Bug Summary

File:home/bhubbard/working/src/ceph/build/src/pybind/rbd2/rbd.c
Warning:line 54232, column 135
Value stored to '__pyx_lineno' is never read

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1/* Generated by Cython 0.23.4 */
2
3/* BEGIN: Cython Metadata
4{
5 "distutils": {
6 "depends": [
7 "/usr/include/python2.7/Python.h",
8 "/usr/include/python2.7/pythread.h"
9 ],
10 "extra_compile_args": [
11 "-fno-strict-aliasing",
12 "-DNDEBUG",
13 "-g",
14 "-fwrapv",
15 "-O2",
16 "-Wall",
17 "-Wstrict-prototypes",
18 "-Wdate-time",
19 "-D_FORTIFY_SOURCE=2",
20 "-g",
21 "-fstack-protector-strong",
22 "-Wformat",
23 "-Werror=format-security"
24 ],
25 "extra_link_args": [
26 "-Wl,-Bsymbolic-functions",
27 "-Wl,-z,relro",
28 "-Xlinker",
29 "-export-dynamic",
30 "-Wl,-O1",
31 "-Wl,-Bsymbolic-functions"
32 ],
33 "include_dirs": [
34 "/usr/include/python2.7"
35 ],
36 "libraries": [
37 "rbd",
38 "rados",
39 "pthread",
40 "dl",
41 "util",
42 "m"
43 ],
44 "library_dirs": [
45 "/usr/lib",
46 "/usr/lib/python2.7/config-x86_64-linux-gnu"
47 ]
48 }
49}
50END: Cython Metadata */
51
52#define PY_SSIZE_T_CLEAN
53#include "Python.h"
54#ifndef Py_PYTHON_H
55 #error Python headers needed to compile C extensions, please install development version of Python.
56#elif PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x02060000 || (0x03000000 <= PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
&& PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03020000)
57 #error Cython requires Python 2.6+ or Python 3.2+.
58#else
59#define CYTHON_ABI"0_23_4" "0_23_4"
60#include <stddef.h>
61#ifndef offsetof
62#define offsetof(type, member)__builtin_offsetof(type, member) ( (size_t) & ((type*)0) -> member )
63#endif
64#if !defined(WIN32) && !defined(MS_WINDOWS)
65 #ifndef __stdcall
66 #define __stdcall
67 #endif
68 #ifndef __cdecl
69 #define __cdecl
70 #endif
71 #ifndef __fastcall
72 #define __fastcall
73 #endif
74#endif
75#ifndef DL_IMPORT
76 #define DL_IMPORT(t)t t
77#endif
78#ifndef DL_EXPORT
79 #define DL_EXPORT(t)t t
80#endif
81#ifndef PY_LONG_LONGlong long
82 #define PY_LONG_LONGlong long LONG_LONG
83#endif
84#ifndef Py_HUGE_VAL(__builtin_huge_val())
85 #define Py_HUGE_VAL(__builtin_huge_val()) HUGE_VAL(__builtin_huge_val())
86#endif
87#ifdef PYPY_VERSION
88#define CYTHON_COMPILING_IN_PYPY0 1
89#define CYTHON_COMPILING_IN_CPYTHON1 0
90#else
91#define CYTHON_COMPILING_IN_PYPY0 0
92#define CYTHON_COMPILING_IN_CPYTHON1 1
93#endif
94#if !defined(CYTHON_USE_PYLONG_INTERNALS1) && CYTHON_COMPILING_IN_CPYTHON1 && PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x02070000
95#define CYTHON_USE_PYLONG_INTERNALS1 1
96#endif
97#if CYTHON_COMPILING_IN_PYPY0 && PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x02070600 && !defined(Py_OptimizeFlag)
98#define Py_OptimizeFlag 0
99#endif
100#define __PYX_BUILD_PY_SSIZE_T"n" "n"
101#define CYTHON_FORMAT_SSIZE_T"z" "z"
102#if PY_MAJOR_VERSION2 < 3
103 #define __Pyx_BUILTIN_MODULE_NAME"__builtin__" "__builtin__"
104 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline
, lnos)
\
105 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
106 #define __Pyx_DefaultClassTypePyClass_Type PyClass_Type
107#else
108 #define __Pyx_BUILTIN_MODULE_NAME"__builtin__" "builtins"
109 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline
, lnos)
\
110 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
111 #define __Pyx_DefaultClassTypePyClass_Type PyType_Type
112#endif
113#ifndef Py_TPFLAGS_CHECKTYPES(1L<<4)
114 #define Py_TPFLAGS_CHECKTYPES(1L<<4) 0
115#endif
116#ifndef Py_TPFLAGS_HAVE_INDEX(1L<<17)
117 #define Py_TPFLAGS_HAVE_INDEX(1L<<17) 0
118#endif
119#ifndef Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)
120 #define Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21) 0
121#endif
122#ifndef Py_TPFLAGS_HAVE_FINALIZE0
123 #define Py_TPFLAGS_HAVE_FINALIZE0 0
124#endif
125#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
> 0x03030000 && defined(PyUnicode_KIND)
126 #define CYTHON_PEP393_ENABLED0 1
127 #define __Pyx_PyUnicode_READY(op)(0) (likely(PyUnicode_IS_READY(op))__builtin_expect(!!(PyUnicode_IS_READY(op)), 1) ?\
128 0 : _PyUnicode_Ready((PyObject *)(op)))
129 #define __Pyx_PyUnicode_GET_LENGTH(u)(((PyUnicodeObject *)(u))->length) PyUnicode_GET_LENGTH(u)
130 #define __Pyx_PyUnicode_READ_CHAR(u, i)((Py_UCS4)((((PyUnicodeObject *)(u))->str)[i])) PyUnicode_READ_CHAR(u, i)
131 #define __Pyx_PyUnicode_KIND(u)(sizeof(Py_UNICODE)) PyUnicode_KIND(u)
132 #define __Pyx_PyUnicode_DATA(u)((void*)(((PyUnicodeObject *)(u))->str)) PyUnicode_DATA(u)
133 #define __Pyx_PyUnicode_READ(k, d, i)((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) PyUnicode_READ(k, d, i)
134#else
135 #define CYTHON_PEP393_ENABLED0 0
136 #define __Pyx_PyUnicode_READY(op)(0) (0)
137 #define __Pyx_PyUnicode_GET_LENGTH(u)(((PyUnicodeObject *)(u))->length) PyUnicode_GET_SIZE(u)(((PyUnicodeObject *)(u))->length)
138 #define __Pyx_PyUnicode_READ_CHAR(u, i)((Py_UCS4)((((PyUnicodeObject *)(u))->str)[i])) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)(((PyUnicodeObject *)(u))->str)[i]))
139 #define __Pyx_PyUnicode_KIND(u)(sizeof(Py_UNICODE)) (sizeof(Py_UNICODE))
140 #define __Pyx_PyUnicode_DATA(u)((void*)(((PyUnicodeObject *)(u))->str)) ((void*)PyUnicode_AS_UNICODE(u)(((PyUnicodeObject *)(u))->str))
141 #define __Pyx_PyUnicode_READ(k, d, i)((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
142#endif
143#if CYTHON_COMPILING_IN_PYPY0
144 #define __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b) PyNumber_Add(a, b)
145 #define __Pyx_PyUnicode_ConcatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0) || __builtin_expect
(!!((b) == (&_Py_NoneStruct)), 0)) ? PyNumber_Add(a, b) :
PyUnicodeUCS4_Concat(a, b))
PyNumber_Add(a, b)
146#else
147 #define __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b) PyUnicode_ConcatPyUnicodeUCS4_Concat(a, b)
148 #define __Pyx_PyUnicode_ConcatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0) || __builtin_expect
(!!((b) == (&_Py_NoneStruct)), 0)) ? PyNumber_Add(a, b) :
PyUnicodeUCS4_Concat(a, b))
((unlikely((a) == Py_None)__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0) || unlikely((b) == Py_None)__builtin_expect(!!((b) == (&_Py_NoneStruct)), 0)) ?\
149 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)PyUnicodeUCS4_Concat(a, b))
150#endif
151#if CYTHON_COMPILING_IN_PYPY0 && !defined(PyUnicode_ContainsPyUnicodeUCS4_Contains)
152 #define PyUnicode_ContainsPyUnicodeUCS4_Contains(u, s) PySequence_Contains(u, s)
153#endif
154#define __Pyx_PyString_FormatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder
(a, b) : PyString_Format(a, b))
((unlikely((a) == Py_None)__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)PyString_Format(a, b))
155#define __Pyx_PyUnicode_FormatSafe(a, b)((__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder
(a, b) : PyUnicodeUCS4_Format(a, b))
((unlikely((a) == Py_None)__builtin_expect(!!((a) == (&_Py_NoneStruct)), 0)) ? PyNumber_Remainder(a, b) : PyUnicode_FormatPyUnicodeUCS4_Format(a, b))
156#if PY_MAJOR_VERSION2 >= 3
157 #define __Pyx_PyString_Format(a, b)PyString_Format(a, b) PyUnicode_FormatPyUnicodeUCS4_Format(a, b)
158#else
159 #define __Pyx_PyString_Format(a, b)PyString_Format(a, b) PyString_Format(a, b)
160#endif
161#if PY_MAJOR_VERSION2 >= 3
162 #define PyBaseString_Type PyUnicode_Type
163 #define PyStringObject PyUnicodeObject
164 #define PyString_Type PyUnicode_Type
165 #define PyString_Check PyUnicode_Check
166 #define PyString_CheckExact PyUnicode_CheckExact
167#endif
168#if PY_MAJOR_VERSION2 >= 3
169 #define __Pyx_PyBaseString_Check(obj)(((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L
<<27))) != 0) || ((((((PyObject*)(obj))->ob_type))->
tp_flags & ((1L<<28))) != 0))
PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<
28))) != 0)
170 #define __Pyx_PyBaseString_CheckExact(obj)(((((PyObject*)(obj))->ob_type) == &PyString_Type) || (
(((PyObject*)(obj))->ob_type) == &PyUnicode_Type))
PyUnicode_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PyUnicode_Type)
171#else
172 #define __Pyx_PyBaseString_Check(obj)(((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L
<<27))) != 0) || ((((((PyObject*)(obj))->ob_type))->
tp_flags & ((1L<<28))) != 0))
(PyString_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<
27))) != 0)
|| PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<
28))) != 0)
)
173 #define __Pyx_PyBaseString_CheckExact(obj)(((((PyObject*)(obj))->ob_type) == &PyString_Type) || (
(((PyObject*)(obj))->ob_type) == &PyUnicode_Type))
(PyString_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PyString_Type) || PyUnicode_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PyUnicode_Type))
174#endif
175#ifndef PySet_CheckExact
176 #define PySet_CheckExact(obj)((((PyObject*)(obj))->ob_type) == &PySet_Type) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type) == &PySet_Type)
177#endif
178#define __Pyx_TypeCheck(obj, type)((((PyObject*)(obj))->ob_type) == ((PyTypeObject *)type) ||
PyType_IsSubtype((((PyObject*)(obj))->ob_type), ((PyTypeObject
*)type)))
PyObject_TypeCheck(obj, (PyTypeObject *)type)((((PyObject*)(obj))->ob_type) == ((PyTypeObject *)type) ||
PyType_IsSubtype((((PyObject*)(obj))->ob_type), ((PyTypeObject
*)type)))
179#if PY_MAJOR_VERSION2 >= 3
180 #define PyIntObject PyLongObject
181 #define PyInt_Type PyLong_Type
182 #define PyInt_Check(op)((((op)->ob_type)->tp_flags & ((1L<<23))) != 0
)
PyLong_Check(op)((((((PyObject*)(op))->ob_type))->tp_flags & ((1L<<
24))) != 0)
183 #define PyInt_CheckExact(op)((op)->ob_type == &PyInt_Type) PyLong_CheckExact(op)((((PyObject*)(op))->ob_type) == &PyLong_Type)
184 #define PyInt_FromString PyLong_FromString
185 #define PyInt_FromUnicode PyLong_FromUnicode
186 #define PyInt_FromLong PyLong_FromLong
187 #define PyInt_FromSize_t PyLong_FromSize_t
188 #define PyInt_FromSsize_t PyLong_FromSsize_t
189 #define PyInt_AsLong PyLong_AsLong
190 #define PyInt_AS_LONG PyLong_AS_LONG
191 #define PyInt_AsSsize_t PyLong_AsSsize_t
192 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
193 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
194 #define PyNumber_Int PyNumber_Long
195#endif
196#if PY_MAJOR_VERSION2 >= 3
197 #define PyBoolObject PyLongObject
198#endif
199#if PY_MAJOR_VERSION2 >= 3 && CYTHON_COMPILING_IN_PYPY0
200 #ifndef PyUnicode_InternFromString
201 #define PyUnicode_InternFromString(s) PyUnicode_FromStringPyUnicodeUCS4_FromString(s)
202 #endif
203#endif
204#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030200A4
205 typedef long Py_hash_t;
206 #define __Pyx_PyInt_FromHash_tPyInt_FromLong PyInt_FromLong
207 #define __Pyx_PyInt_AsHash_tPyInt_AsLong PyInt_AsLong
208#else
209 #define __Pyx_PyInt_FromHash_tPyInt_FromLong PyInt_FromSsize_t
210 #define __Pyx_PyInt_AsHash_tPyInt_AsLong PyInt_AsSsize_t
211#endif
212#if PY_MAJOR_VERSION2 >= 3
213 #define __Pyx_PyMethod_New(func, self, klass)PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
214#else
215 #define __Pyx_PyMethod_New(func, self, klass)PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
216#endif
217#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030500B1
218#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
219#define __Pyx_PyType_AsAsync(obj)((void*)0) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_as_async)
220#elif CYTHON_COMPILING_IN_CPYTHON1 && PY_MAJOR_VERSION2 >= 3
221typedef struct {
222 unaryfunc am_await;
223 unaryfunc am_aiter;
224 unaryfunc am_anext;
225} __Pyx_PyAsyncMethodsStruct;
226#define __Pyx_PyType_AsAsync(obj)((void*)0) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_reserved))
227#else
228#define __Pyx_PyType_AsAsync(obj)((void*)0) NULL((void*)0)
229#endif
230#ifndef CYTHON_RESTRICT__restrict__
231 #if defined(__GNUC__4)
232 #define CYTHON_RESTRICT__restrict__ __restrict__
233 #elif defined(_MSC_VER) && _MSC_VER >= 1400
234 #define CYTHON_RESTRICT__restrict__ __restrict
235 #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L
236 #define CYTHON_RESTRICT__restrict__ restrict
237 #else
238 #define CYTHON_RESTRICT__restrict__
239 #endif
240#endif
241#define __Pyx_void_to_None(void_result)((void)(void_result), ( ((PyObject*)((&_Py_NoneStruct)))->
ob_refcnt++), (&_Py_NoneStruct))
((void)(void_result), Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), Py_None(&_Py_NoneStruct))
242
243#ifndef CYTHON_INLINE__inline__
244 #if defined(__GNUC__4)
245 #define CYTHON_INLINE__inline__ __inline__
246 #elif defined(_MSC_VER)
247 #define CYTHON_INLINE__inline__ __inline
248 #elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L
249 #define CYTHON_INLINE__inline__ inline
250 #else
251 #define CYTHON_INLINE__inline__
252 #endif
253#endif
254
255#if defined(WIN32) || defined(MS_WINDOWS)
256 #define _USE_MATH_DEFINES
257#endif
258#include <math.h>
259#ifdef NAN(__builtin_nanf (""))
260#define __PYX_NAN()((float) (__builtin_nanf (""))) ((float) NAN(__builtin_nanf ("")))
261#else
262static CYTHON_INLINE__inline__ float __PYX_NAN()((float) (__builtin_nanf (""))) {
263 float value;
264 memset(&value, 0xFF, sizeof(value));
265 return value;
266}
267#endif
268
269
270#if PY_MAJOR_VERSION2 >= 3
271 #define __Pyx_PyNumber_Divide(x,y)PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
272 #define __Pyx_PyNumber_InPlaceDivide(x,y)PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
273#else
274 #define __Pyx_PyNumber_Divide(x,y)PyNumber_Divide(x,y) PyNumber_Divide(x,y)
275 #define __Pyx_PyNumber_InPlaceDivide(x,y)PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
276#endif
277
278#ifndef __PYX_EXTERN_Cextern
279 #ifdef __cplusplus
280 #define __PYX_EXTERN_Cextern extern "C"
281 #else
282 #define __PYX_EXTERN_Cextern extern
283 #endif
284#endif
285
286#define __PYX_HAVE__rbd
287#define __PYX_HAVE_API__rbd
288#include "string.h"
289#include "stdio.h"
290#include "pythread.h"
291#include "errno.h"
292#include "stdint.h"
293#include "stdlib.h"
294#include "rados/librados.h"
295#include "time.h"
296#include <errno(*__errno_location ()).h>
297#include "rbd/librbd.h"
298#ifdef _OPENMP
299#include <omp.h>
300#endif /* _OPENMP */
301
302#ifdef PYREX_WITHOUT_ASSERTIONS
303#define CYTHON_WITHOUT_ASSERTIONS
304#endif
305
306#ifndef CYTHON_UNUSED__attribute__ ((__unused__))
307# if defined(__GNUC__4)
308# if !(defined(__cplusplus)) || (__GNUC__4 > 3 || (__GNUC__4 == 3 && __GNUC_MINOR__2 >= 4))
309# define CYTHON_UNUSED__attribute__ ((__unused__)) __attribute__ ((__unused__))
310# else
311# define CYTHON_UNUSED__attribute__ ((__unused__))
312# endif
313# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
314# define CYTHON_UNUSED__attribute__ ((__unused__)) __attribute__ ((__unused__))
315# else
316# define CYTHON_UNUSED__attribute__ ((__unused__))
317# endif
318#endif
319#ifndef CYTHON_NCP_UNUSED
320# if CYTHON_COMPILING_IN_CPYTHON1
321# define CYTHON_NCP_UNUSED
322# else
323# define CYTHON_NCP_UNUSED CYTHON_UNUSED__attribute__ ((__unused__))
324# endif
325#endif
326typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
327 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
328
329#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 0
330#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 0
331#define __PYX_DEFAULT_STRING_ENCODING"" ""
332#define __Pyx_PyObject_FromStringPyString_FromString __Pyx_PyBytes_FromStringPyString_FromString
333#define __Pyx_PyObject_FromStringAndSizePyString_FromStringAndSize __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize
334#define __Pyx_uchar_cast(c)((unsigned char)c) ((unsigned char)c)
335#define __Pyx_long_cast(x)((long)x) ((long)x)
336#define __Pyx_fits_Py_ssize_t(v, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(v < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || v == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(v > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
v == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
(\
337 (sizeof(type) < sizeof(Py_ssize_t)) ||\
338 (sizeof(type) > sizeof(Py_ssize_t) &&\
339 likely(v < (type)PY_SSIZE_T_MAX ||\__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
340 v == (type)PY_SSIZE_T_MAX)__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
&&\
341 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\__builtin_expect(!!(v > (type)(-((Py_ssize_t)(((size_t)-1)
>>1))-1) || v == (type)(-((Py_ssize_t)(((size_t)-1)>>
1))-1)), 1)
342 v == (type)PY_SSIZE_T_MIN)__builtin_expect(!!(v > (type)(-((Py_ssize_t)(((size_t)-1)
>>1))-1) || v == (type)(-((Py_ssize_t)(((size_t)-1)>>
1))-1)), 1)
)) ||\
343 (sizeof(type) == sizeof(Py_ssize_t) &&\
344 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
345 v == (type)PY_SSIZE_T_MAX)__builtin_expect(!!(v < (type)((Py_ssize_t)(((size_t)-1)>>
1)) || v == (type)((Py_ssize_t)(((size_t)-1)>>1))), 1)
)) )
346#if defined (__cplusplus) && __cplusplus >= 201103L
347 #include <cstdlib>
348 #define __Pyx_sst_abs(value)labs(value) std::abs(value)
349#elif SIZEOF_INT4 >= SIZEOF_SIZE_T8
350 #define __Pyx_sst_abs(value)labs(value) abs(value)
351#elif SIZEOF_LONG8 >= SIZEOF_SIZE_T8
352 #define __Pyx_sst_abs(value)labs(value) labs(value)
353#elif defined (_MSC_VER) && defined (_M_X64)
354 #define __Pyx_sst_abs(value)labs(value) _abs64(value)
355#elif defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L
356 #define __Pyx_sst_abs(value)labs(value) llabs(value)
357#elif defined (__GNUC__4)
358 #define __Pyx_sst_abs(value)labs(value) __builtin_llabs(value)
359#else
360 #define __Pyx_sst_abs(value)labs(value) ((value<0) ? -value : value)
361#endif
362static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsString(PyObject*);
363static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
364#define __Pyx_PyByteArray_FromString(s)PyByteArray_FromStringAndSize((const char*)s, strlen((const char
*)s))
PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
365#define __Pyx_PyByteArray_FromStringAndSize(s, l)PyByteArray_FromStringAndSize((const char*)s, l) PyByteArray_FromStringAndSize((const char*)s, l)
366#define __Pyx_PyBytes_FromStringPyString_FromString PyBytes_FromStringPyString_FromString
367#define __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize PyBytes_FromStringAndSizePyString_FromStringAndSize
368static CYTHON_INLINE__inline__ PyObject* __Pyx_PyUnicode_FromString(const char*);
369#if PY_MAJOR_VERSION2 < 3
370 #define __Pyx_PyStr_FromStringPyString_FromString __Pyx_PyBytes_FromStringPyString_FromString
371 #define __Pyx_PyStr_FromStringAndSizePyString_FromStringAndSize __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize
372#else
373 #define __Pyx_PyStr_FromStringPyString_FromString __Pyx_PyUnicode_FromString
374 #define __Pyx_PyStr_FromStringAndSizePyString_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
375#endif
376#define __Pyx_PyObject_AsSString(s)((signed char*) __Pyx_PyObject_AsString(s)) ((signed char*) __Pyx_PyObject_AsString(s))
377#define __Pyx_PyObject_AsUString(s)((unsigned char*) __Pyx_PyObject_AsString(s)) ((unsigned char*) __Pyx_PyObject_AsString(s))
378#define __Pyx_PyObject_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyObject_FromStringPyString_FromString((const char*)s)
379#define __Pyx_PyBytes_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyBytes_FromStringPyString_FromString((const char*)s)
380#define __Pyx_PyByteArray_FromCString(s)PyByteArray_FromStringAndSize((const char*)(const char*)s, strlen
((const char*)(const char*)s))
__Pyx_PyByteArray_FromString((const char*)s)PyByteArray_FromStringAndSize((const char*)(const char*)s, strlen
((const char*)(const char*)s))
381#define __Pyx_PyStr_FromCString(s)PyString_FromString((const char*)s) __Pyx_PyStr_FromStringPyString_FromString((const char*)s)
382#define __Pyx_PyUnicode_FromCString(s)__Pyx_PyUnicode_FromString((const char*)s) __Pyx_PyUnicode_FromString((const char*)s)
383#if PY_MAJOR_VERSION2 < 3
384static CYTHON_INLINE__inline__ size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
385{
386 const Py_UNICODE *u_end = u;
387 while (*u_end++) ;
388 return (size_t)(u_end - u - 1);
389}
390#else
391#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
392#endif
393#define __Pyx_PyUnicode_FromUnicode(u)PyUnicodeUCS4_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
394#define __Pyx_PyUnicode_FromUnicodeAndLengthPyUnicodeUCS4_FromUnicode PyUnicode_FromUnicodePyUnicodeUCS4_FromUnicode
395#define __Pyx_PyUnicode_AsUnicodePyUnicodeUCS4_AsUnicode PyUnicode_AsUnicodePyUnicodeUCS4_AsUnicode
396#define __Pyx_NewRef(obj)(( ((PyObject*)(obj))->ob_refcnt++), obj) (Py_INCREF(obj)( ((PyObject*)(obj))->ob_refcnt++), obj)
397#define __Pyx_Owned_Py_None(b)(( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&
_Py_NoneStruct))
__Pyx_NewRef(Py_None)(( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&
_Py_NoneStruct))
398#define __Pyx_PyBool_FromLong(b)((b) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->
ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (( ((PyObject
*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt++), ((PyObject
*) &_Py_ZeroStruct)))
((b) ? __Pyx_NewRef(Py_True)(( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->ob_refcnt
++), ((PyObject *) &_Py_TrueStruct))
: __Pyx_NewRef(Py_False)(( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct))
)
399static CYTHON_INLINE__inline__ int __Pyx_PyObject_IsTrue(PyObject*);
400static CYTHON_INLINE__inline__ PyObject* __Pyx_PyNumber_Int(PyObject* x);
401static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
402static CYTHON_INLINE__inline__ PyObject * __Pyx_PyInt_FromSize_t(size_t);
403#if CYTHON_COMPILING_IN_CPYTHON1
404#define __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject
*)(x))->ob_fval) : PyFloat_AsDouble(x))
(PyFloat_CheckExact(x)((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? PyFloat_AS_DOUBLE(x)(((PyFloatObject *)(x))->ob_fval) : PyFloat_AsDouble(x))
405#else
406#define __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject
*)(x))->ob_fval) : PyFloat_AsDouble(x))
PyFloat_AsDouble(x)
407#endif
408#define __pyx_PyFloat_AsFloat(x)((float) (((((PyObject*)(x))->ob_type) == &PyFloat_Type
) ? (((PyFloatObject *)(x))->ob_fval) : PyFloat_AsDouble(x
)))
((float) __pyx_PyFloat_AsDouble(x)(((((PyObject*)(x))->ob_type) == &PyFloat_Type) ? (((PyFloatObject
*)(x))->ob_fval) : PyFloat_AsDouble(x))
)
409#if PY_MAJOR_VERSION2 < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
410static int __Pyx_sys_getdefaultencoding_not_ascii;
411static int __Pyx_init_sys_getdefaultencoding_params(void) {
412 PyObject* sys;
413 PyObject* default_encoding = NULL((void*)0);
414 PyObject* ascii_chars_u = NULL((void*)0);
415 PyObject* ascii_chars_b = NULL((void*)0);
416 const char* default_encoding_c;
417 sys = PyImport_ImportModule("sys");
418 if (!sys) goto bad;
419 default_encoding = PyObject_CallMethod_PyObject_CallMethod_SizeT(sys, (char*) "getdefaultencoding", NULL((void*)0));
420 Py_DECREF(sys)do { if ( --((PyObject*)(sys))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(sys)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(sys)))); } while (0)
;
421 if (!default_encoding) goto bad;
422 default_encoding_c = PyBytes_AsStringPyString_AsString(default_encoding);
423 if (!default_encoding_c) goto bad;
424 if (strcmp(default_encoding_c, "ascii")__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p
(default_encoding_c) && __builtin_constant_p ("ascii"
) && (__s1_len = __builtin_strlen (default_encoding_c
), __s2_len = __builtin_strlen ("ascii"), (!((size_t)(const void
*)((default_encoding_c) + 1) - (size_t)(const void *)(default_encoding_c
) == 1) || __s1_len >= 4) && (!((size_t)(const void
*)(("ascii") + 1) - (size_t)(const void *)("ascii") == 1) ||
__s2_len >= 4)) ? __builtin_strcmp (default_encoding_c, "ascii"
) : (__builtin_constant_p (default_encoding_c) && ((size_t
)(const void *)((default_encoding_c) + 1) - (size_t)(const void
*)(default_encoding_c) == 1) && (__s1_len = __builtin_strlen
(default_encoding_c), __s1_len < 4) ? (__builtin_constant_p
("ascii") && ((size_t)(const void *)(("ascii") + 1) -
(size_t)(const void *)("ascii") == 1) ? __builtin_strcmp (default_encoding_c
, "ascii") : (__extension__ ({ const unsigned char *__s2 = (const
unsigned char *) (const char *) ("ascii"); int __result = ((
(const unsigned char *) (const char *) (default_encoding_c))[
0] - __s2[0]); if (__s1_len > 0 && __result == 0) {
__result = (((const unsigned char *) (const char *) (default_encoding_c
))[1] - __s2[1]); if (__s1_len > 1 && __result == 0
) { __result = (((const unsigned char *) (const char *) (default_encoding_c
))[2] - __s2[2]); if (__s1_len > 2 && __result == 0
) __result = (((const unsigned char *) (const char *) (default_encoding_c
))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
"ascii") && ((size_t)(const void *)(("ascii") + 1) - (
size_t)(const void *)("ascii") == 1) && (__s2_len = __builtin_strlen
("ascii"), __s2_len < 4) ? (__builtin_constant_p (default_encoding_c
) && ((size_t)(const void *)((default_encoding_c) + 1
) - (size_t)(const void *)(default_encoding_c) == 1) ? __builtin_strcmp
(default_encoding_c, "ascii") : (- (__extension__ ({ const unsigned
char *__s2 = (const unsigned char *) (const char *) (default_encoding_c
); int __result = (((const unsigned char *) (const char *) ("ascii"
))[0] - __s2[0]); if (__s2_len > 0 && __result == 0
) { __result = (((const unsigned char *) (const char *) ("ascii"
))[1] - __s2[1]); if (__s2_len > 1 && __result == 0
) { __result = (((const unsigned char *) (const char *) ("ascii"
))[2] - __s2[2]); if (__s2_len > 2 && __result == 0
) __result = (((const unsigned char *) (const char *) ("ascii"
))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (default_encoding_c
, "ascii")))); })
== 0) {
425 __Pyx_sys_getdefaultencoding_not_ascii = 0;
426 } else {
427 char ascii_chars[128];
428 int c;
429 for (c = 0; c < 128; c++) {
430 ascii_chars[c] = c;
431 }
432 __Pyx_sys_getdefaultencoding_not_ascii = 1;
433 ascii_chars_u = PyUnicode_DecodeASCIIPyUnicodeUCS4_DecodeASCII(ascii_chars, 128, NULL((void*)0));
434 if (!ascii_chars_u) goto bad;
435 ascii_chars_b = PyUnicode_AsEncodedStringPyUnicodeUCS4_AsEncodedString(ascii_chars_u, default_encoding_c, NULL((void*)0));
436 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b)((((((PyObject*)(ascii_chars_b))->ob_type))->tp_flags &
((1L<<27))) != 0)
|| memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b)(((PyStringObject *)(ascii_chars_b))->ob_sval), 128) != 0) {
437 PyErr_Format(
438 PyExc_ValueError,
439 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
440 default_encoding_c);
441 goto bad;
442 }
443 Py_DECREF(ascii_chars_u)do { if ( --((PyObject*)(ascii_chars_u))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(ascii_chars_u)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(ascii_chars_u))))
; } while (0)
;
444 Py_DECREF(ascii_chars_b)do { if ( --((PyObject*)(ascii_chars_b))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(ascii_chars_b)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(ascii_chars_b))))
; } while (0)
;
445 }
446 Py_DECREF(default_encoding)do { if ( --((PyObject*)(default_encoding))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(default_encoding)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(default_encoding
)))); } while (0)
;
447 return 0;
448bad:
449 Py_XDECREF(default_encoding)do { if ((default_encoding) == ((void*)0)) ; else do { if ( --
((PyObject*)(default_encoding))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(default_encoding)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(default_encoding)))); }
while (0); } while (0)
;
450 Py_XDECREF(ascii_chars_u)do { if ((ascii_chars_u) == ((void*)0)) ; else do { if ( --((
PyObject*)(ascii_chars_u))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(ascii_chars_u)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(ascii_chars_u)))); } while (0); }
while (0)
;
451 Py_XDECREF(ascii_chars_b)do { if ((ascii_chars_b) == ((void*)0)) ; else do { if ( --((
PyObject*)(ascii_chars_b))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(ascii_chars_b)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(ascii_chars_b)))); } while (0); }
while (0)
;
452 return -1;
453}
454#endif
455#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0 && PY_MAJOR_VERSION2 >= 3
456#define __Pyx_PyUnicode_FromStringAndSize(c_str, size)PyUnicodeUCS4_Decode(c_str, size, "", ((void*)0)) PyUnicode_DecodeUTF8PyUnicodeUCS4_DecodeUTF8(c_str, size, NULL((void*)0))
457#else
458#define __Pyx_PyUnicode_FromStringAndSize(c_str, size)PyUnicodeUCS4_Decode(c_str, size, "", ((void*)0)) PyUnicode_DecodePyUnicodeUCS4_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING"", NULL((void*)0))
459#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0
460static char* __PYX_DEFAULT_STRING_ENCODING"";
461static int __Pyx_init_sys_getdefaultencoding_params(void) {
462 PyObject* sys;
463 PyObject* default_encoding = NULL((void*)0);
464 char* default_encoding_c;
465 sys = PyImport_ImportModule("sys");
466 if (!sys) goto bad;
467 default_encoding = PyObject_CallMethod_PyObject_CallMethod_SizeT(sys, (char*) (const char*) "getdefaultencoding", NULL((void*)0));
468 Py_DECREF(sys)do { if ( --((PyObject*)(sys))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(sys)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(sys)))); } while (0)
;
469 if (!default_encoding) goto bad;
470 default_encoding_c = PyBytes_AsStringPyString_AsString(default_encoding);
471 if (!default_encoding_c) goto bad;
472 __PYX_DEFAULT_STRING_ENCODING"" = (char*) malloc(strlen(default_encoding_c));
473 if (!__PYX_DEFAULT_STRING_ENCODING"") goto bad;
474 strcpy(__PYX_DEFAULT_STRING_ENCODING"", default_encoding_c);
475 Py_DECREF(default_encoding)do { if ( --((PyObject*)(default_encoding))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(default_encoding)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(default_encoding
)))); } while (0)
;
476 return 0;
477bad:
478 Py_XDECREF(default_encoding)do { if ((default_encoding) == ((void*)0)) ; else do { if ( --
((PyObject*)(default_encoding))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(default_encoding)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(default_encoding)))); }
while (0); } while (0)
;
479 return -1;
480}
481#endif
482#endif
483
484
485/* Test for GCC > 2.95 */
486#if defined(__GNUC__4) && (__GNUC__4 > 2 || (__GNUC__4 == 2 && (__GNUC_MINOR__2 > 95)))
487 #define likely(x)__builtin_expect(!!(x), 1) __builtin_expect(!!(x), 1)
488 #define unlikely(x)__builtin_expect(!!(x), 0) __builtin_expect(!!(x), 0)
489#else /* !__GNUC__ or GCC < 2.95 */
490 #define likely(x)__builtin_expect(!!(x), 1) (x)
491 #define unlikely(x)__builtin_expect(!!(x), 0) (x)
492#endif /* __GNUC__ */
493
494static PyObject *__pyx_m;
495static PyObject *__pyx_d;
496static PyObject *__pyx_b;
497static PyObject *__pyx_empty_tuple;
498static PyObject *__pyx_empty_bytes;
499static int __pyx_lineno;
500static int __pyx_clineno = 0;
501static const char * __pyx_cfilenm= __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rbd2/rbd.c";
502static const char *__pyx_filename;
503
504
505static const char *__pyx_f[] = {
506 "rbd.pyx",
507 "type.pxd",
508 "bool.pxd",
509 "complex.pxd",
510 "rados.pxd",
511};
512
513/*--- Type declarations ---*/
514struct __pyx_obj_5rados_Rados;
515struct __pyx_obj_5rados_Ioctx;
516struct __pyx_obj_3rbd_Completion;
517struct __pyx_obj_3rbd_MirrorPeerIterator;
518struct __pyx_obj_3rbd_MirrorImageStatusIterator;
519struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator;
520struct __pyx_obj_3rbd_PoolMetadataIterator;
521struct __pyx_obj_3rbd_ConfigPoolIterator;
522struct __pyx_obj_3rbd_Group;
523struct __pyx_obj_3rbd_Image;
524struct __pyx_obj_3rbd_ImageIterator;
525struct __pyx_obj_3rbd_LockOwnerIterator;
526struct __pyx_obj_3rbd_MetadataIterator;
527struct __pyx_obj_3rbd_SnapIterator;
528struct __pyx_obj_3rbd_TrashIterator;
529struct __pyx_obj_3rbd_ChildIterator;
530struct __pyx_obj_3rbd_WatcherIterator;
531struct __pyx_obj_3rbd_ConfigImageIterator;
532struct __pyx_obj_3rbd_GroupImageIterator;
533struct __pyx_obj_3rbd_GroupSnapIterator;
534struct __pyx_obj_3rbd___pyx_scope_struct____iter__;
535struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__;
536struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__;
537struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__;
538struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__;
539struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read;
540struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__;
541struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__;
542struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__;
543struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__;
544struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__;
545struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__;
546struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__;
547struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__;
548struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__;
549struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__;
550struct __pyx_opt_args_3rbd_make_ex;
551
552/* "rbd.pyx":871
553 * }
554 *
555 * cdef make_ex(ret, msg, exception_map=errno_to_exception): # <<<<<<<<<<<<<<
556 * """
557 * Translate a librbd return code into an exception.
558 */
559struct __pyx_opt_args_3rbd_make_ex {
560 int __pyx_n;
561 PyObject *exception_map;
562};
563
564/* "rados.pxd":14
565 *
566 *
567 * cdef class Rados(object): # <<<<<<<<<<<<<<
568 * cdef:
569 * rados_t cluster
570 */
571struct __pyx_obj_5rados_Rados {
572 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
573 rados_t cluster;
574 PyObject *state;
575 PyObject *monitor_callback;
576 PyObject *monitor_callback2;
577 PyObject *parsed_args;
578 PyObject *conf_defaults;
579 PyObject *conffile;
580 PyObject *rados_id;
581};
582
583
584/* "rados.pxd":26
585 *
586 *
587 * cdef class Ioctx(object): # <<<<<<<<<<<<<<
588 * cdef:
589 * rados_ioctx_t io
590 */
591struct __pyx_obj_5rados_Ioctx {
592 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
593 rados_ioctx_t io;
594 PyObject *name;
595 PyObject *state;
596 PyObject *locator_key;
597 PyObject *nspace;
598 PyObject *safe_completions;
599 PyObject *complete_completions;
600 PyObject *lock;
601};
602
603
604/* "rbd.pyx":946
605 * RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY)
606 *
607 * cdef class Completion # <<<<<<<<<<<<<<
608 *
609 * cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil:
610 */
611struct __pyx_obj_3rbd_Completion {
612 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
613 struct __pyx_vtabstruct_3rbd_Completion *__pyx_vtab;
614 PyObject *image;
615 PyObject *oncomplete;
616 rbd_completion_t rbd_comp;
617 PyObject *buf;
618 int persisted;
619 PyObject *exc_info;
620};
621
622
623/* "rbd.pyx":2294
624 *
625 *
626 * cdef class MirrorPeerIterator(object): # <<<<<<<<<<<<<<
627 * """
628 * Iterator over mirror peer info for a pool.
629 */
630struct __pyx_obj_3rbd_MirrorPeerIterator {
631 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
632 rbd_mirror_peer_t *peers;
633 int num_peers;
634};
635
636
637/* "rbd.pyx":2343
638 * free(self.peers)
639 *
640 * cdef class MirrorImageStatusIterator(object): # <<<<<<<<<<<<<<
641 * """
642 * Iterator over mirror image status for a pool.
643 */
644struct __pyx_obj_3rbd_MirrorImageStatusIterator {
645 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
646 rados_ioctx_t ioctx;
647 size_t max_read;
648 char *last_read;
649 char **image_ids;
650 rbd_mirror_image_status_t *images;
651 size_t size;
652};
653
654
655/* "rbd.pyx":2433
656 * self.last_read = strdup("")
657 *
658 * cdef class MirrorImageInstanceIdIterator(object): # <<<<<<<<<<<<<<
659 * """
660 * Iterator over mirror image instance id for a pool.
661 */
662struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator {
663 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
664 rados_ioctx_t ioctx;
665 size_t max_read;
666 char *last_read;
667 char **image_ids;
668 char **instance_ids;
669 size_t size;
670};
671
672
673/* "rbd.pyx":2500
674 * self.last_read = strdup("")
675 *
676 * cdef class PoolMetadataIterator(object): # <<<<<<<<<<<<<<
677 * """
678 * Iterator over pool metadata list.
679 */
680struct __pyx_obj_3rbd_PoolMetadataIterator {
681 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
682 rados_ioctx_t ioctx;
683 char *last_read;
684 uint64_t max_read;
685 PyObject *next_chunk;
686};
687
688
689/* "rbd.pyx":2565
690 * free(c_vals)
691 *
692 * cdef class ConfigPoolIterator(object): # <<<<<<<<<<<<<<
693 * """
694 * Iterator over pool-level overrides for a pool.
695 */
696struct __pyx_obj_3rbd_ConfigPoolIterator {
697 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
698 rbd_config_option_t *options;
699 int num_options;
700};
701
702
703/* "rbd.pyx":2626
704 * return ret
705 *
706 * cdef class Group(object): # <<<<<<<<<<<<<<
707 * """
708 * This class represents an RBD group. It is used to interact with
709 */
710struct __pyx_obj_3rbd_Group {
711 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
712 PyObject *name;
713 char *_name;
714 PyObject *ioctx;
715 rados_ioctx_t _ioctx;
716};
717
718
719/* "rbd.pyx":2790
720 * raise make_ex(ret, 'error rolling back group to snapshot', group_errno_to_exception)
721 *
722 * cdef class Image(object): # <<<<<<<<<<<<<<
723 * """
724 * This class represents an RBD image. It is used to perform I/O on
725 */
726struct __pyx_obj_3rbd_Image {
727 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
728 rbd_image_t image;
729 int closed;
730 PyObject *name;
731 PyObject *ioctx;
732 rados_ioctx_t _ioctx;
733};
734
735
736/* "rbd.pyx":4545
737 *
738 *
739 * cdef class ImageIterator(object): # <<<<<<<<<<<<<<
740 * """
741 * Iterator over RBD images in a pool
742 */
743struct __pyx_obj_3rbd_ImageIterator {
744 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
745 rados_ioctx_t ioctx;
746 rbd_image_spec_t *images;
747 size_t num_images;
748};
749
750
751/* "rbd.pyx":4590
752 *
753 *
754 * cdef class LockOwnerIterator(object): # <<<<<<<<<<<<<<
755 * """
756 * Iterator over managed lock owners for an image
757 */
758struct __pyx_obj_3rbd_LockOwnerIterator {
759 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
760 rbd_lock_mode_t lock_mode;
761 char **lock_owners;
762 size_t num_lock_owners;
763 PyObject *image;
764};
765
766
767/* "rbd.pyx":4638
768 * free(self.lock_owners)
769 *
770 * cdef class MetadataIterator(object): # <<<<<<<<<<<<<<
771 * """
772 * Iterator over metadata list for an image.
773 */
774struct __pyx_obj_3rbd_MetadataIterator {
775 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
776 PyObject *image_name;
777 rbd_image_t image;
778 char *last_read;
779 uint64_t max_read;
780 PyObject *next_chunk;
781};
782
783
784/* "rbd.pyx":4706
785 * free(c_vals)
786 *
787 * cdef class SnapIterator(object): # <<<<<<<<<<<<<<
788 * """
789 * Iterator over snapshot info for an image.
790 */
791struct __pyx_obj_3rbd_SnapIterator {
792 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
793 rbd_snap_info_t *snaps;
794 int num_snaps;
795 PyObject *image;
796};
797
798
799/* "rbd.pyx":4774
800 * free(self.snaps)
801 *
802 * cdef class TrashIterator(object): # <<<<<<<<<<<<<<
803 * """
804 * Iterator over trash entries.
805 */
806struct __pyx_obj_3rbd_TrashIterator {
807 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
808 rados_ioctx_t ioctx;
809 size_t num_entries;
810 rbd_trash_image_info_t *entries;
811};
812
813
814/* "rbd.pyx":4832
815 * free(self.entries)
816 *
817 * cdef class ChildIterator(object): # <<<<<<<<<<<<<<
818 * """
819 * Iterator over child info for the image or its snapshot.
820 */
821struct __pyx_obj_3rbd_ChildIterator {
822 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
823 rbd_linked_image_spec_t *children;
824 size_t num_children;
825 PyObject *image;
826};
827
828
829/* "rbd.pyx":4890
830 * free(self.children)
831 *
832 * cdef class WatcherIterator(object): # <<<<<<<<<<<<<<
833 * """
834 * Iterator over watchers of an image.
835 */
836struct __pyx_obj_3rbd_WatcherIterator {
837 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
838 rbd_image_watcher_t *watchers;
839 size_t num_watchers;
840 PyObject *image;
841};
842
843
844/* "rbd.pyx":4937
845 * free(self.watchers)
846 *
847 * cdef class ConfigImageIterator(object): # <<<<<<<<<<<<<<
848 * """
849 * Iterator over image-level overrides for an image.
850 */
851struct __pyx_obj_3rbd_ConfigImageIterator {
852 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
853 rbd_config_option_t *options;
854 int num_options;
855};
856
857
858/* "rbd.pyx":4985
859 * free(self.options)
860 *
861 * cdef class GroupImageIterator(object): # <<<<<<<<<<<<<<
862 * """
863 * Iterator over image info for a group.
864 */
865struct __pyx_obj_3rbd_GroupImageIterator {
866 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
867 rbd_group_image_info_t *images;
868 size_t num_images;
869 PyObject *group;
870};
871
872
873/* "rbd.pyx":5038
874 * free(self.images)
875 *
876 * cdef class GroupSnapIterator(object): # <<<<<<<<<<<<<<
877 * """
878 * Iterator over snaps specs for a group.
879 */
880struct __pyx_obj_3rbd_GroupSnapIterator {
881 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
882 rbd_group_snap_info_t *snaps;
883 size_t num_snaps;
884 PyObject *group;
885};
886
887
888/* "rbd.pyx":2330
889 * break
890 *
891 * def __iter__(self): # <<<<<<<<<<<<<<
892 * for i in range(self.num_peers):
893 * yield {
894 */
895struct __pyx_obj_3rbd___pyx_scope_struct____iter__ {
896 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
897 int __pyx_v_i;
898 struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self;
899 int __pyx_t_0;
900 int __pyx_t_1;
901};
902
903
904/* "rbd.pyx":2385
905 * self.get_next_chunk()
906 *
907 * def __iter__(self): # <<<<<<<<<<<<<<
908 * while self.size > 0:
909 * for i in range(self.size):
910 */
911struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ {
912 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
913 size_t __pyx_v_i;
914 struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self;
915 size_t __pyx_t_0;
916 size_t __pyx_t_1;
917};
918
919
920/* "rbd.pyx":2459
921 * self.get_next_chunk()
922 *
923 * def __iter__(self): # <<<<<<<<<<<<<<
924 * while self.size > 0:
925 * for i in range(self.size):
926 */
927struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ {
928 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
929 size_t __pyx_v_i;
930 struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self;
931 size_t __pyx_t_0;
932 size_t __pyx_t_1;
933};
934
935
936/* "rbd.pyx":2522
937 * self.get_next_chunk()
938 *
939 * def __iter__(self): # <<<<<<<<<<<<<<
940 * while len(self.next_chunk) > 0:
941 * for pair in self.next_chunk:
942 */
943struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ {
944 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
945 PyObject *__pyx_v_pair;
946 struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self;
947 PyObject *__pyx_t_0;
948 Py_ssize_t __pyx_t_1;
949 PyObject *(*__pyx_t_2)(PyObject *);
950};
951
952
953/* "rbd.pyx":2601
954 * break
955 *
956 * def __iter__(self): # <<<<<<<<<<<<<<
957 * for i in range(self.num_options):
958 * yield {
959 */
960struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ {
961 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
962 int __pyx_v_i;
963 struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self;
964 int __pyx_t_0;
965 int __pyx_t_1;
966};
967
968
969/* "rbd.pyx":4226
970 * free(instance_id)
971 *
972 * def aio_read(self, offset, length, oncomplete, fadvise_flags=0): # <<<<<<<<<<<<<<
973 * """
974 * Asynchronously read data from the image
975 */
976struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read {
977 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
978 PyObject *__pyx_v_length;
979 PyObject *__pyx_v_oncomplete;
980};
981
982
983/* "rbd.pyx":4577
984 * raise make_ex(ret, 'error listing images.')
985 *
986 * def __iter__(self): # <<<<<<<<<<<<<<
987 * for i in range(self.num_images):
988 * yield {
989 */
990struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ {
991 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
992 size_t __pyx_v_i;
993 struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self;
994 size_t __pyx_t_0;
995 size_t __pyx_t_1;
996};
997
998
999/* "rbd.pyx":4626
1000 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name)
1001 *
1002 * def __iter__(self): # <<<<<<<<<<<<<<
1003 * for i in range(self.num_lock_owners):
1004 * yield {
1005 */
1006struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ {
1007 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1008 size_t __pyx_v_i;
1009 struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self;
1010 size_t __pyx_t_0;
1011 size_t __pyx_t_1;
1012};
1013
1014
1015/* "rbd.pyx":4662
1016 * self.get_next_chunk()
1017 *
1018 * def __iter__(self): # <<<<<<<<<<<<<<
1019 * while len(self.next_chunk) > 0:
1020 * for pair in self.next_chunk:
1021 */
1022struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ {
1023 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1024 PyObject *__pyx_v_pair;
1025 struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self;
1026 PyObject *__pyx_t_0;
1027 Py_ssize_t __pyx_t_1;
1028 PyObject *(*__pyx_t_2)(PyObject *);
1029};
1030
1031
1032/* "rbd.pyx":4747
1033 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name)
1034 *
1035 * def __iter__(self): # <<<<<<<<<<<<<<
1036 * for i in range(self.num_snaps):
1037 * s = {
1038 */
1039struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ {
1040 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1041 PyObject *__pyx_v_group;
1042 int __pyx_v_i;
1043 PyObject *__pyx_v_s;
1044 struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self;
1045 PyObject *__pyx_v_trash;
1046 int __pyx_t_0;
1047 int __pyx_t_1;
1048};
1049
1050
1051/* "rbd.pyx":4817
1052 * __source_string = ['USER', 'MIRRORING']
1053 *
1054 * def __iter__(self): # <<<<<<<<<<<<<<
1055 * for i in range(self.num_entries):
1056 * yield {
1057 */
1058struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ {
1059 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1060 size_t __pyx_v_i;
1061 struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self;
1062 size_t __pyx_t_0;
1063 size_t __pyx_t_1;
1064};
1065
1066
1067/* "rbd.pyx":4875
1068 * raise make_ex(ret, 'error listing children.')
1069 *
1070 * def __iter__(self): # <<<<<<<<<<<<<<
1071 * for i in range(self.num_children):
1072 * yield {
1073 */
1074struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ {
1075 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1076 size_t __pyx_v_i;
1077 struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self;
1078 size_t __pyx_t_0;
1079 size_t __pyx_t_1;
1080};
1081
1082
1083/* "rbd.pyx":4924
1084 * raise make_ex(ret, 'error listing watchers.')
1085 *
1086 * def __iter__(self): # <<<<<<<<<<<<<<
1087 * for i in range(self.num_watchers):
1088 * yield {
1089 */
1090struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ {
1091 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1092 size_t __pyx_v_i;
1093 struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self;
1094 size_t __pyx_t_0;
1095 size_t __pyx_t_1;
1096};
1097
1098
1099/* "rbd.pyx":4972
1100 * break
1101 *
1102 * def __iter__(self): # <<<<<<<<<<<<<<
1103 * for i in range(self.num_options):
1104 * yield {
1105 */
1106struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ {
1107 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1108 int __pyx_v_i;
1109 struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self;
1110 int __pyx_t_0;
1111 int __pyx_t_1;
1112};
1113
1114
1115/* "rbd.pyx":5023
1116 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception)
1117 *
1118 * def __iter__(self): # <<<<<<<<<<<<<<
1119 * for i in range(self.num_images):
1120 * yield {
1121 */
1122struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ {
1123 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1124 size_t __pyx_v_i;
1125 struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self;
1126 size_t __pyx_t_0;
1127 size_t __pyx_t_1;
1128};
1129
1130
1131/* "rbd.pyx":5073
1132 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception)
1133 *
1134 * def __iter__(self): # <<<<<<<<<<<<<<
1135 * for i in range(self.num_snaps):
1136 * yield {
1137 */
1138struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ {
1139 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1140 size_t __pyx_v_i;
1141 struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self;
1142 size_t __pyx_t_0;
1143 size_t __pyx_t_1;
1144};
1145
1146
1147
1148/* "rbd.pyx":956
1149 *
1150 *
1151 * cdef class Completion(object): # <<<<<<<<<<<<<<
1152 * """completion object"""
1153 *
1154 */
1155
1156struct __pyx_vtabstruct_3rbd_Completion {
1157 void (*_complete)(struct __pyx_obj_3rbd_Completion *);
1158 PyObject *(*__pyx___persist)(struct __pyx_obj_3rbd_Completion *);
1159 PyObject *(*__pyx___unpersist)(struct __pyx_obj_3rbd_Completion *);
1160};
1161static struct __pyx_vtabstruct_3rbd_Completion *__pyx_vtabptr_3rbd_Completion;
1162
1163/* --- Runtime support code (head) --- */
1164#ifndef CYTHON_REFNANNY0
1165 #define CYTHON_REFNANNY0 0
1166#endif
1167#if CYTHON_REFNANNY0
1168 typedef struct {
1169 void (*INCREF)(void*, PyObject*, int);
1170 void (*DECREF)(void*, PyObject*, int);
1171 void (*GOTREF)(void*, PyObject*, int);
1172 void (*GIVEREF)(void*, PyObject*, int);
1173 void* (*SetupContext)(const char*, int, const char*);
1174 void (*FinishContext)(void**);
1175 } __Pyx_RefNannyAPIStruct;
1176 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL((void*)0);
1177 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1178 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL((void*)0);
1179#ifdef WITH_THREAD1
1180 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1181 if (acquire_gil) {\
1182 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1183 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__1183, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rbd2/rbd.c");\
1184 PyGILState_Release(__pyx_gilstate_save);\
1185 } else {\
1186 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__1186, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rbd2/rbd.c");\
1187 }
1188#else
1189 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1190 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__1190, __FILE__"/home/bhubbard/working/src/ceph/build/src/pybind/rbd2/rbd.c")
1191#endif
1192 #define __Pyx_RefNannyFinishContext()\
1193 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1194 #define __Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__1194)
1195 #define __Pyx_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
__Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__1195)
1196 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__1196)
1197 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__1197)
1198 #define __Pyx_XINCREF(r)do { if ((r) == ((void*)0)) ; else ( ((PyObject*)(r))->ob_refcnt
++); } while (0)
do { if((r) != NULL((void*)0)) {__Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++); }} while(0)
1199 #define __Pyx_XDECREF(r)do { if ((r) == ((void*)0)) ; else do { if ( --((PyObject*)(r
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(r
)))); } while (0); } while (0)
do { if((r) != NULL((void*)0)) {__Pyx_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
; }} while(0)
1200 #define __Pyx_XGOTREF(r) do { if((r) != NULL((void*)0)) {__Pyx_GOTREF(r); }} while(0)
1201 #define __Pyx_XGIVEREF(r) do { if((r) != NULL((void*)0)) {__Pyx_GIVEREF(r);}} while(0)
1202#else
1203 #define __Pyx_RefNannyDeclarations
1204 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1205 #define __Pyx_RefNannyFinishContext()
1206 #define __Pyx_INCREF(r)( ((PyObject*)(r))->ob_refcnt++) Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++)
1207 #define __Pyx_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
Py_DECREF(r)do { if ( --((PyObject*)(r))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(r)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(r)))); } while (0)
1208 #define __Pyx_GOTREF(r)
1209 #define __Pyx_GIVEREF(r)
1210 #define __Pyx_XINCREF(r)do { if ((r) == ((void*)0)) ; else ( ((PyObject*)(r))->ob_refcnt
++); } while (0)
Py_XINCREF(r)do { if ((r) == ((void*)0)) ; else ( ((PyObject*)(r))->ob_refcnt
++); } while (0)
1211 #define __Pyx_XDECREF(r)do { if ((r) == ((void*)0)) ; else do { if ( --((PyObject*)(r
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(r
)))); } while (0); } while (0)
Py_XDECREF(r)do { if ((r) == ((void*)0)) ; else do { if ( --((PyObject*)(r
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(r
)))); } while (0); } while (0)
1212 #define __Pyx_XGOTREF(r)
1213 #define __Pyx_XGIVEREF(r)
1214#endif
1215#define __Pyx_XDECREF_SET(r, v)do { PyObject *tmp = (PyObject *) r; r = v; do { if ((tmp) ==
((void*)0)) ; else do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0); } while (0)
do {\
1216 PyObject *tmp = (PyObject *) r;\
1217 r = v; __Pyx_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;\
1218 } while (0)
1219#define __Pyx_DECREF_SET(r, v)do { PyObject *tmp = (PyObject *) r; r = v; do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
do {\
1220 PyObject *tmp = (PyObject *) r;\
1221 r = v; __Pyx_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;\
1222 } while (0)
1223#define __Pyx_CLEAR(r)do { PyObject* tmp = ((PyObject*)(r)); r = ((void*)0); do { if
( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0);} while(0)
do { PyObject* tmp = ((PyObject*)(r)); r = NULL((void*)0); __Pyx_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;} while(0)
1224#define __Pyx_XCLEAR(r)do { if((r) != ((void*)0)) {PyObject* tmp = ((PyObject*)(r));
r = ((void*)0); do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0);}} while(0)
do { if((r) != NULL((void*)0)) {PyObject* tmp = ((PyObject*)(r)); r = NULL((void*)0); __Pyx_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;}} while(0)
1225
1226#if CYTHON_COMPILING_IN_CPYTHON1
1227static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1228 PyTypeObject* tp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type);
1229 if (likely(tp->tp_getattro)__builtin_expect(!!(tp->tp_getattro), 1))
1230 return tp->tp_getattro(obj, attr_name);
1231#if PY_MAJOR_VERSION2 < 3
1232 if (likely(tp->tp_getattr)__builtin_expect(!!(tp->tp_getattr), 1))
1233 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)(((PyStringObject *)(attr_name))->ob_sval));
1234#endif
1235 return PyObject_GetAttr(obj, attr_name);
1236}
1237#else
1238#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1239#endif
1240
1241static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1242
1243static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1244 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1245
1246static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1247
1248static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1249 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1250 const char* function_name);
1251
1252static CYTHON_INLINE__inline__ PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1253
1254#if CYTHON_COMPILING_IN_CPYTHON1
1255static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1256#else
1257#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1258#endif
1259
1260#if CYTHON_COMPILING_IN_CPYTHON1
1261static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1262#endif
1263
1264static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1265
1266#if CYTHON_COMPILING_IN_CPYTHON1
1267#define __Pyx_PyObject_DelAttrStr(o,n)__Pyx_PyObject_SetAttrStr(o,n,((void*)0)) __Pyx_PyObject_SetAttrStr(o,n,NULL((void*)0))
1268static CYTHON_INLINE__inline__ int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
1269 PyTypeObject* tp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type);
1270 if (likely(tp->tp_setattro)__builtin_expect(!!(tp->tp_setattro), 1))
1271 return tp->tp_setattro(obj, attr_name, value);
1272#if PY_MAJOR_VERSION2 < 3
1273 if (likely(tp->tp_setattr)__builtin_expect(!!(tp->tp_setattr), 1))
1274 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name)(((PyStringObject *)(attr_name))->ob_sval), value);
1275#endif
1276 return PyObject_SetAttr(obj, attr_name, value);
1277}
1278#else
1279#define __Pyx_PyObject_DelAttrStr(o,n)__Pyx_PyObject_SetAttrStr(o,n,((void*)0)) PyObject_DelAttr(o,n)PyObject_SetAttr((o),(n),((void*)0))
1280#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1281#endif
1282
1283#if CYTHON_COMPILING_IN_CPYTHON1
1284static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1285#else
1286#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL((void*)0))
1287#endif
1288
1289static CYTHON_INLINE__inline__ int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1290 int result = PySequence_Contains(seq, item);
1291 return unlikely(result < 0)__builtin_expect(!!(result < 0), 0) ? result : (result == (eq == Py_EQ2));
1292}
1293
1294#ifndef __PYX_FORCE_INIT_THREADS0
1295 #define __PYX_FORCE_INIT_THREADS0 0
1296#endif
1297
1298static CYTHON_INLINE__inline__ void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
1299static CYTHON_INLINE__inline__ void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
1300
1301static void __Pyx_WriteUnraisable(const char *name, int clineno,
1302 int lineno, const char *filename,
1303 int full_traceback, int nogil);
1304
1305static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1306
1307#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)(( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list
, wraparound, boundscheck) : (is_list ? (PyErr_SetString(PyExc_IndexError
, "list index out of range"), (PyObject*)((void*)0)) : __Pyx_GetItemInt_Generic
(o, to_py_func(i))))
\
1308 (__Pyx_fits_Py_ssize_t(i, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
?\
1309 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1310 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL((void*)0)) :\
1311 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1312#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)(( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound
, boundscheck) : (PyErr_SetString(PyExc_IndexError, "list index out of range"
), (PyObject*)((void*)0)))
\
1313 (__Pyx_fits_Py_ssize_t(i, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
?\
1314 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1315 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL((void*)0)))
1316static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1317 int wraparound, int boundscheck);
1318#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)(( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound
, boundscheck) : (PyErr_SetString(PyExc_IndexError, "tuple index out of range"
), (PyObject*)((void*)0)))
\
1319 (__Pyx_fits_Py_ssize_t(i, type, is_signed)( (sizeof(type) < sizeof(Py_ssize_t)) || (sizeof(type) >
sizeof(Py_ssize_t) && __builtin_expect(!!(i < (type
)((Py_ssize_t)(((size_t)-1)>>1)) || i == (type)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!is_signed || __builtin_expect
(!!(i > (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
i == (type)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(type) == sizeof(Py_ssize_t) && (is_signed
|| __builtin_expect(!!(i < (type)((Py_ssize_t)(((size_t)-
1)>>1)) || i == (type)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) )
?\
1320 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1321 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL((void*)0)))
1322static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1323 int wraparound, int boundscheck);
1324static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1325static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1326 int is_list, int wraparound, int boundscheck);
1327
1328static CYTHON_INLINE__inline__ void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
1329static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
1330
1331static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1332
1333static CYTHON_INLINE__inline__ int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1334
1335static CYTHON_INLINE__inline__ void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1336
1337#if CYTHON_COMPILING_IN_CPYTHON1
1338static CYTHON_INLINE__inline__ int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1339 PyListObject* L = (PyListObject*) list;
1340 Py_ssize_t len = Py_SIZE(list)(((PyVarObject*)(list))->ob_size);
1341 if (likely(L->allocated > len)__builtin_expect(!!(L->allocated > len), 1)) {
1342 Py_INCREF(x)( ((PyObject*)(x))->ob_refcnt++);
1343 PyList_SET_ITEM(list, len, x)(((PyListObject *)(list))->ob_item[len] = (x));
1344 Py_SIZE(list)(((PyVarObject*)(list))->ob_size) = len+1;
1345 return 0;
1346 }
1347 return PyList_Append(list, x);
1348}
1349#else
1350#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1351#endif
1352
1353static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_GetSlice(
1354 PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1355 PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1356 int has_cstart, int has_cstop, int wraparound);
1357
1358#if PY_MAJOR_VERSION2 < 3
1359#define __Pyx_PyString_Join_PyString_Join __Pyx_PyBytes_Join_PyString_Join
1360#define __Pyx_PyBaseString_Join(s, v)(((((PyObject*)(s))->ob_type) == &PyUnicode_Type) ? PyUnicodeUCS4_Join
(s, v) : _PyString_Join(s, v))
(PyUnicode_CheckExact(s)((((PyObject*)(s))->ob_type) == &PyUnicode_Type) ? PyUnicode_JoinPyUnicodeUCS4_Join(s, v) : __Pyx_PyBytes_Join_PyString_Join(s, v))
1361#else
1362#define __Pyx_PyString_Join_PyString_Join PyUnicode_JoinPyUnicodeUCS4_Join
1363#define __Pyx_PyBaseString_Join PyUnicode_JoinPyUnicodeUCS4_Join
1364#endif
1365#if CYTHON_COMPILING_IN_CPYTHON1
1366 #if PY_MAJOR_VERSION2 < 3
1367 #define __Pyx_PyBytes_Join_PyString_Join _PyString_Join
1368 #else
1369 #define __Pyx_PyBytes_Join_PyString_Join _PyBytes_Join_PyString_Join
1370 #endif
1371#else
1372static CYTHON_INLINE__inline__ PyObject* __Pyx_PyBytes_Join_PyString_Join(PyObject* sep, PyObject* values);
1373#endif
1374
1375static CYTHON_INLINE__inline__ void __Pyx_RaiseClosureNameError(const char *varname);
1376
1377static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1378
1379#define __Pyx_CyFunction_USED1 1
1380#include <structmember.h>
1381#define __Pyx_CYFUNCTION_STATICMETHOD0x01 0x01
1382#define __Pyx_CYFUNCTION_CLASSMETHOD0x02 0x02
1383#define __Pyx_CYFUNCTION_CCLASS0x04 0x04
1384#define __Pyx_CyFunction_GetClosure(f)(((__pyx_CyFunctionObject *) (f))->func_closure)\
1385 (((__pyx_CyFunctionObject *) (f))->func_closure)
1386#define __Pyx_CyFunction_GetClassObj(f)(((__pyx_CyFunctionObject *) (f))->func_classobj)\
1387 (((__pyx_CyFunctionObject *) (f))->func_classobj)
1388#define __Pyx_CyFunction_Defaults(type, f)((type *)(((__pyx_CyFunctionObject *) (f))->defaults))\
1389 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1390#define __Pyx_CyFunction_SetDefaultsGetter(f, g)((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)\
1391 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1392typedef struct {
1393 PyCFunctionObject func;
1394#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030500A0
1395 PyObject *func_weakreflist;
1396#endif
1397 PyObject *func_dict;
1398 PyObject *func_name;
1399 PyObject *func_qualname;
1400 PyObject *func_doc;
1401 PyObject *func_globals;
1402 PyObject *func_code;
1403 PyObject *func_closure;
1404 PyObject *func_classobj;
1405 void *defaults;
1406 int defaults_pyobjects;
1407 int flags;
1408 PyObject *defaults_tuple;
1409 PyObject *defaults_kwdict;
1410 PyObject *(*defaults_getter)(PyObject *);
1411 PyObject *func_annotations;
1412} __pyx_CyFunctionObject;
1413static PyTypeObject *__pyx_CyFunctionType = 0;
1414#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)__Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname
, self, module, globals, code)
\
1415 __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
1416static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
1417 int flags, PyObject* qualname,
1418 PyObject *self,
1419 PyObject *module, PyObject *globals,
1420 PyObject* code);
1421static CYTHON_INLINE__inline__ void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1422 size_t size,
1423 int pyobjects);
1424static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1425 PyObject *tuple);
1426static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1427 PyObject *dict);
1428static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1429 PyObject *dict);
1430static int __pyx_CyFunction_init(void);
1431
1432static CYTHON_INLINE__inline__ int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
1433 const char *name, int exact);
1434
1435#if PY_MAJOR_VERSION2 >= 3 && !CYTHON_COMPILING_IN_PYPY0
1436static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key)PyObject_GetItem(PyObject *d, PyObject* key) {
1437 PyObject *value;
1438 value = PyDict_GetItemWithError(d, key);
1439 if (unlikely(!value)__builtin_expect(!!(!value), 0)) {
1440 if (!PyErr_Occurred()) {
1441 PyObject* args = PyTuple_Pack(1, key);
1442 if (likely(args)__builtin_expect(!!(args), 1))
1443 PyErr_SetObject(PyExc_KeyError, args);
1444 Py_XDECREF(args)do { if ((args) == ((void*)0)) ; else do { if ( --((PyObject*
)(args))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(args)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(args)))); } while (0); } while (0)
;
1445 }
1446 return NULL((void*)0);
1447 }
1448 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
1449 return value;
1450}
1451#else
1452 #define __Pyx_PyDict_GetItem(d, key)PyObject_GetItem(d, key) PyObject_GetItem(d, key)
1453#endif
1454
1455#include <string.h>
1456
1457static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1458
1459static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1460
1461static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1462
1463static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1464
1465static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1466 PyObject *mkw, PyObject *modname, PyObject *doc);
1467static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1468 PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1469
1470typedef struct {
1471 int code_line;
1472 PyCodeObject* code_object;
1473} __Pyx_CodeObjectCacheEntry;
1474struct __Pyx_CodeObjectCache {
1475 int count;
1476 int max_count;
1477 __Pyx_CodeObjectCacheEntry* entries;
1478};
1479static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL((void*)0)};
1480static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1481static PyCodeObject *__pyx_find_code_object(int code_line);
1482static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1483
1484static void __Pyx_AddTraceback(const char *funcname, int c_line,
1485 int py_line, const char *filename);
1486
1487static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int(int value);
1488
1489static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_mirror_mode_t(rbd_mirror_mode_t value);
1490
1491static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_mirror_image_state_t(rbd_mirror_image_state_t value);
1492
1493static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_mirror_image_status_state_t(rbd_mirror_image_status_state_t value);
1494
1495static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_lock_mode_t(rbd_lock_mode_t value);
1496
1497static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_snap_namespace_type_t(rbd_snap_namespace_type_t value);
1498
1499static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_group_image_state_t(rbd_group_image_state_t value);
1500
1501static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_group_snap_state_t(rbd_group_snap_state_t value);
1502
1503static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_image_migration_state_t(rbd_image_migration_state_t value);
1504
1505static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_config_source_t(rbd_config_source_t value);
1506
1507static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_pool_stat_option_t(rbd_pool_stat_option_t value);
1508
1509static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
1510
1511static CYTHON_INLINE__inline__ int __Pyx_PyInt_As_int(PyObject *);
1512
1513static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_long(long value);
1514
1515static CYTHON_INLINE__inline__ uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
1516
1517static CYTHON_INLINE__inline__ time_t __Pyx_PyInt_As_time_t(PyObject *);
1518
1519static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_trash_image_source_t(rbd_trash_image_source_t value);
1520
1521static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_time_t(time_t value);
1522
1523static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
1524
1525static CYTHON_INLINE__inline__ rbd_mirror_mode_t __Pyx_PyInt_As_rbd_mirror_mode_t(PyObject *);
1526
1527static CYTHON_INLINE__inline__ size_t __Pyx_PyInt_As_size_t(PyObject *);
1528
1529static CYTHON_INLINE__inline__ uint8_t __Pyx_PyInt_As_uint8_t(PyObject *);
1530
1531static CYTHON_INLINE__inline__ uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);
1532
1533static CYTHON_INLINE__inline__ int64_t __Pyx_PyInt_As_int64_t(PyObject *);
1534
1535static CYTHON_INLINE__inline__ int __Pyx_ErrOccurredWithGIL(void); /* proto */
1536
1537static CYTHON_INLINE__inline__ rbd_lock_mode_t __Pyx_PyInt_As_rbd_lock_mode_t(PyObject *);
1538
1539static CYTHON_INLINE__inline__ long __Pyx_PyInt_As_long(PyObject *);
1540
1541static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1542
1543typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
1544typedef struct {
1545 PyObject_HEADPy_ssize_t ob_refcnt; struct _typeobject *ob_type;
1546 __pyx_coroutine_body_t body;
1547 PyObject *closure;
1548 PyObject *exc_type;
1549 PyObject *exc_value;
1550 PyObject *exc_traceback;
1551 PyObject *gi_weakreflist;
1552 PyObject *classobj;
1553 PyObject *yieldfrom;
1554 PyObject *gi_name;
1555 PyObject *gi_qualname;
1556 int resume_label;
1557 char is_running;
1558} __pyx_CoroutineObject;
1559static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
1560 PyObject *closure, PyObject *name, PyObject *qualname);
1561static int __Pyx_Coroutine_clear(PyObject *self);
1562#if 1 || PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030300B0
1563static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
1564#else
1565#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
1566#endif
1567
1568static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1569
1570static int __Pyx_patch_abc(void);
1571
1572#define __Pyx_Generator_USED
1573static PyTypeObject *__pyx_GeneratorType = 0;
1574#define __Pyx_Generator_CheckExact(obj)((((PyObject*)(obj))->ob_type) == __pyx_GeneratorType) (Py_TYPE(obj)(((PyObject*)(obj))->ob_type) == __pyx_GeneratorType)
1575#define __Pyx_Generator_New(body, closure, name, qualname)__Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name
, qualname)
\
1576 __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname)
1577static PyObject *__Pyx_Generator_Next(PyObject *self);
1578static int __pyx_Generator_init(void);
1579
1580static int __Pyx_check_binary_version(void);
1581
1582#if !defined(__Pyx_PyIdentifier_FromString)
1583#if PY_MAJOR_VERSION2 < 3
1584 #define __Pyx_PyIdentifier_FromString(s)PyString_FromString(s) PyString_FromString(s)
1585#else
1586 #define __Pyx_PyIdentifier_FromString(s)PyString_FromString(s) PyUnicode_FromStringPyUnicodeUCS4_FromString(s)
1587#endif
1588#endif
1589
1590static PyObject *__Pyx_ImportModule(const char *name);
1591
1592static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
1593
1594static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1595
1596static void __pyx_f_3rbd_10Completion__complete(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto*/
1597static PyObject *__pyx_f_3rbd_10Completion___persist(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto*/
1598static PyObject *__pyx_f_3rbd_10Completion___unpersist(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto*/
1599
1600/* Module declarations from 'cython' */
1601
1602/* Module declarations from 'cpython.version' */
1603
1604/* Module declarations from '__builtin__' */
1605
1606/* Module declarations from 'cpython.type' */
1607static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1608
1609/* Module declarations from 'libc.string' */
1610
1611/* Module declarations from 'libc.stdio' */
1612
1613/* Module declarations from 'cpython.object' */
1614
1615/* Module declarations from 'cpython.ref' */
1616
1617/* Module declarations from 'cpython.exc' */
1618
1619/* Module declarations from 'cpython.module' */
1620
1621/* Module declarations from 'cpython.mem' */
1622
1623/* Module declarations from 'cpython.tuple' */
1624
1625/* Module declarations from 'cpython.list' */
1626
1627/* Module declarations from 'cpython.sequence' */
1628
1629/* Module declarations from 'cpython.mapping' */
1630
1631/* Module declarations from 'cpython.iterator' */
1632
1633/* Module declarations from 'cpython.number' */
1634
1635/* Module declarations from 'cpython.int' */
1636
1637/* Module declarations from '__builtin__' */
1638
1639/* Module declarations from 'cpython.bool' */
1640static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
1641
1642/* Module declarations from 'cpython.long' */
1643
1644/* Module declarations from 'cpython.float' */
1645
1646/* Module declarations from '__builtin__' */
1647
1648/* Module declarations from 'cpython.complex' */
1649static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
1650
1651/* Module declarations from 'cpython.string' */
1652
1653/* Module declarations from 'cpython.unicode' */
1654
1655/* Module declarations from 'cpython.dict' */
1656
1657/* Module declarations from 'cpython.instance' */
1658
1659/* Module declarations from 'cpython.function' */
1660
1661/* Module declarations from 'cpython.method' */
1662
1663/* Module declarations from 'cpython.weakref' */
1664
1665/* Module declarations from 'cpython.getargs' */
1666
1667/* Module declarations from 'cpython.pythread' */
1668
1669/* Module declarations from 'cpython.pystate' */
1670
1671/* Module declarations from 'cpython.cobject' */
1672
1673/* Module declarations from 'cpython.oldbuffer' */
1674
1675/* Module declarations from 'cpython.set' */
1676
1677/* Module declarations from 'cpython.buffer' */
1678
1679/* Module declarations from 'cpython.bytes' */
1680
1681/* Module declarations from 'cpython.pycapsule' */
1682
1683/* Module declarations from 'cpython' */
1684
1685/* Module declarations from 'libc' */
1686
1687/* Module declarations from 'libc.errno' */
1688
1689/* Module declarations from 'libc.stdint' */
1690
1691/* Module declarations from 'libc.stdlib' */
1692
1693/* Module declarations from 'rados' */
1694static PyTypeObject *__pyx_ptype_5rados_Rados = 0;
1695static PyTypeObject *__pyx_ptype_5rados_Ioctx = 0;
1696
1697/* Module declarations from 'rbd' */
1698static PyTypeObject *__pyx_ptype_3rbd_Completion = 0;
1699static PyTypeObject *__pyx_ptype_3rbd_MirrorPeerIterator = 0;
1700static PyTypeObject *__pyx_ptype_3rbd_MirrorImageStatusIterator = 0;
1701static PyTypeObject *__pyx_ptype_3rbd_MirrorImageInstanceIdIterator = 0;
1702static PyTypeObject *__pyx_ptype_3rbd_PoolMetadataIterator = 0;
1703static PyTypeObject *__pyx_ptype_3rbd_ConfigPoolIterator = 0;
1704static PyTypeObject *__pyx_ptype_3rbd_Group = 0;
1705static PyTypeObject *__pyx_ptype_3rbd_Image = 0;
1706static PyTypeObject *__pyx_ptype_3rbd_ImageIterator = 0;
1707static PyTypeObject *__pyx_ptype_3rbd_LockOwnerIterator = 0;
1708static PyTypeObject *__pyx_ptype_3rbd_MetadataIterator = 0;
1709static PyTypeObject *__pyx_ptype_3rbd_SnapIterator = 0;
1710static PyTypeObject *__pyx_ptype_3rbd_TrashIterator = 0;
1711static PyTypeObject *__pyx_ptype_3rbd_ChildIterator = 0;
1712static PyTypeObject *__pyx_ptype_3rbd_WatcherIterator = 0;
1713static PyTypeObject *__pyx_ptype_3rbd_ConfigImageIterator = 0;
1714static PyTypeObject *__pyx_ptype_3rbd_GroupImageIterator = 0;
1715static PyTypeObject *__pyx_ptype_3rbd_GroupSnapIterator = 0;
1716static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct____iter__ = 0;
1717static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_1___iter__ = 0;
1718static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_2___iter__ = 0;
1719static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_3___iter__ = 0;
1720static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_4___iter__ = 0;
1721static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_5_aio_read = 0;
1722static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_6___iter__ = 0;
1723static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_7___iter__ = 0;
1724static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_8___iter__ = 0;
1725static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_9___iter__ = 0;
1726static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_10___iter__ = 0;
1727static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_11___iter__ = 0;
1728static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_12___iter__ = 0;
1729static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_13___iter__ = 0;
1730static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_14___iter__ = 0;
1731static PyTypeObject *__pyx_ptype_3rbd___pyx_scope_struct_15___iter__ = 0;
1732static PyObject *__pyx_v_3rbd_errno_to_exception = 0;
1733static PyObject *__pyx_v_3rbd_group_errno_to_exception = 0;
1734static PyObject *__pyx_f_3rbd_make_ex(PyObject *, PyObject *, struct __pyx_opt_args_3rbd_make_ex *__pyx_optional_args); /*proto*/
1735static rados_ioctx_t __pyx_f_3rbd_convert_ioctx(struct __pyx_obj_5rados_Ioctx *); /*proto*/
1736static int __pyx_f_3rbd_progress_callback(uint64_t, uint64_t, void *); /*proto*/
1737static int __pyx_f_3rbd_no_op_progress_callback(uint64_t, uint64_t, void *); /*proto*/
1738static char *__pyx_f_3rbd_opt_str(PyObject *); /*proto*/
1739static void *__pyx_f_3rbd_realloc_chk(void *, size_t); /*proto*/
1740static void __pyx_f_3rbd___aio_complete_cb(rbd_completion_t, void *); /*proto*/
1741static int __pyx_f_3rbd_diff_iterate_cb(uint64_t, size_t, int, void *); /*proto*/
1742#define __Pyx_MODULE_NAME"rbd" "rbd"
1743int __pyx_module_is_main_rbd = 0;
1744
1745/* Implementation of 'rbd' */
1746static PyObject *__pyx_builtin_ImportError;
1747static PyObject *__pyx_builtin_Exception;
1748static PyObject *__pyx_builtin_object;
1749static PyObject *__pyx_builtin_super;
1750static PyObject *__pyx_builtin_MemoryError;
1751static PyObject *__pyx_builtin_zip;
1752static PyObject *__pyx_builtin_range;
1753static PyObject *__pyx_builtin_KeyError;
1754static PyObject *__pyx_builtin_TypeError;
1755static PyObject *__pyx_builtin_map;
1756static char __pyx_k_i[] = "i";
1757static char __pyx_k_x[] = "x";
1758static char __pyx_k__5[] = "\000";
1759static char __pyx_k_id[] = "id";
1760static char __pyx_k_up[] = "up";
1761static char __pyx_k_RBD[] = "RBD";
1762static char __pyx_k__13[] = "";
1763static char __pyx_k_doc[] = "__doc__";
1764static char __pyx_k_key[] = "key";
1765static char __pyx_k_map[] = "map";
1766static char __pyx_k_msg[] = "msg";
1767static char __pyx_k_opt[] = "opt";
1768static char __pyx_k_rbd[] = "rbd";
1769static char __pyx_k_ret[] = "ret";
1770static char __pyx_k_src[] = "src";
1771static char __pyx_k_str[] = "__str__";
1772static char __pyx_k_sys[] = "sys";
1773static char __pyx_k_tag[] = "tag";
1774static char __pyx_k_val[] = "val";
1775static char __pyx_k_zip[] = "zip";
1776static char __pyx_k_USER[] = "USER";
1777static char __pyx_k_addr[] = "addr";
1778static char __pyx_k_args[] = "args";
1779static char __pyx_k_cstr[] = "cstr";
1780static char __pyx_k_data[] = "data";
1781static char __pyx_k_dest[] = "dest";
1782static char __pyx_k_info[] = "info";
1783static char __pyx_k_init[] = "__init__";
1784static char __pyx_k_iter[] = "__iter__";
1785static char __pyx_k_join[] = "join";
1786static char __pyx_k_keys[] = "_keys";
1787static char __pyx_k_list[] = "list";
1788static char __pyx_k_main[] = "__main__";
1789static char __pyx_k_mode[] = "mode";
1790static char __pyx_k_name[] = "name";
1791static char __pyx_k_opts[] = "opts";
1792static char __pyx_k_pool[] = "pool";
1793static char __pyx_k_self[] = "self";
1794static char __pyx_k_send[] = "send";
1795static char __pyx_k_size[] = "size";
1796static char __pyx_k_test[] = "__test__";
1797static char __pyx_k_time[] = "time";
1798static char __pyx_k_type[] = "type_";
1799static char __pyx_k_uuid[] = "uuid";
1800static char __pyx_k_vals[] = "_vals";
1801static char __pyx_k_Error[] = "Error";
1802static char __pyx_k_chain[] = "chain";
1803static char __pyx_k_class[] = "__class__";
1804static char __pyx_k_clone[] = "clone";
1805static char __pyx_k_close[] = "close";
1806static char __pyx_k_count[] = "_count";
1807static char __pyx_k_delay[] = "delay";
1808static char __pyx_k_errno[] = "errno";
1809static char __pyx_k_extra[] = "extra";
1810static char __pyx_k_flags[] = "flags";
1811static char __pyx_k_force[] = "force";
1812static char __pyx_k_group[] = "group";
1813static char __pyx_k_image[] = "image";
1814static char __pyx_k_ioctx[] = "ioctx";
1815static char __pyx_k_items[] = "items";
1816static char __pyx_k_key_2[] = "_key";
1817static char __pyx_k_list2[] = "list2";
1818static char __pyx_k_major[] = "major";
1819static char __pyx_k_minor[] = "minor";
1820static char __pyx_k_names[] = "_names";
1821static char __pyx_k_order[] = "order";
1822static char __pyx_k_owner[] = "owner";
1823static char __pyx_k_range[] = "range";
1824static char __pyx_k_split[] = "split";
1825static char __pyx_k_src_2[] = "_src";
1826static char __pyx_k_state[] = "state";
1827static char __pyx_k_stats[] = "_stats";
1828static char __pyx_k_super[] = "super";
1829static char __pyx_k_throw[] = "throw";
1830static char __pyx_k_trash[] = "trash";
1831static char __pyx_k_utf_8[] = "utf-8";
1832static char __pyx_k_value[] = "value";
1833static char __pyx_k_c_info[] = "c_info";
1834static char __pyx_k_c_name[] = "c_name";
1835static char __pyx_k_client[] = "client";
1836static char __pyx_k_cookie[] = "cookie";
1837static char __pyx_k_counts[] = "counts";
1838static char __pyx_k_create[] = "create";
1839static char __pyx_k_decode[] = "decode";
1840static char __pyx_k_dest_2[] = "_dest";
1841static char __pyx_k_encode[] = "encode";
1842static char __pyx_k_exists[] = "_exists";
1843static char __pyx_k_format[] = "format";
1844static char __pyx_k_import[] = "__import__";
1845static char __pyx_k_keys_2[] = "keys";
1846static char __pyx_k_length[] = "length";
1847static char __pyx_k_maxlen[] = "maxlen";
1848static char __pyx_k_mktime[] = "mktime";
1849static char __pyx_k_module[] = "__module__";
1850static char __pyx_k_name_2[] = "_name";
1851static char __pyx_k_object[] = "object";
1852static char __pyx_k_offset[] = "offset";
1853static char __pyx_k_p_name[] = "p_name";
1854static char __pyx_k_reduce[] = "__reduce__";
1855static char __pyx_k_remove[] = "remove";
1856static char __pyx_k_rename[] = "rename";
1857static char __pyx_k_size_2[] = "_size";
1858static char __pyx_k_source[] = "source";
1859static char __pyx_k_states[] = "states";
1860static char __pyx_k_status[] = "status";
1861static char __pyx_k_uuid_2[] = "_uuid";
1862static char __pyx_k_vals_2[] = "vals";
1863static char __pyx_k_IOError[] = "IOError";
1864static char __pyx_k_NoSpace[] = "NoSpace";
1865static char __pyx_k_OSError[] = "OSError";
1866static char __pyx_k_Timeout[] = "Timeout";
1867static char __pyx_k_c_ioctx[] = "c_ioctx";
1868static char __pyx_k_c_names[] = "c_names";
1869static char __pyx_k_delay_2[] = "_delay";
1870static char __pyx_k_dstname[] = "dstname";
1871static char __pyx_k_enabled[] = "enabled";
1872static char __pyx_k_force_2[] = "_force";
1873static char __pyx_k_ioctx_2[] = "_ioctx";
1874static char __pyx_k_lockers[] = "lockers";
1875static char __pyx_k_message[] = "message";
1876static char __pyx_k_order_2[] = "_order";
1877static char __pyx_k_p_ioctx[] = "p_ioctx";
1878static char __pyx_k_prepare[] = "__prepare__";
1879static char __pyx_k_primary[] = "primary";
1880static char __pyx_k_prog_cb[] = "_prog_cb";
1881static char __pyx_k_srcname[] = "srcname";
1882static char __pyx_k_value_2[] = "_value";
1883static char __pyx_k_version[] = "version";
1884static char __pyx_k_Iterable[] = "Iterable";
1885static char __pyx_k_KeyError[] = "KeyError";
1886static char __pyx_k_RBD_list[] = "RBD.list";
1887static char __pyx_k_REMOVING[] = "REMOVING";
1888static char __pyx_k_c_name_2[] = "_c_name";
1889static char __pyx_k_c_status[] = "c_status";
1890static char __pyx_k_datetime[] = "datetime";
1891static char __pyx_k_encoding[] = "encoding";
1892static char __pyx_k_exc_info[] = "exc_info";
1893static char __pyx_k_features[] = "features";
1894static char __pyx_k_get_name[] = "get_name";
1895static char __pyx_k_image_id[] = "image_id";
1896static char __pyx_k_keys_str[] = "keys_str";
1897static char __pyx_k_num_objs[] = "num_objs";
1898static char __pyx_k_obj_size[] = "obj_size";
1899static char __pyx_k_p_name_2[] = "_p_name";
1900static char __pyx_k_prog_arg[] = "_prog_arg";
1901static char __pyx_k_qualname[] = "__qualname__";
1902static char __pyx_k_snapshot[] = "snapshot";
1903static char __pyx_k_vals_str[] = "vals_str";
1904static char __pyx_k_ECANCELED[] = "ECANCELED";
1905static char __pyx_k_Exception[] = "Exception";
1906static char __pyx_k_ImageBusy[] = "ImageBusy";
1907static char __pyx_k_MIGRATION[] = "MIGRATION";
1908static char __pyx_k_MIRRORING[] = "MIRRORING";
1909static char __pyx_k_RBD_clone[] = "RBD.clone";
1910static char __pyx_k_RBD_list2[] = "RBD.list2";
1911static char __pyx_k_TypeError[] = "TypeError";
1912static char __pyx_k_c_ioctx_2[] = "_c_ioctx";
1913static char __pyx_k_data_pool[] = "data_pool";
1914static char __pyx_k_dest_name[] = "dest_name";
1915static char __pyx_k_errno_0_1[] = "[errno {0}] {1}";
1916static char __pyx_k_exclusive[] = "exclusive";
1917static char __pyx_k_expire_ts[] = "expire_ts";
1918static char __pyx_k_global_id[] = "global_id";
1919static char __pyx_k_itertools[] = "itertools";
1920static char __pyx_k_keys_size[] = "_keys_size";
1921static char __pyx_k_last_read[] = "last_read";
1922static char __pyx_k_lock_mode[] = "lock_mode";
1923static char __pyx_k_metaclass[] = "__metaclass__";
1924static char __pyx_k_namespace[] = "namespace";
1925static char __pyx_k_p_ioctx_2[] = "_p_ioctx";
1926static char __pyx_k_pool_init[] = "pool_init";
1927static char __pyx_k_read_only[] = "read_only";
1928static char __pyx_k_snap_name[] = "snap_name";
1929static char __pyx_k_threshold[] = "threshold";
1930static char __pyx_k_timetuple[] = "timetuple";
1931static char __pyx_k_traceback[] = "traceback";
1932static char __pyx_k_trash_get[] = "trash_get";
1933static char __pyx_k_vals_size[] = "_vals_size";
1934static char __pyx_k_LogicError[] = "LogicError";
1935static char __pyx_k_RBD_create[] = "RBD.create";
1936static char __pyx_k_RBD_remove[] = "RBD.remove";
1937static char __pyx_k_RBD_rename[] = "RBD.rename";
1938static char __pyx_k_attributes[] = "attributes";
1939static char __pyx_k_dest_ioctx[] = "dest_ioctx";
1940static char __pyx_k_group_list[] = "group_list";
1941static char __pyx_k_image_id_2[] = "_image_id";
1942static char __pyx_k_image_name[] = "image_name";
1943static char __pyx_k_iterate_cb[] = "iterate_cb";
1944static char __pyx_k_lock_owner[] = "lock_owner";
1945static char __pyx_k_old_format[] = "old_format";
1946static char __pyx_k_oncomplete[] = "oncomplete";
1947static char __pyx_k_p_snapname[] = "p_snapname";
1948static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1949static char __pyx_k_trash_list[] = "trash_list";
1950static char __pyx_k_trash_move[] = "trash_move";
1951static char __pyx_k_ImageExists[] = "ImageExists";
1952static char __pyx_k_ImportError[] = "ImportError";
1953static char __pyx_k_MemoryError[] = "MemoryError";
1954static char __pyx_k_RBD_version[] = "RBD.version";
1955static char __pyx_k_client_name[] = "client_name";
1956static char __pyx_k_collections[] = "collections";
1957static char __pyx_k_config_list[] = "config_list";
1958static char __pyx_k_decode_cstr[] = "decode_cstr";
1959static char __pyx_k_descendants[] = "descendants";
1960static char __pyx_k_description[] = "description";
1961static char __pyx_k_expire_ts_2[] = "_expire_ts";
1962static char __pyx_k_image_count[] = "image_count";
1963static char __pyx_k_image_ioctx[] = "image_ioctx";
1964static char __pyx_k_last_update[] = "last_update";
1965static char __pyx_k_mirror_mode[] = "mirror_mode";
1966static char __pyx_k_on_progress[] = "on_progress";
1967static char __pyx_k_parent_name[] = "parent_name";
1968static char __pyx_k_parent_pool[] = "parent_pool";
1969static char __pyx_k_stripe_unit[] = "stripe_unit";
1970static char __pyx_k_threshold_2[] = "_threshold";
1971static char __pyx_k_trash_count[] = "trash_count";
1972static char __pyx_k_trash_purge[] = "trash_purge";
1973static char __pyx_k_ObjectExists[] = "ObjectExists";
1974static char __pyx_k_allow_shrink[] = "allow_shrink";
1975static char __pyx_k_cluster_name[] = "cluster_name";
1976static char __pyx_k_completion_v[] = "completion_v";
1977static char __pyx_k_dest_ioctx_2[] = "_dest_ioctx";
1978static char __pyx_k_dest_pool_id[] = "dest_pool_id";
1979static char __pyx_k_group_create[] = "group_create";
1980static char __pyx_k_group_remove[] = "group_remove";
1981static char __pyx_k_group_rename[] = "group_rename";
1982static char __pyx_k_image_name_2[] = "_image_name";
1983static char __pyx_k_oncomplete_2[] = "oncomplete_";
1984static char __pyx_k_p_snapname_2[] = "_p_snapname";
1985static char __pyx_k_return_value[] = "return_value";
1986static char __pyx_k_stripe_count[] = "stripe_count";
1987static char __pyx_k_trash_remove[] = "trash_remove";
1988static char __pyx_k_version_info[] = "version_info";
1989static char __pyx_k_whole_object[] = "whole_object";
1990static char __pyx_k_ImageNotFound[] = "ImageNotFound";
1991static char __pyx_k_OSError___str[] = "OSError.__str__";
1992static char __pyx_k_RBD_pool_init[] = "RBD.pool_init";
1993static char __pyx_k_RBD_trash_get[] = "RBD.trash_get";
1994static char __pyx_k_ReadOnlyImage[] = "ReadOnlyImage";
1995static char __pyx_k_client_name_2[] = "_client_name";
1996static char __pyx_k_deletion_time[] = "deletion_time";
1997static char __pyx_k_dest_image_id[] = "dest_image_id";
1998static char __pyx_k_fadvise_flags[] = "fadvise_flags";
1999static char __pyx_k_from_snapshot[] = "from_snapshot";
2000static char __pyx_k_fromtimestamp[] = "fromtimestamp";
2001static char __pyx_k_image_count_2[] = "_image_count";
2002static char __pyx_k_mirror_mode_2[] = "_mirror_mode";
2003static char __pyx_k_new_snap_name[] = "new_snap_name";
2004static char __pyx_k_no_metadata_s[] = "no metadata %s";
2005static char __pyx_k_old_snap_name[] = "old_snap_name";
2006static char __pyx_k_original_name[] = "original_name";
2007static char __pyx_k_source_string[] = "__source_string";
2008static char __pyx_k_trash_count_2[] = "_trash_count";
2009static char __pyx_k_trash_restore[] = "trash_restore";
2010static char __pyx_k_IOError___init[] = "IOError.__init__";
2011static char __pyx_k_NoSpace___init[] = "NoSpace.__init__";
2012static char __pyx_k_OSError___init[] = "OSError.__init__";
2013static char __pyx_k_ObjectNotFound[] = "ObjectNotFound";
2014static char __pyx_k_RBD_group_list[] = "RBD.group_list";
2015static char __pyx_k_RBD_trash_list[] = "RBD.trash_list";
2016static char __pyx_k_RBD_trash_move[] = "RBD.trash_move";
2017static char __pyx_k_Timeout___init[] = "Timeout.__init__";
2018static char __pyx_k_cluster_name_2[] = "_cluster_name";
2019static char __pyx_k_completion_v_2[] = "_completion_v";
2020static char __pyx_k_error_flushing[] = "error flushing";
2021static char __pyx_k_get_completion[] = "__get_completion";
2022static char __pyx_k_get_next_chunk[] = "get_next_chunk";
2023static char __pyx_k_include_parent[] = "include_parent";
2024static char __pyx_k_namespace_list[] = "namespace_list";
2025static char __pyx_k_pool_namespace[] = "pool_namespace";
2026static char __pyx_k_pool_stats_get[] = "pool_stats_get";
2027static char __pyx_k_realloc_failed[] = "realloc failed";
2028static char __pyx_k_source_pool_id[] = "source_pool_id";
2029static char __pyx_k_InvalidArgument[] = "InvalidArgument";
2030static char __pyx_k_PermissionError[] = "PermissionError";
2031static char __pyx_k_RBD_I_O_error_s[] = "RBD I/O error (%s)";
2032static char __pyx_k_RBD_config_list[] = "RBD.config_list";
2033static char __pyx_k_RBD_trash_purge[] = "RBD.trash_purge";
2034static char __pyx_k_collections_abc[] = "collections.abc";
2035static char __pyx_k_dest_image_name[] = "dest_image_name";
2036static char __pyx_k_expire_epoch_ts[] = "expire_epoch_ts";
2037static char __pyx_k_migration_abort[] = "migration_abort";
2038static char __pyx_k_mirror_mode_get[] = "mirror_mode_get";
2039static char __pyx_k_mirror_mode_set[] = "mirror_mode_set";
2040static char __pyx_k_mirror_peer_add[] = "mirror_peer_add";
2041static char __pyx_k_source_image_id[] = "source_image_id";
2042static char __pyx_k_uuid_max_length[] = "_uuid_max_length";
2043static char __pyx_k_ImageBusy___init[] = "ImageBusy.__init__";
2044static char __pyx_k_OSError___reduce[] = "OSError.__reduce__";
2045static char __pyx_k_RBD_FEATURES_ALL[] = "RBD_FEATURES_ALL";
2046static char __pyx_k_RBD_group_create[] = "RBD.group_create";
2047static char __pyx_k_RBD_group_remove[] = "RBD.group_remove";
2048static char __pyx_k_RBD_group_rename[] = "RBD.group_rename";
2049static char __pyx_k_RBD_trash_remove[] = "RBD.trash_remove";
2050static char __pyx_k_get_return_value[] = "get_return_value";
2051static char __pyx_k_image_snap_count[] = "image_snap_count";
2052static char __pyx_k_migration_commit[] = "migration_commit";
2053static char __pyx_k_migration_status[] = "migration_status";
2054static char __pyx_k_mirror_peer_list[] = "mirror_peer_list";
2055static char __pyx_k_namespace_create[] = "namespace_create";
2056static char __pyx_k_namespace_exists[] = "namespace_exists";
2057static char __pyx_k_namespace_remove[] = "namespace_remove";
2058static char __pyx_k_trash_snap_count[] = "trash_snap_count";
2059static char __pyx_k_utcfromtimestamp[] = "utcfromtimestamp";
2060static char __pyx_k_DiskQuotaExceeded[] = "DiskQuotaExceeded";
2061static char __pyx_k_ImageHasSnapshots[] = "ImageHasSnapshots";
2062static char __pyx_k_LogicError___init[] = "LogicError.__init__";
2063static char __pyx_k_OperationCanceled[] = "OperationCanceled";
2064static char __pyx_k_RBD_logic_error_s[] = "RBD logic error (%s)";
2065static char __pyx_k_RBD_trash_restore[] = "RBD.trash_restore";
2066static char __pyx_k_block_name_prefix[] = "block_name_prefix";
2067static char __pyx_k_dest_image_name_2[] = "_dest_image_name";
2068static char __pyx_k_migration_execute[] = "migration_execute";
2069static char __pyx_k_migration_prepare[] = "migration_prepare";
2070static char __pyx_k_pool_metadata_get[] = "pool_metadata_get";
2071static char __pyx_k_pool_metadata_set[] = "pool_metadata_set";
2072static char __pyx_k_rbd_Image_ioctx_r[] = "rbd.Image(ioctx, %r)";
2073static char __pyx_k_source_image_name[] = "source_image_name";
2074static char __pyx_k_state_description[] = "state_description";
2075static char __pyx_k_ArgumentOutOfRange[] = "ArgumentOutOfRange";
2076static char __pyx_k_ConnectionShutdown[] = "ConnectionShutdown";
2077static char __pyx_k_ImageExists___init[] = "ImageExists.__init__";
2078static char __pyx_k_RBD_namespace_list[] = "RBD.namespace_list";
2079static char __pyx_k_RBD_pool_stats_get[] = "RBD.pool_stats_get";
2080static char __pyx_k_deferment_end_time[] = "deferment_end_time";
2081static char __pyx_k_error_flattening_s[] = "error flattening %s";
2082static char __pyx_k_error_writing_to_s[] = "error writing to %s";
2083static char __pyx_k_image_snap_count_2[] = "_image_snap_count";
2084static char __pyx_k_mirror_peer_remove[] = "mirror_peer_remove";
2085static char __pyx_k_pool_metadata_list[] = "pool_metadata_list";
2086static char __pyx_k_s_must_be_a_string[] = "%s must be a string";
2087static char __pyx_k_trash_snap_count_2[] = "_trash_snap_count";
2088static char __pyx_k_ObjectExists___init[] = "ObjectExists.__init__";
2089static char __pyx_k_RBD_image_is_busy_s[] = "RBD image is busy (%s)";
2090static char __pyx_k_RBD_migration_abort[] = "RBD.migration_abort";
2091static char __pyx_k_RBD_mirror_mode_get[] = "RBD.mirror_mode_get";
2092static char __pyx_k_RBD_mirror_mode_set[] = "RBD.mirror_mode_set";
2093static char __pyx_k_RBD_mirror_peer_add[] = "RBD.mirror_peer_add";
2094static char __pyx_k_SnapIterator___iter[] = "SnapIterator.__iter__";
2095static char __pyx_k_dest_pool_namespace[] = "dest_pool_namespace";
2096static char __pyx_k_error_listing_peers[] = "error listing peers";
2097static char __pyx_k_error_sparsifying_s[] = "error sparsifying %s";
2098static char __pyx_k_ChildIterator___iter[] = "ChildIterator.__iter__";
2099static char __pyx_k_FunctionNotSupported[] = "FunctionNotSupported";
2100static char __pyx_k_ImageIterator___iter[] = "ImageIterator.__iter__";
2101static char __pyx_k_ImageNotFound___init[] = "ImageNotFound.__init__";
2102static char __pyx_k_IncompleteWriteError[] = "IncompleteWriteError";
2103static char __pyx_k_RBD_FEATURES_MUTABLE[] = "RBD_FEATURES_MUTABLE";
2104static char __pyx_k_RBD_FEATURE_LAYERING[] = "RBD_FEATURE_LAYERING";
2105static char __pyx_k_RBD_LOCK_MODE_SHARED[] = "RBD_LOCK_MODE_SHARED";
2106static char __pyx_k_RBD_MIRROR_MODE_POOL[] = "RBD_MIRROR_MODE_POOL";
2107static char __pyx_k_RBD_migration_commit[] = "RBD.migration_commit";
2108static char __pyx_k_RBD_migration_status[] = "RBD.migration_status";
2109static char __pyx_k_RBD_mirror_peer_list[] = "RBD.mirror_peer_list";
2110static char __pyx_k_RBD_namespace_create[] = "RBD.namespace_create";
2111static char __pyx_k_RBD_namespace_exists[] = "RBD.namespace_exists";
2112static char __pyx_k_RBD_namespace_remove[] = "RBD.namespace_remove";
2113static char __pyx_k_ReadOnlyImage___init[] = "ReadOnlyImage.__init__";
2114static char __pyx_k_TrashIterator___iter[] = "TrashIterator.__iter__";
2115static char __pyx_k_error_creating_clone[] = "error creating clone";
2116static char __pyx_k_error_creating_image[] = "error creating image";
2117static char __pyx_k_error_flushing_image[] = "error flushing image";
2118static char __pyx_k_error_listing_groups[] = "error listing groups";
2119static char __pyx_k_error_listing_images[] = "error listing images";
2120static char __pyx_k_error_removing_group[] = "error removing group";
2121static char __pyx_k_error_removing_image[] = "error removing image";
2122static char __pyx_k_error_renaming_group[] = "error renaming group";
2123static char __pyx_k_error_renaming_image[] = "error renaming image";
2124static char __pyx_k_pool_metadata_remove[] = "pool_metadata_remove";
2125static char __pyx_k_ObjectNotFound___init[] = "ObjectNotFound.__init__";
2126static char __pyx_k_RBD_FEATURE_DATA_POOL[] = "RBD_FEATURE_DATA_POOL";
2127static char __pyx_k_RBD_FEATURE_FAST_DIFF[] = "RBD_FEATURE_FAST_DIFF";
2128static char __pyx_k_RBD_FEATURE_MIGRATING[] = "RBD_FEATURE_MIGRATING";
2129static char __pyx_k_RBD_MIRROR_MODE_IMAGE[] = "RBD_MIRROR_MODE_IMAGE";
2130static char __pyx_k_RBD_image_not_found_s[] = "RBD image not found (%s)";
2131static char __pyx_k_RBD_migration_execute[] = "RBD.migration_execute";
2132static char __pyx_k_RBD_migration_prepare[] = "RBD.migration_prepare";
2133static char __pyx_k_RBD_pool_metadata_get[] = "RBD.pool_metadata_get";
2134static char __pyx_k_RBD_pool_metadata_set[] = "RBD.pool_metadata_set";
2135static char __pyx_k_RBD_read_only_image_s[] = "RBD read-only image (%s)";
2136static char __pyx_k_error_reading_s_ld_ld[] = "error reading %s %ld~%ld";
2137static char __pyx_k_error_unlocking_image[] = "error unlocking image";
2138static char __pyx_k_error_writing_s_ld_ld[] = "error writing %s %ld~%ld";
2139static char __pyx_k_source_pool_namespace[] = "source_pool_namespace";
2140static char __pyx_k_InvalidArgument___init[] = "InvalidArgument.__init__";
2141static char __pyx_k_PermissionError___init[] = "PermissionError.__init__";
2142static char __pyx_k_RBD_CONFIG_SOURCE_POOL[] = "RBD_CONFIG_SOURCE_POOL";
2143static char __pyx_k_RBD_FEATURE_JOURNALING[] = "RBD_FEATURE_JOURNALING";
2144static char __pyx_k_RBD_FEATURE_OBJECT_MAP[] = "RBD_FEATURE_OBJECT_MAP";
2145static char __pyx_k_RBD_FEATURE_OPERATIONS[] = "RBD_FEATURE_OPERATIONS";
2146static char __pyx_k_RBD_FEATURE_STRIPINGV2[] = "RBD_FEATURE_STRIPINGV2";
2147static char __pyx_k_RBD_IMAGE_OPTION_ORDER[] = "RBD_IMAGE_OPTION_ORDER";
2148static char __pyx_k_RBD_incomplete_write_s[] = "RBD incomplete write (%s)";
2149static char __pyx_k_RBD_invalid_argument_s[] = "RBD invalid argument (%s)";
2150static char __pyx_k_RBD_mirror_peer_remove[] = "RBD.mirror_peer_remove";
2151static char __pyx_k_RBD_object_not_found_s[] = "RBD object not found (%s)";
2152static char __pyx_k_RBD_permission_error_s[] = "RBD permission error (%s)";
2153static char __pyx_k_RBD_pool_metadata_list[] = "RBD.pool_metadata_list";
2154static char __pyx_k_WatcherIterator___iter[] = "WatcherIterator.__iter__";
2155static char __pyx_k_error_creating_group_s[] = "error creating group %s";
2156static char __pyx_k_error_listing_children[] = "error listing children.";
2157static char __pyx_k_error_listing_images_2[] = "error listing images.";
2158static char __pyx_k_error_listing_metadata[] = "error listing metadata";
2159static char __pyx_k_error_listing_watchers[] = "error listing watchers.";
2160static char __pyx_k_error_resizing_image_s[] = "error resizing image %s";
2161static char __pyx_k_mirror_peer_set_client[] = "mirror_peer_set_client";
2162static char __pyx_k_MetadataIterator___iter[] = "MetadataIterator.__iter__";
2163static char __pyx_k_RBD_CONFIG_SOURCE_IMAGE[] = "RBD_CONFIG_SOURCE_IMAGE";
2164static char __pyx_k_RBD_IMAGE_OPTION_FORMAT[] = "RBD_IMAGE_OPTION_FORMAT";
2165static char __pyx_k_RBD_LOCK_MODE_EXCLUSIVE[] = "RBD_LOCK_MODE_EXCLUSIVE";
2166static char __pyx_k_RBD_operation_timeout_s[] = "RBD operation timeout (%s)";
2167static char __pyx_k_error_initializing_pool[] = "error initializing pool";
2168static char __pyx_k_error_migrating_image_s[] = "error migrating image %s";
2169static char __pyx_k_error_to_resync_image_s[] = "error to resync image %s";
2170static char __pyx_k_image_provisioned_bytes[] = "image_provisioned_bytes";
2171static char __pyx_k_mirror_peer_set_cluster[] = "mirror_peer_set_cluster";
2172static char __pyx_k_snap_get_namespace_type[] = "snap_get_namespace_type";
2173static char __pyx_k_trash_provisioned_bytes[] = "trash_provisioned_bytes";
2174static char __pyx_k_DiskQuotaExceeded___init[] = "DiskQuotaExceeded.__init__";
2175static char __pyx_k_GroupSnapIterator___iter[] = "GroupSnapIterator.__iter__";
2176static char __pyx_k_ImageHasSnapshots___init[] = "ImageHasSnapshots.__init__";
2177static char __pyx_k_LockOwnerIterator___iter[] = "LockOwnerIterator.__iter__";
2178static char __pyx_k_OperationCanceled___init[] = "OperationCanceled.__init__";
2179static char __pyx_k_RBD_CONFIG_SOURCE_CONFIG[] = "RBD_CONFIG_SOURCE_CONFIG";
2180static char __pyx_k_RBD_FEATURE_DEEP_FLATTEN[] = "RBD_FEATURE_DEEP_FLATTEN";
2181static char __pyx_k_RBD_MIRROR_IMAGE_ENABLED[] = "RBD_MIRROR_IMAGE_ENABLED";
2182static char __pyx_k_RBD_MIRROR_MODE_DISABLED[] = "RBD_MIRROR_MODE_DISABLED";
2183static char __pyx_k_RBD_operation_canceled_s[] = "RBD operation canceled (%s)";
2184static char __pyx_k_RBD_pool_metadata_remove[] = "RBD.pool_metadata_remove";
2185static char __pyx_k_error_aborting_migration[] = "error aborting migration";
2186static char __pyx_k_error_adding_mirror_peer[] = "error adding mirror peer";
2187static char __pyx_k_error_creating_namespace[] = "error creating namespace";
2188static char __pyx_k_error_discarding_s_ld_ld[] = "error discarding %s %ld~%ld";
2189static char __pyx_k_error_getting_metadata_s[] = "error getting metadata %s";
2190static char __pyx_k_error_invalidating_cache[] = "error invalidating cache";
2191static char __pyx_k_error_listing_namespaces[] = "error listing namespaces";
2192static char __pyx_k_error_removing_namespace[] = "error removing namespace";
2193static char __pyx_k_error_setting_metadata_s[] = "error setting metadata %s";
2194static char __pyx_k_mirror_image_status_list[] = "mirror_image_status_list";
2195static char __pyx_k_snap_get_group_namespace[] = "snap_get_group_namespace";
2196static char __pyx_k_snap_get_trash_namespace[] = "snap_get_trash_namespace";
2197static char __pyx_k_ArgumentOutOfRange___init[] = "ArgumentOutOfRange.__init__";
2198static char __pyx_k_ConfigPoolIterator___iter[] = "ConfigPoolIterator.__iter__";
2199static char __pyx_k_ConnectionShutdown___init[] = "ConnectionShutdown.__init__";
2200static char __pyx_k_GroupImageIterator___iter[] = "GroupImageIterator.__iter__";
2201static char __pyx_k_MirrorPeerIterator___iter[] = "MirrorPeerIterator.__iter__";
2202static char __pyx_k_RBD_FEATURES_INCOMPATIBLE[] = "RBD_FEATURES_INCOMPATIBLE";
2203static char __pyx_k_RBD_IMAGE_OPTION_FEATURES[] = "RBD_IMAGE_OPTION_FEATURES";
2204static char __pyx_k_RBD_MIRROR_IMAGE_DISABLED[] = "RBD_MIRROR_IMAGE_DISABLED";
2205static char __pyx_k_RBD_disk_quota_exceeded_s[] = "RBD disk quota exceeded (%s)";
2206static char __pyx_k_RBD_image_has_snapshots_s[] = "RBD image has snapshots (%s)";
2207static char __pyx_k_error_getting_mirror_mode[] = "error getting mirror mode";
2208static char __pyx_k_error_removing_metadata_s[] = "error removing metadata %s";
2209static char __pyx_k_error_setting_mirror_mode[] = "error setting mirror mode";
2210static char __pyx_k_error_verifying_namespace[] = "error verifying namespace";
2211static char __pyx_k_image_provisioned_bytes_2[] = "_image_provisioned_bytes";
2212static char __pyx_k_no_metadata_s_for_image_s[] = "no metadata %s for image %s";
2213static char __pyx_k_trash_provisioned_bytes_2[] = "_trash_provisioned_bytes";
2214static char __pyx_k_ConfigImageIterator___iter[] = "ConfigImageIterator.__iter__";
2215static char __pyx_k_RBD_FEATURES_SINGLE_CLIENT[] = "RBD_FEATURES_SINGLE_CLIENT";
2216static char __pyx_k_RBD_FEATURE_EXCLUSIVE_LOCK[] = "RBD_FEATURE_EXCLUSIVE_LOCK";
2217static char __pyx_k_RBD_FLAG_FAST_DIFF_INVALID[] = "RBD_FLAG_FAST_DIFF_INVALID";
2218static char __pyx_k_RBD_IMAGE_OPTION_DATA_POOL[] = "RBD_IMAGE_OPTION_DATA_POOL";
2219static char __pyx_k_RBD_MIRROR_IMAGE_DISABLING[] = "RBD_MIRROR_IMAGE_DISABLING";
2220static char __pyx_k_RBD_image_already_exists_s[] = "RBD image already exists (%s)";
2221static char __pyx_k_RBD_mirror_peer_set_client[] = "RBD.mirror_peer_set_client";
2222static char __pyx_k_aio_read_locals_oncomplete[] = "aio_read.<locals>.oncomplete_";
2223static char __pyx_k_data_must_be_a_byte_string[] = "data must be a byte string";
2224static char __pyx_k_error_copying_image_s_to_s[] = "error copying image %s to %s";
2225static char __pyx_k_error_getting_a_completion[] = "error getting a completion";
2226static char __pyx_k_error_removing_mirror_peer[] = "error removing mirror peer";
2227static char __pyx_k_mirror_peer_get_attributes[] = "mirror_peer_get_attributes";
2228static char __pyx_k_mirror_peer_set_attributes[] = "mirror_peer_set_attributes";
2229static char __pyx_k_FunctionNotSupported___init[] = "FunctionNotSupported.__init__";
2230static char __pyx_k_IncompleteWriteError___init[] = "IncompleteWriteError.__init__";
2231static char __pyx_k_PoolMetadataIterator___iter[] = "PoolMetadataIterator.__iter__";
2232static char __pyx_k_RBD_FLAG_OBJECT_MAP_INVALID[] = "RBD_FLAG_OBJECT_MAP_INVALID";
2233static char __pyx_k_RBD_OPERATION_FEATURE_GROUP[] = "RBD_OPERATION_FEATURE_GROUP";
2234static char __pyx_k_RBD_POOL_STAT_OPTION_IMAGES[] = "RBD_POOL_STAT_OPTION_IMAGES";
2235static char __pyx_k_RBD_mirror_peer_set_cluster[] = "RBD.mirror_peer_set_cluster";
2236static char __pyx_k_RBD_object_already_exists_s[] = "RBD object already exists (%s)";
2237static char __pyx_k_error_adding_image_to_group[] = "error adding image to group";
2238static char __pyx_k_error_discarding_region_d_d[] = "error discarding region %d~%d";
2239static char __pyx_k_error_listing_trash_entries[] = "error listing trash entries";
2240static char __pyx_k_error_moving_image_to_trash[] = "error moving image to trash";
2241static char __pyx_k_error_retrieving_pool_stats[] = "error retrieving pool stats";
2242static char __pyx_k_error_while_closing_image_s[] = "error while closing image %s";
2243static char __pyx_k_image_max_provisioned_bytes[] = "image_max_provisioned_bytes";
2244static char __pyx_k_mirror_image_status_summary[] = "mirror_image_status_summary";
2245static char __pyx_k_trash_max_provisioned_bytes[] = "trash_max_provisioned_bytes";
2246static char __pyx_k_RBD_FEATURES_RW_INCOMPATIBLE[] = "RBD_FEATURES_RW_INCOMPATIBLE";
2247static char __pyx_k_RBD_IMAGE_OPTION_STRIPE_UNIT[] = "RBD_IMAGE_OPTION_STRIPE_UNIT";
2248static char __pyx_k_RBD_SNAP_NAMESPACE_TYPE_USER[] = "RBD_SNAP_NAMESPACE_TYPE_USER";
2249static char __pyx_k_RBD_arguments_out_of_range_s[] = "RBD arguments out of range (%s)";
2250static char __pyx_k_RBD_function_not_supported_s[] = "RBD function not supported (%s)";
2251static char __pyx_k_RBD_mirror_image_status_list[] = "RBD.mirror_image_status_list";
2252static char __pyx_k_error_breaking_lock_on_image[] = "error breaking lock on image";
2253static char __pyx_k_error_getting_id_for_image_s[] = "error getting id for image %s";
2254static char __pyx_k_error_listing_config_options[] = "error listing config options";
2255static char __pyx_k_MirrorImageInstanceIdIterator[] = "MirrorImageInstanceIdIterator.__iter__";
2256static char __pyx_k_RBD_GROUP_SNAP_STATE_COMPLETE[] = "RBD_GROUP_SNAP_STATE_COMPLETE";
2257static char __pyx_k_RBD_IMAGE_OPTION_STRIPE_COUNT[] = "RBD_IMAGE_OPTION_STRIPE_COUNT";
2258static char __pyx_k_RBD_SNAP_NAMESPACE_TYPE_GROUP[] = "RBD_SNAP_NAMESPACE_TYPE_GROUP";
2259static char __pyx_k_RBD_SNAP_NAMESPACE_TYPE_TRASH[] = "RBD_SNAP_NAMESPACE_TYPE_TRASH";
2260static char __pyx_k_RBD_connection_was_shutdown_s[] = "RBD connection was shutdown (%s)";
2261static char __pyx_k_Wrote_only_ld_out_of_ld_bytes[] = "Wrote only %ld out of %ld bytes";
2262static char __pyx_k_error_acquiring_lock_on_image[] = "error acquiring lock on image";
2263static char __pyx_k_error_creating_group_snapshot[] = "error creating group snapshot";
2264static char __pyx_k_error_protecting_snapshot_s_s[] = "error protecting snapshot %s@%s";
2265static char __pyx_k_error_rebuilding_object_map_s[] = "error rebuilding object map %s";
2266static char __pyx_k_error_releasing_lock_on_image[] = "error releasing lock on image";
2267static char __pyx_k_error_removing_group_snapshot[] = "error removing group snapshot";
2268static char __pyx_k_error_renaming_group_snapshot[] = "error renaming group snapshot";
2269static char __pyx_k_image_max_provisioned_bytes_2[] = "_image_max_provisioned_bytes";
2270static char __pyx_k_mirror_image_instance_id_list[] = "mirror_image_instance_id_list";
2271static char __pyx_k_trash_max_provisioned_bytes_2[] = "_trash_max_provisioned_bytes";
2272static char __pyx_k_RBD_GROUP_IMAGE_STATE_ATTACHED[] = "RBD_GROUP_IMAGE_STATE_ATTACHED";
2273static char __pyx_k_RBD_mirror_peer_get_attributes[] = "RBD.mirror_peer_get_attributes";
2274static char __pyx_k_RBD_mirror_peer_set_attributes[] = "RBD.mirror_peer_set_attributes";
2275static char __pyx_k_error_getting_info_for_image_s[] = "error getting info for image %s";
2276static char __pyx_k_error_getting_migration_status[] = "error getting migration status";
2277static char __pyx_k_error_getting_name_for_image_s[] = "error getting name for image %s";
2278static char __pyx_k_error_getting_size_for_image_s[] = "error getting size for image %s";
2279static char __pyx_k_home_bhubbard_working_src_ceph[] = "/home/bhubbard/working/src/ceph/src/pybind/rbd/rbd.pyx";
2280static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_ERROR[] = "MIRROR_IMAGE_STATUS_STATE_ERROR";
2281static char __pyx_k_OSError_class_derived_from_Erro[] = " `OSError` class, derived from `Error` ";
2282static char __pyx_k_RBD_GROUP_SNAP_STATE_INCOMPLETE[] = "RBD_GROUP_SNAP_STATE_INCOMPLETE";
2283static char __pyx_k_RBD_IMAGE_MIGRATION_STATE_ERROR[] = "RBD_IMAGE_MIGRATION_STATE_ERROR";
2284static char __pyx_k_RBD_mirror_image_status_summary[] = "RBD.mirror_image_status_summary";
2285static char __pyx_k_This_class_wraps_librbd_CRUD_fu[] = "\n This class wraps librbd CRUD functions.\n ";
2286static char __pyx_k_This_module_is_a_thin_wrapper_a[] = "\nThis module is a thin wrapper around librbd.\n\nIt currently provides all the synchronous methods of librbd that do\nnot use callbacks.\n\nError codes from librbd are turned into exceptions that subclass\n:class:`Error`. Almost all methods may raise :class:`Error`\n(the base class of all rbd exceptions), :class:`PermissionError`\nand :class:`IOError`, in addition to those documented for the\nmethod.\n";
2287static char __pyx_k_error_allow_shrink_is_False_but[] = "error allow_shrink is False but old_size > new_size";
2288static char __pyx_k_error_deleting_image_from_trash[] = "error deleting image from trash";
2289static char __pyx_k_error_getting_block_name_prefix[] = "error getting block name prefix for image %s";
2290static char __pyx_k_error_getting_flags_for_image_s[] = "error getting flags for image %s";
2291static char __pyx_k_error_getting_group_for_image_s[] = "error getting group for image %s";
2292static char __pyx_k_error_getting_mirror_status_for[] = "error getting mirror status for image %s";
2293static char __pyx_k_error_getting_overlap_for_image[] = "error getting overlap for image %s";
2294static char __pyx_k_error_purging_images_from_trash[] = "error purging images from trash";
2295static char __pyx_k_error_removing_image_from_group[] = "error removing image from group";
2296static char __pyx_k_error_unprotecting_snapshot_s_s[] = "error unprotecting snapshot %s@%s";
2297static char __pyx_k_only_need_to_specify_image_name[] = "only need to specify image name or image id";
2298static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_REPLAY[] = "MIRROR_IMAGE_STATUS_STATE_REPLAYING";
2299static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_STARTI[] = "MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY";
2300static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_STOPPE[] = "MIRROR_IMAGE_STATUS_STATE_STOPPED";
2301static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_STOPPI[] = "MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY";
2302static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_SYNCIN[] = "MIRROR_IMAGE_STATUS_STATE_SYNCING";
2303static char __pyx_k_MIRROR_IMAGE_STATUS_STATE_UNKNOW[] = "MIRROR_IMAGE_STATUS_STATE_UNKNOWN";
2304static char __pyx_k_MirrorImageStatusIterator___iter[] = "MirrorImageStatusIterator.__iter__";
2305static char __pyx_k_RBD_GROUP_IMAGE_STATE_INCOMPLETE[] = "RBD_GROUP_IMAGE_STATE_INCOMPLETE";
2306static char __pyx_k_RBD_IMAGE_MIGRATION_STATE_EXECUT[] = "RBD_IMAGE_MIGRATION_STATE_EXECUTING";
2307static char __pyx_k_RBD_IMAGE_MIGRATION_STATE_PREPAR[] = "RBD_IMAGE_MIGRATION_STATE_PREPARING";
2308static char __pyx_k_RBD_IMAGE_MIGRATION_STATE_UNKNOW[] = "RBD_IMAGE_MIGRATION_STATE_UNKNOWN";
2309static char __pyx_k_RBD_MIRROR_PEER_ATTRIBUTE_NAME_K[] = "RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY";
2310static char __pyx_k_RBD_MIRROR_PEER_ATTRIBUTE_NAME_M[] = "RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST";
2311static char __pyx_k_RBD_OPERATION_FEATURE_CLONE_CHIL[] = "RBD_OPERATION_FEATURE_CLONE_CHILD";
2312static char __pyx_k_RBD_OPERATION_FEATURE_CLONE_PARE[] = "RBD_OPERATION_FEATURE_CLONE_PARENT";
2313static char __pyx_k_RBD_OPERATION_FEATURE_SNAP_TRASH[] = "RBD_OPERATION_FEATURE_SNAP_TRASH";
2314static char __pyx_k_RBD_POOL_STAT_OPTION_IMAGE_MAX_P[] = "RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES";
2315static char __pyx_k_RBD_POOL_STAT_OPTION_IMAGE_PROVI[] = "RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES";
2316static char __pyx_k_RBD_POOL_STAT_OPTION_IMAGE_SNAPS[] = "RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS";
2317static char __pyx_k_RBD_POOL_STAT_OPTION_TRASH_IMAGE[] = "RBD_POOL_STAT_OPTION_TRASH_IMAGES";
2318static char __pyx_k_RBD_POOL_STAT_OPTION_TRASH_MAX_P[] = "RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES";
2319static char __pyx_k_RBD_POOL_STAT_OPTION_TRASH_PROVI[] = "RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES";
2320static char __pyx_k_RBD_POOL_STAT_OPTION_TRASH_SNAPS[] = "RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS";
2321static char __pyx_k_RBD_insufficient_space_available[] = "RBD insufficient space available (%s)";
2322static char __pyx_k_RBD_mirror_image_instance_id_lis[] = "RBD.mirror_image_instance_id_list";
2323static char __pyx_k_error_acquiring_exclusive_lock_o[] = "error acquiring exclusive lock on image";
2324static char __pyx_k_error_acquiring_shared_lock_on_i[] = "error acquiring shared lock on image";
2325static char __pyx_k_error_checking_if_snapshot_s_s_i[] = "error checking if snapshot %s@%s is protected";
2326static char __pyx_k_error_creating_snapshot_s_from_s[] = "error creating snapshot %s from %s";
2327static char __pyx_k_error_demoting_image_s_to_second[] = "error demoting image %s to secondary";
2328static char __pyx_k_error_disabling_mirroring_for_im[] = "error disabling mirroring for image %s";
2329static char __pyx_k_error_enabling_mirroring_for_ima[] = "error enabling mirroring for image %s";
2330static char __pyx_k_error_generating_diff_from_snaps[] = "error generating diff from snapshot %s";
2331static char __pyx_k_error_getting_access_timestamp_f[] = "error getting access timestamp for image: %s";
2332static char __pyx_k_error_getting_create_timestamp_f[] = "error getting create timestamp for image: %s";
2333static char __pyx_k_error_getting_features_for_image[] = "error getting features for image %s";
2334static char __pyx_k_error_getting_lock_status_for_im[] = "error getting lock status for image %s";
2335static char __pyx_k_error_getting_metadata_s_for_ima[] = "error getting metadata %s for image %s";
2336static char __pyx_k_error_getting_mirror_image_statu[] = "error getting mirror image status summary";
2337static char __pyx_k_error_getting_mirror_info_for_im[] = "error getting mirror info for image %s";
2338static char __pyx_k_error_getting_mirror_instance_id[] = "error getting mirror instance id for image %s";
2339static char __pyx_k_error_getting_mirror_peer_attrib[] = "error getting mirror peer attributes";
2340static char __pyx_k_error_getting_modify_timestamp_f[] = "error getting modify timestamp for image: %s";
2341static char __pyx_k_error_getting_old_format_for_ima[] = "error getting old_format for image %s";
2342static char __pyx_k_error_getting_op_features_for_im[] = "error getting op features for image %s";
2343static char __pyx_k_error_getting_parent_info_for_im[] = "error getting parent info for image %s";
2344static char __pyx_k_error_getting_snapshot_group_nam[] = "error getting snapshot group namespace for image: %s, snap_id: %d";
2345static char __pyx_k_error_getting_snapshot_limit_for[] = "error getting snapshot limit for %s";
2346static char __pyx_k_error_getting_snapshot_namespace[] = "error getting snapshot namespace type for image: %s, snap_id: %d";
2347static char __pyx_k_error_getting_snapshot_timestamp[] = "error getting snapshot timestamp for image: %s, snap_id: %d";
2348static char __pyx_k_error_getting_snapshot_trash_nam[] = "error getting snapshot trash namespace image: %s, snap_id: %d";
2349static char __pyx_k_error_getting_stripe_count_for_i[] = "error getting stripe count for image %s";
2350static char __pyx_k_error_getting_stripe_unit_for_im[] = "error getting stripe unit for image %s";
2351static char __pyx_k_error_listing_images_for_group_s[] = "error listing images for group %s";
2352static char __pyx_k_error_listing_lock_owners_for_im[] = "error listing lock owners for image %s";
2353static char __pyx_k_error_listing_metadata_for_image[] = "error listing metadata for image %s";
2354static char __pyx_k_error_listing_mirror_images_inst[] = "error listing mirror images instance ids";
2355static char __pyx_k_error_listing_mirror_images_stat[] = "error listing mirror images status";
2356static char __pyx_k_error_listing_snapshots_for_grou[] = "error listing snapshots for group %s";
2357static char __pyx_k_error_listing_snapshots_for_imag[] = "error listing snapshots for image %s";
2358static char __pyx_k_error_opening_image_s_at_snapsho[] = "error opening image %s at snapshot %s";
2359static char __pyx_k_error_promoting_image_s_to_prima[] = "error promoting image %s to primary";
2360static char __pyx_k_error_removing_metadata_s_for_im[] = "error removing metadata %s for image %s";
2361static char __pyx_k_error_removing_snapshot_limit_fo[] = "error removing snapshot limit for %s";
2362static char __pyx_k_error_removing_snapshot_s_from_s[] = "error removing snapshot %s from %s";
2363static char __pyx_k_error_renaming_snapshot_of_s_fro[] = "error renaming snapshot of %s from %s to %s";
2364static char __pyx_k_error_restoring_image_from_trash[] = "error restoring image from trash";
2365static char __pyx_k_error_retrieving_image_from_tras[] = "error retrieving image from trash";
2366static char __pyx_k_error_rolling_back_group_to_snap[] = "error rolling back group to snapshot";
2367static char __pyx_k_error_rolling_back_image_s_to_sn[] = "error rolling back image %s to snapshot %s";
2368static char __pyx_k_error_setting_image_s_to_snapsho[] = "error setting image %s to snapshot %s";
2369static char __pyx_k_error_setting_metadata_s_for_ima[] = "error setting metadata %s for image %s";
2370static char __pyx_k_error_setting_mirror_peer_attrib[] = "error setting mirror peer attributes";
2371static char __pyx_k_error_setting_mirror_peer_client[] = "error setting mirror peer client";
2372static char __pyx_k_error_setting_mirror_peer_cluste[] = "error setting mirror peer cluster";
2373static char __pyx_k_error_setting_snapshot_limit_for[] = "error setting snapshot limit for %s";
2374static char __pyx_k_error_updating_features_for_imag[] = "error updating features for image %s";
2375static char __pyx_k_format_1_images_do_not_support_f[] = "format 1 images do not support feature masks, non-default striping, nor data pool";
2376static char __pyx_k_image_name_or_image_id_was_not_s[] = "image name or image id was not specified";
2377static char __pyx_k_logic_error_rbd_write_s_returned[] = "logic error: rbd_write(%s) returned %d, but %d was the maximum number of bytes it could have written.";
2378static char __pyx_k_RBD_IMAGE_MIGRATION_STATE_EXECUT_2[] = "RBD_IMAGE_MIGRATION_STATE_EXECUTED";
2379static char __pyx_k_RBD_IMAGE_MIGRATION_STATE_PREPAR_2[] = "RBD_IMAGE_MIGRATION_STATE_PREPARED";
2380static char __pyx_k_error_removing_snapshot_s_from_s_2[] = "error removing snapshot %s from %s with flags %llx";
2381static char __pyx_k_error_setting_image_s_to_snapsho_2[] = "error setting image %s to snapshot %d";
2382static PyObject *__pyx_n_s_ArgumentOutOfRange;
2383static PyObject *__pyx_n_s_ArgumentOutOfRange___init;
2384static PyObject *__pyx_n_s_ChildIterator___iter;
2385static PyObject *__pyx_n_s_ConfigImageIterator___iter;
2386static PyObject *__pyx_n_s_ConfigPoolIterator___iter;
2387static PyObject *__pyx_n_s_ConnectionShutdown;
2388static PyObject *__pyx_n_s_ConnectionShutdown___init;
2389static PyObject *__pyx_n_s_DiskQuotaExceeded;
2390static PyObject *__pyx_n_s_DiskQuotaExceeded___init;
2391static PyObject *__pyx_n_s_ECANCELED;
2392static PyObject *__pyx_n_s_Error;
2393static PyObject *__pyx_n_s_Exception;
2394static PyObject *__pyx_n_s_FunctionNotSupported;
2395static PyObject *__pyx_n_s_FunctionNotSupported___init;
2396static PyObject *__pyx_n_s_GroupImageIterator___iter;
2397static PyObject *__pyx_n_s_GroupSnapIterator___iter;
2398static PyObject *__pyx_n_s_IOError;
2399static PyObject *__pyx_n_s_IOError___init;
2400static PyObject *__pyx_n_s_ImageBusy;
2401static PyObject *__pyx_n_s_ImageBusy___init;
2402static PyObject *__pyx_n_s_ImageExists;
2403static PyObject *__pyx_n_s_ImageExists___init;
2404static PyObject *__pyx_n_s_ImageHasSnapshots;
2405static PyObject *__pyx_n_s_ImageHasSnapshots___init;
2406static PyObject *__pyx_n_s_ImageIterator___iter;
2407static PyObject *__pyx_n_s_ImageNotFound;
2408static PyObject *__pyx_n_s_ImageNotFound___init;
2409static PyObject *__pyx_n_s_ImportError;
2410static PyObject *__pyx_n_s_IncompleteWriteError;
2411static PyObject *__pyx_n_s_IncompleteWriteError___init;
2412static PyObject *__pyx_n_s_InvalidArgument;
2413static PyObject *__pyx_n_s_InvalidArgument___init;
2414static PyObject *__pyx_n_s_Iterable;
2415static PyObject *__pyx_n_s_KeyError;
2416static PyObject *__pyx_n_s_LockOwnerIterator___iter;
2417static PyObject *__pyx_n_s_LogicError;
2418static PyObject *__pyx_n_s_LogicError___init;
2419static PyObject *__pyx_n_s_MIGRATION;
2420static PyObject *__pyx_n_s_MIRRORING;
2421static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_ERROR;
2422static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_REPLAY;
2423static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STARTI;
2424static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STOPPE;
2425static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STOPPI;
2426static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_SYNCIN;
2427static PyObject *__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_UNKNOW;
2428static PyObject *__pyx_n_s_MemoryError;
2429static PyObject *__pyx_n_s_MetadataIterator___iter;
2430static PyObject *__pyx_n_s_MirrorImageInstanceIdIterator;
2431static PyObject *__pyx_n_s_MirrorImageStatusIterator___iter;
2432static PyObject *__pyx_n_s_MirrorPeerIterator___iter;
2433static PyObject *__pyx_n_s_NoSpace;
2434static PyObject *__pyx_n_s_NoSpace___init;
2435static PyObject *__pyx_n_s_OSError;
2436static PyObject *__pyx_n_s_OSError___init;
2437static PyObject *__pyx_n_s_OSError___reduce;
2438static PyObject *__pyx_n_s_OSError___str;
2439static PyObject *__pyx_kp_s_OSError_class_derived_from_Erro;
2440static PyObject *__pyx_n_s_ObjectExists;
2441static PyObject *__pyx_n_s_ObjectExists___init;
2442static PyObject *__pyx_n_s_ObjectNotFound;
2443static PyObject *__pyx_n_s_ObjectNotFound___init;
2444static PyObject *__pyx_n_s_OperationCanceled;
2445static PyObject *__pyx_n_s_OperationCanceled___init;
2446static PyObject *__pyx_n_s_PermissionError;
2447static PyObject *__pyx_n_s_PermissionError___init;
2448static PyObject *__pyx_n_s_PoolMetadataIterator___iter;
2449static PyObject *__pyx_n_s_RBD;
2450static PyObject *__pyx_n_s_RBD_CONFIG_SOURCE_CONFIG;
2451static PyObject *__pyx_n_s_RBD_CONFIG_SOURCE_IMAGE;
2452static PyObject *__pyx_n_s_RBD_CONFIG_SOURCE_POOL;
2453static PyObject *__pyx_n_s_RBD_FEATURES_ALL;
2454static PyObject *__pyx_n_s_RBD_FEATURES_INCOMPATIBLE;
2455static PyObject *__pyx_n_s_RBD_FEATURES_MUTABLE;
2456static PyObject *__pyx_n_s_RBD_FEATURES_RW_INCOMPATIBLE;
2457static PyObject *__pyx_n_s_RBD_FEATURES_SINGLE_CLIENT;
2458static PyObject *__pyx_n_s_RBD_FEATURE_DATA_POOL;
2459static PyObject *__pyx_n_s_RBD_FEATURE_DEEP_FLATTEN;
2460static PyObject *__pyx_n_s_RBD_FEATURE_EXCLUSIVE_LOCK;
2461static PyObject *__pyx_n_s_RBD_FEATURE_FAST_DIFF;
2462static PyObject *__pyx_n_s_RBD_FEATURE_JOURNALING;
2463static PyObject *__pyx_n_s_RBD_FEATURE_LAYERING;
2464static PyObject *__pyx_n_s_RBD_FEATURE_MIGRATING;
2465static PyObject *__pyx_n_s_RBD_FEATURE_OBJECT_MAP;
2466static PyObject *__pyx_n_s_RBD_FEATURE_OPERATIONS;
2467static PyObject *__pyx_n_s_RBD_FEATURE_STRIPINGV2;
2468static PyObject *__pyx_n_s_RBD_FLAG_FAST_DIFF_INVALID;
2469static PyObject *__pyx_n_s_RBD_FLAG_OBJECT_MAP_INVALID;
2470static PyObject *__pyx_n_s_RBD_GROUP_IMAGE_STATE_ATTACHED;
2471static PyObject *__pyx_n_s_RBD_GROUP_IMAGE_STATE_INCOMPLETE;
2472static PyObject *__pyx_n_s_RBD_GROUP_SNAP_STATE_COMPLETE;
2473static PyObject *__pyx_n_s_RBD_GROUP_SNAP_STATE_INCOMPLETE;
2474static PyObject *__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_ERROR;
2475static PyObject *__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_EXECUT;
2476static PyObject *__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_EXECUT_2;
2477static PyObject *__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_PREPAR;
2478static PyObject *__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_PREPAR_2;
2479static PyObject *__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_UNKNOW;
2480static PyObject *__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL;
2481static PyObject *__pyx_n_s_RBD_IMAGE_OPTION_FEATURES;
2482static PyObject *__pyx_n_s_RBD_IMAGE_OPTION_FORMAT;
2483static PyObject *__pyx_n_s_RBD_IMAGE_OPTION_ORDER;
2484static PyObject *__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT;
2485static PyObject *__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT;
2486static PyObject *__pyx_kp_s_RBD_I_O_error_s;
2487static PyObject *__pyx_n_s_RBD_LOCK_MODE_EXCLUSIVE;
2488static PyObject *__pyx_n_s_RBD_LOCK_MODE_SHARED;
2489static PyObject *__pyx_n_s_RBD_MIRROR_IMAGE_DISABLED;
2490static PyObject *__pyx_n_s_RBD_MIRROR_IMAGE_DISABLING;
2491static PyObject *__pyx_n_s_RBD_MIRROR_IMAGE_ENABLED;
2492static PyObject *__pyx_n_s_RBD_MIRROR_MODE_DISABLED;
2493static PyObject *__pyx_n_s_RBD_MIRROR_MODE_IMAGE;
2494static PyObject *__pyx_n_s_RBD_MIRROR_MODE_POOL;
2495static PyObject *__pyx_n_s_RBD_MIRROR_PEER_ATTRIBUTE_NAME_K;
2496static PyObject *__pyx_n_s_RBD_MIRROR_PEER_ATTRIBUTE_NAME_M;
2497static PyObject *__pyx_n_s_RBD_OPERATION_FEATURE_CLONE_CHIL;
2498static PyObject *__pyx_n_s_RBD_OPERATION_FEATURE_CLONE_PARE;
2499static PyObject *__pyx_n_s_RBD_OPERATION_FEATURE_GROUP;
2500static PyObject *__pyx_n_s_RBD_OPERATION_FEATURE_SNAP_TRASH;
2501static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGES;
2502static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_MAX_P;
2503static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_PROVI;
2504static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_SNAPS;
2505static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_IMAGE;
2506static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_MAX_P;
2507static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_PROVI;
2508static PyObject *__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_SNAPS;
2509static PyObject *__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_GROUP;
2510static PyObject *__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_TRASH;
2511static PyObject *__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_USER;
2512static PyObject *__pyx_kp_s_RBD_arguments_out_of_range_s;
2513static PyObject *__pyx_n_s_RBD_clone;
2514static PyObject *__pyx_n_s_RBD_config_list;
2515static PyObject *__pyx_kp_s_RBD_connection_was_shutdown_s;
2516static PyObject *__pyx_n_s_RBD_create;
2517static PyObject *__pyx_kp_s_RBD_disk_quota_exceeded_s;
2518static PyObject *__pyx_kp_s_RBD_function_not_supported_s;
2519static PyObject *__pyx_n_s_RBD_group_create;
2520static PyObject *__pyx_n_s_RBD_group_list;
2521static PyObject *__pyx_n_s_RBD_group_remove;
2522static PyObject *__pyx_n_s_RBD_group_rename;
2523static PyObject *__pyx_kp_s_RBD_image_already_exists_s;
2524static PyObject *__pyx_kp_s_RBD_image_has_snapshots_s;
2525static PyObject *__pyx_kp_s_RBD_image_is_busy_s;
2526static PyObject *__pyx_kp_s_RBD_image_not_found_s;
2527static PyObject *__pyx_kp_s_RBD_incomplete_write_s;
2528static PyObject *__pyx_kp_s_RBD_insufficient_space_available;
2529static PyObject *__pyx_kp_s_RBD_invalid_argument_s;
2530static PyObject *__pyx_n_s_RBD_list;
2531static PyObject *__pyx_n_s_RBD_list2;
2532static PyObject *__pyx_kp_s_RBD_logic_error_s;
2533static PyObject *__pyx_n_s_RBD_migration_abort;
2534static PyObject *__pyx_n_s_RBD_migration_commit;
2535static PyObject *__pyx_n_s_RBD_migration_execute;
2536static PyObject *__pyx_n_s_RBD_migration_prepare;
2537static PyObject *__pyx_n_s_RBD_migration_status;
2538static PyObject *__pyx_n_s_RBD_mirror_image_instance_id_lis;
2539static PyObject *__pyx_n_s_RBD_mirror_image_status_list;
2540static PyObject *__pyx_n_s_RBD_mirror_image_status_summary;
2541static PyObject *__pyx_n_s_RBD_mirror_mode_get;
2542static PyObject *__pyx_n_s_RBD_mirror_mode_set;
2543static PyObject *__pyx_n_s_RBD_mirror_peer_add;
2544static PyObject *__pyx_n_s_RBD_mirror_peer_get_attributes;
2545static PyObject *__pyx_n_s_RBD_mirror_peer_list;
2546static PyObject *__pyx_n_s_RBD_mirror_peer_remove;
2547static PyObject *__pyx_n_s_RBD_mirror_peer_set_attributes;
2548static PyObject *__pyx_n_s_RBD_mirror_peer_set_client;
2549static PyObject *__pyx_n_s_RBD_mirror_peer_set_cluster;
2550static PyObject *__pyx_n_s_RBD_namespace_create;
2551static PyObject *__pyx_n_s_RBD_namespace_exists;
2552static PyObject *__pyx_n_s_RBD_namespace_list;
2553static PyObject *__pyx_n_s_RBD_namespace_remove;
2554static PyObject *__pyx_kp_s_RBD_object_already_exists_s;
2555static PyObject *__pyx_kp_s_RBD_object_not_found_s;
2556static PyObject *__pyx_kp_s_RBD_operation_canceled_s;
2557static PyObject *__pyx_kp_s_RBD_operation_timeout_s;
2558static PyObject *__pyx_kp_s_RBD_permission_error_s;
2559static PyObject *__pyx_n_s_RBD_pool_init;
2560static PyObject *__pyx_n_s_RBD_pool_metadata_get;
2561static PyObject *__pyx_n_s_RBD_pool_metadata_list;
2562static PyObject *__pyx_n_s_RBD_pool_metadata_remove;
2563static PyObject *__pyx_n_s_RBD_pool_metadata_set;
2564static PyObject *__pyx_n_s_RBD_pool_stats_get;
2565static PyObject *__pyx_kp_s_RBD_read_only_image_s;
2566static PyObject *__pyx_n_s_RBD_remove;
2567static PyObject *__pyx_n_s_RBD_rename;
2568static PyObject *__pyx_n_s_RBD_trash_get;
2569static PyObject *__pyx_n_s_RBD_trash_list;
2570static PyObject *__pyx_n_s_RBD_trash_move;
2571static PyObject *__pyx_n_s_RBD_trash_purge;
2572static PyObject *__pyx_n_s_RBD_trash_remove;
2573static PyObject *__pyx_n_s_RBD_trash_restore;
2574static PyObject *__pyx_n_s_RBD_version;
2575static PyObject *__pyx_n_s_REMOVING;
2576static PyObject *__pyx_n_s_ReadOnlyImage;
2577static PyObject *__pyx_n_s_ReadOnlyImage___init;
2578static PyObject *__pyx_n_s_SnapIterator___iter;
2579static PyObject *__pyx_kp_s_This_class_wraps_librbd_CRUD_fu;
2580static PyObject *__pyx_n_s_Timeout;
2581static PyObject *__pyx_n_s_Timeout___init;
2582static PyObject *__pyx_n_s_TrashIterator___iter;
2583static PyObject *__pyx_n_s_TypeError;
2584static PyObject *__pyx_n_s_USER;
2585static PyObject *__pyx_n_s_WatcherIterator___iter;
2586static PyObject *__pyx_kp_s_Wrote_only_ld_out_of_ld_bytes;
2587static PyObject *__pyx_kp_b__5;
2588static PyObject *__pyx_n_s_addr;
2589static PyObject *__pyx_n_s_aio_read_locals_oncomplete;
2590static PyObject *__pyx_n_s_allow_shrink;
2591static PyObject *__pyx_n_s_args;
2592static PyObject *__pyx_n_s_attributes;
2593static PyObject *__pyx_n_s_block_name_prefix;
2594static PyObject *__pyx_n_s_c_info;
2595static PyObject *__pyx_n_s_c_ioctx;
2596static PyObject *__pyx_n_s_c_ioctx_2;
2597static PyObject *__pyx_n_s_c_name;
2598static PyObject *__pyx_n_s_c_name_2;
2599static PyObject *__pyx_n_s_c_names;
2600static PyObject *__pyx_n_s_c_status;
2601static PyObject *__pyx_n_s_chain;
2602static PyObject *__pyx_n_s_class;
2603static PyObject *__pyx_n_s_client;
2604static PyObject *__pyx_n_s_client_name;
2605static PyObject *__pyx_n_s_client_name_2;
2606static PyObject *__pyx_n_s_clone;
2607static PyObject *__pyx_n_s_close;
2608static PyObject *__pyx_n_s_cluster_name;
2609static PyObject *__pyx_n_s_cluster_name_2;
2610static PyObject *__pyx_n_s_collections;
2611static PyObject *__pyx_n_s_collections_abc;
2612static PyObject *__pyx_n_s_completion_v;
2613static PyObject *__pyx_n_s_completion_v_2;
2614static PyObject *__pyx_n_s_config_list;
2615static PyObject *__pyx_n_s_cookie;
2616static PyObject *__pyx_n_s_count;
2617static PyObject *__pyx_n_s_counts;
2618static PyObject *__pyx_n_s_create;
2619static PyObject *__pyx_n_s_cstr;
2620static PyObject *__pyx_n_s_data;
2621static PyObject *__pyx_kp_s_data_must_be_a_byte_string;
2622static PyObject *__pyx_n_s_data_pool;
2623static PyObject *__pyx_n_s_datetime;
2624static PyObject *__pyx_n_s_decode;
2625static PyObject *__pyx_n_s_decode_cstr;
2626static PyObject *__pyx_n_s_deferment_end_time;
2627static PyObject *__pyx_n_s_delay;
2628static PyObject *__pyx_n_s_delay_2;
2629static PyObject *__pyx_n_s_deletion_time;
2630static PyObject *__pyx_n_s_descendants;
2631static PyObject *__pyx_n_s_description;
2632static PyObject *__pyx_n_s_dest;
2633static PyObject *__pyx_n_s_dest_2;
2634static PyObject *__pyx_n_s_dest_image_id;
2635static PyObject *__pyx_n_s_dest_image_name;
2636static PyObject *__pyx_n_s_dest_image_name_2;
2637static PyObject *__pyx_n_s_dest_ioctx;
2638static PyObject *__pyx_n_s_dest_ioctx_2;
2639static PyObject *__pyx_n_s_dest_name;
2640static PyObject *__pyx_n_s_dest_pool_id;
2641static PyObject *__pyx_n_s_dest_pool_namespace;
2642static PyObject *__pyx_n_s_doc;
2643static PyObject *__pyx_n_s_dstname;
2644static PyObject *__pyx_n_s_enabled;
2645static PyObject *__pyx_n_s_encode;
2646static PyObject *__pyx_n_s_encoding;
2647static PyObject *__pyx_n_s_errno;
2648static PyObject *__pyx_kp_s_errno_0_1;
2649static PyObject *__pyx_kp_s_error_aborting_migration;
2650static PyObject *__pyx_kp_s_error_acquiring_exclusive_lock_o;
2651static PyObject *__pyx_kp_s_error_acquiring_lock_on_image;
2652static PyObject *__pyx_kp_s_error_acquiring_shared_lock_on_i;
2653static PyObject *__pyx_kp_s_error_adding_image_to_group;
2654static PyObject *__pyx_kp_s_error_adding_mirror_peer;
2655static PyObject *__pyx_kp_s_error_allow_shrink_is_False_but;
2656static PyObject *__pyx_kp_s_error_breaking_lock_on_image;
2657static PyObject *__pyx_kp_s_error_checking_if_snapshot_s_s_i;
2658static PyObject *__pyx_kp_s_error_copying_image_s_to_s;
2659static PyObject *__pyx_kp_s_error_creating_clone;
2660static PyObject *__pyx_kp_s_error_creating_group_s;
2661static PyObject *__pyx_kp_s_error_creating_group_snapshot;
2662static PyObject *__pyx_kp_s_error_creating_image;
2663static PyObject *__pyx_kp_s_error_creating_namespace;
2664static PyObject *__pyx_kp_s_error_creating_snapshot_s_from_s;
2665static PyObject *__pyx_kp_s_error_deleting_image_from_trash;
2666static PyObject *__pyx_kp_s_error_demoting_image_s_to_second;
2667static PyObject *__pyx_kp_s_error_disabling_mirroring_for_im;
2668static PyObject *__pyx_kp_s_error_discarding_region_d_d;
2669static PyObject *__pyx_kp_s_error_discarding_s_ld_ld;
2670static PyObject *__pyx_kp_s_error_enabling_mirroring_for_ima;
2671static PyObject *__pyx_kp_s_error_flattening_s;
2672static PyObject *__pyx_kp_s_error_flushing;
2673static PyObject *__pyx_kp_s_error_flushing_image;
2674static PyObject *__pyx_kp_s_error_generating_diff_from_snaps;
2675static PyObject *__pyx_kp_s_error_getting_a_completion;
2676static PyObject *__pyx_kp_s_error_getting_access_timestamp_f;
2677static PyObject *__pyx_kp_s_error_getting_block_name_prefix;
2678static PyObject *__pyx_kp_s_error_getting_create_timestamp_f;
2679static PyObject *__pyx_kp_s_error_getting_features_for_image;
2680static PyObject *__pyx_kp_s_error_getting_flags_for_image_s;
2681static PyObject *__pyx_kp_s_error_getting_group_for_image_s;
2682static PyObject *__pyx_kp_s_error_getting_id_for_image_s;
2683static PyObject *__pyx_kp_s_error_getting_info_for_image_s;
2684static PyObject *__pyx_kp_s_error_getting_lock_status_for_im;
2685static PyObject *__pyx_kp_s_error_getting_metadata_s;
2686static PyObject *__pyx_kp_s_error_getting_metadata_s_for_ima;
2687static PyObject *__pyx_kp_s_error_getting_migration_status;
2688static PyObject *__pyx_kp_s_error_getting_mirror_image_statu;
2689static PyObject *__pyx_kp_s_error_getting_mirror_info_for_im;
2690static PyObject *__pyx_kp_s_error_getting_mirror_instance_id;
2691static PyObject *__pyx_kp_s_error_getting_mirror_mode;
2692static PyObject *__pyx_kp_s_error_getting_mirror_peer_attrib;
2693static PyObject *__pyx_kp_s_error_getting_mirror_status_for;
2694static PyObject *__pyx_kp_s_error_getting_modify_timestamp_f;
2695static PyObject *__pyx_kp_s_error_getting_name_for_image_s;
2696static PyObject *__pyx_kp_s_error_getting_old_format_for_ima;
2697static PyObject *__pyx_kp_s_error_getting_op_features_for_im;
2698static PyObject *__pyx_kp_s_error_getting_overlap_for_image;
2699static PyObject *__pyx_kp_s_error_getting_parent_info_for_im;
2700static PyObject *__pyx_kp_s_error_getting_size_for_image_s;
2701static PyObject *__pyx_kp_s_error_getting_snapshot_group_nam;
2702static PyObject *__pyx_kp_s_error_getting_snapshot_limit_for;
2703static PyObject *__pyx_kp_s_error_getting_snapshot_namespace;
2704static PyObject *__pyx_kp_s_error_getting_snapshot_timestamp;
2705static PyObject *__pyx_kp_s_error_getting_snapshot_trash_nam;
2706static PyObject *__pyx_kp_s_error_getting_stripe_count_for_i;
2707static PyObject *__pyx_kp_s_error_getting_stripe_unit_for_im;
2708static PyObject *__pyx_kp_s_error_initializing_pool;
2709static PyObject *__pyx_kp_s_error_invalidating_cache;
2710static PyObject *__pyx_kp_s_error_listing_children;
2711static PyObject *__pyx_kp_s_error_listing_config_options;
2712static PyObject *__pyx_kp_s_error_listing_groups;
2713static PyObject *__pyx_kp_s_error_listing_images;
2714static PyObject *__pyx_kp_s_error_listing_images_2;
2715static PyObject *__pyx_kp_s_error_listing_images_for_group_s;
2716static PyObject *__pyx_kp_s_error_listing_lock_owners_for_im;
2717static PyObject *__pyx_kp_s_error_listing_metadata;
2718static PyObject *__pyx_kp_s_error_listing_metadata_for_image;
2719static PyObject *__pyx_kp_s_error_listing_mirror_images_inst;
2720static PyObject *__pyx_kp_s_error_listing_mirror_images_stat;
2721static PyObject *__pyx_kp_s_error_listing_namespaces;
2722static PyObject *__pyx_kp_s_error_listing_peers;
2723static PyObject *__pyx_kp_s_error_listing_snapshots_for_grou;
2724static PyObject *__pyx_kp_s_error_listing_snapshots_for_imag;
2725static PyObject *__pyx_kp_s_error_listing_trash_entries;
2726static PyObject *__pyx_kp_s_error_listing_watchers;
2727static PyObject *__pyx_kp_s_error_migrating_image_s;
2728static PyObject *__pyx_kp_s_error_moving_image_to_trash;
2729static PyObject *__pyx_kp_s_error_opening_image_s_at_snapsho;
2730static PyObject *__pyx_kp_s_error_promoting_image_s_to_prima;
2731static PyObject *__pyx_kp_s_error_protecting_snapshot_s_s;
2732static PyObject *__pyx_kp_s_error_purging_images_from_trash;
2733static PyObject *__pyx_kp_s_error_reading_s_ld_ld;
2734static PyObject *__pyx_kp_s_error_rebuilding_object_map_s;
2735static PyObject *__pyx_kp_s_error_releasing_lock_on_image;
2736static PyObject *__pyx_kp_s_error_removing_group;
2737static PyObject *__pyx_kp_s_error_removing_group_snapshot;
2738static PyObject *__pyx_kp_s_error_removing_image;
2739static PyObject *__pyx_kp_s_error_removing_image_from_group;
2740static PyObject *__pyx_kp_s_error_removing_metadata_s;
2741static PyObject *__pyx_kp_s_error_removing_metadata_s_for_im;
2742static PyObject *__pyx_kp_s_error_removing_mirror_peer;
2743static PyObject *__pyx_kp_s_error_removing_namespace;
2744static PyObject *__pyx_kp_s_error_removing_snapshot_limit_fo;
2745static PyObject *__pyx_kp_s_error_removing_snapshot_s_from_s;
2746static PyObject *__pyx_kp_s_error_removing_snapshot_s_from_s_2;
2747static PyObject *__pyx_kp_s_error_renaming_group;
2748static PyObject *__pyx_kp_s_error_renaming_group_snapshot;
2749static PyObject *__pyx_kp_s_error_renaming_image;
2750static PyObject *__pyx_kp_s_error_renaming_snapshot_of_s_fro;
2751static PyObject *__pyx_kp_s_error_resizing_image_s;
2752static PyObject *__pyx_kp_s_error_restoring_image_from_trash;
2753static PyObject *__pyx_kp_s_error_retrieving_image_from_tras;
2754static PyObject *__pyx_kp_s_error_retrieving_pool_stats;
2755static PyObject *__pyx_kp_s_error_rolling_back_group_to_snap;
2756static PyObject *__pyx_kp_s_error_rolling_back_image_s_to_sn;
2757static PyObject *__pyx_kp_s_error_setting_image_s_to_snapsho;
2758static PyObject *__pyx_kp_s_error_setting_image_s_to_snapsho_2;
2759static PyObject *__pyx_kp_s_error_setting_metadata_s;
2760static PyObject *__pyx_kp_s_error_setting_metadata_s_for_ima;
2761static PyObject *__pyx_kp_s_error_setting_mirror_mode;
2762static PyObject *__pyx_kp_s_error_setting_mirror_peer_attrib;
2763static PyObject *__pyx_kp_s_error_setting_mirror_peer_client;
2764static PyObject *__pyx_kp_s_error_setting_mirror_peer_cluste;
2765static PyObject *__pyx_kp_s_error_setting_snapshot_limit_for;
2766static PyObject *__pyx_kp_s_error_sparsifying_s;
2767static PyObject *__pyx_kp_s_error_to_resync_image_s;
2768static PyObject *__pyx_kp_s_error_unlocking_image;
2769static PyObject *__pyx_kp_s_error_unprotecting_snapshot_s_s;
2770static PyObject *__pyx_kp_s_error_updating_features_for_imag;
2771static PyObject *__pyx_kp_s_error_verifying_namespace;
2772static PyObject *__pyx_kp_s_error_while_closing_image_s;
2773static PyObject *__pyx_kp_s_error_writing_s_ld_ld;
2774static PyObject *__pyx_kp_s_error_writing_to_s;
2775static PyObject *__pyx_n_s_exc_info;
2776static PyObject *__pyx_n_s_exclusive;
2777static PyObject *__pyx_n_s_exists;
2778static PyObject *__pyx_n_s_expire_epoch_ts;
2779static PyObject *__pyx_n_s_expire_ts;
2780static PyObject *__pyx_n_s_expire_ts_2;
2781static PyObject *__pyx_n_s_extra;
2782static PyObject *__pyx_n_s_fadvise_flags;
2783static PyObject *__pyx_n_s_features;
2784static PyObject *__pyx_n_s_flags;
2785static PyObject *__pyx_n_s_force;
2786static PyObject *__pyx_n_s_force_2;
2787static PyObject *__pyx_n_s_format;
2788static PyObject *__pyx_kp_s_format_1_images_do_not_support_f;
2789static PyObject *__pyx_n_s_from_snapshot;
2790static PyObject *__pyx_n_s_fromtimestamp;
2791static PyObject *__pyx_n_s_get_completion;
2792static PyObject *__pyx_n_s_get_name;
2793static PyObject *__pyx_n_s_get_next_chunk;
2794static PyObject *__pyx_n_s_get_return_value;
2795static PyObject *__pyx_n_s_global_id;
2796static PyObject *__pyx_n_s_group;
2797static PyObject *__pyx_n_s_group_create;
2798static PyObject *__pyx_n_s_group_list;
2799static PyObject *__pyx_n_s_group_remove;
2800static PyObject *__pyx_n_s_group_rename;
2801static PyObject *__pyx_kp_s_home_bhubbard_working_src_ceph;
2802static PyObject *__pyx_n_s_i;
2803static PyObject *__pyx_n_s_id;
2804static PyObject *__pyx_n_s_image;
2805static PyObject *__pyx_n_s_image_count;
2806static PyObject *__pyx_n_s_image_count_2;
2807static PyObject *__pyx_n_s_image_id;
2808static PyObject *__pyx_n_s_image_id_2;
2809static PyObject *__pyx_n_s_image_ioctx;
2810static PyObject *__pyx_n_s_image_max_provisioned_bytes;
2811static PyObject *__pyx_n_s_image_max_provisioned_bytes_2;
2812static PyObject *__pyx_n_s_image_name;
2813static PyObject *__pyx_n_s_image_name_2;
2814static PyObject *__pyx_kp_s_image_name_or_image_id_was_not_s;
2815static PyObject *__pyx_n_s_image_provisioned_bytes;
2816static PyObject *__pyx_n_s_image_provisioned_bytes_2;
2817static PyObject *__pyx_n_s_image_snap_count;
2818static PyObject *__pyx_n_s_image_snap_count_2;
2819static PyObject *__pyx_n_s_import;
2820static PyObject *__pyx_n_s_include_parent;
2821static PyObject *__pyx_n_s_info;
2822static PyObject *__pyx_n_s_init;
2823static PyObject *__pyx_n_s_ioctx;
2824static PyObject *__pyx_n_s_ioctx_2;
2825static PyObject *__pyx_n_s_items;
2826static PyObject *__pyx_n_s_iter;
2827static PyObject *__pyx_n_s_iterate_cb;
2828static PyObject *__pyx_n_s_itertools;
2829static PyObject *__pyx_n_s_join;
2830static PyObject *__pyx_n_s_key;
2831static PyObject *__pyx_n_s_key_2;
2832static PyObject *__pyx_n_s_keys;
2833static PyObject *__pyx_n_s_keys_2;
2834static PyObject *__pyx_n_s_keys_size;
2835static PyObject *__pyx_n_s_keys_str;
2836static PyObject *__pyx_n_s_last_read;
2837static PyObject *__pyx_n_s_last_update;
2838static PyObject *__pyx_n_s_length;
2839static PyObject *__pyx_n_s_list;
2840static PyObject *__pyx_n_s_list2;
2841static PyObject *__pyx_n_s_lock_mode;
2842static PyObject *__pyx_n_s_lock_owner;
2843static PyObject *__pyx_n_s_lockers;
2844static PyObject *__pyx_kp_s_logic_error_rbd_write_s_returned;
2845static PyObject *__pyx_n_s_main;
2846static PyObject *__pyx_n_s_major;
2847static PyObject *__pyx_n_s_map;
2848static PyObject *__pyx_n_s_maxlen;
2849static PyObject *__pyx_n_s_message;
2850static PyObject *__pyx_n_s_metaclass;
2851static PyObject *__pyx_n_s_migration_abort;
2852static PyObject *__pyx_n_s_migration_commit;
2853static PyObject *__pyx_n_s_migration_execute;
2854static PyObject *__pyx_n_s_migration_prepare;
2855static PyObject *__pyx_n_s_migration_status;
2856static PyObject *__pyx_n_s_minor;
2857static PyObject *__pyx_n_s_mirror_image_instance_id_list;
2858static PyObject *__pyx_n_s_mirror_image_status_list;
2859static PyObject *__pyx_n_s_mirror_image_status_summary;
2860static PyObject *__pyx_n_s_mirror_mode;
2861static PyObject *__pyx_n_s_mirror_mode_2;
2862static PyObject *__pyx_n_s_mirror_mode_get;
2863static PyObject *__pyx_n_s_mirror_mode_set;
2864static PyObject *__pyx_n_s_mirror_peer_add;
2865static PyObject *__pyx_n_s_mirror_peer_get_attributes;
2866static PyObject *__pyx_n_s_mirror_peer_list;
2867static PyObject *__pyx_n_s_mirror_peer_remove;
2868static PyObject *__pyx_n_s_mirror_peer_set_attributes;
2869static PyObject *__pyx_n_s_mirror_peer_set_client;
2870static PyObject *__pyx_n_s_mirror_peer_set_cluster;
2871static PyObject *__pyx_n_s_mktime;
2872static PyObject *__pyx_n_s_mode;
2873static PyObject *__pyx_n_s_module;
2874static PyObject *__pyx_n_s_msg;
2875static PyObject *__pyx_n_s_name;
2876static PyObject *__pyx_n_s_name_2;
2877static PyObject *__pyx_n_s_names;
2878static PyObject *__pyx_n_s_namespace;
2879static PyObject *__pyx_n_s_namespace_create;
2880static PyObject *__pyx_n_s_namespace_exists;
2881static PyObject *__pyx_n_s_namespace_list;
2882static PyObject *__pyx_n_s_namespace_remove;
2883static PyObject *__pyx_n_s_new_snap_name;
2884static PyObject *__pyx_kp_s_no_metadata_s;
2885static PyObject *__pyx_kp_s_no_metadata_s_for_image_s;
2886static PyObject *__pyx_n_s_num_objs;
2887static PyObject *__pyx_n_s_obj_size;
2888static PyObject *__pyx_n_s_object;
2889static PyObject *__pyx_n_s_offset;
2890static PyObject *__pyx_n_s_old_format;
2891static PyObject *__pyx_n_s_old_snap_name;
2892static PyObject *__pyx_n_s_on_progress;
2893static PyObject *__pyx_n_s_oncomplete;
2894static PyObject *__pyx_n_s_oncomplete_2;
2895static PyObject *__pyx_kp_s_only_need_to_specify_image_name;
2896static PyObject *__pyx_n_s_opt;
2897static PyObject *__pyx_n_s_opts;
2898static PyObject *__pyx_n_s_order;
2899static PyObject *__pyx_n_s_order_2;
2900static PyObject *__pyx_n_s_original_name;
2901static PyObject *__pyx_n_s_owner;
2902static PyObject *__pyx_n_s_p_ioctx;
2903static PyObject *__pyx_n_s_p_ioctx_2;
2904static PyObject *__pyx_n_s_p_name;
2905static PyObject *__pyx_n_s_p_name_2;
2906static PyObject *__pyx_n_s_p_snapname;
2907static PyObject *__pyx_n_s_p_snapname_2;
2908static PyObject *__pyx_n_s_parent_name;
2909static PyObject *__pyx_n_s_parent_pool;
2910static PyObject *__pyx_n_s_pool;
2911static PyObject *__pyx_n_s_pool_init;
2912static PyObject *__pyx_n_s_pool_metadata_get;
2913static PyObject *__pyx_n_s_pool_metadata_list;
2914static PyObject *__pyx_n_s_pool_metadata_remove;
2915static PyObject *__pyx_n_s_pool_metadata_set;
2916static PyObject *__pyx_n_s_pool_namespace;
2917static PyObject *__pyx_n_s_pool_stats_get;
2918static PyObject *__pyx_n_s_prepare;
2919static PyObject *__pyx_n_s_primary;
2920static PyObject *__pyx_n_s_prog_arg;
2921static PyObject *__pyx_n_s_prog_cb;
2922static PyObject *__pyx_n_s_pyx_vtable;
2923static PyObject *__pyx_n_s_qualname;
2924static PyObject *__pyx_n_s_range;
2925static PyObject *__pyx_n_s_rbd;
2926static PyObject *__pyx_kp_s_rbd_Image_ioctx_r;
2927static PyObject *__pyx_n_s_read_only;
2928static PyObject *__pyx_kp_s_realloc_failed;
2929static PyObject *__pyx_n_s_reduce;
2930static PyObject *__pyx_n_s_remove;
2931static PyObject *__pyx_n_s_rename;
2932static PyObject *__pyx_n_s_ret;
2933static PyObject *__pyx_n_s_return_value;
2934static PyObject *__pyx_kp_s_s_must_be_a_string;
2935static PyObject *__pyx_n_s_self;
2936static PyObject *__pyx_n_s_send;
2937static PyObject *__pyx_n_s_size;
2938static PyObject *__pyx_n_s_size_2;
2939static PyObject *__pyx_n_s_snap_get_group_namespace;
2940static PyObject *__pyx_n_s_snap_get_namespace_type;
2941static PyObject *__pyx_n_s_snap_get_trash_namespace;
2942static PyObject *__pyx_n_s_snap_name;
2943static PyObject *__pyx_n_s_snapshot;
2944static PyObject *__pyx_n_s_source;
2945static PyObject *__pyx_n_s_source_image_id;
2946static PyObject *__pyx_n_s_source_image_name;
2947static PyObject *__pyx_n_s_source_pool_id;
2948static PyObject *__pyx_n_s_source_pool_namespace;
2949static PyObject *__pyx_n_s_source_string;
2950static PyObject *__pyx_n_s_split;
2951static PyObject *__pyx_n_s_src;
2952static PyObject *__pyx_n_s_src_2;
2953static PyObject *__pyx_n_s_srcname;
2954static PyObject *__pyx_n_s_state;
2955static PyObject *__pyx_n_s_state_description;
2956static PyObject *__pyx_n_s_states;
2957static PyObject *__pyx_n_s_stats;
2958static PyObject *__pyx_n_s_status;
2959static PyObject *__pyx_n_s_str;
2960static PyObject *__pyx_n_s_stripe_count;
2961static PyObject *__pyx_n_s_stripe_unit;
2962static PyObject *__pyx_n_s_super;
2963static PyObject *__pyx_n_s_sys;
2964static PyObject *__pyx_n_s_tag;
2965static PyObject *__pyx_n_s_test;
2966static PyObject *__pyx_n_s_threshold;
2967static PyObject *__pyx_n_s_threshold_2;
2968static PyObject *__pyx_n_s_throw;
2969static PyObject *__pyx_n_s_time;
2970static PyObject *__pyx_n_s_timetuple;
2971static PyObject *__pyx_n_s_traceback;
2972static PyObject *__pyx_n_s_trash;
2973static PyObject *__pyx_n_s_trash_count;
2974static PyObject *__pyx_n_s_trash_count_2;
2975static PyObject *__pyx_n_s_trash_get;
2976static PyObject *__pyx_n_s_trash_list;
2977static PyObject *__pyx_n_s_trash_max_provisioned_bytes;
2978static PyObject *__pyx_n_s_trash_max_provisioned_bytes_2;
2979static PyObject *__pyx_n_s_trash_move;
2980static PyObject *__pyx_n_s_trash_provisioned_bytes;
2981static PyObject *__pyx_n_s_trash_provisioned_bytes_2;
2982static PyObject *__pyx_n_s_trash_purge;
2983static PyObject *__pyx_n_s_trash_remove;
2984static PyObject *__pyx_n_s_trash_restore;
2985static PyObject *__pyx_n_s_trash_snap_count;
2986static PyObject *__pyx_n_s_trash_snap_count_2;
2987static PyObject *__pyx_n_s_type;
2988static PyObject *__pyx_n_s_up;
2989static PyObject *__pyx_n_s_utcfromtimestamp;
2990static PyObject *__pyx_kp_s_utf_8;
2991static PyObject *__pyx_n_s_uuid;
2992static PyObject *__pyx_n_s_uuid_2;
2993static PyObject *__pyx_n_s_uuid_max_length;
2994static PyObject *__pyx_n_s_val;
2995static PyObject *__pyx_n_s_vals;
2996static PyObject *__pyx_n_s_vals_2;
2997static PyObject *__pyx_n_s_vals_size;
2998static PyObject *__pyx_n_s_vals_str;
2999static PyObject *__pyx_n_s_value;
3000static PyObject *__pyx_n_s_value_2;
3001static PyObject *__pyx_n_s_version;
3002static PyObject *__pyx_n_s_version_info;
3003static PyObject *__pyx_n_s_whole_object;
3004static PyObject *__pyx_n_s_x;
3005static PyObject *__pyx_n_s_zip;
3006static PyObject *__pyx_pf_3rbd_7OSError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3007static PyObject *__pyx_pf_3rbd_7OSError_2__str__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
3008static PyObject *__pyx_pf_3rbd_7OSError_4__reduce__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
3009static PyObject *__pyx_pf_3rbd_15PermissionError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3010static PyObject *__pyx_pf_3rbd_13ImageNotFound___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3011static PyObject *__pyx_pf_3rbd_14ObjectNotFound___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3012static PyObject *__pyx_pf_3rbd_11ImageExists___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3013static PyObject *__pyx_pf_3rbd_12ObjectExists___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3014static PyObject *__pyx_pf_3rbd_7IOError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3015static PyObject *__pyx_pf_3rbd_7NoSpace___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3016static PyObject *__pyx_pf_3rbd_20IncompleteWriteError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3017static PyObject *__pyx_pf_3rbd_15InvalidArgument___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3018static PyObject *__pyx_pf_3rbd_10LogicError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3019static PyObject *__pyx_pf_3rbd_13ReadOnlyImage___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3020static PyObject *__pyx_pf_3rbd_9ImageBusy___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3021static PyObject *__pyx_pf_3rbd_17ImageHasSnapshots___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3022static PyObject *__pyx_pf_3rbd_20FunctionNotSupported___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3023static PyObject *__pyx_pf_3rbd_18ArgumentOutOfRange___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3024static PyObject *__pyx_pf_3rbd_18ConnectionShutdown___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3025static PyObject *__pyx_pf_3rbd_7Timeout___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3026static PyObject *__pyx_pf_3rbd_17DiskQuotaExceeded___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3027static PyObject *__pyx_pf_3rbd_17OperationCanceled___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno); /* proto */
3028static PyObject *__pyx_pf_3rbd_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_name, PyObject *__pyx_v_encoding, PyObject *__pyx_v_opt); /* proto */
3029static PyObject *__pyx_pf_3rbd_2decode_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_encoding); /* proto */
3030static int __pyx_pf_3rbd_10Completion___cinit__(struct __pyx_obj_3rbd_Completion *__pyx_v_self, PyObject *__pyx_v_image, PyObject *__pyx_v_oncomplete); /* proto */
3031static PyObject *__pyx_pf_3rbd_10Completion_2is_complete(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto */
3032static PyObject *__pyx_pf_3rbd_10Completion_4wait_for_complete_and_cb(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto */
3033static PyObject *__pyx_pf_3rbd_10Completion_6get_return_value(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto */
3034static void __pyx_pf_3rbd_10Completion_8__dealloc__(struct __pyx_obj_3rbd_Completion *__pyx_v_self); /* proto */
3035static PyObject *__pyx_pf_3rbd_3RBD_version(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self); /* proto */
3036static PyObject *__pyx_pf_3rbd_3RBD_2create(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_size, PyObject *__pyx_v_order, PyObject *__pyx_v_old_format, PyObject *__pyx_v_features, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool); /* proto */
3037static PyObject *__pyx_pf_3rbd_3RBD_4clone(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_p_ioctx, PyObject *__pyx_v_p_name, PyObject *__pyx_v_p_snapname, PyObject *__pyx_v_c_ioctx, PyObject *__pyx_v_c_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool); /* proto */
3038static PyObject *__pyx_pf_3rbd_3RBD_6list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3039static PyObject *__pyx_pf_3rbd_3RBD_8list2(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3040static PyObject *__pyx_pf_3rbd_3RBD_10remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_on_progress); /* proto */
3041static PyObject *__pyx_pf_3rbd_3RBD_12rename(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_src, PyObject *__pyx_v_dest); /* proto */
3042static PyObject *__pyx_pf_3rbd_3RBD_14trash_move(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_delay); /* proto */
3043static PyObject *__pyx_pf_3rbd_3RBD_16trash_purge(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_expire_ts, PyObject *__pyx_v_threshold); /* proto */
3044static PyObject *__pyx_pf_3rbd_3RBD_18trash_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_id, PyObject *__pyx_v_force, PyObject *__pyx_v_on_progress); /* proto */
3045static PyObject *__pyx_pf_3rbd_3RBD_20trash_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_id); /* proto */
3046static PyObject *__pyx_pf_3rbd_3RBD_22trash_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3047static PyObject *__pyx_pf_3rbd_3RBD_24trash_restore(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_id, PyObject *__pyx_v_name); /* proto */
3048static PyObject *__pyx_pf_3rbd_3RBD_26migration_prepare(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_dest_ioctx, PyObject *__pyx_v_dest_image_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool); /* proto */
3049static PyObject *__pyx_pf_3rbd_3RBD_28migration_execute(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_on_progress); /* proto */
3050static PyObject *__pyx_pf_3rbd_3RBD_30migration_commit(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_on_progress); /* proto */
3051static PyObject *__pyx_pf_3rbd_3RBD_32migration_abort(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_on_progress); /* proto */
3052static PyObject *__pyx_pf_3rbd_3RBD_34migration_status(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name); /* proto */
3053static PyObject *__pyx_pf_3rbd_3RBD_36mirror_mode_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3054static PyObject *__pyx_pf_3rbd_3RBD_38mirror_mode_set(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_mirror_mode); /* proto */
3055static PyObject *__pyx_pf_3rbd_3RBD_40mirror_peer_add(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_cluster_name, PyObject *__pyx_v_client_name); /* proto */
3056static PyObject *__pyx_pf_3rbd_3RBD_42mirror_peer_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid); /* proto */
3057static PyObject *__pyx_pf_3rbd_3RBD_44mirror_peer_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3058static PyObject *__pyx_pf_3rbd_3RBD_46mirror_peer_set_client(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid, PyObject *__pyx_v_client_name); /* proto */
3059static PyObject *__pyx_pf_3rbd_3RBD_48mirror_peer_set_cluster(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid, PyObject *__pyx_v_cluster_name); /* proto */
3060static PyObject *__pyx_pf_3rbd_3RBD_50mirror_peer_get_attributes(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid); /* proto */
3061static PyObject *__pyx_pf_3rbd_3RBD_52mirror_peer_set_attributes(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid, PyObject *__pyx_v_attributes); /* proto */
3062static PyObject *__pyx_pf_3rbd_3RBD_54mirror_image_status_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3063static PyObject *__pyx_pf_3rbd_3RBD_56mirror_image_status_summary(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3064static PyObject *__pyx_pf_3rbd_3RBD_58mirror_image_instance_id_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3065static PyObject *__pyx_pf_3rbd_3RBD_60pool_metadata_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_key); /* proto */
3066static PyObject *__pyx_pf_3rbd_3RBD_62pool_metadata_set(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
3067static PyObject *__pyx_pf_3rbd_3RBD_64pool_metadata_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_key); /* proto */
3068static PyObject *__pyx_pf_3rbd_3RBD_66pool_metadata_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3069static PyObject *__pyx_pf_3rbd_3RBD_68config_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3070static PyObject *__pyx_pf_3rbd_3RBD_70group_create(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name); /* proto */
3071static PyObject *__pyx_pf_3rbd_3RBD_72group_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name); /* proto */
3072static PyObject *__pyx_pf_3rbd_3RBD_74group_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3073static PyObject *__pyx_pf_3rbd_3RBD_76group_rename(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_src, PyObject *__pyx_v_dest); /* proto */
3074static PyObject *__pyx_pf_3rbd_3RBD_78namespace_create(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name); /* proto */
3075static PyObject *__pyx_pf_3rbd_3RBD_80namespace_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name); /* proto */
3076static PyObject *__pyx_pf_3rbd_3RBD_82namespace_exists(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name); /* proto */
3077static PyObject *__pyx_pf_3rbd_3RBD_84namespace_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3078static PyObject *__pyx_pf_3rbd_3RBD_86pool_init(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_force); /* proto */
3079static PyObject *__pyx_pf_3rbd_3RBD_88pool_stats_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3080static int __pyx_pf_3rbd_18MirrorPeerIterator___init__(struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3081static PyObject *__pyx_pf_3rbd_18MirrorPeerIterator_2__iter__(struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self); /* proto */
3082static void __pyx_pf_3rbd_18MirrorPeerIterator_5__dealloc__(struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self); /* proto */
3083static int __pyx_pf_3rbd_25MirrorImageStatusIterator___init__(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3084static PyObject *__pyx_pf_3rbd_25MirrorImageStatusIterator_2__iter__(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self); /* proto */
3085static void __pyx_pf_3rbd_25MirrorImageStatusIterator_5__dealloc__(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self); /* proto */
3086static PyObject *__pyx_pf_3rbd_25MirrorImageStatusIterator_7get_next_chunk(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self); /* proto */
3087static int __pyx_pf_3rbd_29MirrorImageInstanceIdIterator___init__(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3088static PyObject *__pyx_pf_3rbd_29MirrorImageInstanceIdIterator_2__iter__(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self); /* proto */
3089static void __pyx_pf_3rbd_29MirrorImageInstanceIdIterator_5__dealloc__(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self); /* proto */
3090static PyObject *__pyx_pf_3rbd_29MirrorImageInstanceIdIterator_7get_next_chunk(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self); /* proto */
3091static int __pyx_pf_3rbd_20PoolMetadataIterator___init__(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3092static PyObject *__pyx_pf_3rbd_20PoolMetadataIterator_2__iter__(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self); /* proto */
3093static void __pyx_pf_3rbd_20PoolMetadataIterator_5__dealloc__(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self); /* proto */
3094static PyObject *__pyx_pf_3rbd_20PoolMetadataIterator_7get_next_chunk(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self); /* proto */
3095static int __pyx_pf_3rbd_18ConfigPoolIterator___init__(struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3096static PyObject *__pyx_pf_3rbd_18ConfigPoolIterator_2__iter__(struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self); /* proto */
3097static void __pyx_pf_3rbd_18ConfigPoolIterator_5__dealloc__(struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self); /* proto */
3098static int __pyx_pf_3rbd_5Group___init__(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name); /* proto */
3099static PyObject *__pyx_pf_3rbd_5Group_2__enter__(struct __pyx_obj_3rbd_Group *__pyx_v_self); /* proto */
3100static PyObject *__pyx_pf_3rbd_5Group_4__exit__(CYTHON_UNUSED__attribute__ ((__unused__)) struct __pyx_obj_3rbd_Group *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback); /* proto */
3101static PyObject *__pyx_pf_3rbd_5Group_6add_image(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_image_ioctx, PyObject *__pyx_v_image_name); /* proto */
3102static PyObject *__pyx_pf_3rbd_5Group_8remove_image(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_image_ioctx, PyObject *__pyx_v_image_name); /* proto */
3103static PyObject *__pyx_pf_3rbd_5Group_10list_images(struct __pyx_obj_3rbd_Group *__pyx_v_self); /* proto */
3104static PyObject *__pyx_pf_3rbd_5Group_12create_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_snap_name); /* proto */
3105static PyObject *__pyx_pf_3rbd_5Group_14remove_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_snap_name); /* proto */
3106static PyObject *__pyx_pf_3rbd_5Group_16rename_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_old_snap_name, PyObject *__pyx_v_new_snap_name); /* proto */
3107static PyObject *__pyx_pf_3rbd_5Group_18list_snaps(struct __pyx_obj_3rbd_Group *__pyx_v_self); /* proto */
3108static PyObject *__pyx_pf_3rbd_5Group_20rollback_to_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3109static int __pyx_pf_3rbd_5Image___init__(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_snapshot, PyObject *__pyx_v_read_only, PyObject *__pyx_v_image_id); /* proto */
3110static PyObject *__pyx_pf_3rbd_5Image_2__enter__(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3111static PyObject *__pyx_pf_3rbd_5Image_4__exit__(struct __pyx_obj_3rbd_Image *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback); /* proto */
3112static PyObject *__pyx_pf_3rbd_5Image_6__get_completion(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_oncomplete); /* proto */
3113static PyObject *__pyx_pf_3rbd_5Image_8close(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3114static void __pyx_pf_3rbd_5Image_10__dealloc__(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3115static PyObject *__pyx_pf_3rbd_5Image_12__repr__(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3116static PyObject *__pyx_pf_3rbd_5Image_14resize(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_allow_shrink); /* proto */
3117static PyObject *__pyx_pf_3rbd_5Image_16stat(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3118static PyObject *__pyx_pf_3rbd_5Image_18get_name(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3119static PyObject *__pyx_pf_3rbd_5Image_20id(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3120static PyObject *__pyx_pf_3rbd_5Image_22block_name_prefix(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3121static PyObject *__pyx_pf_3rbd_5Image_24data_pool_id(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3122static PyObject *__pyx_pf_3rbd_5Image_26parent_info(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3123static PyObject *__pyx_pf_3rbd_5Image_28parent_id(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3124static PyObject *__pyx_pf_3rbd_5Image_30old_format(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3125static PyObject *__pyx_pf_3rbd_5Image_32size(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3126static PyObject *__pyx_pf_3rbd_5Image_34features(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3127static PyObject *__pyx_pf_3rbd_5Image_36update_features(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_features, PyObject *__pyx_v_enabled); /* proto */
3128static PyObject *__pyx_pf_3rbd_5Image_38op_features(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3129static PyObject *__pyx_pf_3rbd_5Image_40overlap(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3130static PyObject *__pyx_pf_3rbd_5Image_42flags(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3131static PyObject *__pyx_pf_3rbd_5Image_44group(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3132static PyObject *__pyx_pf_3rbd_5Image_46is_exclusive_lock_owner(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3133static PyObject *__pyx_pf_3rbd_5Image_48copy(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_dest_ioctx, PyObject *__pyx_v_dest_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool); /* proto */
3134static PyObject *__pyx_pf_3rbd_5Image_50deep_copy(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_dest_ioctx, PyObject *__pyx_v_dest_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool); /* proto */
3135static PyObject *__pyx_pf_3rbd_5Image_52list_snaps(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3136static PyObject *__pyx_pf_3rbd_5Image_54create_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3137static PyObject *__pyx_pf_3rbd_5Image_56rename_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_srcname, PyObject *__pyx_v_dstname); /* proto */
3138static PyObject *__pyx_pf_3rbd_5Image_58remove_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3139static PyObject *__pyx_pf_3rbd_5Image_60remove_snap2(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_flags); /* proto */
3140static PyObject *__pyx_pf_3rbd_5Image_62remove_snap_by_id(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id); /* proto */
3141static PyObject *__pyx_pf_3rbd_5Image_64rollback_to_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3142static PyObject *__pyx_pf_3rbd_5Image_66protect_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3143static PyObject *__pyx_pf_3rbd_5Image_68unprotect_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3144static PyObject *__pyx_pf_3rbd_5Image_70is_protected_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3145static PyObject *__pyx_pf_3rbd_5Image_72get_snap_limit(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3146static PyObject *__pyx_pf_3rbd_5Image_74set_snap_limit(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
3147static PyObject *__pyx_pf_3rbd_5Image_76get_snap_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id); /* proto */
3148static PyObject *__pyx_pf_3rbd_5Image_78remove_snap_limit(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3149static PyObject *__pyx_pf_3rbd_5Image_80set_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
3150static PyObject *__pyx_pf_3rbd_5Image_82set_snap_by_id(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id); /* proto */
3151static PyObject *__pyx_pf_3rbd_5Image_84read(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_fadvise_flags); /* proto */
3152static PyObject *__pyx_pf_3rbd_5Image_86diff_iterate(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_from_snapshot, PyObject *__pyx_v_iterate_cb, PyObject *__pyx_v_include_parent, PyObject *__pyx_v_whole_object); /* proto */
3153static PyObject *__pyx_pf_3rbd_5Image_88write(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_offset, PyObject *__pyx_v_fadvise_flags); /* proto */
3154static PyObject *__pyx_pf_3rbd_5Image_90discard(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length); /* proto */
3155static PyObject *__pyx_pf_3rbd_5Image_92flush(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3156static PyObject *__pyx_pf_3rbd_5Image_94invalidate_cache(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3157static PyObject *__pyx_pf_3rbd_5Image_96stripe_unit(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3158static PyObject *__pyx_pf_3rbd_5Image_98stripe_count(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3159static PyObject *__pyx_pf_3rbd_5Image_100create_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3160static PyObject *__pyx_pf_3rbd_5Image_102access_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3161static PyObject *__pyx_pf_3rbd_5Image_104modify_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3162static PyObject *__pyx_pf_3rbd_5Image_106flatten(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_on_progress); /* proto */
3163static PyObject *__pyx_pf_3rbd_5Image_108sparsify(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_sparse_size); /* proto */
3164static PyObject *__pyx_pf_3rbd_5Image_110rebuild_object_map(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3165static PyObject *__pyx_pf_3rbd_5Image_112list_children(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3166static PyObject *__pyx_pf_3rbd_5Image_114list_children2(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3167static PyObject *__pyx_pf_3rbd_5Image_116list_descendants(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3168static PyObject *__pyx_pf_3rbd_5Image_118list_lockers(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3169static PyObject *__pyx_pf_3rbd_5Image_120lock_acquire(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_lock_mode); /* proto */
3170static PyObject *__pyx_pf_3rbd_5Image_122lock_release(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3171static PyObject *__pyx_pf_3rbd_5Image_124lock_get_owners(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3172static PyObject *__pyx_pf_3rbd_5Image_126lock_break(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_lock_mode, PyObject *__pyx_v_lock_owner); /* proto */
3173static PyObject *__pyx_pf_3rbd_5Image_128lock_exclusive(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_cookie); /* proto */
3174static PyObject *__pyx_pf_3rbd_5Image_130lock_shared(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_cookie, PyObject *__pyx_v_tag); /* proto */
3175static PyObject *__pyx_pf_3rbd_5Image_132unlock(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_cookie); /* proto */
3176static PyObject *__pyx_pf_3rbd_5Image_134break_lock(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_client, PyObject *__pyx_v_cookie); /* proto */
3177static PyObject *__pyx_pf_3rbd_5Image_136mirror_image_enable(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3178static PyObject *__pyx_pf_3rbd_5Image_138mirror_image_disable(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_force); /* proto */
3179static PyObject *__pyx_pf_3rbd_5Image_140mirror_image_promote(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_force); /* proto */
3180static PyObject *__pyx_pf_3rbd_5Image_142mirror_image_demote(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3181static PyObject *__pyx_pf_3rbd_5Image_144mirror_image_resync(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3182static PyObject *__pyx_pf_3rbd_5Image_146mirror_image_get_info(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3183static PyObject *__pyx_pf_3rbd_5Image_148mirror_image_get_status(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3184static PyObject *__pyx_pf_3rbd_5Image_150mirror_image_get_instance_id(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3185static PyObject *__pyx_pf_3rbd_5Image_8aio_read_oncomplete_(PyObject *__pyx_self, PyObject *__pyx_v_completion_v); /* proto */
3186static PyObject *__pyx_pf_3rbd_5Image_152aio_read(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_oncomplete, PyObject *__pyx_v_fadvise_flags); /* proto */
3187static PyObject *__pyx_pf_3rbd_5Image_154aio_write(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_offset, PyObject *__pyx_v_oncomplete, PyObject *__pyx_v_fadvise_flags); /* proto */
3188static PyObject *__pyx_pf_3rbd_5Image_156aio_discard(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_oncomplete); /* proto */
3189static PyObject *__pyx_pf_3rbd_5Image_158aio_flush(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_oncomplete); /* proto */
3190static PyObject *__pyx_pf_3rbd_5Image_160metadata_get(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
3191static PyObject *__pyx_pf_3rbd_5Image_162metadata_set(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
3192static PyObject *__pyx_pf_3rbd_5Image_164metadata_remove(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
3193static PyObject *__pyx_pf_3rbd_5Image_166metadata_list(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3194static PyObject *__pyx_pf_3rbd_5Image_168watchers_list(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3195static PyObject *__pyx_pf_3rbd_5Image_170config_list(struct __pyx_obj_3rbd_Image *__pyx_v_self); /* proto */
3196static PyObject *__pyx_pf_3rbd_5Image_172snap_get_namespace_type(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id); /* proto */
3197static PyObject *__pyx_pf_3rbd_5Image_174snap_get_group_namespace(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id); /* proto */
3198static PyObject *__pyx_pf_3rbd_5Image_176snap_get_trash_namespace(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id); /* proto */
3199static int __pyx_pf_3rbd_13ImageIterator___init__(struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3200static PyObject *__pyx_pf_3rbd_13ImageIterator_2__iter__(struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self); /* proto */
3201static void __pyx_pf_3rbd_13ImageIterator_5__dealloc__(struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self); /* proto */
3202static int __pyx_pf_3rbd_17LockOwnerIterator___init__(struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image); /* proto */
3203static PyObject *__pyx_pf_3rbd_17LockOwnerIterator_2__iter__(struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self); /* proto */
3204static void __pyx_pf_3rbd_17LockOwnerIterator_5__dealloc__(struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self); /* proto */
3205static int __pyx_pf_3rbd_16MetadataIterator___init__(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image); /* proto */
3206static PyObject *__pyx_pf_3rbd_16MetadataIterator_2__iter__(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self); /* proto */
3207static void __pyx_pf_3rbd_16MetadataIterator_5__dealloc__(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self); /* proto */
3208static PyObject *__pyx_pf_3rbd_16MetadataIterator_7get_next_chunk(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self); /* proto */
3209static int __pyx_pf_3rbd_12SnapIterator___init__(struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image); /* proto */
3210static PyObject *__pyx_pf_3rbd_12SnapIterator_2__iter__(struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self); /* proto */
3211static void __pyx_pf_3rbd_12SnapIterator_5__dealloc__(struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self); /* proto */
3212static int __pyx_pf_3rbd_13TrashIterator___init__(struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self, PyObject *__pyx_v_ioctx); /* proto */
3213static PyObject *__pyx_pf_3rbd_13TrashIterator_2__iter__(struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self); /* proto */
3214static void __pyx_pf_3rbd_13TrashIterator_5__dealloc__(struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self); /* proto */
3215static int __pyx_pf_3rbd_13ChildIterator___init__(struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image, PyObject *__pyx_v_descendants); /* proto */
3216static PyObject *__pyx_pf_3rbd_13ChildIterator_2__iter__(struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self); /* proto */
3217static void __pyx_pf_3rbd_13ChildIterator_5__dealloc__(struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self); /* proto */
3218static int __pyx_pf_3rbd_15WatcherIterator___init__(struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image); /* proto */
3219static PyObject *__pyx_pf_3rbd_15WatcherIterator_2__iter__(struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self); /* proto */
3220static void __pyx_pf_3rbd_15WatcherIterator_5__dealloc__(struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self); /* proto */
3221static int __pyx_pf_3rbd_19ConfigImageIterator___init__(struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image); /* proto */
3222static PyObject *__pyx_pf_3rbd_19ConfigImageIterator_2__iter__(struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self); /* proto */
3223static void __pyx_pf_3rbd_19ConfigImageIterator_5__dealloc__(struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self); /* proto */
3224static int __pyx_pf_3rbd_18GroupImageIterator___init__(struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self, struct __pyx_obj_3rbd_Group *__pyx_v_group); /* proto */
3225static PyObject *__pyx_pf_3rbd_18GroupImageIterator_2__iter__(struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self); /* proto */
3226static void __pyx_pf_3rbd_18GroupImageIterator_5__dealloc__(struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self); /* proto */
3227static int __pyx_pf_3rbd_17GroupSnapIterator___init__(struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self, struct __pyx_obj_3rbd_Group *__pyx_v_group); /* proto */
3228static PyObject *__pyx_pf_3rbd_17GroupSnapIterator_2__iter__(struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self); /* proto */
3229static void __pyx_pf_3rbd_17GroupSnapIterator_5__dealloc__(struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self); /* proto */
3230static PyObject *__pyx_tp_new_3rbd_Completion(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3231static PyObject *__pyx_tp_new_3rbd_MirrorPeerIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3232static PyObject *__pyx_tp_new_3rbd_MirrorImageStatusIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3233static PyObject *__pyx_tp_new_3rbd_MirrorImageInstanceIdIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3234static PyObject *__pyx_tp_new_3rbd_PoolMetadataIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3235static PyObject *__pyx_tp_new_3rbd_ConfigPoolIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3236static PyObject *__pyx_tp_new_3rbd_Group(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3237static PyObject *__pyx_tp_new_3rbd_Image(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3238static PyObject *__pyx_tp_new_3rbd_ImageIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3239static PyObject *__pyx_tp_new_3rbd_LockOwnerIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3240static PyObject *__pyx_tp_new_3rbd_MetadataIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3241static PyObject *__pyx_tp_new_3rbd_SnapIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3242static PyObject *__pyx_tp_new_3rbd_TrashIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3243static PyObject *__pyx_tp_new_3rbd_ChildIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3244static PyObject *__pyx_tp_new_3rbd_WatcherIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3245static PyObject *__pyx_tp_new_3rbd_ConfigImageIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3246static PyObject *__pyx_tp_new_3rbd_GroupImageIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3247static PyObject *__pyx_tp_new_3rbd_GroupSnapIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3248static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3249static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3250static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_2___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3251static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_3___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3252static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_4___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3253static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_5_aio_read(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3254static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_6___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3255static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3256static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_8___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3257static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_9___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3258static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_10___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3259static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_11___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3260static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_12___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3261static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_13___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3262static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_14___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3263static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_15___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
3264static PyObject *__pyx_int_0;
3265static PyObject *__pyx_int_3;
3266static PyObject *__pyx_int_neg_1;
3267static PyObject *__pyx_k_;
3268static PyObject *__pyx_slice__8;
3269static PyObject *__pyx_tuple__2;
3270static PyObject *__pyx_tuple__3;
3271static PyObject *__pyx_tuple__4;
3272static PyObject *__pyx_tuple__6;
3273static PyObject *__pyx_tuple__7;
3274static PyObject *__pyx_tuple__9;
3275static PyObject *__pyx_slice__10;
3276static PyObject *__pyx_tuple__11;
3277static PyObject *__pyx_tuple__12;
3278static PyObject *__pyx_tuple__14;
3279static PyObject *__pyx_tuple__15;
3280static PyObject *__pyx_tuple__16;
3281static PyObject *__pyx_tuple__17;
3282static PyObject *__pyx_tuple__18;
3283static PyObject *__pyx_tuple__19;
3284static PyObject *__pyx_tuple__20;
3285static PyObject *__pyx_tuple__21;
3286static PyObject *__pyx_tuple__22;
3287static PyObject *__pyx_tuple__23;
3288static PyObject *__pyx_tuple__25;
3289static PyObject *__pyx_tuple__26;
3290static PyObject *__pyx_tuple__27;
3291static PyObject *__pyx_tuple__29;
3292static PyObject *__pyx_tuple__30;
3293static PyObject *__pyx_tuple__32;
3294static PyObject *__pyx_tuple__34;
3295static PyObject *__pyx_tuple__36;
3296static PyObject *__pyx_tuple__37;
3297static PyObject *__pyx_tuple__39;
3298static PyObject *__pyx_tuple__40;
3299static PyObject *__pyx_tuple__42;
3300static PyObject *__pyx_tuple__43;
3301static PyObject *__pyx_tuple__45;
3302static PyObject *__pyx_tuple__46;
3303static PyObject *__pyx_tuple__48;
3304static PyObject *__pyx_tuple__49;
3305static PyObject *__pyx_tuple__51;
3306static PyObject *__pyx_tuple__52;
3307static PyObject *__pyx_tuple__54;
3308static PyObject *__pyx_tuple__55;
3309static PyObject *__pyx_tuple__57;
3310static PyObject *__pyx_tuple__58;
3311static PyObject *__pyx_tuple__60;
3312static PyObject *__pyx_tuple__61;
3313static PyObject *__pyx_tuple__63;
3314static PyObject *__pyx_tuple__64;
3315static PyObject *__pyx_tuple__66;
3316static PyObject *__pyx_tuple__67;
3317static PyObject *__pyx_tuple__69;
3318static PyObject *__pyx_tuple__70;
3319static PyObject *__pyx_tuple__72;
3320static PyObject *__pyx_tuple__73;
3321static PyObject *__pyx_tuple__75;
3322static PyObject *__pyx_tuple__76;
3323static PyObject *__pyx_tuple__78;
3324static PyObject *__pyx_tuple__79;
3325static PyObject *__pyx_tuple__81;
3326static PyObject *__pyx_tuple__82;
3327static PyObject *__pyx_tuple__84;
3328static PyObject *__pyx_tuple__85;
3329static PyObject *__pyx_tuple__87;
3330static PyObject *__pyx_tuple__88;
3331static PyObject *__pyx_tuple__90;
3332static PyObject *__pyx_tuple__91;
3333static PyObject *__pyx_tuple__93;
3334static PyObject *__pyx_tuple__95;
3335static PyObject *__pyx_tuple__97;
3336static PyObject *__pyx_tuple__99;
3337static PyObject *__pyx_tuple__100;
3338static PyObject *__pyx_tuple__102;
3339static PyObject *__pyx_tuple__103;
3340static PyObject *__pyx_tuple__105;
3341static PyObject *__pyx_tuple__107;
3342static PyObject *__pyx_tuple__109;
3343static PyObject *__pyx_tuple__110;
3344static PyObject *__pyx_tuple__112;
3345static PyObject *__pyx_tuple__114;
3346static PyObject *__pyx_tuple__115;
3347static PyObject *__pyx_tuple__117;
3348static PyObject *__pyx_tuple__118;
3349static PyObject *__pyx_tuple__120;
3350static PyObject *__pyx_tuple__121;
3351static PyObject *__pyx_tuple__123;
3352static PyObject *__pyx_tuple__125;
3353static PyObject *__pyx_tuple__127;
3354static PyObject *__pyx_tuple__129;
3355static PyObject *__pyx_tuple__130;
3356static PyObject *__pyx_tuple__132;
3357static PyObject *__pyx_tuple__133;
3358static PyObject *__pyx_tuple__135;
3359static PyObject *__pyx_tuple__136;
3360static PyObject *__pyx_tuple__138;
3361static PyObject *__pyx_tuple__139;
3362static PyObject *__pyx_tuple__141;
3363static PyObject *__pyx_tuple__143;
3364static PyObject *__pyx_tuple__145;
3365static PyObject *__pyx_tuple__147;
3366static PyObject *__pyx_tuple__149;
3367static PyObject *__pyx_tuple__151;
3368static PyObject *__pyx_tuple__153;
3369static PyObject *__pyx_tuple__155;
3370static PyObject *__pyx_tuple__157;
3371static PyObject *__pyx_tuple__159;
3372static PyObject *__pyx_tuple__161;
3373static PyObject *__pyx_tuple__163;
3374static PyObject *__pyx_tuple__165;
3375static PyObject *__pyx_tuple__167;
3376static PyObject *__pyx_tuple__169;
3377static PyObject *__pyx_tuple__171;
3378static PyObject *__pyx_tuple__173;
3379static PyObject *__pyx_tuple__175;
3380static PyObject *__pyx_tuple__177;
3381static PyObject *__pyx_tuple__179;
3382static PyObject *__pyx_tuple__181;
3383static PyObject *__pyx_tuple__183;
3384static PyObject *__pyx_tuple__185;
3385static PyObject *__pyx_tuple__187;
3386static PyObject *__pyx_tuple__189;
3387static PyObject *__pyx_tuple__191;
3388static PyObject *__pyx_tuple__193;
3389static PyObject *__pyx_codeobj__24;
3390static PyObject *__pyx_codeobj__28;
3391static PyObject *__pyx_codeobj__31;
3392static PyObject *__pyx_codeobj__33;
3393static PyObject *__pyx_codeobj__35;
3394static PyObject *__pyx_codeobj__38;
3395static PyObject *__pyx_codeobj__41;
3396static PyObject *__pyx_codeobj__44;
3397static PyObject *__pyx_codeobj__47;
3398static PyObject *__pyx_codeobj__50;
3399static PyObject *__pyx_codeobj__53;
3400static PyObject *__pyx_codeobj__56;
3401static PyObject *__pyx_codeobj__59;
3402static PyObject *__pyx_codeobj__62;
3403static PyObject *__pyx_codeobj__65;
3404static PyObject *__pyx_codeobj__68;
3405static PyObject *__pyx_codeobj__71;
3406static PyObject *__pyx_codeobj__74;
3407static PyObject *__pyx_codeobj__77;
3408static PyObject *__pyx_codeobj__80;
3409static PyObject *__pyx_codeobj__83;
3410static PyObject *__pyx_codeobj__86;
3411static PyObject *__pyx_codeobj__89;
3412static PyObject *__pyx_codeobj__92;
3413static PyObject *__pyx_codeobj__94;
3414static PyObject *__pyx_codeobj__96;
3415static PyObject *__pyx_codeobj__98;
3416static PyObject *__pyx_codeobj__101;
3417static PyObject *__pyx_codeobj__104;
3418static PyObject *__pyx_codeobj__106;
3419static PyObject *__pyx_codeobj__108;
3420static PyObject *__pyx_codeobj__111;
3421static PyObject *__pyx_codeobj__113;
3422static PyObject *__pyx_codeobj__116;
3423static PyObject *__pyx_codeobj__119;
3424static PyObject *__pyx_codeobj__122;
3425static PyObject *__pyx_codeobj__124;
3426static PyObject *__pyx_codeobj__126;
3427static PyObject *__pyx_codeobj__128;
3428static PyObject *__pyx_codeobj__131;
3429static PyObject *__pyx_codeobj__134;
3430static PyObject *__pyx_codeobj__137;
3431static PyObject *__pyx_codeobj__140;
3432static PyObject *__pyx_codeobj__142;
3433static PyObject *__pyx_codeobj__144;
3434static PyObject *__pyx_codeobj__146;
3435static PyObject *__pyx_codeobj__148;
3436static PyObject *__pyx_codeobj__150;
3437static PyObject *__pyx_codeobj__152;
3438static PyObject *__pyx_codeobj__154;
3439static PyObject *__pyx_codeobj__156;
3440static PyObject *__pyx_codeobj__158;
3441static PyObject *__pyx_codeobj__160;
3442static PyObject *__pyx_codeobj__162;
3443static PyObject *__pyx_codeobj__164;
3444static PyObject *__pyx_codeobj__166;
3445static PyObject *__pyx_codeobj__168;
3446static PyObject *__pyx_codeobj__170;
3447static PyObject *__pyx_codeobj__172;
3448static PyObject *__pyx_codeobj__174;
3449static PyObject *__pyx_codeobj__176;
3450static PyObject *__pyx_codeobj__178;
3451static PyObject *__pyx_codeobj__180;
3452static PyObject *__pyx_codeobj__182;
3453static PyObject *__pyx_codeobj__184;
3454static PyObject *__pyx_codeobj__186;
3455static PyObject *__pyx_codeobj__188;
3456static PyObject *__pyx_codeobj__190;
3457static PyObject *__pyx_codeobj__192;
3458static PyObject *__pyx_codeobj__194;
3459
3460/* "rbd.pyx":710
3461 * class OSError(Error):
3462 * """ `OSError` class, derived from `Error` """
3463 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
3464 * super(OSError, self).__init__(message)
3465 * self.errno = errno
3466 */
3467
3468/* Python wrapper */
3469static PyObject *__pyx_pw_3rbd_7OSError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3470static char __pyx_doc_3rbd_7OSError___init__[] = "OSError.__init__(self, message, errno=None)";
3471static PyMethodDef __pyx_mdef_3rbd_7OSError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_7OSError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_7OSError___init__};
3472static PyObject *__pyx_pw_3rbd_7OSError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3473 PyObject *__pyx_v_self = 0;
3474 PyObject *__pyx_v_message = 0;
3475 PyObject *__pyx_v_errno = 0;
3476 int __pyx_lineno = 0;
3477 const char *__pyx_filename = NULL((void*)0);
3478 int __pyx_clineno = 0;
3479 PyObject *__pyx_r = 0;
3480 __Pyx_RefNannyDeclarations
3481 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3482 {
3483 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
3484 PyObject* values[3] = {0,0,0};
3485 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
3486 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
3487 Py_ssize_t kw_args;
3488 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
3489 switch (pos_args) {
3490 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3491 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3492 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3493 case 0: break;
3494 default: goto __pyx_L5_argtuple_error;
3495 }
3496 kw_args = PyDict_Size(__pyx_kwds);
3497 switch (pos_args) {
3498 case 0:
3499 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
3500 else goto __pyx_L5_argtuple_error;
3501 case 1:
3502 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
3503 else {
3504 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__3504; goto __pyx_L3_error;}
3505 }
3506 case 2:
3507 if (kw_args > 0) {
3508 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
3509 if (value) { values[2] = value; kw_args--; }
3510 }
3511 }
3512 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
3513 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__3513; goto __pyx_L3_error;}
3514 }
3515 } else {
3516 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
3517 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3518 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3519 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3520 break;
3521 default: goto __pyx_L5_argtuple_error;
3522 }
3523 }
3524 __pyx_v_self = values[0];
3525 __pyx_v_message = values[1];
3526 __pyx_v_errno = values[2];
3527 }
3528 goto __pyx_L4_argument_unpacking_done;
3529 __pyx_L5_argtuple_error:;
3530 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__3530; goto __pyx_L3_error;}
3531 __pyx_L3_error:;
3532 __Pyx_AddTraceback("rbd.OSError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3533 __Pyx_RefNannyFinishContext();
3534 return NULL((void*)0);
3535 __pyx_L4_argument_unpacking_done:;
3536 __pyx_r = __pyx_pf_3rbd_7OSError___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
3537
3538 /* function exit code */
3539 __Pyx_RefNannyFinishContext();
3540 return __pyx_r;
3541}
3542
3543static PyObject *__pyx_pf_3rbd_7OSError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
3544 PyObject *__pyx_r = NULL((void*)0);
3545 __Pyx_RefNannyDeclarations
3546 PyObject *__pyx_t_1 = NULL((void*)0);
3547 PyObject *__pyx_t_2 = NULL((void*)0);
3548 PyObject *__pyx_t_3 = NULL((void*)0);
3549 PyObject *__pyx_t_4 = NULL((void*)0);
3550 int __pyx_lineno = 0;
3551 const char *__pyx_filename = NULL((void*)0);
3552 int __pyx_clineno = 0;
3553 __Pyx_RefNannySetupContext("__init__", 0);
3554
3555 /* "rbd.pyx":711
3556 * """ `OSError` class, derived from `Error` """
3557 * def __init__(self, message, errno=None):
3558 * super(OSError, self).__init__(message) # <<<<<<<<<<<<<<
3559 * self.errno = errno
3560 *
3561 */
3562 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3562; goto __pyx_L1_error;}
3563 __Pyx_GOTREF(__pyx_t_2);
3564 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3564; goto __pyx_L1_error;}
3565 __Pyx_GOTREF(__pyx_t_3);
3566 __Pyx_GIVEREF(__pyx_t_2);
3567 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
3568 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
3569 __Pyx_GIVEREF(__pyx_v_self);
3570 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
3571 __pyx_t_2 = 0;
3572 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3572; goto __pyx_L1_error;}
3573 __Pyx_GOTREF(__pyx_t_2);
3574 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3575 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3575; goto __pyx_L1_error;}
3576 __Pyx_GOTREF(__pyx_t_3);
3577 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3578 __pyx_t_2 = NULL((void*)0);
3579 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
3580 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
3581 if (likely(__pyx_t_2)__builtin_expect(!!(__pyx_t_2), 1)) {
3582 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
3583 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
3584 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
3585 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
3586 }
3587 }
3588 if (!__pyx_t_2) {
3589 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_message); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3589; goto __pyx_L1_error;}
3590 __Pyx_GOTREF(__pyx_t_1);
3591 } else {
3592 __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3592; goto __pyx_L1_error;}
3593 __Pyx_GOTREF(__pyx_t_4);
3594 __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_2); __pyx_t_2 = NULL((void*)0);
3595 __Pyx_INCREF(__pyx_v_message)( ((PyObject*)(__pyx_v_message))->ob_refcnt++);
3596 __Pyx_GIVEREF(__pyx_v_message);
3597 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_message)(((PyTupleObject *)(__pyx_t_4))->ob_item[0+1] = __pyx_v_message
)
;
3598 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__3598; goto __pyx_L1_error;}
3599 __Pyx_GOTREF(__pyx_t_1);
3600 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
3601 }
3602 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3603 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
3604
3605 /* "rbd.pyx":712
3606 * def __init__(self, message, errno=None):
3607 * super(OSError, self).__init__(message)
3608 * self.errno = errno # <<<<<<<<<<<<<<
3609 *
3610 * def __str__(self):
3611 */
3612 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_errno, __pyx_v_errno) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__3612; goto __pyx_L1_error;}
3613
3614 /* "rbd.pyx":710
3615 * class OSError(Error):
3616 * """ `OSError` class, derived from `Error` """
3617 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
3618 * super(OSError, self).__init__(message)
3619 * self.errno = errno
3620 */
3621
3622 /* function exit code */
3623 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
3624 goto __pyx_L0;
3625 __pyx_L1_error:;
3626 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
3627 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
3628 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
3629 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
3630 __Pyx_AddTraceback("rbd.OSError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3631 __pyx_r = NULL((void*)0);
3632 __pyx_L0:;
3633 __Pyx_XGIVEREF(__pyx_r);
3634 __Pyx_RefNannyFinishContext();
3635 return __pyx_r;
3636}
3637
3638/* "rbd.pyx":714
3639 * self.errno = errno
3640 *
3641 * def __str__(self): # <<<<<<<<<<<<<<
3642 * msg = super(OSError, self).__str__()
3643 * if self.errno is None:
3644 */
3645
3646/* Python wrapper */
3647static PyObject *__pyx_pw_3rbd_7OSError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
3648static char __pyx_doc_3rbd_7OSError_2__str__[] = "OSError.__str__(self)";
3649static PyMethodDef __pyx_mdef_3rbd_7OSError_3__str__ = {"__str__", (PyCFunction)__pyx_pw_3rbd_7OSError_3__str__, METH_O0x0008, __pyx_doc_3rbd_7OSError_2__str__};
3650static PyObject *__pyx_pw_3rbd_7OSError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
3651 PyObject *__pyx_r = 0;
3652 __Pyx_RefNannyDeclarations
3653 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
3654 __pyx_r = __pyx_pf_3rbd_7OSError_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));
3655
3656 /* function exit code */
3657 __Pyx_RefNannyFinishContext();
3658 return __pyx_r;
3659}
3660
3661static PyObject *__pyx_pf_3rbd_7OSError_2__str__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) {
3662 PyObject *__pyx_v_msg = NULL((void*)0);
3663 PyObject *__pyx_r = NULL((void*)0);
3664 __Pyx_RefNannyDeclarations
3665 PyObject *__pyx_t_1 = NULL((void*)0);
3666 PyObject *__pyx_t_2 = NULL((void*)0);
3667 PyObject *__pyx_t_3 = NULL((void*)0);
3668 int __pyx_t_4;
3669 int __pyx_t_5;
3670 PyObject *__pyx_t_6 = NULL((void*)0);
3671 Py_ssize_t __pyx_t_7;
3672 PyObject *__pyx_t_8 = NULL((void*)0);
3673 int __pyx_lineno = 0;
3674 const char *__pyx_filename = NULL((void*)0);
3675 int __pyx_clineno = 0;
3676 __Pyx_RefNannySetupContext("__str__", 0);
3677
3678 /* "rbd.pyx":715
3679 *
3680 * def __str__(self):
3681 * msg = super(OSError, self).__str__() # <<<<<<<<<<<<<<
3682 * if self.errno is None:
3683 * return msg
3684 */
3685 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__3685; goto __pyx_L1_error;}
3686 __Pyx_GOTREF(__pyx_t_2);
3687 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__3687; goto __pyx_L1_error;}
3688 __Pyx_GOTREF(__pyx_t_3);
3689 __Pyx_GIVEREF(__pyx_t_2);
3690 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
3691 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
3692 __Pyx_GIVEREF(__pyx_v_self);
3693 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
3694 __pyx_t_2 = 0;
3695 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__3695; goto __pyx_L1_error;}
3696 __Pyx_GOTREF(__pyx_t_2);
3697 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3698 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_str); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__3698; goto __pyx_L1_error;}
3699 __Pyx_GOTREF(__pyx_t_3);
3700 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3701 __pyx_t_2 = NULL((void*)0);
3702 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
3703 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
3704 if (likely(__pyx_t_2)__builtin_expect(!!(__pyx_t_2), 1)) {
3705 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
3706 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
3707 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
3708 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
3709 }
3710 }
3711 if (__pyx_t_2) {
3712 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__3712; goto __pyx_L1_error;}
3713 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
3714 } else {
3715 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__3715; goto __pyx_L1_error;}
3716 }
3717 __Pyx_GOTREF(__pyx_t_1);
3718 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3719 __pyx_v_msg = __pyx_t_1;
3720 __pyx_t_1 = 0;
3721
3722 /* "rbd.pyx":716
3723 * def __str__(self):
3724 * msg = super(OSError, self).__str__()
3725 * if self.errno is None: # <<<<<<<<<<<<<<
3726 * return msg
3727 * return '[errno {0}] {1}'.format(self.errno, msg)
3728 */
3729 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errno); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__3729; goto __pyx_L1_error;}
3730 __Pyx_GOTREF(__pyx_t_1);
3731 __pyx_t_4 = (__pyx_t_1 == Py_None(&_Py_NoneStruct));
3732 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
3733 __pyx_t_5 = (__pyx_t_4 != 0);
3734 if (__pyx_t_5) {
3735
3736 /* "rbd.pyx":717
3737 * msg = super(OSError, self).__str__()
3738 * if self.errno is None:
3739 * return msg # <<<<<<<<<<<<<<
3740 * return '[errno {0}] {1}'.format(self.errno, msg)
3741 *
3742 */
3743 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3744 __Pyx_INCREF(__pyx_v_msg)( ((PyObject*)(__pyx_v_msg))->ob_refcnt++);
3745 __pyx_r = __pyx_v_msg;
3746 goto __pyx_L0;
3747
3748 /* "rbd.pyx":716
3749 * def __str__(self):
3750 * msg = super(OSError, self).__str__()
3751 * if self.errno is None: # <<<<<<<<<<<<<<
3752 * return msg
3753 * return '[errno {0}] {1}'.format(self.errno, msg)
3754 */
3755 }
3756
3757 /* "rbd.pyx":718
3758 * if self.errno is None:
3759 * return msg
3760 * return '[errno {0}] {1}'.format(self.errno, msg) # <<<<<<<<<<<<<<
3761 *
3762 * def __reduce__(self):
3763 */
3764 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3765 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_errno_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__3765; goto __pyx_L1_error;}
3766 __Pyx_GOTREF(__pyx_t_3);
3767 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errno); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__3767; goto __pyx_L1_error;}
3768 __Pyx_GOTREF(__pyx_t_2);
3769 __pyx_t_6 = NULL((void*)0);
3770 __pyx_t_7 = 0;
3771 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
3772 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
3773 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
3774 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
3775 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
3776 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
3777 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
3778 __pyx_t_7 = 1;
3779 }
3780 }
3781 __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__3781; goto __pyx_L1_error;}
3782 __Pyx_GOTREF(__pyx_t_8);
3783 if (__pyx_t_6) {
3784 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
3785 }
3786 __Pyx_GIVEREF(__pyx_t_2);
3787 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+__pyx_t_7] = __pyx_t_2
)
;
3788 __Pyx_INCREF(__pyx_v_msg)( ((PyObject*)(__pyx_v_msg))->ob_refcnt++);
3789 __Pyx_GIVEREF(__pyx_v_msg);
3790 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_msg)(((PyTupleObject *)(__pyx_t_8))->ob_item[1+__pyx_t_7] = __pyx_v_msg
)
;
3791 __pyx_t_2 = 0;
3792 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__3792; goto __pyx_L1_error;}
3793 __Pyx_GOTREF(__pyx_t_1);
3794 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
3795 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
3796 __pyx_r = __pyx_t_1;
3797 __pyx_t_1 = 0;
3798 goto __pyx_L0;
3799
3800 /* "rbd.pyx":714
3801 * self.errno = errno
3802 *
3803 * def __str__(self): # <<<<<<<<<<<<<<
3804 * msg = super(OSError, self).__str__()
3805 * if self.errno is None:
3806 */
3807
3808 /* function exit code */
3809 __pyx_L1_error:;
3810 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
3811 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
3812 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
3813 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
3814 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
3815 __Pyx_AddTraceback("rbd.OSError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3816 __pyx_r = NULL((void*)0);
3817 __pyx_L0:;
3818 __Pyx_XDECREF(__pyx_v_msg)do { if ((__pyx_v_msg) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_msg))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_msg)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_msg)))); } while (0); } while (0)
;
3819 __Pyx_XGIVEREF(__pyx_r);
3820 __Pyx_RefNannyFinishContext();
3821 return __pyx_r;
3822}
3823
3824/* "rbd.pyx":720
3825 * return '[errno {0}] {1}'.format(self.errno, msg)
3826 *
3827 * def __reduce__(self): # <<<<<<<<<<<<<<
3828 * return (self.__class__, (self.message, self.errno))
3829 *
3830 */
3831
3832/* Python wrapper */
3833static PyObject *__pyx_pw_3rbd_7OSError_5__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
3834static char __pyx_doc_3rbd_7OSError_4__reduce__[] = "OSError.__reduce__(self)";
3835static PyMethodDef __pyx_mdef_3rbd_7OSError_5__reduce__ = {"__reduce__", (PyCFunction)__pyx_pw_3rbd_7OSError_5__reduce__, METH_O0x0008, __pyx_doc_3rbd_7OSError_4__reduce__};
3836static PyObject *__pyx_pw_3rbd_7OSError_5__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
3837 PyObject *__pyx_r = 0;
3838 __Pyx_RefNannyDeclarations
3839 __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
3840 __pyx_r = __pyx_pf_3rbd_7OSError_4__reduce__(__pyx_self, ((PyObject *)__pyx_v_self));
3841
3842 /* function exit code */
3843 __Pyx_RefNannyFinishContext();
3844 return __pyx_r;
3845}
3846
3847static PyObject *__pyx_pf_3rbd_7OSError_4__reduce__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self) {
3848 PyObject *__pyx_r = NULL((void*)0);
3849 __Pyx_RefNannyDeclarations
3850 PyObject *__pyx_t_1 = NULL((void*)0);
3851 PyObject *__pyx_t_2 = NULL((void*)0);
3852 PyObject *__pyx_t_3 = NULL((void*)0);
3853 PyObject *__pyx_t_4 = NULL((void*)0);
3854 int __pyx_lineno = 0;
3855 const char *__pyx_filename = NULL((void*)0);
3856 int __pyx_clineno = 0;
3857 __Pyx_RefNannySetupContext("__reduce__", 0);
3858
3859 /* "rbd.pyx":721
3860 *
3861 * def __reduce__(self):
3862 * return (self.__class__, (self.message, self.errno)) # <<<<<<<<<<<<<<
3863 *
3864 * class PermissionError(OSError):
3865 */
3866 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
3867 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__3867; goto __pyx_L1_error;}
3868 __Pyx_GOTREF(__pyx_t_1);
3869 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__3869; goto __pyx_L1_error;}
3870 __Pyx_GOTREF(__pyx_t_2);
3871 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_errno); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__3871; goto __pyx_L1_error;}
3872 __Pyx_GOTREF(__pyx_t_3);
3873 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__3873; goto __pyx_L1_error;}
3874 __Pyx_GOTREF(__pyx_t_4);
3875 __Pyx_GIVEREF(__pyx_t_2);
3876 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_2);
3877 __Pyx_GIVEREF(__pyx_t_3);
3878 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_t_3);
3879 __pyx_t_2 = 0;
3880 __pyx_t_3 = 0;
3881 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__3881; goto __pyx_L1_error;}
3882 __Pyx_GOTREF(__pyx_t_3);
3883 __Pyx_GIVEREF(__pyx_t_1);
3884 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_1);
3885 __Pyx_GIVEREF(__pyx_t_4);
3886 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_t_4);
3887 __pyx_t_1 = 0;
3888 __pyx_t_4 = 0;
3889 __pyx_r = __pyx_t_3;
3890 __pyx_t_3 = 0;
3891 goto __pyx_L0;
3892
3893 /* "rbd.pyx":720
3894 * return '[errno {0}] {1}'.format(self.errno, msg)
3895 *
3896 * def __reduce__(self): # <<<<<<<<<<<<<<
3897 * return (self.__class__, (self.message, self.errno))
3898 *
3899 */
3900
3901 /* function exit code */
3902 __pyx_L1_error:;
3903 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
3904 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
3905 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
3906 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
3907 __Pyx_AddTraceback("rbd.OSError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3908 __pyx_r = NULL((void*)0);
3909 __pyx_L0:;
3910 __Pyx_XGIVEREF(__pyx_r);
3911 __Pyx_RefNannyFinishContext();
3912 return __pyx_r;
3913}
3914
3915/* "rbd.pyx":724
3916 *
3917 * class PermissionError(OSError):
3918 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
3919 * super(PermissionError, self).__init__(
3920 * "RBD permission error (%s)" % message, errno)
3921 */
3922
3923/* Python wrapper */
3924static PyObject *__pyx_pw_3rbd_15PermissionError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3925static char __pyx_doc_3rbd_15PermissionError___init__[] = "PermissionError.__init__(self, message, errno=None)";
3926static PyMethodDef __pyx_mdef_3rbd_15PermissionError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_15PermissionError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_15PermissionError___init__};
3927static PyObject *__pyx_pw_3rbd_15PermissionError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3928 PyObject *__pyx_v_self = 0;
3929 PyObject *__pyx_v_message = 0;
3930 PyObject *__pyx_v_errno = 0;
3931 int __pyx_lineno = 0;
3932 const char *__pyx_filename = NULL((void*)0);
3933 int __pyx_clineno = 0;
3934 PyObject *__pyx_r = 0;
3935 __Pyx_RefNannyDeclarations
3936 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3937 {
3938 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
3939 PyObject* values[3] = {0,0,0};
3940 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
3941 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
3942 Py_ssize_t kw_args;
3943 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
3944 switch (pos_args) {
3945 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3946 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3947 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3948 case 0: break;
3949 default: goto __pyx_L5_argtuple_error;
3950 }
3951 kw_args = PyDict_Size(__pyx_kwds);
3952 switch (pos_args) {
3953 case 0:
3954 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
3955 else goto __pyx_L5_argtuple_error;
3956 case 1:
3957 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
3958 else {
3959 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__3959; goto __pyx_L3_error;}
3960 }
3961 case 2:
3962 if (kw_args > 0) {
3963 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
3964 if (value) { values[2] = value; kw_args--; }
3965 }
3966 }
3967 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
3968 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__3968; goto __pyx_L3_error;}
3969 }
3970 } else {
3971 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
3972 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
3973 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
3974 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
3975 break;
3976 default: goto __pyx_L5_argtuple_error;
3977 }
3978 }
3979 __pyx_v_self = values[0];
3980 __pyx_v_message = values[1];
3981 __pyx_v_errno = values[2];
3982 }
3983 goto __pyx_L4_argument_unpacking_done;
3984 __pyx_L5_argtuple_error:;
3985 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__3985; goto __pyx_L3_error;}
3986 __pyx_L3_error:;
3987 __Pyx_AddTraceback("rbd.PermissionError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3988 __Pyx_RefNannyFinishContext();
3989 return NULL((void*)0);
3990 __pyx_L4_argument_unpacking_done:;
3991 __pyx_r = __pyx_pf_3rbd_15PermissionError___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
3992
3993 /* function exit code */
3994 __Pyx_RefNannyFinishContext();
3995 return __pyx_r;
3996}
3997
3998static PyObject *__pyx_pf_3rbd_15PermissionError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
3999 PyObject *__pyx_r = NULL((void*)0);
4000 __Pyx_RefNannyDeclarations
4001 PyObject *__pyx_t_1 = NULL((void*)0);
4002 PyObject *__pyx_t_2 = NULL((void*)0);
4003 PyObject *__pyx_t_3 = NULL((void*)0);
4004 PyObject *__pyx_t_4 = NULL((void*)0);
4005 Py_ssize_t __pyx_t_5;
4006 PyObject *__pyx_t_6 = NULL((void*)0);
4007 int __pyx_lineno = 0;
4008 const char *__pyx_filename = NULL((void*)0);
4009 int __pyx_clineno = 0;
4010 __Pyx_RefNannySetupContext("__init__", 0);
4011
4012 /* "rbd.pyx":725
4013 * class PermissionError(OSError):
4014 * def __init__(self, message, errno=None):
4015 * super(PermissionError, self).__init__( # <<<<<<<<<<<<<<
4016 * "RBD permission error (%s)" % message, errno)
4017 *
4018 */
4019 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PermissionError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__4019; goto __pyx_L1_error;}
4020 __Pyx_GOTREF(__pyx_t_2);
4021 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__4021; goto __pyx_L1_error;}
4022 __Pyx_GOTREF(__pyx_t_3);
4023 __Pyx_GIVEREF(__pyx_t_2);
4024 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
4025 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
4026 __Pyx_GIVEREF(__pyx_v_self);
4027 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
4028 __pyx_t_2 = 0;
4029 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__4029; goto __pyx_L1_error;}
4030 __Pyx_GOTREF(__pyx_t_2);
4031 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4032 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__4032; goto __pyx_L1_error;}
4033 __Pyx_GOTREF(__pyx_t_3);
4034 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4035
4036 /* "rbd.pyx":726
4037 * def __init__(self, message, errno=None):
4038 * super(PermissionError, self).__init__(
4039 * "RBD permission error (%s)" % message, errno) # <<<<<<<<<<<<<<
4040 *
4041 *
4042 */
4043 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_permission_error_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_permission_error_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__4043; goto __pyx_L1_error;}
4044 __Pyx_GOTREF(__pyx_t_2);
4045 __pyx_t_4 = NULL((void*)0);
4046 __pyx_t_5 = 0;
4047 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
4048 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4049 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4050 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4051 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4052 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4053 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4054 __pyx_t_5 = 1;
4055 }
4056 }
4057 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__4057; goto __pyx_L1_error;}
4058 __Pyx_GOTREF(__pyx_t_6);
4059 if (__pyx_t_4) {
4060 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4061 }
4062 __Pyx_GIVEREF(__pyx_t_2);
4063 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
4064 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
4065 __Pyx_GIVEREF(__pyx_v_errno);
4066 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
4067 __pyx_t_2 = 0;
4068 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__4068; goto __pyx_L1_error;}
4069 __Pyx_GOTREF(__pyx_t_1);
4070 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4071 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4072 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
4073
4074 /* "rbd.pyx":724
4075 *
4076 * class PermissionError(OSError):
4077 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4078 * super(PermissionError, self).__init__(
4079 * "RBD permission error (%s)" % message, errno)
4080 */
4081
4082 /* function exit code */
4083 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4084 goto __pyx_L0;
4085 __pyx_L1_error:;
4086 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
4087 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4088 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4089 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4090 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4091 __Pyx_AddTraceback("rbd.PermissionError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4092 __pyx_r = NULL((void*)0);
4093 __pyx_L0:;
4094 __Pyx_XGIVEREF(__pyx_r);
4095 __Pyx_RefNannyFinishContext();
4096 return __pyx_r;
4097}
4098
4099/* "rbd.pyx":730
4100 *
4101 * class ImageNotFound(OSError):
4102 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4103 * super(ImageNotFound, self).__init__(
4104 * "RBD image not found (%s)" % message, errno)
4105 */
4106
4107/* Python wrapper */
4108static PyObject *__pyx_pw_3rbd_13ImageNotFound_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4109static char __pyx_doc_3rbd_13ImageNotFound___init__[] = "ImageNotFound.__init__(self, message, errno=None)";
4110static PyMethodDef __pyx_mdef_3rbd_13ImageNotFound_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_13ImageNotFound_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_13ImageNotFound___init__};
4111static PyObject *__pyx_pw_3rbd_13ImageNotFound_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4112 PyObject *__pyx_v_self = 0;
4113 PyObject *__pyx_v_message = 0;
4114 PyObject *__pyx_v_errno = 0;
4115 int __pyx_lineno = 0;
4116 const char *__pyx_filename = NULL((void*)0);
4117 int __pyx_clineno = 0;
4118 PyObject *__pyx_r = 0;
4119 __Pyx_RefNannyDeclarations
4120 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4121 {
4122 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
4123 PyObject* values[3] = {0,0,0};
4124 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
4125 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4126 Py_ssize_t kw_args;
4127 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4128 switch (pos_args) {
4129 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4130 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4131 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4132 case 0: break;
4133 default: goto __pyx_L5_argtuple_error;
4134 }
4135 kw_args = PyDict_Size(__pyx_kwds);
4136 switch (pos_args) {
4137 case 0:
4138 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
4139 else goto __pyx_L5_argtuple_error;
4140 case 1:
4141 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
4142 else {
4143 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__4143; goto __pyx_L3_error;}
4144 }
4145 case 2:
4146 if (kw_args > 0) {
4147 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
4148 if (value) { values[2] = value; kw_args--; }
4149 }
4150 }
4151 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4152 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__4152; goto __pyx_L3_error;}
4153 }
4154 } else {
4155 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4156 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4157 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4158 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4159 break;
4160 default: goto __pyx_L5_argtuple_error;
4161 }
4162 }
4163 __pyx_v_self = values[0];
4164 __pyx_v_message = values[1];
4165 __pyx_v_errno = values[2];
4166 }
4167 goto __pyx_L4_argument_unpacking_done;
4168 __pyx_L5_argtuple_error:;
4169 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__4169; goto __pyx_L3_error;}
4170 __pyx_L3_error:;
4171 __Pyx_AddTraceback("rbd.ImageNotFound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4172 __Pyx_RefNannyFinishContext();
4173 return NULL((void*)0);
4174 __pyx_L4_argument_unpacking_done:;
4175 __pyx_r = __pyx_pf_3rbd_13ImageNotFound___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
4176
4177 /* function exit code */
4178 __Pyx_RefNannyFinishContext();
4179 return __pyx_r;
4180}
4181
4182static PyObject *__pyx_pf_3rbd_13ImageNotFound___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
4183 PyObject *__pyx_r = NULL((void*)0);
4184 __Pyx_RefNannyDeclarations
4185 PyObject *__pyx_t_1 = NULL((void*)0);
4186 PyObject *__pyx_t_2 = NULL((void*)0);
4187 PyObject *__pyx_t_3 = NULL((void*)0);
4188 PyObject *__pyx_t_4 = NULL((void*)0);
4189 Py_ssize_t __pyx_t_5;
4190 PyObject *__pyx_t_6 = NULL((void*)0);
4191 int __pyx_lineno = 0;
4192 const char *__pyx_filename = NULL((void*)0);
4193 int __pyx_clineno = 0;
4194 __Pyx_RefNannySetupContext("__init__", 0);
4195
4196 /* "rbd.pyx":731
4197 * class ImageNotFound(OSError):
4198 * def __init__(self, message, errno=None):
4199 * super(ImageNotFound, self).__init__( # <<<<<<<<<<<<<<
4200 * "RBD image not found (%s)" % message, errno)
4201 *
4202 */
4203 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageNotFound); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__4203; goto __pyx_L1_error;}
4204 __Pyx_GOTREF(__pyx_t_2);
4205 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__4205; goto __pyx_L1_error;}
4206 __Pyx_GOTREF(__pyx_t_3);
4207 __Pyx_GIVEREF(__pyx_t_2);
4208 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
4209 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
4210 __Pyx_GIVEREF(__pyx_v_self);
4211 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
4212 __pyx_t_2 = 0;
4213 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__4213; goto __pyx_L1_error;}
4214 __Pyx_GOTREF(__pyx_t_2);
4215 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4216 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__4216; goto __pyx_L1_error;}
4217 __Pyx_GOTREF(__pyx_t_3);
4218 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4219
4220 /* "rbd.pyx":732
4221 * def __init__(self, message, errno=None):
4222 * super(ImageNotFound, self).__init__(
4223 * "RBD image not found (%s)" % message, errno) # <<<<<<<<<<<<<<
4224 *
4225 *
4226 */
4227 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_image_not_found_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_image_not_found_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__4227; goto __pyx_L1_error;}
4228 __Pyx_GOTREF(__pyx_t_2);
4229 __pyx_t_4 = NULL((void*)0);
4230 __pyx_t_5 = 0;
4231 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
4232 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4233 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4234 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4235 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4236 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4237 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4238 __pyx_t_5 = 1;
4239 }
4240 }
4241 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__4241; goto __pyx_L1_error;}
4242 __Pyx_GOTREF(__pyx_t_6);
4243 if (__pyx_t_4) {
4244 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4245 }
4246 __Pyx_GIVEREF(__pyx_t_2);
4247 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
4248 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
4249 __Pyx_GIVEREF(__pyx_v_errno);
4250 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
4251 __pyx_t_2 = 0;
4252 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__4252; goto __pyx_L1_error;}
4253 __Pyx_GOTREF(__pyx_t_1);
4254 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4255 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4256 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
4257
4258 /* "rbd.pyx":730
4259 *
4260 * class ImageNotFound(OSError):
4261 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4262 * super(ImageNotFound, self).__init__(
4263 * "RBD image not found (%s)" % message, errno)
4264 */
4265
4266 /* function exit code */
4267 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4268 goto __pyx_L0;
4269 __pyx_L1_error:;
4270 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
4271 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4272 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4273 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4274 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4275 __Pyx_AddTraceback("rbd.ImageNotFound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4276 __pyx_r = NULL((void*)0);
4277 __pyx_L0:;
4278 __Pyx_XGIVEREF(__pyx_r);
4279 __Pyx_RefNannyFinishContext();
4280 return __pyx_r;
4281}
4282
4283/* "rbd.pyx":736
4284 *
4285 * class ObjectNotFound(OSError):
4286 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4287 * super(ObjectNotFound, self).__init__(
4288 * "RBD object not found (%s)" % message, errno)
4289 */
4290
4291/* Python wrapper */
4292static PyObject *__pyx_pw_3rbd_14ObjectNotFound_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4293static char __pyx_doc_3rbd_14ObjectNotFound___init__[] = "ObjectNotFound.__init__(self, message, errno=None)";
4294static PyMethodDef __pyx_mdef_3rbd_14ObjectNotFound_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_14ObjectNotFound_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_14ObjectNotFound___init__};
4295static PyObject *__pyx_pw_3rbd_14ObjectNotFound_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4296 PyObject *__pyx_v_self = 0;
4297 PyObject *__pyx_v_message = 0;
4298 PyObject *__pyx_v_errno = 0;
4299 int __pyx_lineno = 0;
4300 const char *__pyx_filename = NULL((void*)0);
4301 int __pyx_clineno = 0;
4302 PyObject *__pyx_r = 0;
4303 __Pyx_RefNannyDeclarations
4304 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4305 {
4306 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
4307 PyObject* values[3] = {0,0,0};
4308 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
4309 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4310 Py_ssize_t kw_args;
4311 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4312 switch (pos_args) {
4313 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4314 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4315 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4316 case 0: break;
4317 default: goto __pyx_L5_argtuple_error;
4318 }
4319 kw_args = PyDict_Size(__pyx_kwds);
4320 switch (pos_args) {
4321 case 0:
4322 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
4323 else goto __pyx_L5_argtuple_error;
4324 case 1:
4325 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
4326 else {
4327 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__4327; goto __pyx_L3_error;}
4328 }
4329 case 2:
4330 if (kw_args > 0) {
4331 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
4332 if (value) { values[2] = value; kw_args--; }
4333 }
4334 }
4335 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4336 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__4336; goto __pyx_L3_error;}
4337 }
4338 } else {
4339 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4340 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4341 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4342 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4343 break;
4344 default: goto __pyx_L5_argtuple_error;
4345 }
4346 }
4347 __pyx_v_self = values[0];
4348 __pyx_v_message = values[1];
4349 __pyx_v_errno = values[2];
4350 }
4351 goto __pyx_L4_argument_unpacking_done;
4352 __pyx_L5_argtuple_error:;
4353 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__4353; goto __pyx_L3_error;}
4354 __pyx_L3_error:;
4355 __Pyx_AddTraceback("rbd.ObjectNotFound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4356 __Pyx_RefNannyFinishContext();
4357 return NULL((void*)0);
4358 __pyx_L4_argument_unpacking_done:;
4359 __pyx_r = __pyx_pf_3rbd_14ObjectNotFound___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
4360
4361 /* function exit code */
4362 __Pyx_RefNannyFinishContext();
4363 return __pyx_r;
4364}
4365
4366static PyObject *__pyx_pf_3rbd_14ObjectNotFound___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
4367 PyObject *__pyx_r = NULL((void*)0);
4368 __Pyx_RefNannyDeclarations
4369 PyObject *__pyx_t_1 = NULL((void*)0);
4370 PyObject *__pyx_t_2 = NULL((void*)0);
4371 PyObject *__pyx_t_3 = NULL((void*)0);
4372 PyObject *__pyx_t_4 = NULL((void*)0);
4373 Py_ssize_t __pyx_t_5;
4374 PyObject *__pyx_t_6 = NULL((void*)0);
4375 int __pyx_lineno = 0;
4376 const char *__pyx_filename = NULL((void*)0);
4377 int __pyx_clineno = 0;
4378 __Pyx_RefNannySetupContext("__init__", 0);
4379
4380 /* "rbd.pyx":737
4381 * class ObjectNotFound(OSError):
4382 * def __init__(self, message, errno=None):
4383 * super(ObjectNotFound, self).__init__( # <<<<<<<<<<<<<<
4384 * "RBD object not found (%s)" % message, errno)
4385 *
4386 */
4387 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectNotFound); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__4387; goto __pyx_L1_error;}
4388 __Pyx_GOTREF(__pyx_t_2);
4389 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__4389; goto __pyx_L1_error;}
4390 __Pyx_GOTREF(__pyx_t_3);
4391 __Pyx_GIVEREF(__pyx_t_2);
4392 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
4393 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
4394 __Pyx_GIVEREF(__pyx_v_self);
4395 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
4396 __pyx_t_2 = 0;
4397 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__4397; goto __pyx_L1_error;}
4398 __Pyx_GOTREF(__pyx_t_2);
4399 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4400 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__4400; goto __pyx_L1_error;}
4401 __Pyx_GOTREF(__pyx_t_3);
4402 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4403
4404 /* "rbd.pyx":738
4405 * def __init__(self, message, errno=None):
4406 * super(ObjectNotFound, self).__init__(
4407 * "RBD object not found (%s)" % message, errno) # <<<<<<<<<<<<<<
4408 *
4409 *
4410 */
4411 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_object_not_found_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_object_not_found_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__4411; goto __pyx_L1_error;}
4412 __Pyx_GOTREF(__pyx_t_2);
4413 __pyx_t_4 = NULL((void*)0);
4414 __pyx_t_5 = 0;
4415 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
4416 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4417 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4418 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4419 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4420 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4421 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4422 __pyx_t_5 = 1;
4423 }
4424 }
4425 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__4425; goto __pyx_L1_error;}
4426 __Pyx_GOTREF(__pyx_t_6);
4427 if (__pyx_t_4) {
4428 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4429 }
4430 __Pyx_GIVEREF(__pyx_t_2);
4431 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
4432 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
4433 __Pyx_GIVEREF(__pyx_v_errno);
4434 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
4435 __pyx_t_2 = 0;
4436 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__4436; goto __pyx_L1_error;}
4437 __Pyx_GOTREF(__pyx_t_1);
4438 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4439 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4440 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
4441
4442 /* "rbd.pyx":736
4443 *
4444 * class ObjectNotFound(OSError):
4445 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4446 * super(ObjectNotFound, self).__init__(
4447 * "RBD object not found (%s)" % message, errno)
4448 */
4449
4450 /* function exit code */
4451 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4452 goto __pyx_L0;
4453 __pyx_L1_error:;
4454 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
4455 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4456 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4457 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4458 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4459 __Pyx_AddTraceback("rbd.ObjectNotFound.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4460 __pyx_r = NULL((void*)0);
4461 __pyx_L0:;
4462 __Pyx_XGIVEREF(__pyx_r);
4463 __Pyx_RefNannyFinishContext();
4464 return __pyx_r;
4465}
4466
4467/* "rbd.pyx":742
4468 *
4469 * class ImageExists(OSError):
4470 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4471 * super(ImageExists, self).__init__(
4472 * "RBD image already exists (%s)" % message, errno)
4473 */
4474
4475/* Python wrapper */
4476static PyObject *__pyx_pw_3rbd_11ImageExists_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4477static char __pyx_doc_3rbd_11ImageExists___init__[] = "ImageExists.__init__(self, message, errno=None)";
4478static PyMethodDef __pyx_mdef_3rbd_11ImageExists_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_11ImageExists_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_11ImageExists___init__};
4479static PyObject *__pyx_pw_3rbd_11ImageExists_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4480 PyObject *__pyx_v_self = 0;
4481 PyObject *__pyx_v_message = 0;
4482 PyObject *__pyx_v_errno = 0;
4483 int __pyx_lineno = 0;
4484 const char *__pyx_filename = NULL((void*)0);
4485 int __pyx_clineno = 0;
4486 PyObject *__pyx_r = 0;
4487 __Pyx_RefNannyDeclarations
4488 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4489 {
4490 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
4491 PyObject* values[3] = {0,0,0};
4492 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
4493 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4494 Py_ssize_t kw_args;
4495 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4496 switch (pos_args) {
4497 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4498 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4499 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4500 case 0: break;
4501 default: goto __pyx_L5_argtuple_error;
4502 }
4503 kw_args = PyDict_Size(__pyx_kwds);
4504 switch (pos_args) {
4505 case 0:
4506 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
4507 else goto __pyx_L5_argtuple_error;
4508 case 1:
4509 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
4510 else {
4511 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__4511; goto __pyx_L3_error;}
4512 }
4513 case 2:
4514 if (kw_args > 0) {
4515 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
4516 if (value) { values[2] = value; kw_args--; }
4517 }
4518 }
4519 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4520 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__4520; goto __pyx_L3_error;}
4521 }
4522 } else {
4523 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4524 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4525 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4526 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4527 break;
4528 default: goto __pyx_L5_argtuple_error;
4529 }
4530 }
4531 __pyx_v_self = values[0];
4532 __pyx_v_message = values[1];
4533 __pyx_v_errno = values[2];
4534 }
4535 goto __pyx_L4_argument_unpacking_done;
4536 __pyx_L5_argtuple_error:;
4537 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__4537; goto __pyx_L3_error;}
4538 __pyx_L3_error:;
4539 __Pyx_AddTraceback("rbd.ImageExists.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4540 __Pyx_RefNannyFinishContext();
4541 return NULL((void*)0);
4542 __pyx_L4_argument_unpacking_done:;
4543 __pyx_r = __pyx_pf_3rbd_11ImageExists___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
4544
4545 /* function exit code */
4546 __Pyx_RefNannyFinishContext();
4547 return __pyx_r;
4548}
4549
4550static PyObject *__pyx_pf_3rbd_11ImageExists___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
4551 PyObject *__pyx_r = NULL((void*)0);
4552 __Pyx_RefNannyDeclarations
4553 PyObject *__pyx_t_1 = NULL((void*)0);
4554 PyObject *__pyx_t_2 = NULL((void*)0);
4555 PyObject *__pyx_t_3 = NULL((void*)0);
4556 PyObject *__pyx_t_4 = NULL((void*)0);
4557 Py_ssize_t __pyx_t_5;
4558 PyObject *__pyx_t_6 = NULL((void*)0);
4559 int __pyx_lineno = 0;
4560 const char *__pyx_filename = NULL((void*)0);
4561 int __pyx_clineno = 0;
4562 __Pyx_RefNannySetupContext("__init__", 0);
4563
4564 /* "rbd.pyx":743
4565 * class ImageExists(OSError):
4566 * def __init__(self, message, errno=None):
4567 * super(ImageExists, self).__init__( # <<<<<<<<<<<<<<
4568 * "RBD image already exists (%s)" % message, errno)
4569 *
4570 */
4571 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageExists); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__4571; goto __pyx_L1_error;}
4572 __Pyx_GOTREF(__pyx_t_2);
4573 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__4573; goto __pyx_L1_error;}
4574 __Pyx_GOTREF(__pyx_t_3);
4575 __Pyx_GIVEREF(__pyx_t_2);
4576 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
4577 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
4578 __Pyx_GIVEREF(__pyx_v_self);
4579 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
4580 __pyx_t_2 = 0;
4581 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__4581; goto __pyx_L1_error;}
4582 __Pyx_GOTREF(__pyx_t_2);
4583 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4584 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__4584; goto __pyx_L1_error;}
4585 __Pyx_GOTREF(__pyx_t_3);
4586 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4587
4588 /* "rbd.pyx":744
4589 * def __init__(self, message, errno=None):
4590 * super(ImageExists, self).__init__(
4591 * "RBD image already exists (%s)" % message, errno) # <<<<<<<<<<<<<<
4592 *
4593 *
4594 */
4595 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_image_already_exists_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_image_already_exists_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__4595; goto __pyx_L1_error;}
4596 __Pyx_GOTREF(__pyx_t_2);
4597 __pyx_t_4 = NULL((void*)0);
4598 __pyx_t_5 = 0;
4599 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
4600 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4601 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4602 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4603 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4604 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4605 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4606 __pyx_t_5 = 1;
4607 }
4608 }
4609 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__4609; goto __pyx_L1_error;}
4610 __Pyx_GOTREF(__pyx_t_6);
4611 if (__pyx_t_4) {
4612 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4613 }
4614 __Pyx_GIVEREF(__pyx_t_2);
4615 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
4616 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
4617 __Pyx_GIVEREF(__pyx_v_errno);
4618 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
4619 __pyx_t_2 = 0;
4620 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__4620; goto __pyx_L1_error;}
4621 __Pyx_GOTREF(__pyx_t_1);
4622 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4623 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4624 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
4625
4626 /* "rbd.pyx":742
4627 *
4628 * class ImageExists(OSError):
4629 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4630 * super(ImageExists, self).__init__(
4631 * "RBD image already exists (%s)" % message, errno)
4632 */
4633
4634 /* function exit code */
4635 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4636 goto __pyx_L0;
4637 __pyx_L1_error:;
4638 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
4639 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4640 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4641 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4642 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4643 __Pyx_AddTraceback("rbd.ImageExists.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4644 __pyx_r = NULL((void*)0);
4645 __pyx_L0:;
4646 __Pyx_XGIVEREF(__pyx_r);
4647 __Pyx_RefNannyFinishContext();
4648 return __pyx_r;
4649}
4650
4651/* "rbd.pyx":748
4652 *
4653 * class ObjectExists(OSError):
4654 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4655 * super(ObjectExists, self).__init__(
4656 * "RBD object already exists (%s)" % message, errno)
4657 */
4658
4659/* Python wrapper */
4660static PyObject *__pyx_pw_3rbd_12ObjectExists_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4661static char __pyx_doc_3rbd_12ObjectExists___init__[] = "ObjectExists.__init__(self, message, errno=None)";
4662static PyMethodDef __pyx_mdef_3rbd_12ObjectExists_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_12ObjectExists_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_12ObjectExists___init__};
4663static PyObject *__pyx_pw_3rbd_12ObjectExists_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4664 PyObject *__pyx_v_self = 0;
4665 PyObject *__pyx_v_message = 0;
4666 PyObject *__pyx_v_errno = 0;
4667 int __pyx_lineno = 0;
4668 const char *__pyx_filename = NULL((void*)0);
4669 int __pyx_clineno = 0;
4670 PyObject *__pyx_r = 0;
4671 __Pyx_RefNannyDeclarations
4672 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4673 {
4674 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
4675 PyObject* values[3] = {0,0,0};
4676 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
4677 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4678 Py_ssize_t kw_args;
4679 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4680 switch (pos_args) {
4681 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4682 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4683 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4684 case 0: break;
4685 default: goto __pyx_L5_argtuple_error;
4686 }
4687 kw_args = PyDict_Size(__pyx_kwds);
4688 switch (pos_args) {
4689 case 0:
4690 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
4691 else goto __pyx_L5_argtuple_error;
4692 case 1:
4693 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
4694 else {
4695 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__4695; goto __pyx_L3_error;}
4696 }
4697 case 2:
4698 if (kw_args > 0) {
4699 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
4700 if (value) { values[2] = value; kw_args--; }
4701 }
4702 }
4703 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4704 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__4704; goto __pyx_L3_error;}
4705 }
4706 } else {
4707 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4708 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4709 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4710 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4711 break;
4712 default: goto __pyx_L5_argtuple_error;
4713 }
4714 }
4715 __pyx_v_self = values[0];
4716 __pyx_v_message = values[1];
4717 __pyx_v_errno = values[2];
4718 }
4719 goto __pyx_L4_argument_unpacking_done;
4720 __pyx_L5_argtuple_error:;
4721 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__4721; goto __pyx_L3_error;}
4722 __pyx_L3_error:;
4723 __Pyx_AddTraceback("rbd.ObjectExists.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4724 __Pyx_RefNannyFinishContext();
4725 return NULL((void*)0);
4726 __pyx_L4_argument_unpacking_done:;
4727 __pyx_r = __pyx_pf_3rbd_12ObjectExists___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
4728
4729 /* function exit code */
4730 __Pyx_RefNannyFinishContext();
4731 return __pyx_r;
4732}
4733
4734static PyObject *__pyx_pf_3rbd_12ObjectExists___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
4735 PyObject *__pyx_r = NULL((void*)0);
4736 __Pyx_RefNannyDeclarations
4737 PyObject *__pyx_t_1 = NULL((void*)0);
4738 PyObject *__pyx_t_2 = NULL((void*)0);
4739 PyObject *__pyx_t_3 = NULL((void*)0);
4740 PyObject *__pyx_t_4 = NULL((void*)0);
4741 Py_ssize_t __pyx_t_5;
4742 PyObject *__pyx_t_6 = NULL((void*)0);
4743 int __pyx_lineno = 0;
4744 const char *__pyx_filename = NULL((void*)0);
4745 int __pyx_clineno = 0;
4746 __Pyx_RefNannySetupContext("__init__", 0);
4747
4748 /* "rbd.pyx":749
4749 * class ObjectExists(OSError):
4750 * def __init__(self, message, errno=None):
4751 * super(ObjectExists, self).__init__( # <<<<<<<<<<<<<<
4752 * "RBD object already exists (%s)" % message, errno)
4753 *
4754 */
4755 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectExists); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__4755; goto __pyx_L1_error;}
4756 __Pyx_GOTREF(__pyx_t_2);
4757 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__4757; goto __pyx_L1_error;}
4758 __Pyx_GOTREF(__pyx_t_3);
4759 __Pyx_GIVEREF(__pyx_t_2);
4760 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
4761 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
4762 __Pyx_GIVEREF(__pyx_v_self);
4763 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
4764 __pyx_t_2 = 0;
4765 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__4765; goto __pyx_L1_error;}
4766 __Pyx_GOTREF(__pyx_t_2);
4767 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4768 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__4768; goto __pyx_L1_error;}
4769 __Pyx_GOTREF(__pyx_t_3);
4770 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4771
4772 /* "rbd.pyx":750
4773 * def __init__(self, message, errno=None):
4774 * super(ObjectExists, self).__init__(
4775 * "RBD object already exists (%s)" % message, errno) # <<<<<<<<<<<<<<
4776 *
4777 *
4778 */
4779 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_object_already_exists_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_object_already_exists_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__4779; goto __pyx_L1_error;}
4780 __Pyx_GOTREF(__pyx_t_2);
4781 __pyx_t_4 = NULL((void*)0);
4782 __pyx_t_5 = 0;
4783 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
4784 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4785 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4786 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4787 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4788 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4789 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4790 __pyx_t_5 = 1;
4791 }
4792 }
4793 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__4793; goto __pyx_L1_error;}
4794 __Pyx_GOTREF(__pyx_t_6);
4795 if (__pyx_t_4) {
4796 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4797 }
4798 __Pyx_GIVEREF(__pyx_t_2);
4799 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
4800 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
4801 __Pyx_GIVEREF(__pyx_v_errno);
4802 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
4803 __pyx_t_2 = 0;
4804 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__4804; goto __pyx_L1_error;}
4805 __Pyx_GOTREF(__pyx_t_1);
4806 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4807 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4808 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
4809
4810 /* "rbd.pyx":748
4811 *
4812 * class ObjectExists(OSError):
4813 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4814 * super(ObjectExists, self).__init__(
4815 * "RBD object already exists (%s)" % message, errno)
4816 */
4817
4818 /* function exit code */
4819 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
4820 goto __pyx_L0;
4821 __pyx_L1_error:;
4822 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
4823 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
4824 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
4825 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
4826 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
4827 __Pyx_AddTraceback("rbd.ObjectExists.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4828 __pyx_r = NULL((void*)0);
4829 __pyx_L0:;
4830 __Pyx_XGIVEREF(__pyx_r);
4831 __Pyx_RefNannyFinishContext();
4832 return __pyx_r;
4833}
4834
4835/* "rbd.pyx":754
4836 *
4837 * class IOError(OSError):
4838 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4839 * super(IOError, self).__init__(
4840 * "RBD I/O error (%s)" % message, errno)
4841 */
4842
4843/* Python wrapper */
4844static PyObject *__pyx_pw_3rbd_7IOError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4845static char __pyx_doc_3rbd_7IOError___init__[] = "IOError.__init__(self, message, errno=None)";
4846static PyMethodDef __pyx_mdef_3rbd_7IOError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_7IOError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_7IOError___init__};
4847static PyObject *__pyx_pw_3rbd_7IOError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4848 PyObject *__pyx_v_self = 0;
4849 PyObject *__pyx_v_message = 0;
4850 PyObject *__pyx_v_errno = 0;
4851 int __pyx_lineno = 0;
4852 const char *__pyx_filename = NULL((void*)0);
4853 int __pyx_clineno = 0;
4854 PyObject *__pyx_r = 0;
4855 __Pyx_RefNannyDeclarations
4856 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4857 {
4858 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
4859 PyObject* values[3] = {0,0,0};
4860 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
4861 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
4862 Py_ssize_t kw_args;
4863 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
4864 switch (pos_args) {
4865 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4866 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4867 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4868 case 0: break;
4869 default: goto __pyx_L5_argtuple_error;
4870 }
4871 kw_args = PyDict_Size(__pyx_kwds);
4872 switch (pos_args) {
4873 case 0:
4874 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
4875 else goto __pyx_L5_argtuple_error;
4876 case 1:
4877 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
4878 else {
4879 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__4879; goto __pyx_L3_error;}
4880 }
4881 case 2:
4882 if (kw_args > 0) {
4883 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
4884 if (value) { values[2] = value; kw_args--; }
4885 }
4886 }
4887 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
4888 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__4888; goto __pyx_L3_error;}
4889 }
4890 } else {
4891 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
4892 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
4893 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
4894 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
4895 break;
4896 default: goto __pyx_L5_argtuple_error;
4897 }
4898 }
4899 __pyx_v_self = values[0];
4900 __pyx_v_message = values[1];
4901 __pyx_v_errno = values[2];
4902 }
4903 goto __pyx_L4_argument_unpacking_done;
4904 __pyx_L5_argtuple_error:;
4905 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__4905; goto __pyx_L3_error;}
4906 __pyx_L3_error:;
4907 __Pyx_AddTraceback("rbd.IOError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4908 __Pyx_RefNannyFinishContext();
4909 return NULL((void*)0);
4910 __pyx_L4_argument_unpacking_done:;
4911 __pyx_r = __pyx_pf_3rbd_7IOError___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
4912
4913 /* function exit code */
4914 __Pyx_RefNannyFinishContext();
4915 return __pyx_r;
4916}
4917
4918static PyObject *__pyx_pf_3rbd_7IOError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
4919 PyObject *__pyx_r = NULL((void*)0);
4920 __Pyx_RefNannyDeclarations
4921 PyObject *__pyx_t_1 = NULL((void*)0);
4922 PyObject *__pyx_t_2 = NULL((void*)0);
4923 PyObject *__pyx_t_3 = NULL((void*)0);
4924 PyObject *__pyx_t_4 = NULL((void*)0);
4925 Py_ssize_t __pyx_t_5;
4926 PyObject *__pyx_t_6 = NULL((void*)0);
4927 int __pyx_lineno = 0;
4928 const char *__pyx_filename = NULL((void*)0);
4929 int __pyx_clineno = 0;
4930 __Pyx_RefNannySetupContext("__init__", 0);
4931
4932 /* "rbd.pyx":755
4933 * class IOError(OSError):
4934 * def __init__(self, message, errno=None):
4935 * super(IOError, self).__init__( # <<<<<<<<<<<<<<
4936 * "RBD I/O error (%s)" % message, errno)
4937 *
4938 */
4939 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_IOError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__4939; goto __pyx_L1_error;}
4940 __Pyx_GOTREF(__pyx_t_2);
4941 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__4941; goto __pyx_L1_error;}
4942 __Pyx_GOTREF(__pyx_t_3);
4943 __Pyx_GIVEREF(__pyx_t_2);
4944 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
4945 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
4946 __Pyx_GIVEREF(__pyx_v_self);
4947 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
4948 __pyx_t_2 = 0;
4949 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__4949; goto __pyx_L1_error;}
4950 __Pyx_GOTREF(__pyx_t_2);
4951 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4952 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__4952; goto __pyx_L1_error;}
4953 __Pyx_GOTREF(__pyx_t_3);
4954 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
4955
4956 /* "rbd.pyx":756
4957 * def __init__(self, message, errno=None):
4958 * super(IOError, self).__init__(
4959 * "RBD I/O error (%s)" % message, errno) # <<<<<<<<<<<<<<
4960 *
4961 *
4962 */
4963 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_I_O_error_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_I_O_error_s, __pyx_v_message); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__4963; goto __pyx_L1_error;}
4964 __Pyx_GOTREF(__pyx_t_2);
4965 __pyx_t_4 = NULL((void*)0);
4966 __pyx_t_5 = 0;
4967 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
4968 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
4969 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
4970 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
4971 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
4972 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
4973 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
4974 __pyx_t_5 = 1;
4975 }
4976 }
4977 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__4977; goto __pyx_L1_error;}
4978 __Pyx_GOTREF(__pyx_t_6);
4979 if (__pyx_t_4) {
4980 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
4981 }
4982 __Pyx_GIVEREF(__pyx_t_2);
4983 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
4984 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
4985 __Pyx_GIVEREF(__pyx_v_errno);
4986 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
4987 __pyx_t_2 = 0;
4988 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__4988; goto __pyx_L1_error;}
4989 __Pyx_GOTREF(__pyx_t_1);
4990 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
4991 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
4992 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
4993
4994 /* "rbd.pyx":754
4995 *
4996 * class IOError(OSError):
4997 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
4998 * super(IOError, self).__init__(
4999 * "RBD I/O error (%s)" % message, errno)
5000 */
5001
5002 /* function exit code */
5003 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5004 goto __pyx_L0;
5005 __pyx_L1_error:;
5006 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5007 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5008 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5009 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5010 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5011 __Pyx_AddTraceback("rbd.IOError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5012 __pyx_r = NULL((void*)0);
5013 __pyx_L0:;
5014 __Pyx_XGIVEREF(__pyx_r);
5015 __Pyx_RefNannyFinishContext();
5016 return __pyx_r;
5017}
5018
5019/* "rbd.pyx":760
5020 *
5021 * class NoSpace(OSError):
5022 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5023 * super(NoSpace, self).__init__(
5024 * "RBD insufficient space available (%s)" % message, errno)
5025 */
5026
5027/* Python wrapper */
5028static PyObject *__pyx_pw_3rbd_7NoSpace_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5029static char __pyx_doc_3rbd_7NoSpace___init__[] = "NoSpace.__init__(self, message, errno=None)";
5030static PyMethodDef __pyx_mdef_3rbd_7NoSpace_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_7NoSpace_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_7NoSpace___init__};
5031static PyObject *__pyx_pw_3rbd_7NoSpace_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5032 PyObject *__pyx_v_self = 0;
5033 PyObject *__pyx_v_message = 0;
5034 PyObject *__pyx_v_errno = 0;
5035 int __pyx_lineno = 0;
5036 const char *__pyx_filename = NULL((void*)0);
5037 int __pyx_clineno = 0;
5038 PyObject *__pyx_r = 0;
5039 __Pyx_RefNannyDeclarations
5040 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5041 {
5042 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
5043 PyObject* values[3] = {0,0,0};
5044 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
5045 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5046 Py_ssize_t kw_args;
5047 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5048 switch (pos_args) {
5049 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5050 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5051 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5052 case 0: break;
5053 default: goto __pyx_L5_argtuple_error;
5054 }
5055 kw_args = PyDict_Size(__pyx_kwds);
5056 switch (pos_args) {
5057 case 0:
5058 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
5059 else goto __pyx_L5_argtuple_error;
5060 case 1:
5061 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
5062 else {
5063 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__5063; goto __pyx_L3_error;}
5064 }
5065 case 2:
5066 if (kw_args > 0) {
5067 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
5068 if (value) { values[2] = value; kw_args--; }
5069 }
5070 }
5071 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5072 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__5072; goto __pyx_L3_error;}
5073 }
5074 } else {
5075 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5076 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5077 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5078 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5079 break;
5080 default: goto __pyx_L5_argtuple_error;
5081 }
5082 }
5083 __pyx_v_self = values[0];
5084 __pyx_v_message = values[1];
5085 __pyx_v_errno = values[2];
5086 }
5087 goto __pyx_L4_argument_unpacking_done;
5088 __pyx_L5_argtuple_error:;
5089 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__5089; goto __pyx_L3_error;}
5090 __pyx_L3_error:;
5091 __Pyx_AddTraceback("rbd.NoSpace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5092 __Pyx_RefNannyFinishContext();
5093 return NULL((void*)0);
5094 __pyx_L4_argument_unpacking_done:;
5095 __pyx_r = __pyx_pf_3rbd_7NoSpace___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
5096
5097 /* function exit code */
5098 __Pyx_RefNannyFinishContext();
5099 return __pyx_r;
5100}
5101
5102static PyObject *__pyx_pf_3rbd_7NoSpace___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
5103 PyObject *__pyx_r = NULL((void*)0);
5104 __Pyx_RefNannyDeclarations
5105 PyObject *__pyx_t_1 = NULL((void*)0);
5106 PyObject *__pyx_t_2 = NULL((void*)0);
5107 PyObject *__pyx_t_3 = NULL((void*)0);
5108 PyObject *__pyx_t_4 = NULL((void*)0);
5109 Py_ssize_t __pyx_t_5;
5110 PyObject *__pyx_t_6 = NULL((void*)0);
5111 int __pyx_lineno = 0;
5112 const char *__pyx_filename = NULL((void*)0);
5113 int __pyx_clineno = 0;
5114 __Pyx_RefNannySetupContext("__init__", 0);
5115
5116 /* "rbd.pyx":761
5117 * class NoSpace(OSError):
5118 * def __init__(self, message, errno=None):
5119 * super(NoSpace, self).__init__( # <<<<<<<<<<<<<<
5120 * "RBD insufficient space available (%s)" % message, errno)
5121 *
5122 */
5123 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoSpace); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__5123; goto __pyx_L1_error;}
5124 __Pyx_GOTREF(__pyx_t_2);
5125 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__5125; goto __pyx_L1_error;}
5126 __Pyx_GOTREF(__pyx_t_3);
5127 __Pyx_GIVEREF(__pyx_t_2);
5128 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
5129 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
5130 __Pyx_GIVEREF(__pyx_v_self);
5131 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
5132 __pyx_t_2 = 0;
5133 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__5133; goto __pyx_L1_error;}
5134 __Pyx_GOTREF(__pyx_t_2);
5135 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5136 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__5136; goto __pyx_L1_error;}
5137 __Pyx_GOTREF(__pyx_t_3);
5138 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5139
5140 /* "rbd.pyx":762
5141 * def __init__(self, message, errno=None):
5142 * super(NoSpace, self).__init__(
5143 * "RBD insufficient space available (%s)" % message, errno) # <<<<<<<<<<<<<<
5144 *
5145 *
5146 */
5147 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_insufficient_space_available, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_insufficient_space_available, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__5147; goto __pyx_L1_error;}
5148 __Pyx_GOTREF(__pyx_t_2);
5149 __pyx_t_4 = NULL((void*)0);
5150 __pyx_t_5 = 0;
5151 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
5152 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
5153 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
5154 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
5155 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
5156 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5157 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5158 __pyx_t_5 = 1;
5159 }
5160 }
5161 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__5161; goto __pyx_L1_error;}
5162 __Pyx_GOTREF(__pyx_t_6);
5163 if (__pyx_t_4) {
5164 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
5165 }
5166 __Pyx_GIVEREF(__pyx_t_2);
5167 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
5168 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
5169 __Pyx_GIVEREF(__pyx_v_errno);
5170 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
5171 __pyx_t_2 = 0;
5172 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__5172; goto __pyx_L1_error;}
5173 __Pyx_GOTREF(__pyx_t_1);
5174 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5175 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5176 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5177
5178 /* "rbd.pyx":760
5179 *
5180 * class NoSpace(OSError):
5181 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5182 * super(NoSpace, self).__init__(
5183 * "RBD insufficient space available (%s)" % message, errno)
5184 */
5185
5186 /* function exit code */
5187 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5188 goto __pyx_L0;
5189 __pyx_L1_error:;
5190 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5191 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5192 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5193 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5194 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5195 __Pyx_AddTraceback("rbd.NoSpace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5196 __pyx_r = NULL((void*)0);
5197 __pyx_L0:;
5198 __Pyx_XGIVEREF(__pyx_r);
5199 __Pyx_RefNannyFinishContext();
5200 return __pyx_r;
5201}
5202
5203/* "rbd.pyx":766
5204 *
5205 * class IncompleteWriteError(OSError):
5206 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5207 * super(IncompleteWriteError, self).__init__(
5208 * "RBD incomplete write (%s)" % message, errno)
5209 */
5210
5211/* Python wrapper */
5212static PyObject *__pyx_pw_3rbd_20IncompleteWriteError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5213static char __pyx_doc_3rbd_20IncompleteWriteError___init__[] = "IncompleteWriteError.__init__(self, message, errno=None)";
5214static PyMethodDef __pyx_mdef_3rbd_20IncompleteWriteError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_20IncompleteWriteError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_20IncompleteWriteError___init__};
5215static PyObject *__pyx_pw_3rbd_20IncompleteWriteError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5216 PyObject *__pyx_v_self = 0;
5217 PyObject *__pyx_v_message = 0;
5218 PyObject *__pyx_v_errno = 0;
5219 int __pyx_lineno = 0;
5220 const char *__pyx_filename = NULL((void*)0);
5221 int __pyx_clineno = 0;
5222 PyObject *__pyx_r = 0;
5223 __Pyx_RefNannyDeclarations
5224 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5225 {
5226 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
5227 PyObject* values[3] = {0,0,0};
5228 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
5229 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5230 Py_ssize_t kw_args;
5231 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5232 switch (pos_args) {
5233 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5234 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5235 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5236 case 0: break;
5237 default: goto __pyx_L5_argtuple_error;
5238 }
5239 kw_args = PyDict_Size(__pyx_kwds);
5240 switch (pos_args) {
5241 case 0:
5242 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
5243 else goto __pyx_L5_argtuple_error;
5244 case 1:
5245 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
5246 else {
5247 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__5247; goto __pyx_L3_error;}
5248 }
5249 case 2:
5250 if (kw_args > 0) {
5251 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
5252 if (value) { values[2] = value; kw_args--; }
5253 }
5254 }
5255 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5256 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__5256; goto __pyx_L3_error;}
5257 }
5258 } else {
5259 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5260 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5261 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5262 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5263 break;
5264 default: goto __pyx_L5_argtuple_error;
5265 }
5266 }
5267 __pyx_v_self = values[0];
5268 __pyx_v_message = values[1];
5269 __pyx_v_errno = values[2];
5270 }
5271 goto __pyx_L4_argument_unpacking_done;
5272 __pyx_L5_argtuple_error:;
5273 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__5273; goto __pyx_L3_error;}
5274 __pyx_L3_error:;
5275 __Pyx_AddTraceback("rbd.IncompleteWriteError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5276 __Pyx_RefNannyFinishContext();
5277 return NULL((void*)0);
5278 __pyx_L4_argument_unpacking_done:;
5279 __pyx_r = __pyx_pf_3rbd_20IncompleteWriteError___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
5280
5281 /* function exit code */
5282 __Pyx_RefNannyFinishContext();
5283 return __pyx_r;
5284}
5285
5286static PyObject *__pyx_pf_3rbd_20IncompleteWriteError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
5287 PyObject *__pyx_r = NULL((void*)0);
5288 __Pyx_RefNannyDeclarations
5289 PyObject *__pyx_t_1 = NULL((void*)0);
5290 PyObject *__pyx_t_2 = NULL((void*)0);
5291 PyObject *__pyx_t_3 = NULL((void*)0);
5292 PyObject *__pyx_t_4 = NULL((void*)0);
5293 Py_ssize_t __pyx_t_5;
5294 PyObject *__pyx_t_6 = NULL((void*)0);
5295 int __pyx_lineno = 0;
5296 const char *__pyx_filename = NULL((void*)0);
5297 int __pyx_clineno = 0;
5298 __Pyx_RefNannySetupContext("__init__", 0);
5299
5300 /* "rbd.pyx":767
5301 * class IncompleteWriteError(OSError):
5302 * def __init__(self, message, errno=None):
5303 * super(IncompleteWriteError, self).__init__( # <<<<<<<<<<<<<<
5304 * "RBD incomplete write (%s)" % message, errno)
5305 *
5306 */
5307 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_IncompleteWriteError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__5307; goto __pyx_L1_error;}
5308 __Pyx_GOTREF(__pyx_t_2);
5309 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__5309; goto __pyx_L1_error;}
5310 __Pyx_GOTREF(__pyx_t_3);
5311 __Pyx_GIVEREF(__pyx_t_2);
5312 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
5313 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
5314 __Pyx_GIVEREF(__pyx_v_self);
5315 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
5316 __pyx_t_2 = 0;
5317 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__5317; goto __pyx_L1_error;}
5318 __Pyx_GOTREF(__pyx_t_2);
5319 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5320 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__5320; goto __pyx_L1_error;}
5321 __Pyx_GOTREF(__pyx_t_3);
5322 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5323
5324 /* "rbd.pyx":768
5325 * def __init__(self, message, errno=None):
5326 * super(IncompleteWriteError, self).__init__(
5327 * "RBD incomplete write (%s)" % message, errno) # <<<<<<<<<<<<<<
5328 *
5329 *
5330 */
5331 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_incomplete_write_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_incomplete_write_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__5331; goto __pyx_L1_error;}
5332 __Pyx_GOTREF(__pyx_t_2);
5333 __pyx_t_4 = NULL((void*)0);
5334 __pyx_t_5 = 0;
5335 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
5336 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
5337 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
5338 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
5339 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
5340 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5341 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5342 __pyx_t_5 = 1;
5343 }
5344 }
5345 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__5345; goto __pyx_L1_error;}
5346 __Pyx_GOTREF(__pyx_t_6);
5347 if (__pyx_t_4) {
5348 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
5349 }
5350 __Pyx_GIVEREF(__pyx_t_2);
5351 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
5352 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
5353 __Pyx_GIVEREF(__pyx_v_errno);
5354 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
5355 __pyx_t_2 = 0;
5356 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__5356; goto __pyx_L1_error;}
5357 __Pyx_GOTREF(__pyx_t_1);
5358 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5359 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5360 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5361
5362 /* "rbd.pyx":766
5363 *
5364 * class IncompleteWriteError(OSError):
5365 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5366 * super(IncompleteWriteError, self).__init__(
5367 * "RBD incomplete write (%s)" % message, errno)
5368 */
5369
5370 /* function exit code */
5371 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5372 goto __pyx_L0;
5373 __pyx_L1_error:;
5374 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5375 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5376 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5377 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5378 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5379 __Pyx_AddTraceback("rbd.IncompleteWriteError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5380 __pyx_r = NULL((void*)0);
5381 __pyx_L0:;
5382 __Pyx_XGIVEREF(__pyx_r);
5383 __Pyx_RefNannyFinishContext();
5384 return __pyx_r;
5385}
5386
5387/* "rbd.pyx":772
5388 *
5389 * class InvalidArgument(OSError):
5390 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5391 * super(InvalidArgument, self).__init__(
5392 * "RBD invalid argument (%s)" % message, errno)
5393 */
5394
5395/* Python wrapper */
5396static PyObject *__pyx_pw_3rbd_15InvalidArgument_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5397static char __pyx_doc_3rbd_15InvalidArgument___init__[] = "InvalidArgument.__init__(self, message, errno=None)";
5398static PyMethodDef __pyx_mdef_3rbd_15InvalidArgument_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_15InvalidArgument_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_15InvalidArgument___init__};
5399static PyObject *__pyx_pw_3rbd_15InvalidArgument_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5400 PyObject *__pyx_v_self = 0;
5401 PyObject *__pyx_v_message = 0;
5402 PyObject *__pyx_v_errno = 0;
5403 int __pyx_lineno = 0;
5404 const char *__pyx_filename = NULL((void*)0);
5405 int __pyx_clineno = 0;
5406 PyObject *__pyx_r = 0;
5407 __Pyx_RefNannyDeclarations
5408 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5409 {
5410 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
5411 PyObject* values[3] = {0,0,0};
5412 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
5413 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5414 Py_ssize_t kw_args;
5415 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5416 switch (pos_args) {
5417 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5418 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5419 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5420 case 0: break;
5421 default: goto __pyx_L5_argtuple_error;
5422 }
5423 kw_args = PyDict_Size(__pyx_kwds);
5424 switch (pos_args) {
5425 case 0:
5426 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
5427 else goto __pyx_L5_argtuple_error;
5428 case 1:
5429 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
5430 else {
5431 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__5431; goto __pyx_L3_error;}
5432 }
5433 case 2:
5434 if (kw_args > 0) {
5435 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
5436 if (value) { values[2] = value; kw_args--; }
5437 }
5438 }
5439 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5440 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__5440; goto __pyx_L3_error;}
5441 }
5442 } else {
5443 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5444 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5445 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5446 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5447 break;
5448 default: goto __pyx_L5_argtuple_error;
5449 }
5450 }
5451 __pyx_v_self = values[0];
5452 __pyx_v_message = values[1];
5453 __pyx_v_errno = values[2];
5454 }
5455 goto __pyx_L4_argument_unpacking_done;
5456 __pyx_L5_argtuple_error:;
5457 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__5457; goto __pyx_L3_error;}
5458 __pyx_L3_error:;
5459 __Pyx_AddTraceback("rbd.InvalidArgument.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5460 __Pyx_RefNannyFinishContext();
5461 return NULL((void*)0);
5462 __pyx_L4_argument_unpacking_done:;
5463 __pyx_r = __pyx_pf_3rbd_15InvalidArgument___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
5464
5465 /* function exit code */
5466 __Pyx_RefNannyFinishContext();
5467 return __pyx_r;
5468}
5469
5470static PyObject *__pyx_pf_3rbd_15InvalidArgument___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
5471 PyObject *__pyx_r = NULL((void*)0);
5472 __Pyx_RefNannyDeclarations
5473 PyObject *__pyx_t_1 = NULL((void*)0);
5474 PyObject *__pyx_t_2 = NULL((void*)0);
5475 PyObject *__pyx_t_3 = NULL((void*)0);
5476 PyObject *__pyx_t_4 = NULL((void*)0);
5477 Py_ssize_t __pyx_t_5;
5478 PyObject *__pyx_t_6 = NULL((void*)0);
5479 int __pyx_lineno = 0;
5480 const char *__pyx_filename = NULL((void*)0);
5481 int __pyx_clineno = 0;
5482 __Pyx_RefNannySetupContext("__init__", 0);
5483
5484 /* "rbd.pyx":773
5485 * class InvalidArgument(OSError):
5486 * def __init__(self, message, errno=None):
5487 * super(InvalidArgument, self).__init__( # <<<<<<<<<<<<<<
5488 * "RBD invalid argument (%s)" % message, errno)
5489 *
5490 */
5491 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__5491; goto __pyx_L1_error;}
5492 __Pyx_GOTREF(__pyx_t_2);
5493 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__5493; goto __pyx_L1_error;}
5494 __Pyx_GOTREF(__pyx_t_3);
5495 __Pyx_GIVEREF(__pyx_t_2);
5496 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
5497 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
5498 __Pyx_GIVEREF(__pyx_v_self);
5499 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
5500 __pyx_t_2 = 0;
5501 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__5501; goto __pyx_L1_error;}
5502 __Pyx_GOTREF(__pyx_t_2);
5503 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5504 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__5504; goto __pyx_L1_error;}
5505 __Pyx_GOTREF(__pyx_t_3);
5506 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5507
5508 /* "rbd.pyx":774
5509 * def __init__(self, message, errno=None):
5510 * super(InvalidArgument, self).__init__(
5511 * "RBD invalid argument (%s)" % message, errno) # <<<<<<<<<<<<<<
5512 *
5513 *
5514 */
5515 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_invalid_argument_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_invalid_argument_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__5515; goto __pyx_L1_error;}
5516 __Pyx_GOTREF(__pyx_t_2);
5517 __pyx_t_4 = NULL((void*)0);
5518 __pyx_t_5 = 0;
5519 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
5520 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
5521 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
5522 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
5523 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
5524 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5525 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5526 __pyx_t_5 = 1;
5527 }
5528 }
5529 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__5529; goto __pyx_L1_error;}
5530 __Pyx_GOTREF(__pyx_t_6);
5531 if (__pyx_t_4) {
5532 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
5533 }
5534 __Pyx_GIVEREF(__pyx_t_2);
5535 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
5536 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
5537 __Pyx_GIVEREF(__pyx_v_errno);
5538 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
5539 __pyx_t_2 = 0;
5540 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__5540; goto __pyx_L1_error;}
5541 __Pyx_GOTREF(__pyx_t_1);
5542 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5543 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5544 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5545
5546 /* "rbd.pyx":772
5547 *
5548 * class InvalidArgument(OSError):
5549 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5550 * super(InvalidArgument, self).__init__(
5551 * "RBD invalid argument (%s)" % message, errno)
5552 */
5553
5554 /* function exit code */
5555 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5556 goto __pyx_L0;
5557 __pyx_L1_error:;
5558 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5559 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5560 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5561 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5562 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5563 __Pyx_AddTraceback("rbd.InvalidArgument.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5564 __pyx_r = NULL((void*)0);
5565 __pyx_L0:;
5566 __Pyx_XGIVEREF(__pyx_r);
5567 __Pyx_RefNannyFinishContext();
5568 return __pyx_r;
5569}
5570
5571/* "rbd.pyx":778
5572 *
5573 * class LogicError(OSError):
5574 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5575 * super(LogicError, self).__init__(
5576 * "RBD logic error (%s)" % message, errno)
5577 */
5578
5579/* Python wrapper */
5580static PyObject *__pyx_pw_3rbd_10LogicError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5581static char __pyx_doc_3rbd_10LogicError___init__[] = "LogicError.__init__(self, message, errno=None)";
5582static PyMethodDef __pyx_mdef_3rbd_10LogicError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_10LogicError_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_10LogicError___init__};
5583static PyObject *__pyx_pw_3rbd_10LogicError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5584 PyObject *__pyx_v_self = 0;
5585 PyObject *__pyx_v_message = 0;
5586 PyObject *__pyx_v_errno = 0;
5587 int __pyx_lineno = 0;
5588 const char *__pyx_filename = NULL((void*)0);
5589 int __pyx_clineno = 0;
5590 PyObject *__pyx_r = 0;
5591 __Pyx_RefNannyDeclarations
5592 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5593 {
5594 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
5595 PyObject* values[3] = {0,0,0};
5596 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
5597 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5598 Py_ssize_t kw_args;
5599 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5600 switch (pos_args) {
5601 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5602 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5603 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5604 case 0: break;
5605 default: goto __pyx_L5_argtuple_error;
5606 }
5607 kw_args = PyDict_Size(__pyx_kwds);
5608 switch (pos_args) {
5609 case 0:
5610 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
5611 else goto __pyx_L5_argtuple_error;
5612 case 1:
5613 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
5614 else {
5615 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__5615; goto __pyx_L3_error;}
5616 }
5617 case 2:
5618 if (kw_args > 0) {
5619 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
5620 if (value) { values[2] = value; kw_args--; }
5621 }
5622 }
5623 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5624 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__5624; goto __pyx_L3_error;}
5625 }
5626 } else {
5627 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5628 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5629 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5630 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5631 break;
5632 default: goto __pyx_L5_argtuple_error;
5633 }
5634 }
5635 __pyx_v_self = values[0];
5636 __pyx_v_message = values[1];
5637 __pyx_v_errno = values[2];
5638 }
5639 goto __pyx_L4_argument_unpacking_done;
5640 __pyx_L5_argtuple_error:;
5641 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__5641; goto __pyx_L3_error;}
5642 __pyx_L3_error:;
5643 __Pyx_AddTraceback("rbd.LogicError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5644 __Pyx_RefNannyFinishContext();
5645 return NULL((void*)0);
5646 __pyx_L4_argument_unpacking_done:;
5647 __pyx_r = __pyx_pf_3rbd_10LogicError___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
5648
5649 /* function exit code */
5650 __Pyx_RefNannyFinishContext();
5651 return __pyx_r;
5652}
5653
5654static PyObject *__pyx_pf_3rbd_10LogicError___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
5655 PyObject *__pyx_r = NULL((void*)0);
5656 __Pyx_RefNannyDeclarations
5657 PyObject *__pyx_t_1 = NULL((void*)0);
5658 PyObject *__pyx_t_2 = NULL((void*)0);
5659 PyObject *__pyx_t_3 = NULL((void*)0);
5660 PyObject *__pyx_t_4 = NULL((void*)0);
5661 Py_ssize_t __pyx_t_5;
5662 PyObject *__pyx_t_6 = NULL((void*)0);
5663 int __pyx_lineno = 0;
5664 const char *__pyx_filename = NULL((void*)0);
5665 int __pyx_clineno = 0;
5666 __Pyx_RefNannySetupContext("__init__", 0);
5667
5668 /* "rbd.pyx":779
5669 * class LogicError(OSError):
5670 * def __init__(self, message, errno=None):
5671 * super(LogicError, self).__init__( # <<<<<<<<<<<<<<
5672 * "RBD logic error (%s)" % message, errno)
5673 *
5674 */
5675 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LogicError); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__5675; goto __pyx_L1_error;}
5676 __Pyx_GOTREF(__pyx_t_2);
5677 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__5677; goto __pyx_L1_error;}
5678 __Pyx_GOTREF(__pyx_t_3);
5679 __Pyx_GIVEREF(__pyx_t_2);
5680 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
5681 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
5682 __Pyx_GIVEREF(__pyx_v_self);
5683 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
5684 __pyx_t_2 = 0;
5685 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__5685; goto __pyx_L1_error;}
5686 __Pyx_GOTREF(__pyx_t_2);
5687 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5688 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__5688; goto __pyx_L1_error;}
5689 __Pyx_GOTREF(__pyx_t_3);
5690 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5691
5692 /* "rbd.pyx":780
5693 * def __init__(self, message, errno=None):
5694 * super(LogicError, self).__init__(
5695 * "RBD logic error (%s)" % message, errno) # <<<<<<<<<<<<<<
5696 *
5697 *
5698 */
5699 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_logic_error_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_logic_error_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__5699; goto __pyx_L1_error;}
5700 __Pyx_GOTREF(__pyx_t_2);
5701 __pyx_t_4 = NULL((void*)0);
5702 __pyx_t_5 = 0;
5703 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
5704 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
5705 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
5706 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
5707 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
5708 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5709 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5710 __pyx_t_5 = 1;
5711 }
5712 }
5713 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__5713; goto __pyx_L1_error;}
5714 __Pyx_GOTREF(__pyx_t_6);
5715 if (__pyx_t_4) {
5716 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
5717 }
5718 __Pyx_GIVEREF(__pyx_t_2);
5719 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
5720 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
5721 __Pyx_GIVEREF(__pyx_v_errno);
5722 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
5723 __pyx_t_2 = 0;
5724 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__5724; goto __pyx_L1_error;}
5725 __Pyx_GOTREF(__pyx_t_1);
5726 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5727 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5728 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5729
5730 /* "rbd.pyx":778
5731 *
5732 * class LogicError(OSError):
5733 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5734 * super(LogicError, self).__init__(
5735 * "RBD logic error (%s)" % message, errno)
5736 */
5737
5738 /* function exit code */
5739 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5740 goto __pyx_L0;
5741 __pyx_L1_error:;
5742 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5743 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5744 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5745 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5746 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5747 __Pyx_AddTraceback("rbd.LogicError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5748 __pyx_r = NULL((void*)0);
5749 __pyx_L0:;
5750 __Pyx_XGIVEREF(__pyx_r);
5751 __Pyx_RefNannyFinishContext();
5752 return __pyx_r;
5753}
5754
5755/* "rbd.pyx":784
5756 *
5757 * class ReadOnlyImage(OSError):
5758 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5759 * super(ReadOnlyImage, self).__init__(
5760 * "RBD read-only image (%s)" % message, errno)
5761 */
5762
5763/* Python wrapper */
5764static PyObject *__pyx_pw_3rbd_13ReadOnlyImage_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5765static char __pyx_doc_3rbd_13ReadOnlyImage___init__[] = "ReadOnlyImage.__init__(self, message, errno=None)";
5766static PyMethodDef __pyx_mdef_3rbd_13ReadOnlyImage_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_13ReadOnlyImage_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_13ReadOnlyImage___init__};
5767static PyObject *__pyx_pw_3rbd_13ReadOnlyImage_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5768 PyObject *__pyx_v_self = 0;
5769 PyObject *__pyx_v_message = 0;
5770 PyObject *__pyx_v_errno = 0;
5771 int __pyx_lineno = 0;
5772 const char *__pyx_filename = NULL((void*)0);
5773 int __pyx_clineno = 0;
5774 PyObject *__pyx_r = 0;
5775 __Pyx_RefNannyDeclarations
5776 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5777 {
5778 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
5779 PyObject* values[3] = {0,0,0};
5780 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
5781 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5782 Py_ssize_t kw_args;
5783 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5784 switch (pos_args) {
5785 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5786 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5787 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5788 case 0: break;
5789 default: goto __pyx_L5_argtuple_error;
5790 }
5791 kw_args = PyDict_Size(__pyx_kwds);
5792 switch (pos_args) {
5793 case 0:
5794 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
5795 else goto __pyx_L5_argtuple_error;
5796 case 1:
5797 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
5798 else {
5799 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__5799; goto __pyx_L3_error;}
5800 }
5801 case 2:
5802 if (kw_args > 0) {
5803 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
5804 if (value) { values[2] = value; kw_args--; }
5805 }
5806 }
5807 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5808 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__5808; goto __pyx_L3_error;}
5809 }
5810 } else {
5811 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5812 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5813 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5814 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5815 break;
5816 default: goto __pyx_L5_argtuple_error;
5817 }
5818 }
5819 __pyx_v_self = values[0];
5820 __pyx_v_message = values[1];
5821 __pyx_v_errno = values[2];
5822 }
5823 goto __pyx_L4_argument_unpacking_done;
5824 __pyx_L5_argtuple_error:;
5825 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__5825; goto __pyx_L3_error;}
5826 __pyx_L3_error:;
5827 __Pyx_AddTraceback("rbd.ReadOnlyImage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5828 __Pyx_RefNannyFinishContext();
5829 return NULL((void*)0);
5830 __pyx_L4_argument_unpacking_done:;
5831 __pyx_r = __pyx_pf_3rbd_13ReadOnlyImage___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
5832
5833 /* function exit code */
5834 __Pyx_RefNannyFinishContext();
5835 return __pyx_r;
5836}
5837
5838static PyObject *__pyx_pf_3rbd_13ReadOnlyImage___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
5839 PyObject *__pyx_r = NULL((void*)0);
5840 __Pyx_RefNannyDeclarations
5841 PyObject *__pyx_t_1 = NULL((void*)0);
5842 PyObject *__pyx_t_2 = NULL((void*)0);
5843 PyObject *__pyx_t_3 = NULL((void*)0);
5844 PyObject *__pyx_t_4 = NULL((void*)0);
5845 Py_ssize_t __pyx_t_5;
5846 PyObject *__pyx_t_6 = NULL((void*)0);
5847 int __pyx_lineno = 0;
5848 const char *__pyx_filename = NULL((void*)0);
5849 int __pyx_clineno = 0;
5850 __Pyx_RefNannySetupContext("__init__", 0);
5851
5852 /* "rbd.pyx":785
5853 * class ReadOnlyImage(OSError):
5854 * def __init__(self, message, errno=None):
5855 * super(ReadOnlyImage, self).__init__( # <<<<<<<<<<<<<<
5856 * "RBD read-only image (%s)" % message, errno)
5857 *
5858 */
5859 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReadOnlyImage); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__5859; goto __pyx_L1_error;}
5860 __Pyx_GOTREF(__pyx_t_2);
5861 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__5861; goto __pyx_L1_error;}
5862 __Pyx_GOTREF(__pyx_t_3);
5863 __Pyx_GIVEREF(__pyx_t_2);
5864 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
5865 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
5866 __Pyx_GIVEREF(__pyx_v_self);
5867 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
5868 __pyx_t_2 = 0;
5869 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__5869; goto __pyx_L1_error;}
5870 __Pyx_GOTREF(__pyx_t_2);
5871 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5872 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__5872; goto __pyx_L1_error;}
5873 __Pyx_GOTREF(__pyx_t_3);
5874 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
5875
5876 /* "rbd.pyx":786
5877 * def __init__(self, message, errno=None):
5878 * super(ReadOnlyImage, self).__init__(
5879 * "RBD read-only image (%s)" % message, errno) # <<<<<<<<<<<<<<
5880 *
5881 *
5882 */
5883 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_read_only_image_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_read_only_image_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__5883; goto __pyx_L1_error;}
5884 __Pyx_GOTREF(__pyx_t_2);
5885 __pyx_t_4 = NULL((void*)0);
5886 __pyx_t_5 = 0;
5887 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
5888 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
5889 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
5890 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
5891 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
5892 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
5893 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
5894 __pyx_t_5 = 1;
5895 }
5896 }
5897 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__5897; goto __pyx_L1_error;}
5898 __Pyx_GOTREF(__pyx_t_6);
5899 if (__pyx_t_4) {
5900 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
5901 }
5902 __Pyx_GIVEREF(__pyx_t_2);
5903 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
5904 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
5905 __Pyx_GIVEREF(__pyx_v_errno);
5906 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
5907 __pyx_t_2 = 0;
5908 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__5908; goto __pyx_L1_error;}
5909 __Pyx_GOTREF(__pyx_t_1);
5910 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
5911 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
5912 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
5913
5914 /* "rbd.pyx":784
5915 *
5916 * class ReadOnlyImage(OSError):
5917 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5918 * super(ReadOnlyImage, self).__init__(
5919 * "RBD read-only image (%s)" % message, errno)
5920 */
5921
5922 /* function exit code */
5923 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
5924 goto __pyx_L0;
5925 __pyx_L1_error:;
5926 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
5927 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
5928 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
5929 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
5930 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
5931 __Pyx_AddTraceback("rbd.ReadOnlyImage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5932 __pyx_r = NULL((void*)0);
5933 __pyx_L0:;
5934 __Pyx_XGIVEREF(__pyx_r);
5935 __Pyx_RefNannyFinishContext();
5936 return __pyx_r;
5937}
5938
5939/* "rbd.pyx":790
5940 *
5941 * class ImageBusy(OSError):
5942 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
5943 * super(ImageBusy, self).__init__(
5944 * "RBD image is busy (%s)" % message, errno)
5945 */
5946
5947/* Python wrapper */
5948static PyObject *__pyx_pw_3rbd_9ImageBusy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5949static char __pyx_doc_3rbd_9ImageBusy___init__[] = "ImageBusy.__init__(self, message, errno=None)";
5950static PyMethodDef __pyx_mdef_3rbd_9ImageBusy_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_9ImageBusy_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_9ImageBusy___init__};
5951static PyObject *__pyx_pw_3rbd_9ImageBusy_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5952 PyObject *__pyx_v_self = 0;
5953 PyObject *__pyx_v_message = 0;
5954 PyObject *__pyx_v_errno = 0;
5955 int __pyx_lineno = 0;
5956 const char *__pyx_filename = NULL((void*)0);
5957 int __pyx_clineno = 0;
5958 PyObject *__pyx_r = 0;
5959 __Pyx_RefNannyDeclarations
5960 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5961 {
5962 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
5963 PyObject* values[3] = {0,0,0};
5964 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
5965 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
5966 Py_ssize_t kw_args;
5967 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
5968 switch (pos_args) {
5969 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5970 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5971 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5972 case 0: break;
5973 default: goto __pyx_L5_argtuple_error;
5974 }
5975 kw_args = PyDict_Size(__pyx_kwds);
5976 switch (pos_args) {
5977 case 0:
5978 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
5979 else goto __pyx_L5_argtuple_error;
5980 case 1:
5981 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
5982 else {
5983 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__5983; goto __pyx_L3_error;}
5984 }
5985 case 2:
5986 if (kw_args > 0) {
5987 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
5988 if (value) { values[2] = value; kw_args--; }
5989 }
5990 }
5991 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
5992 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__5992; goto __pyx_L3_error;}
5993 }
5994 } else {
5995 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
5996 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
5997 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
5998 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
5999 break;
6000 default: goto __pyx_L5_argtuple_error;
6001 }
6002 }
6003 __pyx_v_self = values[0];
6004 __pyx_v_message = values[1];
6005 __pyx_v_errno = values[2];
6006 }
6007 goto __pyx_L4_argument_unpacking_done;
6008 __pyx_L5_argtuple_error:;
6009 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__6009; goto __pyx_L3_error;}
6010 __pyx_L3_error:;
6011 __Pyx_AddTraceback("rbd.ImageBusy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6012 __Pyx_RefNannyFinishContext();
6013 return NULL((void*)0);
6014 __pyx_L4_argument_unpacking_done:;
6015 __pyx_r = __pyx_pf_3rbd_9ImageBusy___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
6016
6017 /* function exit code */
6018 __Pyx_RefNannyFinishContext();
6019 return __pyx_r;
6020}
6021
6022static PyObject *__pyx_pf_3rbd_9ImageBusy___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
6023 PyObject *__pyx_r = NULL((void*)0);
6024 __Pyx_RefNannyDeclarations
6025 PyObject *__pyx_t_1 = NULL((void*)0);
6026 PyObject *__pyx_t_2 = NULL((void*)0);
6027 PyObject *__pyx_t_3 = NULL((void*)0);
6028 PyObject *__pyx_t_4 = NULL((void*)0);
6029 Py_ssize_t __pyx_t_5;
6030 PyObject *__pyx_t_6 = NULL((void*)0);
6031 int __pyx_lineno = 0;
6032 const char *__pyx_filename = NULL((void*)0);
6033 int __pyx_clineno = 0;
6034 __Pyx_RefNannySetupContext("__init__", 0);
6035
6036 /* "rbd.pyx":791
6037 * class ImageBusy(OSError):
6038 * def __init__(self, message, errno=None):
6039 * super(ImageBusy, self).__init__( # <<<<<<<<<<<<<<
6040 * "RBD image is busy (%s)" % message, errno)
6041 *
6042 */
6043 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageBusy); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__6043; goto __pyx_L1_error;}
6044 __Pyx_GOTREF(__pyx_t_2);
6045 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__6045; goto __pyx_L1_error;}
6046 __Pyx_GOTREF(__pyx_t_3);
6047 __Pyx_GIVEREF(__pyx_t_2);
6048 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
6049 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
6050 __Pyx_GIVEREF(__pyx_v_self);
6051 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
6052 __pyx_t_2 = 0;
6053 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__6053; goto __pyx_L1_error;}
6054 __Pyx_GOTREF(__pyx_t_2);
6055 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6056 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__6056; goto __pyx_L1_error;}
6057 __Pyx_GOTREF(__pyx_t_3);
6058 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6059
6060 /* "rbd.pyx":792
6061 * def __init__(self, message, errno=None):
6062 * super(ImageBusy, self).__init__(
6063 * "RBD image is busy (%s)" % message, errno) # <<<<<<<<<<<<<<
6064 *
6065 *
6066 */
6067 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_image_is_busy_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_image_is_busy_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__6067; goto __pyx_L1_error;}
6068 __Pyx_GOTREF(__pyx_t_2);
6069 __pyx_t_4 = NULL((void*)0);
6070 __pyx_t_5 = 0;
6071 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
6072 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
6073 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
6074 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
6075 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
6076 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6077 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6078 __pyx_t_5 = 1;
6079 }
6080 }
6081 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__6081; goto __pyx_L1_error;}
6082 __Pyx_GOTREF(__pyx_t_6);
6083 if (__pyx_t_4) {
6084 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
6085 }
6086 __Pyx_GIVEREF(__pyx_t_2);
6087 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
6088 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
6089 __Pyx_GIVEREF(__pyx_v_errno);
6090 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
6091 __pyx_t_2 = 0;
6092 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__6092; goto __pyx_L1_error;}
6093 __Pyx_GOTREF(__pyx_t_1);
6094 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
6095 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6096 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6097
6098 /* "rbd.pyx":790
6099 *
6100 * class ImageBusy(OSError):
6101 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6102 * super(ImageBusy, self).__init__(
6103 * "RBD image is busy (%s)" % message, errno)
6104 */
6105
6106 /* function exit code */
6107 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6108 goto __pyx_L0;
6109 __pyx_L1_error:;
6110 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6111 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6112 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6113 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
6114 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
6115 __Pyx_AddTraceback("rbd.ImageBusy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6116 __pyx_r = NULL((void*)0);
6117 __pyx_L0:;
6118 __Pyx_XGIVEREF(__pyx_r);
6119 __Pyx_RefNannyFinishContext();
6120 return __pyx_r;
6121}
6122
6123/* "rbd.pyx":796
6124 *
6125 * class ImageHasSnapshots(OSError):
6126 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6127 * super(ImageHasSnapshots, self).__init__(
6128 * "RBD image has snapshots (%s)" % message, errno)
6129 */
6130
6131/* Python wrapper */
6132static PyObject *__pyx_pw_3rbd_17ImageHasSnapshots_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6133static char __pyx_doc_3rbd_17ImageHasSnapshots___init__[] = "ImageHasSnapshots.__init__(self, message, errno=None)";
6134static PyMethodDef __pyx_mdef_3rbd_17ImageHasSnapshots_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_17ImageHasSnapshots_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_17ImageHasSnapshots___init__};
6135static PyObject *__pyx_pw_3rbd_17ImageHasSnapshots_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6136 PyObject *__pyx_v_self = 0;
6137 PyObject *__pyx_v_message = 0;
6138 PyObject *__pyx_v_errno = 0;
6139 int __pyx_lineno = 0;
6140 const char *__pyx_filename = NULL((void*)0);
6141 int __pyx_clineno = 0;
6142 PyObject *__pyx_r = 0;
6143 __Pyx_RefNannyDeclarations
6144 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6145 {
6146 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
6147 PyObject* values[3] = {0,0,0};
6148 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
6149 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
6150 Py_ssize_t kw_args;
6151 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
6152 switch (pos_args) {
6153 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6154 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6155 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6156 case 0: break;
6157 default: goto __pyx_L5_argtuple_error;
6158 }
6159 kw_args = PyDict_Size(__pyx_kwds);
6160 switch (pos_args) {
6161 case 0:
6162 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
6163 else goto __pyx_L5_argtuple_error;
6164 case 1:
6165 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
6166 else {
6167 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__6167; goto __pyx_L3_error;}
6168 }
6169 case 2:
6170 if (kw_args > 0) {
6171 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
6172 if (value) { values[2] = value; kw_args--; }
6173 }
6174 }
6175 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
6176 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__6176; goto __pyx_L3_error;}
6177 }
6178 } else {
6179 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
6180 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6181 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6182 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6183 break;
6184 default: goto __pyx_L5_argtuple_error;
6185 }
6186 }
6187 __pyx_v_self = values[0];
6188 __pyx_v_message = values[1];
6189 __pyx_v_errno = values[2];
6190 }
6191 goto __pyx_L4_argument_unpacking_done;
6192 __pyx_L5_argtuple_error:;
6193 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__6193; goto __pyx_L3_error;}
6194 __pyx_L3_error:;
6195 __Pyx_AddTraceback("rbd.ImageHasSnapshots.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6196 __Pyx_RefNannyFinishContext();
6197 return NULL((void*)0);
6198 __pyx_L4_argument_unpacking_done:;
6199 __pyx_r = __pyx_pf_3rbd_17ImageHasSnapshots___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
6200
6201 /* function exit code */
6202 __Pyx_RefNannyFinishContext();
6203 return __pyx_r;
6204}
6205
6206static PyObject *__pyx_pf_3rbd_17ImageHasSnapshots___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
6207 PyObject *__pyx_r = NULL((void*)0);
6208 __Pyx_RefNannyDeclarations
6209 PyObject *__pyx_t_1 = NULL((void*)0);
6210 PyObject *__pyx_t_2 = NULL((void*)0);
6211 PyObject *__pyx_t_3 = NULL((void*)0);
6212 PyObject *__pyx_t_4 = NULL((void*)0);
6213 Py_ssize_t __pyx_t_5;
6214 PyObject *__pyx_t_6 = NULL((void*)0);
6215 int __pyx_lineno = 0;
6216 const char *__pyx_filename = NULL((void*)0);
6217 int __pyx_clineno = 0;
6218 __Pyx_RefNannySetupContext("__init__", 0);
6219
6220 /* "rbd.pyx":797
6221 * class ImageHasSnapshots(OSError):
6222 * def __init__(self, message, errno=None):
6223 * super(ImageHasSnapshots, self).__init__( # <<<<<<<<<<<<<<
6224 * "RBD image has snapshots (%s)" % message, errno)
6225 *
6226 */
6227 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageHasSnapshots); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__6227; goto __pyx_L1_error;}
6228 __Pyx_GOTREF(__pyx_t_2);
6229 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__6229; goto __pyx_L1_error;}
6230 __Pyx_GOTREF(__pyx_t_3);
6231 __Pyx_GIVEREF(__pyx_t_2);
6232 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
6233 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
6234 __Pyx_GIVEREF(__pyx_v_self);
6235 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
6236 __pyx_t_2 = 0;
6237 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__6237; goto __pyx_L1_error;}
6238 __Pyx_GOTREF(__pyx_t_2);
6239 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6240 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__6240; goto __pyx_L1_error;}
6241 __Pyx_GOTREF(__pyx_t_3);
6242 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6243
6244 /* "rbd.pyx":798
6245 * def __init__(self, message, errno=None):
6246 * super(ImageHasSnapshots, self).__init__(
6247 * "RBD image has snapshots (%s)" % message, errno) # <<<<<<<<<<<<<<
6248 *
6249 *
6250 */
6251 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_image_has_snapshots_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_image_has_snapshots_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__6251; goto __pyx_L1_error;}
6252 __Pyx_GOTREF(__pyx_t_2);
6253 __pyx_t_4 = NULL((void*)0);
6254 __pyx_t_5 = 0;
6255 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
6256 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
6257 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
6258 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
6259 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
6260 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6261 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6262 __pyx_t_5 = 1;
6263 }
6264 }
6265 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__6265; goto __pyx_L1_error;}
6266 __Pyx_GOTREF(__pyx_t_6);
6267 if (__pyx_t_4) {
6268 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
6269 }
6270 __Pyx_GIVEREF(__pyx_t_2);
6271 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
6272 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
6273 __Pyx_GIVEREF(__pyx_v_errno);
6274 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
6275 __pyx_t_2 = 0;
6276 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__6276; goto __pyx_L1_error;}
6277 __Pyx_GOTREF(__pyx_t_1);
6278 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
6279 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6280 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6281
6282 /* "rbd.pyx":796
6283 *
6284 * class ImageHasSnapshots(OSError):
6285 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6286 * super(ImageHasSnapshots, self).__init__(
6287 * "RBD image has snapshots (%s)" % message, errno)
6288 */
6289
6290 /* function exit code */
6291 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6292 goto __pyx_L0;
6293 __pyx_L1_error:;
6294 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6295 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6296 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6297 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
6298 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
6299 __Pyx_AddTraceback("rbd.ImageHasSnapshots.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6300 __pyx_r = NULL((void*)0);
6301 __pyx_L0:;
6302 __Pyx_XGIVEREF(__pyx_r);
6303 __Pyx_RefNannyFinishContext();
6304 return __pyx_r;
6305}
6306
6307/* "rbd.pyx":802
6308 *
6309 * class FunctionNotSupported(OSError):
6310 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6311 * super(FunctionNotSupported, self).__init__(
6312 * "RBD function not supported (%s)" % message, errno)
6313 */
6314
6315/* Python wrapper */
6316static PyObject *__pyx_pw_3rbd_20FunctionNotSupported_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6317static char __pyx_doc_3rbd_20FunctionNotSupported___init__[] = "FunctionNotSupported.__init__(self, message, errno=None)";
6318static PyMethodDef __pyx_mdef_3rbd_20FunctionNotSupported_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_20FunctionNotSupported_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_20FunctionNotSupported___init__};
6319static PyObject *__pyx_pw_3rbd_20FunctionNotSupported_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6320 PyObject *__pyx_v_self = 0;
6321 PyObject *__pyx_v_message = 0;
6322 PyObject *__pyx_v_errno = 0;
6323 int __pyx_lineno = 0;
6324 const char *__pyx_filename = NULL((void*)0);
6325 int __pyx_clineno = 0;
6326 PyObject *__pyx_r = 0;
6327 __Pyx_RefNannyDeclarations
6328 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6329 {
6330 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
6331 PyObject* values[3] = {0,0,0};
6332 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
6333 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
6334 Py_ssize_t kw_args;
6335 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
6336 switch (pos_args) {
6337 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6338 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6339 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6340 case 0: break;
6341 default: goto __pyx_L5_argtuple_error;
6342 }
6343 kw_args = PyDict_Size(__pyx_kwds);
6344 switch (pos_args) {
6345 case 0:
6346 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
6347 else goto __pyx_L5_argtuple_error;
6348 case 1:
6349 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
6350 else {
6351 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__6351; goto __pyx_L3_error;}
6352 }
6353 case 2:
6354 if (kw_args > 0) {
6355 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
6356 if (value) { values[2] = value; kw_args--; }
6357 }
6358 }
6359 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
6360 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__6360; goto __pyx_L3_error;}
6361 }
6362 } else {
6363 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
6364 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6365 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6366 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6367 break;
6368 default: goto __pyx_L5_argtuple_error;
6369 }
6370 }
6371 __pyx_v_self = values[0];
6372 __pyx_v_message = values[1];
6373 __pyx_v_errno = values[2];
6374 }
6375 goto __pyx_L4_argument_unpacking_done;
6376 __pyx_L5_argtuple_error:;
6377 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__6377; goto __pyx_L3_error;}
6378 __pyx_L3_error:;
6379 __Pyx_AddTraceback("rbd.FunctionNotSupported.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6380 __Pyx_RefNannyFinishContext();
6381 return NULL((void*)0);
6382 __pyx_L4_argument_unpacking_done:;
6383 __pyx_r = __pyx_pf_3rbd_20FunctionNotSupported___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
6384
6385 /* function exit code */
6386 __Pyx_RefNannyFinishContext();
6387 return __pyx_r;
6388}
6389
6390static PyObject *__pyx_pf_3rbd_20FunctionNotSupported___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
6391 PyObject *__pyx_r = NULL((void*)0);
6392 __Pyx_RefNannyDeclarations
6393 PyObject *__pyx_t_1 = NULL((void*)0);
6394 PyObject *__pyx_t_2 = NULL((void*)0);
6395 PyObject *__pyx_t_3 = NULL((void*)0);
6396 PyObject *__pyx_t_4 = NULL((void*)0);
6397 Py_ssize_t __pyx_t_5;
6398 PyObject *__pyx_t_6 = NULL((void*)0);
6399 int __pyx_lineno = 0;
6400 const char *__pyx_filename = NULL((void*)0);
6401 int __pyx_clineno = 0;
6402 __Pyx_RefNannySetupContext("__init__", 0);
6403
6404 /* "rbd.pyx":803
6405 * class FunctionNotSupported(OSError):
6406 * def __init__(self, message, errno=None):
6407 * super(FunctionNotSupported, self).__init__( # <<<<<<<<<<<<<<
6408 * "RBD function not supported (%s)" % message, errno)
6409 *
6410 */
6411 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FunctionNotSupported); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__6411; goto __pyx_L1_error;}
6412 __Pyx_GOTREF(__pyx_t_2);
6413 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__6413; goto __pyx_L1_error;}
6414 __Pyx_GOTREF(__pyx_t_3);
6415 __Pyx_GIVEREF(__pyx_t_2);
6416 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
6417 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
6418 __Pyx_GIVEREF(__pyx_v_self);
6419 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
6420 __pyx_t_2 = 0;
6421 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__6421; goto __pyx_L1_error;}
6422 __Pyx_GOTREF(__pyx_t_2);
6423 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6424 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__6424; goto __pyx_L1_error;}
6425 __Pyx_GOTREF(__pyx_t_3);
6426 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6427
6428 /* "rbd.pyx":804
6429 * def __init__(self, message, errno=None):
6430 * super(FunctionNotSupported, self).__init__(
6431 * "RBD function not supported (%s)" % message, errno) # <<<<<<<<<<<<<<
6432 *
6433 *
6434 */
6435 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_function_not_supported_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_function_not_supported_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__6435; goto __pyx_L1_error;}
6436 __Pyx_GOTREF(__pyx_t_2);
6437 __pyx_t_4 = NULL((void*)0);
6438 __pyx_t_5 = 0;
6439 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
6440 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
6441 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
6442 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
6443 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
6444 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6445 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6446 __pyx_t_5 = 1;
6447 }
6448 }
6449 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__6449; goto __pyx_L1_error;}
6450 __Pyx_GOTREF(__pyx_t_6);
6451 if (__pyx_t_4) {
6452 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
6453 }
6454 __Pyx_GIVEREF(__pyx_t_2);
6455 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
6456 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
6457 __Pyx_GIVEREF(__pyx_v_errno);
6458 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
6459 __pyx_t_2 = 0;
6460 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__6460; goto __pyx_L1_error;}
6461 __Pyx_GOTREF(__pyx_t_1);
6462 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
6463 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6464 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6465
6466 /* "rbd.pyx":802
6467 *
6468 * class FunctionNotSupported(OSError):
6469 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6470 * super(FunctionNotSupported, self).__init__(
6471 * "RBD function not supported (%s)" % message, errno)
6472 */
6473
6474 /* function exit code */
6475 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6476 goto __pyx_L0;
6477 __pyx_L1_error:;
6478 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6479 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6480 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6481 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
6482 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
6483 __Pyx_AddTraceback("rbd.FunctionNotSupported.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6484 __pyx_r = NULL((void*)0);
6485 __pyx_L0:;
6486 __Pyx_XGIVEREF(__pyx_r);
6487 __Pyx_RefNannyFinishContext();
6488 return __pyx_r;
6489}
6490
6491/* "rbd.pyx":808
6492 *
6493 * class ArgumentOutOfRange(OSError):
6494 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6495 * super(ArgumentOutOfRange, self).__init__(
6496 * "RBD arguments out of range (%s)" % message, errno)
6497 */
6498
6499/* Python wrapper */
6500static PyObject *__pyx_pw_3rbd_18ArgumentOutOfRange_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6501static char __pyx_doc_3rbd_18ArgumentOutOfRange___init__[] = "ArgumentOutOfRange.__init__(self, message, errno=None)";
6502static PyMethodDef __pyx_mdef_3rbd_18ArgumentOutOfRange_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_18ArgumentOutOfRange_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_18ArgumentOutOfRange___init__};
6503static PyObject *__pyx_pw_3rbd_18ArgumentOutOfRange_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6504 PyObject *__pyx_v_self = 0;
6505 PyObject *__pyx_v_message = 0;
6506 PyObject *__pyx_v_errno = 0;
6507 int __pyx_lineno = 0;
6508 const char *__pyx_filename = NULL((void*)0);
6509 int __pyx_clineno = 0;
6510 PyObject *__pyx_r = 0;
6511 __Pyx_RefNannyDeclarations
6512 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6513 {
6514 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
6515 PyObject* values[3] = {0,0,0};
6516 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
6517 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
6518 Py_ssize_t kw_args;
6519 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
6520 switch (pos_args) {
6521 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6522 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6523 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6524 case 0: break;
6525 default: goto __pyx_L5_argtuple_error;
6526 }
6527 kw_args = PyDict_Size(__pyx_kwds);
6528 switch (pos_args) {
6529 case 0:
6530 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
6531 else goto __pyx_L5_argtuple_error;
6532 case 1:
6533 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
6534 else {
6535 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__6535; goto __pyx_L3_error;}
6536 }
6537 case 2:
6538 if (kw_args > 0) {
6539 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
6540 if (value) { values[2] = value; kw_args--; }
6541 }
6542 }
6543 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
6544 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__6544; goto __pyx_L3_error;}
6545 }
6546 } else {
6547 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
6548 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6549 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6550 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6551 break;
6552 default: goto __pyx_L5_argtuple_error;
6553 }
6554 }
6555 __pyx_v_self = values[0];
6556 __pyx_v_message = values[1];
6557 __pyx_v_errno = values[2];
6558 }
6559 goto __pyx_L4_argument_unpacking_done;
6560 __pyx_L5_argtuple_error:;
6561 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__6561; goto __pyx_L3_error;}
6562 __pyx_L3_error:;
6563 __Pyx_AddTraceback("rbd.ArgumentOutOfRange.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6564 __Pyx_RefNannyFinishContext();
6565 return NULL((void*)0);
6566 __pyx_L4_argument_unpacking_done:;
6567 __pyx_r = __pyx_pf_3rbd_18ArgumentOutOfRange___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
6568
6569 /* function exit code */
6570 __Pyx_RefNannyFinishContext();
6571 return __pyx_r;
6572}
6573
6574static PyObject *__pyx_pf_3rbd_18ArgumentOutOfRange___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
6575 PyObject *__pyx_r = NULL((void*)0);
6576 __Pyx_RefNannyDeclarations
6577 PyObject *__pyx_t_1 = NULL((void*)0);
6578 PyObject *__pyx_t_2 = NULL((void*)0);
6579 PyObject *__pyx_t_3 = NULL((void*)0);
6580 PyObject *__pyx_t_4 = NULL((void*)0);
6581 Py_ssize_t __pyx_t_5;
6582 PyObject *__pyx_t_6 = NULL((void*)0);
6583 int __pyx_lineno = 0;
6584 const char *__pyx_filename = NULL((void*)0);
6585 int __pyx_clineno = 0;
6586 __Pyx_RefNannySetupContext("__init__", 0);
6587
6588 /* "rbd.pyx":809
6589 * class ArgumentOutOfRange(OSError):
6590 * def __init__(self, message, errno=None):
6591 * super(ArgumentOutOfRange, self).__init__( # <<<<<<<<<<<<<<
6592 * "RBD arguments out of range (%s)" % message, errno)
6593 *
6594 */
6595 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ArgumentOutOfRange); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__6595; goto __pyx_L1_error;}
6596 __Pyx_GOTREF(__pyx_t_2);
6597 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__6597; goto __pyx_L1_error;}
6598 __Pyx_GOTREF(__pyx_t_3);
6599 __Pyx_GIVEREF(__pyx_t_2);
6600 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
6601 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
6602 __Pyx_GIVEREF(__pyx_v_self);
6603 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
6604 __pyx_t_2 = 0;
6605 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__6605; goto __pyx_L1_error;}
6606 __Pyx_GOTREF(__pyx_t_2);
6607 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6608 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__6608; goto __pyx_L1_error;}
6609 __Pyx_GOTREF(__pyx_t_3);
6610 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6611
6612 /* "rbd.pyx":810
6613 * def __init__(self, message, errno=None):
6614 * super(ArgumentOutOfRange, self).__init__(
6615 * "RBD arguments out of range (%s)" % message, errno) # <<<<<<<<<<<<<<
6616 *
6617 *
6618 */
6619 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_arguments_out_of_range_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_arguments_out_of_range_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__6619; goto __pyx_L1_error;}
6620 __Pyx_GOTREF(__pyx_t_2);
6621 __pyx_t_4 = NULL((void*)0);
6622 __pyx_t_5 = 0;
6623 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
6624 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
6625 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
6626 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
6627 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
6628 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6629 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6630 __pyx_t_5 = 1;
6631 }
6632 }
6633 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__6633; goto __pyx_L1_error;}
6634 __Pyx_GOTREF(__pyx_t_6);
6635 if (__pyx_t_4) {
6636 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
6637 }
6638 __Pyx_GIVEREF(__pyx_t_2);
6639 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
6640 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
6641 __Pyx_GIVEREF(__pyx_v_errno);
6642 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
6643 __pyx_t_2 = 0;
6644 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__6644; goto __pyx_L1_error;}
6645 __Pyx_GOTREF(__pyx_t_1);
6646 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
6647 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6648 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6649
6650 /* "rbd.pyx":808
6651 *
6652 * class ArgumentOutOfRange(OSError):
6653 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6654 * super(ArgumentOutOfRange, self).__init__(
6655 * "RBD arguments out of range (%s)" % message, errno)
6656 */
6657
6658 /* function exit code */
6659 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6660 goto __pyx_L0;
6661 __pyx_L1_error:;
6662 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6663 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6664 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6665 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
6666 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
6667 __Pyx_AddTraceback("rbd.ArgumentOutOfRange.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6668 __pyx_r = NULL((void*)0);
6669 __pyx_L0:;
6670 __Pyx_XGIVEREF(__pyx_r);
6671 __Pyx_RefNannyFinishContext();
6672 return __pyx_r;
6673}
6674
6675/* "rbd.pyx":814
6676 *
6677 * class ConnectionShutdown(OSError):
6678 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6679 * super(ConnectionShutdown, self).__init__(
6680 * "RBD connection was shutdown (%s)" % message, errno)
6681 */
6682
6683/* Python wrapper */
6684static PyObject *__pyx_pw_3rbd_18ConnectionShutdown_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6685static char __pyx_doc_3rbd_18ConnectionShutdown___init__[] = "ConnectionShutdown.__init__(self, message, errno=None)";
6686static PyMethodDef __pyx_mdef_3rbd_18ConnectionShutdown_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_18ConnectionShutdown_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_18ConnectionShutdown___init__};
6687static PyObject *__pyx_pw_3rbd_18ConnectionShutdown_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6688 PyObject *__pyx_v_self = 0;
6689 PyObject *__pyx_v_message = 0;
6690 PyObject *__pyx_v_errno = 0;
6691 int __pyx_lineno = 0;
6692 const char *__pyx_filename = NULL((void*)0);
6693 int __pyx_clineno = 0;
6694 PyObject *__pyx_r = 0;
6695 __Pyx_RefNannyDeclarations
6696 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6697 {
6698 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
6699 PyObject* values[3] = {0,0,0};
6700 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
6701 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
6702 Py_ssize_t kw_args;
6703 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
6704 switch (pos_args) {
6705 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6706 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6707 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6708 case 0: break;
6709 default: goto __pyx_L5_argtuple_error;
6710 }
6711 kw_args = PyDict_Size(__pyx_kwds);
6712 switch (pos_args) {
6713 case 0:
6714 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
6715 else goto __pyx_L5_argtuple_error;
6716 case 1:
6717 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
6718 else {
6719 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__6719; goto __pyx_L3_error;}
6720 }
6721 case 2:
6722 if (kw_args > 0) {
6723 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
6724 if (value) { values[2] = value; kw_args--; }
6725 }
6726 }
6727 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
6728 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__6728; goto __pyx_L3_error;}
6729 }
6730 } else {
6731 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
6732 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6733 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6734 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6735 break;
6736 default: goto __pyx_L5_argtuple_error;
6737 }
6738 }
6739 __pyx_v_self = values[0];
6740 __pyx_v_message = values[1];
6741 __pyx_v_errno = values[2];
6742 }
6743 goto __pyx_L4_argument_unpacking_done;
6744 __pyx_L5_argtuple_error:;
6745 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__6745; goto __pyx_L3_error;}
6746 __pyx_L3_error:;
6747 __Pyx_AddTraceback("rbd.ConnectionShutdown.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6748 __Pyx_RefNannyFinishContext();
6749 return NULL((void*)0);
6750 __pyx_L4_argument_unpacking_done:;
6751 __pyx_r = __pyx_pf_3rbd_18ConnectionShutdown___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
6752
6753 /* function exit code */
6754 __Pyx_RefNannyFinishContext();
6755 return __pyx_r;
6756}
6757
6758static PyObject *__pyx_pf_3rbd_18ConnectionShutdown___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
6759 PyObject *__pyx_r = NULL((void*)0);
6760 __Pyx_RefNannyDeclarations
6761 PyObject *__pyx_t_1 = NULL((void*)0);
6762 PyObject *__pyx_t_2 = NULL((void*)0);
6763 PyObject *__pyx_t_3 = NULL((void*)0);
6764 PyObject *__pyx_t_4 = NULL((void*)0);
6765 Py_ssize_t __pyx_t_5;
6766 PyObject *__pyx_t_6 = NULL((void*)0);
6767 int __pyx_lineno = 0;
6768 const char *__pyx_filename = NULL((void*)0);
6769 int __pyx_clineno = 0;
6770 __Pyx_RefNannySetupContext("__init__", 0);
6771
6772 /* "rbd.pyx":815
6773 * class ConnectionShutdown(OSError):
6774 * def __init__(self, message, errno=None):
6775 * super(ConnectionShutdown, self).__init__( # <<<<<<<<<<<<<<
6776 * "RBD connection was shutdown (%s)" % message, errno)
6777 *
6778 */
6779 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ConnectionShutdown); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__6779; goto __pyx_L1_error;}
6780 __Pyx_GOTREF(__pyx_t_2);
6781 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__6781; goto __pyx_L1_error;}
6782 __Pyx_GOTREF(__pyx_t_3);
6783 __Pyx_GIVEREF(__pyx_t_2);
6784 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
6785 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
6786 __Pyx_GIVEREF(__pyx_v_self);
6787 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
6788 __pyx_t_2 = 0;
6789 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__6789; goto __pyx_L1_error;}
6790 __Pyx_GOTREF(__pyx_t_2);
6791 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6792 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__6792; goto __pyx_L1_error;}
6793 __Pyx_GOTREF(__pyx_t_3);
6794 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6795
6796 /* "rbd.pyx":816
6797 * def __init__(self, message, errno=None):
6798 * super(ConnectionShutdown, self).__init__(
6799 * "RBD connection was shutdown (%s)" % message, errno) # <<<<<<<<<<<<<<
6800 *
6801 *
6802 */
6803 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_connection_was_shutdown_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_connection_was_shutdown_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__6803; goto __pyx_L1_error;}
6804 __Pyx_GOTREF(__pyx_t_2);
6805 __pyx_t_4 = NULL((void*)0);
6806 __pyx_t_5 = 0;
6807 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
6808 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
6809 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
6810 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
6811 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
6812 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6813 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6814 __pyx_t_5 = 1;
6815 }
6816 }
6817 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__6817; goto __pyx_L1_error;}
6818 __Pyx_GOTREF(__pyx_t_6);
6819 if (__pyx_t_4) {
6820 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
6821 }
6822 __Pyx_GIVEREF(__pyx_t_2);
6823 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
6824 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
6825 __Pyx_GIVEREF(__pyx_v_errno);
6826 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
6827 __pyx_t_2 = 0;
6828 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__6828; goto __pyx_L1_error;}
6829 __Pyx_GOTREF(__pyx_t_1);
6830 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
6831 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6832 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
6833
6834 /* "rbd.pyx":814
6835 *
6836 * class ConnectionShutdown(OSError):
6837 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6838 * super(ConnectionShutdown, self).__init__(
6839 * "RBD connection was shutdown (%s)" % message, errno)
6840 */
6841
6842 /* function exit code */
6843 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
6844 goto __pyx_L0;
6845 __pyx_L1_error:;
6846 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
6847 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
6848 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
6849 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
6850 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
6851 __Pyx_AddTraceback("rbd.ConnectionShutdown.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6852 __pyx_r = NULL((void*)0);
6853 __pyx_L0:;
6854 __Pyx_XGIVEREF(__pyx_r);
6855 __Pyx_RefNannyFinishContext();
6856 return __pyx_r;
6857}
6858
6859/* "rbd.pyx":820
6860 *
6861 * class Timeout(OSError):
6862 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
6863 * super(Timeout, self).__init__(
6864 * "RBD operation timeout (%s)" % message, errno)
6865 */
6866
6867/* Python wrapper */
6868static PyObject *__pyx_pw_3rbd_7Timeout_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6869static char __pyx_doc_3rbd_7Timeout___init__[] = "Timeout.__init__(self, message, errno=None)";
6870static PyMethodDef __pyx_mdef_3rbd_7Timeout_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_7Timeout_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_7Timeout___init__};
6871static PyObject *__pyx_pw_3rbd_7Timeout_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6872 PyObject *__pyx_v_self = 0;
6873 PyObject *__pyx_v_message = 0;
6874 PyObject *__pyx_v_errno = 0;
6875 int __pyx_lineno = 0;
6876 const char *__pyx_filename = NULL((void*)0);
6877 int __pyx_clineno = 0;
6878 PyObject *__pyx_r = 0;
6879 __Pyx_RefNannyDeclarations
6880 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6881 {
6882 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
6883 PyObject* values[3] = {0,0,0};
6884 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
6885 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
6886 Py_ssize_t kw_args;
6887 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
6888 switch (pos_args) {
6889 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6890 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6891 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6892 case 0: break;
6893 default: goto __pyx_L5_argtuple_error;
6894 }
6895 kw_args = PyDict_Size(__pyx_kwds);
6896 switch (pos_args) {
6897 case 0:
6898 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
6899 else goto __pyx_L5_argtuple_error;
6900 case 1:
6901 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
6902 else {
6903 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__6903; goto __pyx_L3_error;}
6904 }
6905 case 2:
6906 if (kw_args > 0) {
6907 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
6908 if (value) { values[2] = value; kw_args--; }
6909 }
6910 }
6911 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
6912 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__6912; goto __pyx_L3_error;}
6913 }
6914 } else {
6915 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
6916 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
6917 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
6918 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
6919 break;
6920 default: goto __pyx_L5_argtuple_error;
6921 }
6922 }
6923 __pyx_v_self = values[0];
6924 __pyx_v_message = values[1];
6925 __pyx_v_errno = values[2];
6926 }
6927 goto __pyx_L4_argument_unpacking_done;
6928 __pyx_L5_argtuple_error:;
6929 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__6929; goto __pyx_L3_error;}
6930 __pyx_L3_error:;
6931 __Pyx_AddTraceback("rbd.Timeout.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6932 __Pyx_RefNannyFinishContext();
6933 return NULL((void*)0);
6934 __pyx_L4_argument_unpacking_done:;
6935 __pyx_r = __pyx_pf_3rbd_7Timeout___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
6936
6937 /* function exit code */
6938 __Pyx_RefNannyFinishContext();
6939 return __pyx_r;
6940}
6941
6942static PyObject *__pyx_pf_3rbd_7Timeout___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
6943 PyObject *__pyx_r = NULL((void*)0);
6944 __Pyx_RefNannyDeclarations
6945 PyObject *__pyx_t_1 = NULL((void*)0);
6946 PyObject *__pyx_t_2 = NULL((void*)0);
6947 PyObject *__pyx_t_3 = NULL((void*)0);
6948 PyObject *__pyx_t_4 = NULL((void*)0);
6949 Py_ssize_t __pyx_t_5;
6950 PyObject *__pyx_t_6 = NULL((void*)0);
6951 int __pyx_lineno = 0;
6952 const char *__pyx_filename = NULL((void*)0);
6953 int __pyx_clineno = 0;
6954 __Pyx_RefNannySetupContext("__init__", 0);
6955
6956 /* "rbd.pyx":821
6957 * class Timeout(OSError):
6958 * def __init__(self, message, errno=None):
6959 * super(Timeout, self).__init__( # <<<<<<<<<<<<<<
6960 * "RBD operation timeout (%s)" % message, errno)
6961 *
6962 */
6963 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timeout); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__6963; goto __pyx_L1_error;}
6964 __Pyx_GOTREF(__pyx_t_2);
6965 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__6965; goto __pyx_L1_error;}
6966 __Pyx_GOTREF(__pyx_t_3);
6967 __Pyx_GIVEREF(__pyx_t_2);
6968 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
6969 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
6970 __Pyx_GIVEREF(__pyx_v_self);
6971 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
6972 __pyx_t_2 = 0;
6973 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__6973; goto __pyx_L1_error;}
6974 __Pyx_GOTREF(__pyx_t_2);
6975 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
6976 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__6976; goto __pyx_L1_error;}
6977 __Pyx_GOTREF(__pyx_t_3);
6978 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
6979
6980 /* "rbd.pyx":822
6981 * def __init__(self, message, errno=None):
6982 * super(Timeout, self).__init__(
6983 * "RBD operation timeout (%s)" % message, errno) # <<<<<<<<<<<<<<
6984 *
6985 *
6986 */
6987 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_operation_timeout_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_operation_timeout_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__6987; goto __pyx_L1_error;}
6988 __Pyx_GOTREF(__pyx_t_2);
6989 __pyx_t_4 = NULL((void*)0);
6990 __pyx_t_5 = 0;
6991 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
6992 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
6993 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
6994 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
6995 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
6996 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
6997 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
6998 __pyx_t_5 = 1;
6999 }
7000 }
7001 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__7001; goto __pyx_L1_error;}
7002 __Pyx_GOTREF(__pyx_t_6);
7003 if (__pyx_t_4) {
7004 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
7005 }
7006 __Pyx_GIVEREF(__pyx_t_2);
7007 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
7008 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
7009 __Pyx_GIVEREF(__pyx_v_errno);
7010 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
7011 __pyx_t_2 = 0;
7012 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__7012; goto __pyx_L1_error;}
7013 __Pyx_GOTREF(__pyx_t_1);
7014 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
7015 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7016 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7017
7018 /* "rbd.pyx":820
7019 *
7020 * class Timeout(OSError):
7021 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
7022 * super(Timeout, self).__init__(
7023 * "RBD operation timeout (%s)" % message, errno)
7024 */
7025
7026 /* function exit code */
7027 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7028 goto __pyx_L0;
7029 __pyx_L1_error:;
7030 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7031 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7032 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
7033 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
7034 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
7035 __Pyx_AddTraceback("rbd.Timeout.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7036 __pyx_r = NULL((void*)0);
7037 __pyx_L0:;
7038 __Pyx_XGIVEREF(__pyx_r);
7039 __Pyx_RefNannyFinishContext();
7040 return __pyx_r;
7041}
7042
7043/* "rbd.pyx":826
7044 *
7045 * class DiskQuotaExceeded(OSError):
7046 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
7047 * super(DiskQuotaExceeded, self).__init__(
7048 * "RBD disk quota exceeded (%s)" % message, errno)
7049 */
7050
7051/* Python wrapper */
7052static PyObject *__pyx_pw_3rbd_17DiskQuotaExceeded_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7053static char __pyx_doc_3rbd_17DiskQuotaExceeded___init__[] = "DiskQuotaExceeded.__init__(self, message, errno=None)";
7054static PyMethodDef __pyx_mdef_3rbd_17DiskQuotaExceeded_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_17DiskQuotaExceeded_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_17DiskQuotaExceeded___init__};
7055static PyObject *__pyx_pw_3rbd_17DiskQuotaExceeded_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7056 PyObject *__pyx_v_self = 0;
7057 PyObject *__pyx_v_message = 0;
7058 PyObject *__pyx_v_errno = 0;
7059 int __pyx_lineno = 0;
7060 const char *__pyx_filename = NULL((void*)0);
7061 int __pyx_clineno = 0;
7062 PyObject *__pyx_r = 0;
7063 __Pyx_RefNannyDeclarations
7064 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7065 {
7066 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
7067 PyObject* values[3] = {0,0,0};
7068 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
7069 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
7070 Py_ssize_t kw_args;
7071 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
7072 switch (pos_args) {
7073 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
7074 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7075 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7076 case 0: break;
7077 default: goto __pyx_L5_argtuple_error;
7078 }
7079 kw_args = PyDict_Size(__pyx_kwds);
7080 switch (pos_args) {
7081 case 0:
7082 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
7083 else goto __pyx_L5_argtuple_error;
7084 case 1:
7085 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
7086 else {
7087 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__7087; goto __pyx_L3_error;}
7088 }
7089 case 2:
7090 if (kw_args > 0) {
7091 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
7092 if (value) { values[2] = value; kw_args--; }
7093 }
7094 }
7095 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
7096 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__7096; goto __pyx_L3_error;}
7097 }
7098 } else {
7099 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
7100 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
7101 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7102 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7103 break;
7104 default: goto __pyx_L5_argtuple_error;
7105 }
7106 }
7107 __pyx_v_self = values[0];
7108 __pyx_v_message = values[1];
7109 __pyx_v_errno = values[2];
7110 }
7111 goto __pyx_L4_argument_unpacking_done;
7112 __pyx_L5_argtuple_error:;
7113 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__7113; goto __pyx_L3_error;}
7114 __pyx_L3_error:;
7115 __Pyx_AddTraceback("rbd.DiskQuotaExceeded.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7116 __Pyx_RefNannyFinishContext();
7117 return NULL((void*)0);
7118 __pyx_L4_argument_unpacking_done:;
7119 __pyx_r = __pyx_pf_3rbd_17DiskQuotaExceeded___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
7120
7121 /* function exit code */
7122 __Pyx_RefNannyFinishContext();
7123 return __pyx_r;
7124}
7125
7126static PyObject *__pyx_pf_3rbd_17DiskQuotaExceeded___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
7127 PyObject *__pyx_r = NULL((void*)0);
7128 __Pyx_RefNannyDeclarations
7129 PyObject *__pyx_t_1 = NULL((void*)0);
7130 PyObject *__pyx_t_2 = NULL((void*)0);
7131 PyObject *__pyx_t_3 = NULL((void*)0);
7132 PyObject *__pyx_t_4 = NULL((void*)0);
7133 Py_ssize_t __pyx_t_5;
7134 PyObject *__pyx_t_6 = NULL((void*)0);
7135 int __pyx_lineno = 0;
7136 const char *__pyx_filename = NULL((void*)0);
7137 int __pyx_clineno = 0;
7138 __Pyx_RefNannySetupContext("__init__", 0);
7139
7140 /* "rbd.pyx":827
7141 * class DiskQuotaExceeded(OSError):
7142 * def __init__(self, message, errno=None):
7143 * super(DiskQuotaExceeded, self).__init__( # <<<<<<<<<<<<<<
7144 * "RBD disk quota exceeded (%s)" % message, errno)
7145 *
7146 */
7147 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiskQuotaExceeded); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__7147; goto __pyx_L1_error;}
7148 __Pyx_GOTREF(__pyx_t_2);
7149 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__7149; goto __pyx_L1_error;}
7150 __Pyx_GOTREF(__pyx_t_3);
7151 __Pyx_GIVEREF(__pyx_t_2);
7152 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
7153 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
7154 __Pyx_GIVEREF(__pyx_v_self);
7155 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
7156 __pyx_t_2 = 0;
7157 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__7157; goto __pyx_L1_error;}
7158 __Pyx_GOTREF(__pyx_t_2);
7159 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7160 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__7160; goto __pyx_L1_error;}
7161 __Pyx_GOTREF(__pyx_t_3);
7162 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7163
7164 /* "rbd.pyx":828
7165 * def __init__(self, message, errno=None):
7166 * super(DiskQuotaExceeded, self).__init__(
7167 * "RBD disk quota exceeded (%s)" % message, errno) # <<<<<<<<<<<<<<
7168 *
7169 * class OperationCanceled(OSError):
7170 */
7171 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_disk_quota_exceeded_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_disk_quota_exceeded_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__7171; goto __pyx_L1_error;}
7172 __Pyx_GOTREF(__pyx_t_2);
7173 __pyx_t_4 = NULL((void*)0);
7174 __pyx_t_5 = 0;
7175 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
7176 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
7177 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
7178 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
7179 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
7180 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7181 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7182 __pyx_t_5 = 1;
7183 }
7184 }
7185 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__7185; goto __pyx_L1_error;}
7186 __Pyx_GOTREF(__pyx_t_6);
7187 if (__pyx_t_4) {
7188 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
7189 }
7190 __Pyx_GIVEREF(__pyx_t_2);
7191 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
7192 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
7193 __Pyx_GIVEREF(__pyx_v_errno);
7194 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
7195 __pyx_t_2 = 0;
7196 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__7196; goto __pyx_L1_error;}
7197 __Pyx_GOTREF(__pyx_t_1);
7198 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
7199 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7200 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7201
7202 /* "rbd.pyx":826
7203 *
7204 * class DiskQuotaExceeded(OSError):
7205 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
7206 * super(DiskQuotaExceeded, self).__init__(
7207 * "RBD disk quota exceeded (%s)" % message, errno)
7208 */
7209
7210 /* function exit code */
7211 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7212 goto __pyx_L0;
7213 __pyx_L1_error:;
7214 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7215 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7216 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
7217 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
7218 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
7219 __Pyx_AddTraceback("rbd.DiskQuotaExceeded.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7220 __pyx_r = NULL((void*)0);
7221 __pyx_L0:;
7222 __Pyx_XGIVEREF(__pyx_r);
7223 __Pyx_RefNannyFinishContext();
7224 return __pyx_r;
7225}
7226
7227/* "rbd.pyx":831
7228 *
7229 * class OperationCanceled(OSError):
7230 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
7231 * super(OperationCanceled, self).__init__(
7232 * "RBD operation canceled (%s)" % message, errno)
7233 */
7234
7235/* Python wrapper */
7236static PyObject *__pyx_pw_3rbd_17OperationCanceled_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7237static char __pyx_doc_3rbd_17OperationCanceled___init__[] = "OperationCanceled.__init__(self, message, errno=None)";
7238static PyMethodDef __pyx_mdef_3rbd_17OperationCanceled_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3rbd_17OperationCanceled_1__init__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_17OperationCanceled___init__};
7239static PyObject *__pyx_pw_3rbd_17OperationCanceled_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7240 PyObject *__pyx_v_self = 0;
7241 PyObject *__pyx_v_message = 0;
7242 PyObject *__pyx_v_errno = 0;
7243 int __pyx_lineno = 0;
7244 const char *__pyx_filename = NULL((void*)0);
7245 int __pyx_clineno = 0;
7246 PyObject *__pyx_r = 0;
7247 __Pyx_RefNannyDeclarations
7248 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
7249 {
7250 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_errno,0};
7251 PyObject* values[3] = {0,0,0};
7252 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
7253 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
7254 Py_ssize_t kw_args;
7255 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
7256 switch (pos_args) {
7257 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
7258 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7259 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7260 case 0: break;
7261 default: goto __pyx_L5_argtuple_error;
7262 }
7263 kw_args = PyDict_Size(__pyx_kwds);
7264 switch (pos_args) {
7265 case 0:
7266 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
7267 else goto __pyx_L5_argtuple_error;
7268 case 1:
7269 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message
)) != 0), 1)
) kw_args--;
7270 else {
7271 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__7271; goto __pyx_L3_error;}
7272 }
7273 case 2:
7274 if (kw_args > 0) {
7275 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_errno);
7276 if (value) { values[2] = value; kw_args--; }
7277 }
7278 }
7279 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
7280 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__7280; goto __pyx_L3_error;}
7281 }
7282 } else {
7283 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
7284 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
7285 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7286 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7287 break;
7288 default: goto __pyx_L5_argtuple_error;
7289 }
7290 }
7291 __pyx_v_self = values[0];
7292 __pyx_v_message = values[1];
7293 __pyx_v_errno = values[2];
7294 }
7295 goto __pyx_L4_argument_unpacking_done;
7296 __pyx_L5_argtuple_error:;
7297 __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__7297; goto __pyx_L3_error;}
7298 __pyx_L3_error:;
7299 __Pyx_AddTraceback("rbd.OperationCanceled.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7300 __Pyx_RefNannyFinishContext();
7301 return NULL((void*)0);
7302 __pyx_L4_argument_unpacking_done:;
7303 __pyx_r = __pyx_pf_3rbd_17OperationCanceled___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errno);
7304
7305 /* function exit code */
7306 __Pyx_RefNannyFinishContext();
7307 return __pyx_r;
7308}
7309
7310static PyObject *__pyx_pf_3rbd_17OperationCanceled___init__(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errno) {
7311 PyObject *__pyx_r = NULL((void*)0);
7312 __Pyx_RefNannyDeclarations
7313 PyObject *__pyx_t_1 = NULL((void*)0);
7314 PyObject *__pyx_t_2 = NULL((void*)0);
7315 PyObject *__pyx_t_3 = NULL((void*)0);
7316 PyObject *__pyx_t_4 = NULL((void*)0);
7317 Py_ssize_t __pyx_t_5;
7318 PyObject *__pyx_t_6 = NULL((void*)0);
7319 int __pyx_lineno = 0;
7320 const char *__pyx_filename = NULL((void*)0);
7321 int __pyx_clineno = 0;
7322 __Pyx_RefNannySetupContext("__init__", 0);
7323
7324 /* "rbd.pyx":832
7325 * class OperationCanceled(OSError):
7326 * def __init__(self, message, errno=None):
7327 * super(OperationCanceled, self).__init__( # <<<<<<<<<<<<<<
7328 * "RBD operation canceled (%s)" % message, errno)
7329 *
7330 */
7331 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationCanceled); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__7331; goto __pyx_L1_error;}
7332 __Pyx_GOTREF(__pyx_t_2);
7333 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__7333; goto __pyx_L1_error;}
7334 __Pyx_GOTREF(__pyx_t_3);
7335 __Pyx_GIVEREF(__pyx_t_2);
7336 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_2);
7337 __Pyx_INCREF(__pyx_v_self)( ((PyObject*)(__pyx_v_self))->ob_refcnt++);
7338 __Pyx_GIVEREF(__pyx_v_self);
7339 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_self
)
;
7340 __pyx_t_2 = 0;
7341 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__7341; goto __pyx_L1_error;}
7342 __Pyx_GOTREF(__pyx_t_2);
7343 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7344 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__7344; goto __pyx_L1_error;}
7345 __Pyx_GOTREF(__pyx_t_3);
7346 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
7347
7348 /* "rbd.pyx":833
7349 * def __init__(self, message, errno=None):
7350 * super(OperationCanceled, self).__init__(
7351 * "RBD operation canceled (%s)" % message, errno) # <<<<<<<<<<<<<<
7352 *
7353 * cdef errno_to_exception = {
7354 */
7355 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RBD_operation_canceled_s, __pyx_v_message)PyString_Format(__pyx_kp_s_RBD_operation_canceled_s, __pyx_v_message
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__7355; goto __pyx_L1_error;}
7356 __Pyx_GOTREF(__pyx_t_2);
7357 __pyx_t_4 = NULL((void*)0);
7358 __pyx_t_5 = 0;
7359 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
7360 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
7361 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
7362 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
7363 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
7364 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7365 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7366 __pyx_t_5 = 1;
7367 }
7368 }
7369 __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__7369; goto __pyx_L1_error;}
7370 __Pyx_GOTREF(__pyx_t_6);
7371 if (__pyx_t_4) {
7372 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_4); __pyx_t_4 = NULL((void*)0);
7373 }
7374 __Pyx_GIVEREF(__pyx_t_2);
7375 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+__pyx_t_5] = __pyx_t_2
)
;
7376 __Pyx_INCREF(__pyx_v_errno)( ((PyObject*)(__pyx_v_errno))->ob_refcnt++);
7377 __Pyx_GIVEREF(__pyx_v_errno);
7378 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_errno)(((PyTupleObject *)(__pyx_t_6))->ob_item[1+__pyx_t_5] = __pyx_v_errno
)
;
7379 __pyx_t_2 = 0;
7380 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__7380; goto __pyx_L1_error;}
7381 __Pyx_GOTREF(__pyx_t_1);
7382 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
7383 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
7384 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7385
7386 /* "rbd.pyx":831
7387 *
7388 * class OperationCanceled(OSError):
7389 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
7390 * super(OperationCanceled, self).__init__(
7391 * "RBD operation canceled (%s)" % message, errno)
7392 */
7393
7394 /* function exit code */
7395 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7396 goto __pyx_L0;
7397 __pyx_L1_error:;
7398 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7399 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7400 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
7401 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
7402 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
7403 __Pyx_AddTraceback("rbd.OperationCanceled.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7404 __pyx_r = NULL((void*)0);
7405 __pyx_L0:;
7406 __Pyx_XGIVEREF(__pyx_r);
7407 __Pyx_RefNannyFinishContext();
7408 return __pyx_r;
7409}
7410
7411/* "rbd.pyx":871
7412 * }
7413 *
7414 * cdef make_ex(ret, msg, exception_map=errno_to_exception): # <<<<<<<<<<<<<<
7415 * """
7416 * Translate a librbd return code into an exception.
7417 */
7418
7419static PyObject *__pyx_f_3rbd_make_ex(PyObject *__pyx_v_ret, PyObject *__pyx_v_msg, struct __pyx_opt_args_3rbd_make_ex *__pyx_optional_args) {
7420 PyObject *__pyx_v_exception_map = __pyx_k_;
7421 PyObject *__pyx_r = NULL((void*)0);
7422 __Pyx_RefNannyDeclarations
7423 PyObject *__pyx_t_1 = NULL((void*)0);
7424 int __pyx_t_2;
7425 int __pyx_t_3;
7426 PyObject *__pyx_t_4 = NULL((void*)0);
7427 PyObject *__pyx_t_5 = NULL((void*)0);
7428 PyObject *__pyx_t_6 = NULL((void*)0);
7429 int __pyx_lineno = 0;
7430 const char *__pyx_filename = NULL((void*)0);
7431 int __pyx_clineno = 0;
7432 __Pyx_RefNannySetupContext("make_ex", 0);
7433 if (__pyx_optional_args) {
7434 if (__pyx_optional_args->__pyx_n > 0) {
7435 __pyx_v_exception_map = __pyx_optional_args->exception_map;
7436 }
7437 }
7438 __Pyx_INCREF(__pyx_v_ret)( ((PyObject*)(__pyx_v_ret))->ob_refcnt++);
7439
7440 /* "rbd.pyx":881
7441 * :returns: a subclass of :class:`Error`
7442 * """
7443 * ret = abs(ret) # <<<<<<<<<<<<<<
7444 * if ret in exception_map:
7445 * return exception_map[ret](msg, errno=ret)
7446 */
7447 __pyx_t_1 = PyNumber_Absolute(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__7447; goto __pyx_L1_error;}
7448 __Pyx_GOTREF(__pyx_t_1);
7449 __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_ret; __pyx_v_ret = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7450 __pyx_t_1 = 0;
7451
7452 /* "rbd.pyx":882
7453 * """
7454 * ret = abs(ret)
7455 * if ret in exception_map: # <<<<<<<<<<<<<<
7456 * return exception_map[ret](msg, errno=ret)
7457 * else:
7458 */
7459 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_ret, __pyx_v_exception_map, Py_EQ2)); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__7459; goto __pyx_L1_error;}
7460 __pyx_t_3 = (__pyx_t_2 != 0);
7461 if (__pyx_t_3) {
7462
7463 /* "rbd.pyx":883
7464 * ret = abs(ret)
7465 * if ret in exception_map:
7466 * return exception_map[ret](msg, errno=ret) # <<<<<<<<<<<<<<
7467 * else:
7468 * return OSError(msg, errno=ret)
7469 */
7470 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
7471 __pyx_t_1 = PyObject_GetItem(__pyx_v_exception_map, __pyx_v_ret); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__7471; goto __pyx_L1_error;};
7472 __Pyx_GOTREF(__pyx_t_1);
7473 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__7473; goto __pyx_L1_error;}
7474 __Pyx_GOTREF(__pyx_t_4);
7475 __Pyx_INCREF(__pyx_v_msg)( ((PyObject*)(__pyx_v_msg))->ob_refcnt++);
7476 __Pyx_GIVEREF(__pyx_v_msg);
7477 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_msg)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_v_msg);
7478 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__7478; goto __pyx_L1_error;}
7479 __Pyx_GOTREF(__pyx_t_5);
7480 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_errno, __pyx_v_ret) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__7480; goto __pyx_L1_error;}
7481 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__7481; goto __pyx_L1_error;}
7482 __Pyx_GOTREF(__pyx_t_6);
7483 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7484 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
7485 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
7486 __pyx_r = __pyx_t_6;
7487 __pyx_t_6 = 0;
7488 goto __pyx_L0;
7489
7490 /* "rbd.pyx":882
7491 * """
7492 * ret = abs(ret)
7493 * if ret in exception_map: # <<<<<<<<<<<<<<
7494 * return exception_map[ret](msg, errno=ret)
7495 * else:
7496 */
7497 }
7498
7499 /* "rbd.pyx":885
7500 * return exception_map[ret](msg, errno=ret)
7501 * else:
7502 * return OSError(msg, errno=ret) # <<<<<<<<<<<<<<
7503 *
7504 *
7505 */
7506 /*else*/ {
7507 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
7508 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__7508; goto __pyx_L1_error;}
7509 __Pyx_GOTREF(__pyx_t_6);
7510 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__7510; goto __pyx_L1_error;}
7511 __Pyx_GOTREF(__pyx_t_5);
7512 __Pyx_INCREF(__pyx_v_msg)( ((PyObject*)(__pyx_v_msg))->ob_refcnt++);
7513 __Pyx_GIVEREF(__pyx_v_msg);
7514 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_msg)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_msg);
7515 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__7515; goto __pyx_L1_error;}
7516 __Pyx_GOTREF(__pyx_t_4);
7517 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_errno, __pyx_v_ret) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__7517; goto __pyx_L1_error;}
7518 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__7518; goto __pyx_L1_error;}
7519 __Pyx_GOTREF(__pyx_t_1);
7520 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
7521 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
7522 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
7523 __pyx_r = __pyx_t_1;
7524 __pyx_t_1 = 0;
7525 goto __pyx_L0;
7526 }
7527
7528 /* "rbd.pyx":871
7529 * }
7530 *
7531 * cdef make_ex(ret, msg, exception_map=errno_to_exception): # <<<<<<<<<<<<<<
7532 * """
7533 * Translate a librbd return code into an exception.
7534 */
7535
7536 /* function exit code */
7537 __pyx_L1_error:;
7538 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7539 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
7540 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
7541 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
7542 __Pyx_AddTraceback("rbd.make_ex", __pyx_clineno, __pyx_lineno, __pyx_filename);
7543 __pyx_r = 0;
7544 __pyx_L0:;
7545 __Pyx_XDECREF(__pyx_v_ret)do { if ((__pyx_v_ret) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_ret))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_ret)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_ret)))); } while (0); } while (0)
;
7546 __Pyx_XGIVEREF(__pyx_r);
7547 __Pyx_RefNannyFinishContext();
7548 return __pyx_r;
7549}
7550
7551/* "rbd.pyx":888
7552 *
7553 *
7554 * cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL: # <<<<<<<<<<<<<<
7555 * return <rados_ioctx_t>ioctx.io
7556 *
7557 */
7558
7559static rados_ioctx_t __pyx_f_3rbd_convert_ioctx(struct __pyx_obj_5rados_Ioctx *__pyx_v_ioctx) {
7560 rados_ioctx_t __pyx_r;
7561 __Pyx_RefNannyDeclarations
7562 __Pyx_RefNannySetupContext("convert_ioctx", 0);
7563
7564 /* "rbd.pyx":889
7565 *
7566 * cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL:
7567 * return <rados_ioctx_t>ioctx.io # <<<<<<<<<<<<<<
7568 *
7569 * cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil:
7570 */
7571 __pyx_r = ((rados_ioctx_t)__pyx_v_ioctx->io);
7572 goto __pyx_L0;
7573
7574 /* "rbd.pyx":888
7575 *
7576 *
7577 * cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL: # <<<<<<<<<<<<<<
7578 * return <rados_ioctx_t>ioctx.io
7579 *
7580 */
7581
7582 /* function exit code */
7583 __pyx_L0:;
7584 __Pyx_RefNannyFinishContext();
7585 return __pyx_r;
7586}
7587
7588/* "rbd.pyx":891
7589 * return <rados_ioctx_t>ioctx.io
7590 *
7591 * cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil: # <<<<<<<<<<<<<<
7592 * return (<object>ptr)(offset, total)
7593 *
7594 */
7595
7596static int __pyx_f_3rbd_progress_callback(uint64_t __pyx_v_offset, uint64_t __pyx_v_total, void *__pyx_v_ptr) {
7597 int __pyx_r;
7598 __Pyx_RefNannyDeclarations
7599 PyObject *__pyx_t_1 = NULL((void*)0);
7600 PyObject *__pyx_t_2 = NULL((void*)0);
7601 PyObject *__pyx_t_3 = NULL((void*)0);
7602 PyObject *__pyx_t_4 = NULL((void*)0);
7603 PyObject *__pyx_t_5 = NULL((void*)0);
7604 Py_ssize_t __pyx_t_6;
7605 PyObject *__pyx_t_7 = NULL((void*)0);
7606 int __pyx_t_8;
7607 int __pyx_lineno = 0;
7608 const char *__pyx_filename = NULL((void*)0);
7609 int __pyx_clineno = 0;
7610 #ifdef WITH_THREAD1
7611 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
7612 #endif
7613 __Pyx_RefNannySetupContext("progress_callback", 0);
7614
7615 /* "rbd.pyx":892
7616 *
7617 * cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil:
7618 * return (<object>ptr)(offset, total) # <<<<<<<<<<<<<<
7619 *
7620 * cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
7621 */
7622 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_offset); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__7622; goto __pyx_L1_error;}
7623 __Pyx_GOTREF(__pyx_t_2);
7624 __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_total); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__7624; goto __pyx_L1_error;}
7625 __Pyx_GOTREF(__pyx_t_3);
7626 __Pyx_INCREF(((PyObject *)__pyx_v_ptr))( ((PyObject*)(((PyObject *)__pyx_v_ptr)))->ob_refcnt++);
7627 __pyx_t_4 = ((PyObject *)__pyx_v_ptr); __pyx_t_5 = NULL((void*)0);
7628 __pyx_t_6 = 0;
7629 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
7630 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
7631 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
7632 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
7633 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
7634 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7635 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7636 __pyx_t_6 = 1;
7637 }
7638 }
7639 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__7639; goto __pyx_L1_error;}
7640 __Pyx_GOTREF(__pyx_t_7);
7641 if (__pyx_t_5) {
7642 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
7643 }
7644 __Pyx_GIVEREF(__pyx_t_2);
7645 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_t_2
)
;
7646 __Pyx_GIVEREF(__pyx_t_3);
7647 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_t_3
)
;
7648 __pyx_t_2 = 0;
7649 __pyx_t_3 = 0;
7650 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__7650; goto __pyx_L1_error;}
7651 __Pyx_GOTREF(__pyx_t_1);
7652 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
7653 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
7654 __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__7654; goto __pyx_L1_error;}
7655 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
7656 __pyx_r = __pyx_t_8;
7657 goto __pyx_L0;
7658
7659 /* "rbd.pyx":891
7660 * return <rados_ioctx_t>ioctx.io
7661 *
7662 * cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil: # <<<<<<<<<<<<<<
7663 * return (<object>ptr)(offset, total)
7664 *
7665 */
7666
7667 /* function exit code */
7668 __pyx_L1_error:;
7669 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
7670 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
7671 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
7672 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
7673 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
7674 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
7675 __Pyx_WriteUnraisable("rbd.progress_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
7676 __pyx_r = 0;
7677 __pyx_L0:;
7678 __Pyx_RefNannyFinishContext();
7679 #ifdef WITH_THREAD1
7680 PyGILState_Release(__pyx_gilstate_save);
7681 #endif
7682 return __pyx_r;
7683}
7684
7685/* "rbd.pyx":894
7686 * return (<object>ptr)(offset, total)
7687 *
7688 * cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr): # <<<<<<<<<<<<<<
7689 * return 0
7690 *
7691 */
7692
7693static int __pyx_f_3rbd_no_op_progress_callback(CYTHON_UNUSED__attribute__ ((__unused__)) uint64_t __pyx_v_offset, CYTHON_UNUSED__attribute__ ((__unused__)) uint64_t __pyx_v_total, CYTHON_UNUSED__attribute__ ((__unused__)) void *__pyx_v_ptr) {
7694 int __pyx_r;
7695 __Pyx_RefNannyDeclarations
7696 __Pyx_RefNannySetupContext("no_op_progress_callback", 0);
7697
7698 /* "rbd.pyx":895
7699 *
7700 * cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
7701 * return 0 # <<<<<<<<<<<<<<
7702 *
7703 * def cstr(val, name, encoding="utf-8", opt=False):
7704 */
7705 __pyx_r = 0;
7706 goto __pyx_L0;
7707
7708 /* "rbd.pyx":894
7709 * return (<object>ptr)(offset, total)
7710 *
7711 * cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr): # <<<<<<<<<<<<<<
7712 * return 0
7713 *
7714 */
7715
7716 /* function exit code */
7717 __pyx_L0:;
7718 __Pyx_RefNannyFinishContext();
7719 return __pyx_r;
7720}
7721
7722/* "rbd.pyx":897
7723 * return 0
7724 *
7725 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
7726 * """
7727 * Create a byte string from a Python string
7728 */
7729
7730/* Python wrapper */
7731static PyObject *__pyx_pw_3rbd_1cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7732static char __pyx_doc_3rbd_cstr[] = "cstr(val, name, encoding='utf-8', opt=False)\n\n Create a byte string from a Python string\n\n :param basestring val: Python string\n :param str name: Name of the string parameter, for exceptions\n :param str encoding: Encoding to use\n :param bool opt: If True, None is allowed\n :rtype: bytes\n :raises: :class:`InvalidArgument`\n ";
7733static PyMethodDef __pyx_mdef_3rbd_1cstr = {"cstr", (PyCFunction)__pyx_pw_3rbd_1cstr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_cstr};
7734static PyObject *__pyx_pw_3rbd_1cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7735 PyObject *__pyx_v_val = 0;
7736 PyObject *__pyx_v_name = 0;
7737 PyObject *__pyx_v_encoding = 0;
7738 PyObject *__pyx_v_opt = 0;
7739 int __pyx_lineno = 0;
7740 const char *__pyx_filename = NULL((void*)0);
7741 int __pyx_clineno = 0;
7742 PyObject *__pyx_r = 0;
7743 __Pyx_RefNannyDeclarations
7744 __Pyx_RefNannySetupContext("cstr (wrapper)", 0);
7745 {
7746 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_name,&__pyx_n_s_encoding,&__pyx_n_s_opt,0};
7747 PyObject* values[4] = {0,0,0,0};
7748 values[2] = ((PyObject *)__pyx_kp_s_utf_8);
7749 values[3] = ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct));
7750 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
7751 Py_ssize_t kw_args;
7752 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
7753 switch (pos_args) {
7754 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
7755 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
7756 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7757 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7758 case 0: break;
7759 default: goto __pyx_L5_argtuple_error;
7760 }
7761 kw_args = PyDict_Size(__pyx_kwds);
7762 switch (pos_args) {
7763 case 0:
7764 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val
)) != 0), 1)
) kw_args--;
7765 else goto __pyx_L5_argtuple_error;
7766 case 1:
7767 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
7768 else {
7769 __Pyx_RaiseArgtupleInvalid("cstr", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__7769; goto __pyx_L3_error;}
7770 }
7771 case 2:
7772 if (kw_args > 0) {
7773 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding);
7774 if (value) { values[2] = value; kw_args--; }
7775 }
7776 case 3:
7777 if (kw_args > 0) {
7778 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_opt);
7779 if (value) { values[3] = value; kw_args--; }
7780 }
7781 }
7782 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
7783 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cstr") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "cstr") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__7783; goto __pyx_L3_error;}
7784 }
7785 } else {
7786 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
7787 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
7788 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
7789 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
7790 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
7791 break;
7792 default: goto __pyx_L5_argtuple_error;
7793 }
7794 }
7795 __pyx_v_val = values[0];
7796 __pyx_v_name = values[1];
7797 __pyx_v_encoding = values[2];
7798 __pyx_v_opt = values[3];
7799 }
7800 goto __pyx_L4_argument_unpacking_done;
7801 __pyx_L5_argtuple_error:;
7802 __Pyx_RaiseArgtupleInvalid("cstr", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__7802; goto __pyx_L3_error;}
7803 __pyx_L3_error:;
7804 __Pyx_AddTraceback("rbd.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
7805 __Pyx_RefNannyFinishContext();
7806 return NULL((void*)0);
7807 __pyx_L4_argument_unpacking_done:;
7808 __pyx_r = __pyx_pf_3rbd_cstr(__pyx_self, __pyx_v_val, __pyx_v_name, __pyx_v_encoding, __pyx_v_opt);
7809
7810 /* function exit code */
7811 __Pyx_RefNannyFinishContext();
7812 return __pyx_r;
7813}
7814
7815static PyObject *__pyx_pf_3rbd_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_name, PyObject *__pyx_v_encoding, PyObject *__pyx_v_opt) {
7816 PyObject *__pyx_r = NULL((void*)0);
7817 __Pyx_RefNannyDeclarations
7818 int __pyx_t_1;
7819 int __pyx_t_2;
7820 int __pyx_t_3;
7821 PyObject *__pyx_t_4 = NULL((void*)0);
7822 PyObject *__pyx_t_5 = NULL((void*)0);
7823 PyObject *__pyx_t_6 = NULL((void*)0);
7824 PyObject *__pyx_t_7 = NULL((void*)0);
7825 PyObject *__pyx_t_8 = NULL((void*)0);
7826 int __pyx_lineno = 0;
7827 const char *__pyx_filename = NULL((void*)0);
7828 int __pyx_clineno = 0;
7829 __Pyx_RefNannySetupContext("cstr", 0);
7830
7831 /* "rbd.pyx":908
7832 * :raises: :class:`InvalidArgument`
7833 * """
7834 * if opt and val is None: # <<<<<<<<<<<<<<
7835 * return None
7836 * if isinstance(val, bytes):
7837 */
7838 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opt); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__7838; goto __pyx_L1_error;}
7839 if (__pyx_t_2) {
7840 } else {
7841 __pyx_t_1 = __pyx_t_2;
7842 goto __pyx_L4_bool_binop_done;
7843 }
7844 __pyx_t_2 = (__pyx_v_val == Py_None(&_Py_NoneStruct));
7845 __pyx_t_3 = (__pyx_t_2 != 0);
7846 __pyx_t_1 = __pyx_t_3;
7847 __pyx_L4_bool_binop_done:;
7848 if (__pyx_t_1) {
7849
7850 /* "rbd.pyx":909
7851 * """
7852 * if opt and val is None:
7853 * return None # <<<<<<<<<<<<<<
7854 * if isinstance(val, bytes):
7855 * return val
7856 */
7857 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
7858 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
7859 __pyx_r = Py_None(&_Py_NoneStruct);
7860 goto __pyx_L0;
7861
7862 /* "rbd.pyx":908
7863 * :raises: :class:`InvalidArgument`
7864 * """
7865 * if opt and val is None: # <<<<<<<<<<<<<<
7866 * return None
7867 * if isinstance(val, bytes):
7868 */
7869 }
7870
7871 /* "rbd.pyx":910
7872 * if opt and val is None:
7873 * return None
7874 * if isinstance(val, bytes): # <<<<<<<<<<<<<<
7875 * return val
7876 * elif isinstance(val, str):
7877 */
7878 __pyx_t_1 = PyBytes_Check(__pyx_v_val)((((((PyObject*)(__pyx_v_val))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
7879 __pyx_t_3 = (__pyx_t_1 != 0);
7880 if (__pyx_t_3) {
7881
7882 /* "rbd.pyx":911
7883 * return None
7884 * if isinstance(val, bytes):
7885 * return val # <<<<<<<<<<<<<<
7886 * elif isinstance(val, str):
7887 * return val.encode(encoding)
7888 */
7889 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
7890 __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++);
7891 __pyx_r = __pyx_v_val;
7892 goto __pyx_L0;
7893
7894 /* "rbd.pyx":910
7895 * if opt and val is None:
7896 * return None
7897 * if isinstance(val, bytes): # <<<<<<<<<<<<<<
7898 * return val
7899 * elif isinstance(val, str):
7900 */
7901 }
7902
7903 /* "rbd.pyx":912
7904 * if isinstance(val, bytes):
7905 * return val
7906 * elif isinstance(val, str): # <<<<<<<<<<<<<<
7907 * return val.encode(encoding)
7908 * elif sys.version_info < (3, 0) and isinstance(val, unicode):
7909 */
7910 __pyx_t_3 = PyString_Check(__pyx_v_val)((((((PyObject*)(__pyx_v_val))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
7911 __pyx_t_1 = (__pyx_t_3 != 0);
7912 if (__pyx_t_1) {
7913
7914 /* "rbd.pyx":913
7915 * return val
7916 * elif isinstance(val, str):
7917 * return val.encode(encoding) # <<<<<<<<<<<<<<
7918 * elif sys.version_info < (3, 0) and isinstance(val, unicode):
7919 * return val.encode(encoding)
7920 */
7921 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
7922 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__7922; goto __pyx_L1_error;}
7923 __Pyx_GOTREF(__pyx_t_5);
7924 __pyx_t_6 = NULL((void*)0);
7925 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
7926 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
7927 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
7928 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
7929 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
7930 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
7931 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
7932 }
7933 }
7934 if (!__pyx_t_6) {
7935 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_encoding); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__7935; goto __pyx_L1_error;}
7936 __Pyx_GOTREF(__pyx_t_4);
7937 } else {
7938 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__7938; goto __pyx_L1_error;}
7939 __Pyx_GOTREF(__pyx_t_7);
7940 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
7941 __Pyx_INCREF(__pyx_v_encoding)( ((PyObject*)(__pyx_v_encoding))->ob_refcnt++);
7942 __Pyx_GIVEREF(__pyx_v_encoding);
7943 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_encoding)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_v_encoding
)
;
7944 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__7944; goto __pyx_L1_error;}
7945 __Pyx_GOTREF(__pyx_t_4);
7946 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
7947 }
7948 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
7949 __pyx_r = __pyx_t_4;
7950 __pyx_t_4 = 0;
7951 goto __pyx_L0;
7952
7953 /* "rbd.pyx":912
7954 * if isinstance(val, bytes):
7955 * return val
7956 * elif isinstance(val, str): # <<<<<<<<<<<<<<
7957 * return val.encode(encoding)
7958 * elif sys.version_info < (3, 0) and isinstance(val, unicode):
7959 */
7960 }
7961
7962 /* "rbd.pyx":914
7963 * elif isinstance(val, str):
7964 * return val.encode(encoding)
7965 * elif sys.version_info < (3, 0) and isinstance(val, unicode): # <<<<<<<<<<<<<<
7966 * return val.encode(encoding)
7967 * else:
7968 */
7969 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__7969; goto __pyx_L1_error;}
7970 __Pyx_GOTREF(__pyx_t_4);
7971 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__7971; goto __pyx_L1_error;}
7972 __Pyx_GOTREF(__pyx_t_5);
7973 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
7974 __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__2, Py_LT0); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__7974; goto __pyx_L1_error;}
7975 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
7976 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__7976; goto __pyx_L1_error;}
7977 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
7978 if (__pyx_t_3) {
7979 } else {
7980 __pyx_t_1 = __pyx_t_3;
7981 goto __pyx_L7_bool_binop_done;
7982 }
7983 __pyx_t_3 = PyUnicode_Check(__pyx_v_val)((((((PyObject*)(__pyx_v_val))->ob_type))->tp_flags &
((1L<<28))) != 0)
;
7984 __pyx_t_2 = (__pyx_t_3 != 0);
7985 __pyx_t_1 = __pyx_t_2;
7986 __pyx_L7_bool_binop_done:;
7987 if (__pyx_t_1) {
7988
7989 /* "rbd.pyx":915
7990 * return val.encode(encoding)
7991 * elif sys.version_info < (3, 0) and isinstance(val, unicode):
7992 * return val.encode(encoding) # <<<<<<<<<<<<<<
7993 * else:
7994 * raise InvalidArgument('%s must be a string' % name)
7995 */
7996 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
7997 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__7997; goto __pyx_L1_error;}
7998 __Pyx_GOTREF(__pyx_t_5);
7999 __pyx_t_7 = NULL((void*)0);
8000 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
8001 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
8002 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
8003 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
8004 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
8005 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
8006 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
8007 }
8008 }
8009 if (!__pyx_t_7) {
8010 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_encoding); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__8010; goto __pyx_L1_error;}
8011 __Pyx_GOTREF(__pyx_t_4);
8012 } else {
8013 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__8013; goto __pyx_L1_error;}
8014 __Pyx_GOTREF(__pyx_t_6);
8015 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
8016 __Pyx_INCREF(__pyx_v_encoding)( ((PyObject*)(__pyx_v_encoding))->ob_refcnt++);
8017 __Pyx_GIVEREF(__pyx_v_encoding);
8018 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_encoding)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_v_encoding
)
;
8019 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__8019; goto __pyx_L1_error;}
8020 __Pyx_GOTREF(__pyx_t_4);
8021 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
8022 }
8023 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
8024 __pyx_r = __pyx_t_4;
8025 __pyx_t_4 = 0;
8026 goto __pyx_L0;
8027
8028 /* "rbd.pyx":914
8029 * elif isinstance(val, str):
8030 * return val.encode(encoding)
8031 * elif sys.version_info < (3, 0) and isinstance(val, unicode): # <<<<<<<<<<<<<<
8032 * return val.encode(encoding)
8033 * else:
8034 */
8035 }
8036
8037 /* "rbd.pyx":917
8038 * return val.encode(encoding)
8039 * else:
8040 * raise InvalidArgument('%s must be a string' % name) # <<<<<<<<<<<<<<
8041 *
8042 * def decode_cstr(val, encoding="utf-8"):
8043 */
8044 /*else*/ {
8045 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__8045; goto __pyx_L1_error;}
8046 __Pyx_GOTREF(__pyx_t_5);
8047 __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_must_be_a_string, __pyx_v_name)PyString_Format(__pyx_kp_s_s_must_be_a_string, __pyx_v_name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__8047; goto __pyx_L1_error;}
8048 __Pyx_GOTREF(__pyx_t_6);
8049 __pyx_t_7 = NULL((void*)0);
8050 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
8051 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
8052 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
8053 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
8054 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
8055 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
8056 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
8057 }
8058 }
8059 if (!__pyx_t_7) {
8060 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__8060; goto __pyx_L1_error;}
8061 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
8062 __Pyx_GOTREF(__pyx_t_4);
8063 } else {
8064 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__8064; goto __pyx_L1_error;}
8065 __Pyx_GOTREF(__pyx_t_8);
8066 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
8067 __Pyx_GIVEREF(__pyx_t_6);
8068 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
8069 __pyx_t_6 = 0;
8070 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__8070; goto __pyx_L1_error;}
8071 __Pyx_GOTREF(__pyx_t_4);
8072 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
8073 }
8074 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
8075 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
8076 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
8077 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__8077; goto __pyx_L1_error;}
8078 }
8079
8080 /* "rbd.pyx":897
8081 * return 0
8082 *
8083 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
8084 * """
8085 * Create a byte string from a Python string
8086 */
8087
8088 /* function exit code */
8089 __pyx_L1_error:;
8090 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
8091 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
8092 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
8093 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
8094 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
8095 __Pyx_AddTraceback("rbd.cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8096 __pyx_r = NULL((void*)0);
8097 __pyx_L0:;
8098 __Pyx_XGIVEREF(__pyx_r);
8099 __Pyx_RefNannyFinishContext();
8100 return __pyx_r;
8101}
8102
8103/* "rbd.pyx":919
8104 * raise InvalidArgument('%s must be a string' % name)
8105 *
8106 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
8107 * """
8108 * Decode a byte string into a Python string.
8109 */
8110
8111/* Python wrapper */
8112static PyObject *__pyx_pw_3rbd_3decode_cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8113static char __pyx_doc_3rbd_2decode_cstr[] = "decode_cstr(val, encoding='utf-8')\n\n Decode a byte string into a Python string.\n\n :param bytes val: byte string\n :rtype: unicode or None\n ";
8114static PyMethodDef __pyx_mdef_3rbd_3decode_cstr = {"decode_cstr", (PyCFunction)__pyx_pw_3rbd_3decode_cstr, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_2decode_cstr};
8115static PyObject *__pyx_pw_3rbd_3decode_cstr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8116 PyObject *__pyx_v_val = 0;
8117 PyObject *__pyx_v_encoding = 0;
8118 int __pyx_lineno = 0;
8119 const char *__pyx_filename = NULL((void*)0);
8120 int __pyx_clineno = 0;
8121 PyObject *__pyx_r = 0;
8122 __Pyx_RefNannyDeclarations
8123 __Pyx_RefNannySetupContext("decode_cstr (wrapper)", 0);
8124 {
8125 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_val,&__pyx_n_s_encoding,0};
8126 PyObject* values[2] = {0,0};
8127 values[1] = ((PyObject *)__pyx_kp_s_utf_8);
8128 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
8129 Py_ssize_t kw_args;
8130 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
8131 switch (pos_args) {
8132 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
8133 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
8134 case 0: break;
8135 default: goto __pyx_L5_argtuple_error;
8136 }
8137 kw_args = PyDict_Size(__pyx_kwds);
8138 switch (pos_args) {
8139 case 0:
8140 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val
)) != 0), 1)
) kw_args--;
8141 else goto __pyx_L5_argtuple_error;
8142 case 1:
8143 if (kw_args > 0) {
8144 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding);
8145 if (value) { values[1] = value; kw_args--; }
8146 }
8147 }
8148 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
8149 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_cstr") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "decode_cstr") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__8149; goto __pyx_L3_error;}
8150 }
8151 } else {
8152 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
8153 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
8154 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
8155 break;
8156 default: goto __pyx_L5_argtuple_error;
8157 }
8158 }
8159 __pyx_v_val = values[0];
8160 __pyx_v_encoding = values[1];
8161 }
8162 goto __pyx_L4_argument_unpacking_done;
8163 __pyx_L5_argtuple_error:;
8164 __Pyx_RaiseArgtupleInvalid("decode_cstr", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__8164; goto __pyx_L3_error;}
8165 __pyx_L3_error:;
8166 __Pyx_AddTraceback("rbd.decode_cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8167 __Pyx_RefNannyFinishContext();
8168 return NULL((void*)0);
8169 __pyx_L4_argument_unpacking_done:;
8170 __pyx_r = __pyx_pf_3rbd_2decode_cstr(__pyx_self, __pyx_v_val, __pyx_v_encoding);
8171
8172 /* function exit code */
8173 __Pyx_RefNannyFinishContext();
8174 return __pyx_r;
8175}
8176
8177static PyObject *__pyx_pf_3rbd_2decode_cstr(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_encoding) {
8178 PyObject *__pyx_r = NULL((void*)0);
8179 __Pyx_RefNannyDeclarations
8180 int __pyx_t_1;
8181 int __pyx_t_2;
8182 PyObject *__pyx_t_3 = NULL((void*)0);
8183 PyObject *__pyx_t_4 = NULL((void*)0);
8184 PyObject *__pyx_t_5 = NULL((void*)0);
8185 PyObject *__pyx_t_6 = NULL((void*)0);
8186 int __pyx_lineno = 0;
8187 const char *__pyx_filename = NULL((void*)0);
8188 int __pyx_clineno = 0;
8189 __Pyx_RefNannySetupContext("decode_cstr", 0);
8190
8191 /* "rbd.pyx":926
8192 * :rtype: unicode or None
8193 * """
8194 * if val is None: # <<<<<<<<<<<<<<
8195 * return None
8196 *
8197 */
8198 __pyx_t_1 = (__pyx_v_val == Py_None(&_Py_NoneStruct));
8199 __pyx_t_2 = (__pyx_t_1 != 0);
8200 if (__pyx_t_2) {
8201
8202 /* "rbd.pyx":927
8203 * """
8204 * if val is None:
8205 * return None # <<<<<<<<<<<<<<
8206 *
8207 * return val.decode(encoding)
8208 */
8209 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
8210 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
8211 __pyx_r = Py_None(&_Py_NoneStruct);
8212 goto __pyx_L0;
8213
8214 /* "rbd.pyx":926
8215 * :rtype: unicode or None
8216 * """
8217 * if val is None: # <<<<<<<<<<<<<<
8218 * return None
8219 *
8220 */
8221 }
8222
8223 /* "rbd.pyx":929
8224 * return None
8225 *
8226 * return val.decode(encoding) # <<<<<<<<<<<<<<
8227 *
8228 *
8229 */
8230 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
8231 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__8231; goto __pyx_L1_error;}
8232 __Pyx_GOTREF(__pyx_t_4);
8233 __pyx_t_5 = NULL((void*)0);
8234 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
8235 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
8236 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
8237 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
8238 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
8239 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
8240 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
8241 }
8242 }
8243 if (!__pyx_t_5) {
8244 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_encoding); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__8244; goto __pyx_L1_error;}
8245 __Pyx_GOTREF(__pyx_t_3);
8246 } else {
8247 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__8247; goto __pyx_L1_error;}
8248 __Pyx_GOTREF(__pyx_t_6);
8249 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
8250 __Pyx_INCREF(__pyx_v_encoding)( ((PyObject*)(__pyx_v_encoding))->ob_refcnt++);
8251 __Pyx_GIVEREF(__pyx_v_encoding);
8252 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_encoding)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_v_encoding
)
;
8253 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__8253; goto __pyx_L1_error;}
8254 __Pyx_GOTREF(__pyx_t_3);
8255 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
8256 }
8257 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
8258 __pyx_r = __pyx_t_3;
8259 __pyx_t_3 = 0;
8260 goto __pyx_L0;
8261
8262 /* "rbd.pyx":919
8263 * raise InvalidArgument('%s must be a string' % name)
8264 *
8265 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
8266 * """
8267 * Decode a byte string into a Python string.
8268 */
8269
8270 /* function exit code */
8271 __pyx_L1_error:;
8272 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
8273 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
8274 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
8275 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
8276 __Pyx_AddTraceback("rbd.decode_cstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
8277 __pyx_r = NULL((void*)0);
8278 __pyx_L0:;
8279 __Pyx_XGIVEREF(__pyx_r);
8280 __Pyx_RefNannyFinishContext();
8281 return __pyx_r;
8282}
8283
8284/* "rbd.pyx":932
8285 *
8286 *
8287 * cdef char* opt_str(s) except? NULL: # <<<<<<<<<<<<<<
8288 * if s is None:
8289 * return NULL
8290 */
8291
8292static char *__pyx_f_3rbd_opt_str(PyObject *__pyx_v_s) {
8293 char *__pyx_r;
8294 __Pyx_RefNannyDeclarations
8295 int __pyx_t_1;
8296 int __pyx_t_2;
8297 char *__pyx_t_3;
8298 int __pyx_lineno = 0;
8299 const char *__pyx_filename = NULL((void*)0);
8300 int __pyx_clineno = 0;
8301 __Pyx_RefNannySetupContext("opt_str", 0);
8302
8303 /* "rbd.pyx":933
8304 *
8305 * cdef char* opt_str(s) except? NULL:
8306 * if s is None: # <<<<<<<<<<<<<<
8307 * return NULL
8308 * return s
8309 */
8310 __pyx_t_1 = (__pyx_v_s == Py_None(&_Py_NoneStruct));
8311 __pyx_t_2 = (__pyx_t_1 != 0);
8312 if (__pyx_t_2) {
8313
8314 /* "rbd.pyx":934
8315 * cdef char* opt_str(s) except? NULL:
8316 * if s is None:
8317 * return NULL # <<<<<<<<<<<<<<
8318 * return s
8319 *
8320 */
8321 __pyx_r = NULL((void*)0);
8322 goto __pyx_L0;
8323
8324 /* "rbd.pyx":933
8325 *
8326 * cdef char* opt_str(s) except? NULL:
8327 * if s is None: # <<<<<<<<<<<<<<
8328 * return NULL
8329 * return s
8330 */
8331 }
8332
8333 /* "rbd.pyx":935
8334 * if s is None:
8335 * return NULL
8336 * return s # <<<<<<<<<<<<<<
8337 *
8338 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
8339 */
8340 __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_s); if (unlikely((!__pyx_t_3) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_3) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__8340; goto __pyx_L1_error;}
8341 __pyx_r = __pyx_t_3;
8342 goto __pyx_L0;
8343
8344 /* "rbd.pyx":932
8345 *
8346 *
8347 * cdef char* opt_str(s) except? NULL: # <<<<<<<<<<<<<<
8348 * if s is None:
8349 * return NULL
8350 */
8351
8352 /* function exit code */
8353 __pyx_L1_error:;
8354 __Pyx_AddTraceback("rbd.opt_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
8355 __pyx_r = NULL((void*)0);
8356 __pyx_L0:;
8357 __Pyx_RefNannyFinishContext();
8358 return __pyx_r;
8359}
8360
8361/* "rbd.pyx":937
8362 * return s
8363 *
8364 * cdef void* realloc_chk(void* ptr, size_t size) except NULL: # <<<<<<<<<<<<<<
8365 * cdef void *ret = realloc(ptr, size)
8366 * if ret == NULL:
8367 */
8368
8369static void *__pyx_f_3rbd_realloc_chk(void *__pyx_v_ptr, size_t __pyx_v_size) {
8370 void *__pyx_v_ret;
8371 void *__pyx_r;
8372 __Pyx_RefNannyDeclarations
8373 int __pyx_t_1;
8374 PyObject *__pyx_t_2 = NULL((void*)0);
8375 int __pyx_lineno = 0;
8376 const char *__pyx_filename = NULL((void*)0);
8377 int __pyx_clineno = 0;
8378 __Pyx_RefNannySetupContext("realloc_chk", 0);
8379
8380 /* "rbd.pyx":938
8381 *
8382 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
8383 * cdef void *ret = realloc(ptr, size) # <<<<<<<<<<<<<<
8384 * if ret == NULL:
8385 * raise MemoryError("realloc failed")
8386 */
8387 __pyx_v_ret = realloc(__pyx_v_ptr, __pyx_v_size);
8388
8389 /* "rbd.pyx":939
8390 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
8391 * cdef void *ret = realloc(ptr, size)
8392 * if ret == NULL: # <<<<<<<<<<<<<<
8393 * raise MemoryError("realloc failed")
8394 * return ret
8395 */
8396 __pyx_t_1 = ((__pyx_v_ret == NULL((void*)0)) != 0);
8397 if (__pyx_t_1) {
8398
8399 /* "rbd.pyx":940
8400 * cdef void *ret = realloc(ptr, size)
8401 * if ret == NULL:
8402 * raise MemoryError("realloc failed") # <<<<<<<<<<<<<<
8403 * return ret
8404 *
8405 */
8406 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__8406; goto __pyx_L1_error;}
8407 __Pyx_GOTREF(__pyx_t_2);
8408 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
8409 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8410 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__8410; goto __pyx_L1_error;}
8411
8412 /* "rbd.pyx":939
8413 * cdef void* realloc_chk(void* ptr, size_t size) except NULL:
8414 * cdef void *ret = realloc(ptr, size)
8415 * if ret == NULL: # <<<<<<<<<<<<<<
8416 * raise MemoryError("realloc failed")
8417 * return ret
8418 */
8419 }
8420
8421 /* "rbd.pyx":941
8422 * if ret == NULL:
8423 * raise MemoryError("realloc failed")
8424 * return ret # <<<<<<<<<<<<<<
8425 *
8426 * RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST)
8427 */
8428 __pyx_r = __pyx_v_ret;
8429 goto __pyx_L0;
8430
8431 /* "rbd.pyx":937
8432 * return s
8433 *
8434 * cdef void* realloc_chk(void* ptr, size_t size) except NULL: # <<<<<<<<<<<<<<
8435 * cdef void *ret = realloc(ptr, size)
8436 * if ret == NULL:
8437 */
8438
8439 /* function exit code */
8440 __pyx_L1_error:;
8441 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8442 __Pyx_AddTraceback("rbd.realloc_chk", __pyx_clineno, __pyx_lineno, __pyx_filename);
8443 __pyx_r = NULL((void*)0);
8444 __pyx_L0:;
8445 __Pyx_RefNannyFinishContext();
8446 return __pyx_r;
8447}
8448
8449/* "rbd.pyx":948
8450 * cdef class Completion
8451 *
8452 * cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil: # <<<<<<<<<<<<<<
8453 * """
8454 * Callback to oncomplete() for asynchronous operations
8455 */
8456
8457static void __pyx_f_3rbd___aio_complete_cb(CYTHON_UNUSED__attribute__ ((__unused__)) rbd_completion_t __pyx_v_completion, void *__pyx_v_args) {
8458 struct __pyx_obj_3rbd_Completion *__pyx_v_cb = 0;
8459 __Pyx_RefNannyDeclarations
8460 PyObject *__pyx_t_1 = NULL((void*)0);
8461 #ifdef WITH_THREAD1
8462 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
8463 #endif
8464 __Pyx_RefNannySetupContext("__aio_complete_cb", 0);
8465
8466 /* "rbd.pyx":952
8467 * Callback to oncomplete() for asynchronous operations
8468 * """
8469 * cdef Completion cb = <Completion>args # <<<<<<<<<<<<<<
8470 * cb._complete()
8471 *
8472 */
8473 __pyx_t_1 = ((PyObject *)__pyx_v_args);
8474 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
8475 __pyx_v_cb = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_1);
8476 __pyx_t_1 = 0;
8477
8478 /* "rbd.pyx":953
8479 * """
8480 * cdef Completion cb = <Completion>args
8481 * cb._complete() # <<<<<<<<<<<<<<
8482 *
8483 *
8484 */
8485 ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_cb->__pyx_vtab)->_complete(__pyx_v_cb);
8486
8487 /* "rbd.pyx":948
8488 * cdef class Completion
8489 *
8490 * cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil: # <<<<<<<<<<<<<<
8491 * """
8492 * Callback to oncomplete() for asynchronous operations
8493 */
8494
8495 /* function exit code */
8496 __Pyx_XDECREF((PyObject *)__pyx_v_cb)do { if (((PyObject *)__pyx_v_cb) == ((void*)0)) ; else do { if
( --((PyObject*)((PyObject *)__pyx_v_cb))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)((PyObject *)__pyx_v_cb
)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((PyObject
*)__pyx_v_cb)))); } while (0); } while (0)
;
8497 __Pyx_RefNannyFinishContext();
8498 #ifdef WITH_THREAD1
8499 PyGILState_Release(__pyx_gilstate_save);
8500 #endif
8501}
8502
8503/* "rbd.pyx":967
8504 * object exc_info
8505 *
8506 * def __cinit__(self, image, object oncomplete): # <<<<<<<<<<<<<<
8507 * self.oncomplete = oncomplete
8508 * self.image = image
8509 */
8510
8511/* Python wrapper */
8512static int __pyx_pw_3rbd_10Completion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8513static int __pyx_pw_3rbd_10Completion_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8514 PyObject *__pyx_v_image = 0;
8515 PyObject *__pyx_v_oncomplete = 0;
8516 int __pyx_lineno = 0;
8517 const char *__pyx_filename = NULL((void*)0);
8518 int __pyx_clineno = 0;
8519 int __pyx_r;
8520 __Pyx_RefNannyDeclarations
8521 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
8522 {
8523 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,&__pyx_n_s_oncomplete,0};
8524 PyObject* values[2] = {0,0};
8525 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
8526 Py_ssize_t kw_args;
8527 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
8528 switch (pos_args) {
8529 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
8530 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
8531 case 0: break;
8532 default: goto __pyx_L5_argtuple_error;
8533 }
8534 kw_args = PyDict_Size(__pyx_kwds);
8535 switch (pos_args) {
8536 case 0:
8537 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
8538 else goto __pyx_L5_argtuple_error;
8539 case 1:
8540 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete
)) != 0), 1)
) kw_args--;
8541 else {
8542 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__8542; goto __pyx_L3_error;}
8543 }
8544 }
8545 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
8546 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__cinit__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__8546; goto __pyx_L3_error;}
8547 }
8548 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
8549 goto __pyx_L5_argtuple_error;
8550 } else {
8551 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
8552 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
8553 }
8554 __pyx_v_image = values[0];
8555 __pyx_v_oncomplete = values[1];
8556 }
8557 goto __pyx_L4_argument_unpacking_done;
8558 __pyx_L5_argtuple_error:;
8559 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__8559; goto __pyx_L3_error;}
8560 __pyx_L3_error:;
8561 __Pyx_AddTraceback("rbd.Completion.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8562 __Pyx_RefNannyFinishContext();
8563 return -1;
8564 __pyx_L4_argument_unpacking_done:;
8565 __pyx_r = __pyx_pf_3rbd_10Completion___cinit__(((struct __pyx_obj_3rbd_Completion *)__pyx_v_self), __pyx_v_image, __pyx_v_oncomplete);
8566
8567 /* function exit code */
8568 __Pyx_RefNannyFinishContext();
8569 return __pyx_r;
8570}
8571
8572static int __pyx_pf_3rbd_10Completion___cinit__(struct __pyx_obj_3rbd_Completion *__pyx_v_self, PyObject *__pyx_v_image, PyObject *__pyx_v_oncomplete) {
8573 int __pyx_r;
8574 __Pyx_RefNannyDeclarations
8575 __Pyx_RefNannySetupContext("__cinit__", 0);
8576
8577 /* "rbd.pyx":968
8578 *
8579 * def __cinit__(self, image, object oncomplete):
8580 * self.oncomplete = oncomplete # <<<<<<<<<<<<<<
8581 * self.image = image
8582 * self.persisted = False
8583 */
8584 __Pyx_INCREF(__pyx_v_oncomplete)( ((PyObject*)(__pyx_v_oncomplete))->ob_refcnt++);
8585 __Pyx_GIVEREF(__pyx_v_oncomplete);
8586 __Pyx_GOTREF(__pyx_v_self->oncomplete);
8587 __Pyx_DECREF(__pyx_v_self->oncomplete)do { if ( --((PyObject*)(__pyx_v_self->oncomplete))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
oncomplete)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_v_self->oncomplete)))); } while (0)
;
8588 __pyx_v_self->oncomplete = __pyx_v_oncomplete;
8589
8590 /* "rbd.pyx":969
8591 * def __cinit__(self, image, object oncomplete):
8592 * self.oncomplete = oncomplete
8593 * self.image = image # <<<<<<<<<<<<<<
8594 * self.persisted = False
8595 *
8596 */
8597 __Pyx_INCREF(__pyx_v_image)( ((PyObject*)(__pyx_v_image))->ob_refcnt++);
8598 __Pyx_GIVEREF(__pyx_v_image);
8599 __Pyx_GOTREF(__pyx_v_self->image);
8600 __Pyx_DECREF(__pyx_v_self->image)do { if ( --((PyObject*)(__pyx_v_self->image))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
image)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->image)))); } while (0)
;
8601 __pyx_v_self->image = __pyx_v_image;
8602
8603 /* "rbd.pyx":970
8604 * self.oncomplete = oncomplete
8605 * self.image = image
8606 * self.persisted = False # <<<<<<<<<<<<<<
8607 *
8608 * def is_complete(self):
8609 */
8610 __pyx_v_self->persisted = 0;
8611
8612 /* "rbd.pyx":967
8613 * object exc_info
8614 *
8615 * def __cinit__(self, image, object oncomplete): # <<<<<<<<<<<<<<
8616 * self.oncomplete = oncomplete
8617 * self.image = image
8618 */
8619
8620 /* function exit code */
8621 __pyx_r = 0;
8622 __Pyx_RefNannyFinishContext();
8623 return __pyx_r;
8624}
8625
8626/* "rbd.pyx":972
8627 * self.persisted = False
8628 *
8629 * def is_complete(self): # <<<<<<<<<<<<<<
8630 * """
8631 * Has an asynchronous operation completed?
8632 */
8633
8634/* Python wrapper */
8635static PyObject *__pyx_pw_3rbd_10Completion_3is_complete(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
8636static char __pyx_doc_3rbd_10Completion_2is_complete[] = "Completion.is_complete(self)\n\n Has an asynchronous operation completed?\n\n This does not imply that the callback has finished.\n\n :returns: True if the operation is completed\n ";
8637static PyObject *__pyx_pw_3rbd_10Completion_3is_complete(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
8638 PyObject *__pyx_r = 0;
8639 __Pyx_RefNannyDeclarations
8640 __Pyx_RefNannySetupContext("is_complete (wrapper)", 0);
8641 __pyx_r = __pyx_pf_3rbd_10Completion_2is_complete(((struct __pyx_obj_3rbd_Completion *)__pyx_v_self));
8642
8643 /* function exit code */
8644 __Pyx_RefNannyFinishContext();
8645 return __pyx_r;
8646}
8647
8648static PyObject *__pyx_pf_3rbd_10Completion_2is_complete(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
8649 int __pyx_v_ret;
8650 PyObject *__pyx_r = NULL((void*)0);
8651 __Pyx_RefNannyDeclarations
8652 PyObject *__pyx_t_1 = NULL((void*)0);
8653 int __pyx_lineno = 0;
8654 const char *__pyx_filename = NULL((void*)0);
8655 int __pyx_clineno = 0;
8656 __Pyx_RefNannySetupContext("is_complete", 0);
8657
8658 /* "rbd.pyx":980
8659 * :returns: True if the operation is completed
8660 * """
8661 * with nogil: # <<<<<<<<<<<<<<
8662 * ret = rbd_aio_is_complete(self.rbd_comp)
8663 * return ret == 1
8664 */
8665 {
8666 #ifdef WITH_THREAD1
8667 PyThreadState *_save;
8668 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8669 #endif
8670 /*try:*/ {
8671
8672 /* "rbd.pyx":981
8673 * """
8674 * with nogil:
8675 * ret = rbd_aio_is_complete(self.rbd_comp) # <<<<<<<<<<<<<<
8676 * return ret == 1
8677 *
8678 */
8679 __pyx_v_ret = rbd_aio_is_complete(__pyx_v_self->rbd_comp);
8680 }
8681
8682 /* "rbd.pyx":980
8683 * :returns: True if the operation is completed
8684 * """
8685 * with nogil: # <<<<<<<<<<<<<<
8686 * ret = rbd_aio_is_complete(self.rbd_comp)
8687 * return ret == 1
8688 */
8689 /*finally:*/ {
8690 /*normal exit:*/{
8691 #ifdef WITH_THREAD1
8692 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8693 #endif
8694 goto __pyx_L5;
8695 }
8696 __pyx_L5:;
8697 }
8698 }
8699
8700 /* "rbd.pyx":982
8701 * with nogil:
8702 * ret = rbd_aio_is_complete(self.rbd_comp)
8703 * return ret == 1 # <<<<<<<<<<<<<<
8704 *
8705 * def wait_for_complete_and_cb(self):
8706 */
8707 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
8708 __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_ret == 1))(((__pyx_v_ret == 1)) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct
)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (
( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__8708; goto __pyx_L1_error;}
8709 __Pyx_GOTREF(__pyx_t_1);
8710 __pyx_r = __pyx_t_1;
8711 __pyx_t_1 = 0;
8712 goto __pyx_L0;
8713
8714 /* "rbd.pyx":972
8715 * self.persisted = False
8716 *
8717 * def is_complete(self): # <<<<<<<<<<<<<<
8718 * """
8719 * Has an asynchronous operation completed?
8720 */
8721
8722 /* function exit code */
8723 __pyx_L1_error:;
8724 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8725 __Pyx_AddTraceback("rbd.Completion.is_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
8726 __pyx_r = NULL((void*)0);
8727 __pyx_L0:;
8728 __Pyx_XGIVEREF(__pyx_r);
8729 __Pyx_RefNannyFinishContext();
8730 return __pyx_r;
8731}
8732
8733/* "rbd.pyx":984
8734 * return ret == 1
8735 *
8736 * def wait_for_complete_and_cb(self): # <<<<<<<<<<<<<<
8737 * """
8738 * Wait for an asynchronous operation to complete
8739 */
8740
8741/* Python wrapper */
8742static PyObject *__pyx_pw_3rbd_10Completion_5wait_for_complete_and_cb(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
8743static char __pyx_doc_3rbd_10Completion_4wait_for_complete_and_cb[] = "Completion.wait_for_complete_and_cb(self)\n\n Wait for an asynchronous operation to complete\n\n This method waits for the callback to execute, if one was provided.\n It will also re-raise any exceptions raised by the callback. You\n should call this to \"reap\" asynchronous completions and ensure that\n any exceptions in the callbacks are handled, as an exception internal\n to this module may have occurred.\n ";
8744static PyObject *__pyx_pw_3rbd_10Completion_5wait_for_complete_and_cb(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
8745 PyObject *__pyx_r = 0;
8746 __Pyx_RefNannyDeclarations
8747 __Pyx_RefNannySetupContext("wait_for_complete_and_cb (wrapper)", 0);
8748 __pyx_r = __pyx_pf_3rbd_10Completion_4wait_for_complete_and_cb(((struct __pyx_obj_3rbd_Completion *)__pyx_v_self));
8749
8750 /* function exit code */
8751 __Pyx_RefNannyFinishContext();
8752 return __pyx_r;
8753}
8754
8755static PyObject *__pyx_pf_3rbd_10Completion_4wait_for_complete_and_cb(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
8756 PyObject *__pyx_r = NULL((void*)0);
8757 __Pyx_RefNannyDeclarations
8758 int __pyx_t_1;
8759 PyObject *__pyx_t_2 = NULL((void*)0);
8760 PyObject *__pyx_t_3 = NULL((void*)0);
8761 PyObject *__pyx_t_4 = NULL((void*)0);
8762 int __pyx_lineno = 0;
8763 const char *__pyx_filename = NULL((void*)0);
8764 int __pyx_clineno = 0;
8765 __Pyx_RefNannySetupContext("wait_for_complete_and_cb", 0);
8766
8767 /* "rbd.pyx":994
8768 * to this module may have occurred.
8769 * """
8770 * with nogil: # <<<<<<<<<<<<<<
8771 * rbd_aio_wait_for_complete(self.rbd_comp)
8772 *
8773 */
8774 {
8775 #ifdef WITH_THREAD1
8776 PyThreadState *_save;
8777 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8778 #endif
8779 /*try:*/ {
8780
8781 /* "rbd.pyx":995
8782 * """
8783 * with nogil:
8784 * rbd_aio_wait_for_complete(self.rbd_comp) # <<<<<<<<<<<<<<
8785 *
8786 * if self.exc_info:
8787 */
8788 rbd_aio_wait_for_complete(__pyx_v_self->rbd_comp);
8789 }
8790
8791 /* "rbd.pyx":994
8792 * to this module may have occurred.
8793 * """
8794 * with nogil: # <<<<<<<<<<<<<<
8795 * rbd_aio_wait_for_complete(self.rbd_comp)
8796 *
8797 */
8798 /*finally:*/ {
8799 /*normal exit:*/{
8800 #ifdef WITH_THREAD1
8801 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8802 #endif
8803 goto __pyx_L5;
8804 }
8805 __pyx_L5:;
8806 }
8807 }
8808
8809 /* "rbd.pyx":997
8810 * rbd_aio_wait_for_complete(self.rbd_comp)
8811 *
8812 * if self.exc_info: # <<<<<<<<<<<<<<
8813 * raise self.exc_info[0], self.exc_info[1], self.exc_info[2]
8814 *
8815 */
8816 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->exc_info); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__8816; goto __pyx_L1_error;}
8817 if (__pyx_t_1) {
8818
8819 /* "rbd.pyx":998
8820 *
8821 * if self.exc_info:
8822 * raise self.exc_info[0], self.exc_info[1], self.exc_info[2] # <<<<<<<<<<<<<<
8823 *
8824 * def get_return_value(self):
8825 */
8826 __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(0 < (long
)((Py_ssize_t)(((size_t)-1)>>1)) || 0 == (long)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(0 > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
0 == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(long) == sizeof(Py_ssize_t) && (1 || __builtin_expect
(!!(0 < (long)((Py_ssize_t)(((size_t)-1)>>1)) || 0 ==
(long)((Py_ssize_t)(((size_t)-1)>>1))), 1))) ) ? __Pyx_GetItemInt_Fast
(__pyx_v_self->exc_info, (Py_ssize_t)0, 0, 0, 1) : (0 ? (PyErr_SetString
(PyExc_IndexError, "list index out of range"), (PyObject*)((void
*)0)) : __Pyx_GetItemInt_Generic(__pyx_v_self->exc_info, __Pyx_PyInt_From_long
(0))))
; if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__8826; goto __pyx_L1_error;};
8827 __Pyx_GOTREF(__pyx_t_2);
8828 __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(1 < (long
)((Py_ssize_t)(((size_t)-1)>>1)) || 1 == (long)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(1 > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
1 == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(long) == sizeof(Py_ssize_t) && (1 || __builtin_expect
(!!(1 < (long)((Py_ssize_t)(((size_t)-1)>>1)) || 1 ==
(long)((Py_ssize_t)(((size_t)-1)>>1))), 1))) ) ? __Pyx_GetItemInt_Fast
(__pyx_v_self->exc_info, (Py_ssize_t)1, 0, 0, 1) : (0 ? (PyErr_SetString
(PyExc_IndexError, "list index out of range"), (PyObject*)((void
*)0)) : __Pyx_GetItemInt_Generic(__pyx_v_self->exc_info, __Pyx_PyInt_From_long
(1))))
; if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__8828; goto __pyx_L1_error;};
8829 __Pyx_GOTREF(__pyx_t_3);
8830 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(2 < (long
)((Py_ssize_t)(((size_t)-1)>>1)) || 2 == (long)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(2 > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
2 == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(long) == sizeof(Py_ssize_t) && (1 || __builtin_expect
(!!(2 < (long)((Py_ssize_t)(((size_t)-1)>>1)) || 2 ==
(long)((Py_ssize_t)(((size_t)-1)>>1))), 1))) ) ? __Pyx_GetItemInt_Fast
(__pyx_v_self->exc_info, (Py_ssize_t)2, 0, 0, 1) : (0 ? (PyErr_SetString
(PyExc_IndexError, "list index out of range"), (PyObject*)((void
*)0)) : __Pyx_GetItemInt_Generic(__pyx_v_self->exc_info, __Pyx_PyInt_From_long
(2))))
; if (unlikely(__pyx_t_4 == NULL)__builtin_expect(!!(__pyx_t_4 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__8830; goto __pyx_L1_error;};
8831 __Pyx_GOTREF(__pyx_t_4);
8832 __Pyx_Raise(__pyx_t_2, __pyx_t_3, __pyx_t_4, 0);
8833 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
8834 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
8835 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
8836 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__8836; goto __pyx_L1_error;}
8837
8838 /* "rbd.pyx":997
8839 * rbd_aio_wait_for_complete(self.rbd_comp)
8840 *
8841 * if self.exc_info: # <<<<<<<<<<<<<<
8842 * raise self.exc_info[0], self.exc_info[1], self.exc_info[2]
8843 *
8844 */
8845 }
8846
8847 /* "rbd.pyx":984
8848 * return ret == 1
8849 *
8850 * def wait_for_complete_and_cb(self): # <<<<<<<<<<<<<<
8851 * """
8852 * Wait for an asynchronous operation to complete
8853 */
8854
8855 /* function exit code */
8856 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
8857 goto __pyx_L0;
8858 __pyx_L1_error:;
8859 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
8860 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
8861 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
8862 __Pyx_AddTraceback("rbd.Completion.wait_for_complete_and_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
8863 __pyx_r = NULL((void*)0);
8864 __pyx_L0:;
8865 __Pyx_XGIVEREF(__pyx_r);
8866 __Pyx_RefNannyFinishContext();
8867 return __pyx_r;
8868}
8869
8870/* "rbd.pyx":1000
8871 * raise self.exc_info[0], self.exc_info[1], self.exc_info[2]
8872 *
8873 * def get_return_value(self): # <<<<<<<<<<<<<<
8874 * """
8875 * Get the return value of an asychronous operation
8876 */
8877
8878/* Python wrapper */
8879static PyObject *__pyx_pw_3rbd_10Completion_7get_return_value(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
8880static char __pyx_doc_3rbd_10Completion_6get_return_value[] = "Completion.get_return_value(self)\n\n Get the return value of an asychronous operation\n\n The return value is set when the operation is complete.\n\n :returns: int - return value of the operation\n ";
8881static PyObject *__pyx_pw_3rbd_10Completion_7get_return_value(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
8882 PyObject *__pyx_r = 0;
8883 __Pyx_RefNannyDeclarations
8884 __Pyx_RefNannySetupContext("get_return_value (wrapper)", 0);
8885 __pyx_r = __pyx_pf_3rbd_10Completion_6get_return_value(((struct __pyx_obj_3rbd_Completion *)__pyx_v_self));
8886
8887 /* function exit code */
8888 __Pyx_RefNannyFinishContext();
8889 return __pyx_r;
8890}
8891
8892static PyObject *__pyx_pf_3rbd_10Completion_6get_return_value(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
8893 Py_ssize_t __pyx_v_ret;
8894 PyObject *__pyx_r = NULL((void*)0);
8895 __Pyx_RefNannyDeclarations
8896 PyObject *__pyx_t_1 = NULL((void*)0);
8897 int __pyx_lineno = 0;
8898 const char *__pyx_filename = NULL((void*)0);
8899 int __pyx_clineno = 0;
8900 __Pyx_RefNannySetupContext("get_return_value", 0);
8901
8902 /* "rbd.pyx":1008
8903 * :returns: int - return value of the operation
8904 * """
8905 * with nogil: # <<<<<<<<<<<<<<
8906 * ret = rbd_aio_get_return_value(self.rbd_comp)
8907 * return ret
8908 */
8909 {
8910 #ifdef WITH_THREAD1
8911 PyThreadState *_save;
8912 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
8913 #endif
8914 /*try:*/ {
8915
8916 /* "rbd.pyx":1009
8917 * """
8918 * with nogil:
8919 * ret = rbd_aio_get_return_value(self.rbd_comp) # <<<<<<<<<<<<<<
8920 * return ret
8921 *
8922 */
8923 __pyx_v_ret = rbd_aio_get_return_value(__pyx_v_self->rbd_comp);
8924 }
8925
8926 /* "rbd.pyx":1008
8927 * :returns: int - return value of the operation
8928 * """
8929 * with nogil: # <<<<<<<<<<<<<<
8930 * ret = rbd_aio_get_return_value(self.rbd_comp)
8931 * return ret
8932 */
8933 /*finally:*/ {
8934 /*normal exit:*/{
8935 #ifdef WITH_THREAD1
8936 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
8937 #endif
8938 goto __pyx_L5;
8939 }
8940 __pyx_L5:;
8941 }
8942 }
8943
8944 /* "rbd.pyx":1010
8945 * with nogil:
8946 * ret = rbd_aio_get_return_value(self.rbd_comp)
8947 * return ret # <<<<<<<<<<<<<<
8948 *
8949 * def __dealloc__(self):
8950 */
8951 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
8952 __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__8952; goto __pyx_L1_error;}
8953 __Pyx_GOTREF(__pyx_t_1);
8954 __pyx_r = __pyx_t_1;
8955 __pyx_t_1 = 0;
8956 goto __pyx_L0;
8957
8958 /* "rbd.pyx":1000
8959 * raise self.exc_info[0], self.exc_info[1], self.exc_info[2]
8960 *
8961 * def get_return_value(self): # <<<<<<<<<<<<<<
8962 * """
8963 * Get the return value of an asychronous operation
8964 */
8965
8966 /* function exit code */
8967 __pyx_L1_error:;
8968 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
8969 __Pyx_AddTraceback("rbd.Completion.get_return_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
8970 __pyx_r = NULL((void*)0);
8971 __pyx_L0:;
8972 __Pyx_XGIVEREF(__pyx_r);
8973 __Pyx_RefNannyFinishContext();
8974 return __pyx_r;
8975}
8976
8977/* "rbd.pyx":1012
8978 * return ret
8979 *
8980 * def __dealloc__(self): # <<<<<<<<<<<<<<
8981 * """
8982 * Release a completion
8983 */
8984
8985/* Python wrapper */
8986static void __pyx_pw_3rbd_10Completion_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
8987static void __pyx_pw_3rbd_10Completion_9__dealloc__(PyObject *__pyx_v_self) {
8988 __Pyx_RefNannyDeclarations
8989 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
8990 __pyx_pf_3rbd_10Completion_8__dealloc__(((struct __pyx_obj_3rbd_Completion *)__pyx_v_self));
8991
8992 /* function exit code */
8993 __Pyx_RefNannyFinishContext();
8994}
8995
8996static void __pyx_pf_3rbd_10Completion_8__dealloc__(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
8997 __Pyx_RefNannyDeclarations
8998 int __pyx_t_1;
8999 __Pyx_RefNannySetupContext("__dealloc__", 0);
9000
9001 /* "rbd.pyx":1018
9002 * This is automatically called when the completion object is freed.
9003 * """
9004 * ref.Py_XDECREF(self.buf) # <<<<<<<<<<<<<<
9005 * self.buf = NULL
9006 * if self.rbd_comp != NULL:
9007 */
9008 Py_XDECREF(__pyx_v_self->buf)do { if ((__pyx_v_self->buf) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_self->buf))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->buf)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_self
->buf)))); } while (0); } while (0)
;
9009
9010 /* "rbd.pyx":1019
9011 * """
9012 * ref.Py_XDECREF(self.buf)
9013 * self.buf = NULL # <<<<<<<<<<<<<<
9014 * if self.rbd_comp != NULL:
9015 * with nogil:
9016 */
9017 __pyx_v_self->buf = NULL((void*)0);
9018
9019 /* "rbd.pyx":1020
9020 * ref.Py_XDECREF(self.buf)
9021 * self.buf = NULL
9022 * if self.rbd_comp != NULL: # <<<<<<<<<<<<<<
9023 * with nogil:
9024 * rbd_aio_release(self.rbd_comp)
9025 */
9026 __pyx_t_1 = ((__pyx_v_self->rbd_comp != NULL((void*)0)) != 0);
9027 if (__pyx_t_1) {
9028
9029 /* "rbd.pyx":1021
9030 * self.buf = NULL
9031 * if self.rbd_comp != NULL:
9032 * with nogil: # <<<<<<<<<<<<<<
9033 * rbd_aio_release(self.rbd_comp)
9034 * self.rbd_comp = NULL
9035 */
9036 {
9037 #ifdef WITH_THREAD1
9038 PyThreadState *_save;
9039 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
9040 #endif
9041 /*try:*/ {
9042
9043 /* "rbd.pyx":1022
9044 * if self.rbd_comp != NULL:
9045 * with nogil:
9046 * rbd_aio_release(self.rbd_comp) # <<<<<<<<<<<<<<
9047 * self.rbd_comp = NULL
9048 *
9049 */
9050 rbd_aio_release(__pyx_v_self->rbd_comp);
9051
9052 /* "rbd.pyx":1023
9053 * with nogil:
9054 * rbd_aio_release(self.rbd_comp)
9055 * self.rbd_comp = NULL # <<<<<<<<<<<<<<
9056 *
9057 * cdef void _complete(self):
9058 */
9059 __pyx_v_self->rbd_comp = NULL((void*)0);
9060 }
9061
9062 /* "rbd.pyx":1021
9063 * self.buf = NULL
9064 * if self.rbd_comp != NULL:
9065 * with nogil: # <<<<<<<<<<<<<<
9066 * rbd_aio_release(self.rbd_comp)
9067 * self.rbd_comp = NULL
9068 */
9069 /*finally:*/ {
9070 /*normal exit:*/{
9071 #ifdef WITH_THREAD1
9072 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
9073 #endif
9074 goto __pyx_L6;
9075 }
9076 __pyx_L6:;
9077 }
9078 }
9079
9080 /* "rbd.pyx":1020
9081 * ref.Py_XDECREF(self.buf)
9082 * self.buf = NULL
9083 * if self.rbd_comp != NULL: # <<<<<<<<<<<<<<
9084 * with nogil:
9085 * rbd_aio_release(self.rbd_comp)
9086 */
9087 }
9088
9089 /* "rbd.pyx":1012
9090 * return ret
9091 *
9092 * def __dealloc__(self): # <<<<<<<<<<<<<<
9093 * """
9094 * Release a completion
9095 */
9096
9097 /* function exit code */
9098 __Pyx_RefNannyFinishContext();
9099}
9100
9101/* "rbd.pyx":1025
9102 * self.rbd_comp = NULL
9103 *
9104 * cdef void _complete(self): # <<<<<<<<<<<<<<
9105 * try:
9106 * self.__unpersist()
9107 */
9108
9109static void __pyx_f_3rbd_10Completion__complete(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
9110 __Pyx_RefNannyDeclarations
9111 PyObject *__pyx_t_1 = NULL((void*)0);
9112 PyObject *__pyx_t_2 = NULL((void*)0);
9113 PyObject *__pyx_t_3 = NULL((void*)0);
9114 PyObject *__pyx_t_4 = NULL((void*)0);
9115 int __pyx_t_5;
9116 PyObject *__pyx_t_6 = NULL((void*)0);
9117 PyObject *__pyx_t_7 = NULL((void*)0);
9118 PyObject *__pyx_t_8 = NULL((void*)0);
9119 PyObject *__pyx_t_9 = NULL((void*)0);
9120 PyObject *__pyx_t_10 = NULL((void*)0);
9121 int __pyx_lineno = 0;
9122 const char *__pyx_filename = NULL((void*)0);
9123 int __pyx_clineno = 0;
9124 __Pyx_RefNannySetupContext("_complete", 0);
9125
9126 /* "rbd.pyx":1026
9127 *
9128 * cdef void _complete(self):
9129 * try: # <<<<<<<<<<<<<<
9130 * self.__unpersist()
9131 * if self.oncomplete:
9132 */
9133 {
9134 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9135 __Pyx_XGOTREF(__pyx_t_1);
9136 __Pyx_XGOTREF(__pyx_t_2);
9137 __Pyx_XGOTREF(__pyx_t_3);
9138 /*try:*/ {
9139
9140 /* "rbd.pyx":1027
9141 * cdef void _complete(self):
9142 * try:
9143 * self.__unpersist() # <<<<<<<<<<<<<<
9144 * if self.oncomplete:
9145 * self.oncomplete(self)
9146 */
9147 __pyx_t_4 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_self->__pyx_vtab)->__pyx___unpersist(__pyx_v_self); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__9147; goto __pyx_L3_error;}
9148 __Pyx_GOTREF(__pyx_t_4);
9149 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
9150
9151 /* "rbd.pyx":1028
9152 * try:
9153 * self.__unpersist()
9154 * if self.oncomplete: # <<<<<<<<<<<<<<
9155 * self.oncomplete(self)
9156 * # In the event that something raises an exception during the next 2
9157 */
9158 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->oncomplete); if (unlikely(__pyx_t_5 < 0)__builtin_expect(!!(__pyx_t_5 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__9158; goto __pyx_L3_error;}
9159 if (__pyx_t_5) {
9160
9161 /* "rbd.pyx":1029
9162 * self.__unpersist()
9163 * if self.oncomplete:
9164 * self.oncomplete(self) # <<<<<<<<<<<<<<
9165 * # In the event that something raises an exception during the next 2
9166 * # lines of code, we will not be able to catch it, and this may result
9167 */
9168 __Pyx_INCREF(__pyx_v_self->oncomplete)( ((PyObject*)(__pyx_v_self->oncomplete))->ob_refcnt++);
9169 __pyx_t_6 = __pyx_v_self->oncomplete; __pyx_t_7 = NULL((void*)0);
9170 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 1)
) {
9171 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
9172 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
9173 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
9174 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
9175 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9176 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9177 }
9178 }
9179 if (!__pyx_t_7) {
9180 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__9180; goto __pyx_L3_error;}
9181 __Pyx_GOTREF(__pyx_t_4);
9182 } else {
9183 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__9183; goto __pyx_L3_error;}
9184 __Pyx_GOTREF(__pyx_t_8);
9185 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
9186 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
9187 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
9188 PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = ((PyObject
*)__pyx_v_self))
;
9189 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__9189; goto __pyx_L3_error;}
9190 __Pyx_GOTREF(__pyx_t_4);
9191 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
9192 }
9193 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
9194 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
9195
9196 /* "rbd.pyx":1028
9197 * try:
9198 * self.__unpersist()
9199 * if self.oncomplete: # <<<<<<<<<<<<<<
9200 * self.oncomplete(self)
9201 * # In the event that something raises an exception during the next 2
9202 */
9203 }
9204
9205 /* "rbd.pyx":1026
9206 *
9207 * cdef void _complete(self):
9208 * try: # <<<<<<<<<<<<<<
9209 * self.__unpersist()
9210 * if self.oncomplete:
9211 */
9212 }
9213 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
9214 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
9215 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
9216 goto __pyx_L10_try_end;
9217 __pyx_L3_error:;
9218 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
9219 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
9220 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
9221 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
9222
9223 /* "rbd.pyx":1036
9224 * # should not be a problem because the callback thread from librbd
9225 * # ought to have SIGINT blocked.
9226 * except: # <<<<<<<<<<<<<<
9227 * self.exc_info = sys.exc_info()
9228 *
9229 */
9230 /*except:*/ {
9231 __Pyx_AddTraceback("rbd.Completion._complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
9232 if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__9232; goto __pyx_L5_except_error;}
9233 __Pyx_GOTREF(__pyx_t_4);
9234 __Pyx_GOTREF(__pyx_t_6);
9235 __Pyx_GOTREF(__pyx_t_8);
9236
9237 /* "rbd.pyx":1037
9238 * # ought to have SIGINT blocked.
9239 * except:
9240 * self.exc_info = sys.exc_info() # <<<<<<<<<<<<<<
9241 *
9242 * cdef __persist(self):
9243 */
9244 __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__9244; goto __pyx_L5_except_error;}
9245 __Pyx_GOTREF(__pyx_t_9);
9246 __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__9246; goto __pyx_L5_except_error;}
9247 __Pyx_GOTREF(__pyx_t_10);
9248 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
9249 __pyx_t_9 = NULL((void*)0);
9250 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_10))__builtin_expect(!!(((__pyx_t_10)->ob_type == &PyMethod_Type
)), 0)
) {
9251 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_self);
9252 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
9253 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_func);
9254 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
9255 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9256 __Pyx_DECREF_SET(__pyx_t_10, function)do { PyObject *tmp = (PyObject *) __pyx_t_10; __pyx_t_10 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9257 }
9258 }
9259 if (__pyx_t_9) {
9260 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__9260; goto __pyx_L5_except_error;}
9261 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
9262 } else {
9263 __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__9263; goto __pyx_L5_except_error;}
9264 }
9265 __Pyx_GOTREF(__pyx_t_7);
9266 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
9267 __Pyx_GIVEREF(__pyx_t_7);
9268 __Pyx_GOTREF(__pyx_v_self->exc_info);
9269 __Pyx_DECREF(__pyx_v_self->exc_info)do { if ( --((PyObject*)(__pyx_v_self->exc_info))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
exc_info)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_v_self->exc_info)))); } while (0)
;
9270 __pyx_v_self->exc_info = __pyx_t_7;
9271 __pyx_t_7 = 0;
9272 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
9273 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
9274 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
9275 goto __pyx_L4_exception_handled;
9276 }
9277 __pyx_L5_except_error:;
9278
9279 /* "rbd.pyx":1026
9280 *
9281 * cdef void _complete(self):
9282 * try: # <<<<<<<<<<<<<<
9283 * self.__unpersist()
9284 * if self.oncomplete:
9285 */
9286 __Pyx_XGIVEREF(__pyx_t_1);
9287 __Pyx_XGIVEREF(__pyx_t_2);
9288 __Pyx_XGIVEREF(__pyx_t_3);
9289 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9290 goto __pyx_L1_error;
9291 __pyx_L4_exception_handled:;
9292 __Pyx_XGIVEREF(__pyx_t_1);
9293 __Pyx_XGIVEREF(__pyx_t_2);
9294 __Pyx_XGIVEREF(__pyx_t_3);
9295 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9296 __pyx_L10_try_end:;
9297 }
9298
9299 /* "rbd.pyx":1025
9300 * self.rbd_comp = NULL
9301 *
9302 * cdef void _complete(self): # <<<<<<<<<<<<<<
9303 * try:
9304 * self.__unpersist()
9305 */
9306
9307 /* function exit code */
9308 goto __pyx_L0;
9309 __pyx_L1_error:;
9310 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
9311 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
9312 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
9313 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
9314 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
9315 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
9316 __Pyx_WriteUnraisable("rbd.Completion._complete", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
9317 __pyx_L0:;
9318 __Pyx_RefNannyFinishContext();
9319}
9320
9321/* "rbd.pyx":1039
9322 * self.exc_info = sys.exc_info()
9323 *
9324 * cdef __persist(self): # <<<<<<<<<<<<<<
9325 * if self.oncomplete is not None and not self.persisted:
9326 * # Increment our own reference count to make sure the completion
9327 */
9328
9329static PyObject *__pyx_f_3rbd_10Completion___persist(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
9330 PyObject *__pyx_r = NULL((void*)0);
9331 __Pyx_RefNannyDeclarations
9332 int __pyx_t_1;
9333 int __pyx_t_2;
9334 int __pyx_t_3;
9335 __Pyx_RefNannySetupContext("__persist", 0);
9336
9337 /* "rbd.pyx":1040
9338 *
9339 * cdef __persist(self):
9340 * if self.oncomplete is not None and not self.persisted: # <<<<<<<<<<<<<<
9341 * # Increment our own reference count to make sure the completion
9342 * # is not freed until the callback is called. The completion is
9343 */
9344 __pyx_t_2 = (__pyx_v_self->oncomplete != Py_None(&_Py_NoneStruct));
9345 __pyx_t_3 = (__pyx_t_2 != 0);
9346 if (__pyx_t_3) {
9347 } else {
9348 __pyx_t_1 = __pyx_t_3;
9349 goto __pyx_L4_bool_binop_done;
9350 }
9351 __pyx_t_3 = ((!(__pyx_v_self->persisted != 0)) != 0);
9352 __pyx_t_1 = __pyx_t_3;
9353 __pyx_L4_bool_binop_done:;
9354 if (__pyx_t_1) {
9355
9356 /* "rbd.pyx":1044
9357 * # is not freed until the callback is called. The completion is
9358 * # allowed to be freed if there is no callback.
9359 * ref.Py_INCREF(self) # <<<<<<<<<<<<<<
9360 * self.persisted = True
9361 *
9362 */
9363 Py_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
9364
9365 /* "rbd.pyx":1045
9366 * # allowed to be freed if there is no callback.
9367 * ref.Py_INCREF(self)
9368 * self.persisted = True # <<<<<<<<<<<<<<
9369 *
9370 * cdef __unpersist(self):
9371 */
9372 __pyx_v_self->persisted = 1;
9373
9374 /* "rbd.pyx":1040
9375 *
9376 * cdef __persist(self):
9377 * if self.oncomplete is not None and not self.persisted: # <<<<<<<<<<<<<<
9378 * # Increment our own reference count to make sure the completion
9379 * # is not freed until the callback is called. The completion is
9380 */
9381 }
9382
9383 /* "rbd.pyx":1039
9384 * self.exc_info = sys.exc_info()
9385 *
9386 * cdef __persist(self): # <<<<<<<<<<<<<<
9387 * if self.oncomplete is not None and not self.persisted:
9388 * # Increment our own reference count to make sure the completion
9389 */
9390
9391 /* function exit code */
9392 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
9393 __Pyx_XGIVEREF(__pyx_r);
9394 __Pyx_RefNannyFinishContext();
9395 return __pyx_r;
9396}
9397
9398/* "rbd.pyx":1047
9399 * self.persisted = True
9400 *
9401 * cdef __unpersist(self): # <<<<<<<<<<<<<<
9402 * if self.persisted:
9403 * ref.Py_DECREF(self)
9404 */
9405
9406static PyObject *__pyx_f_3rbd_10Completion___unpersist(struct __pyx_obj_3rbd_Completion *__pyx_v_self) {
9407 PyObject *__pyx_r = NULL((void*)0);
9408 __Pyx_RefNannyDeclarations
9409 int __pyx_t_1;
9410 __Pyx_RefNannySetupContext("__unpersist", 0);
9411
9412 /* "rbd.pyx":1048
9413 *
9414 * cdef __unpersist(self):
9415 * if self.persisted: # <<<<<<<<<<<<<<
9416 * ref.Py_DECREF(self)
9417 * self.persisted = False
9418 */
9419 __pyx_t_1 = (__pyx_v_self->persisted != 0);
9420 if (__pyx_t_1) {
9421
9422 /* "rbd.pyx":1049
9423 * cdef __unpersist(self):
9424 * if self.persisted:
9425 * ref.Py_DECREF(self) # <<<<<<<<<<<<<<
9426 * self.persisted = False
9427 *
9428 */
9429 Py_DECREF(((PyObject *)__pyx_v_self))do { if ( --((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject *)__pyx_v_self
))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((
(PyObject *)__pyx_v_self))))); } while (0)
;
9430
9431 /* "rbd.pyx":1050
9432 * if self.persisted:
9433 * ref.Py_DECREF(self)
9434 * self.persisted = False # <<<<<<<<<<<<<<
9435 *
9436 *
9437 */
9438 __pyx_v_self->persisted = 0;
9439
9440 /* "rbd.pyx":1048
9441 *
9442 * cdef __unpersist(self):
9443 * if self.persisted: # <<<<<<<<<<<<<<
9444 * ref.Py_DECREF(self)
9445 * self.persisted = False
9446 */
9447 }
9448
9449 /* "rbd.pyx":1047
9450 * self.persisted = True
9451 *
9452 * cdef __unpersist(self): # <<<<<<<<<<<<<<
9453 * if self.persisted:
9454 * ref.Py_DECREF(self)
9455 */
9456
9457 /* function exit code */
9458 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
9459 __Pyx_XGIVEREF(__pyx_r);
9460 __Pyx_RefNannyFinishContext();
9461 return __pyx_r;
9462}
9463
9464/* "rbd.pyx":1057
9465 * This class wraps librbd CRUD functions.
9466 * """
9467 * def version(self): # <<<<<<<<<<<<<<
9468 * """
9469 * Get the version number of the ``librbd`` C library.
9470 */
9471
9472/* Python wrapper */
9473static PyObject *__pyx_pw_3rbd_3RBD_1version(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
9474static char __pyx_doc_3rbd_3RBD_version[] = "RBD.version(self)\n\n Get the version number of the ``librbd`` C library.\n\n :returns: a tuple of ``(major, minor, extra)`` components of the\n librbd version\n ";
9475static PyMethodDef __pyx_mdef_3rbd_3RBD_1version = {"version", (PyCFunction)__pyx_pw_3rbd_3RBD_1version, METH_O0x0008, __pyx_doc_3rbd_3RBD_version};
9476static PyObject *__pyx_pw_3rbd_3RBD_1version(PyObject *__pyx_self, PyObject *__pyx_v_self) {
9477 PyObject *__pyx_r = 0;
9478 __Pyx_RefNannyDeclarations
9479 __Pyx_RefNannySetupContext("version (wrapper)", 0);
9480 __pyx_r = __pyx_pf_3rbd_3RBD_version(__pyx_self, ((PyObject *)__pyx_v_self));
9481
9482 /* function exit code */
9483 __Pyx_RefNannyFinishContext();
9484 return __pyx_r;
9485}
9486
9487static PyObject *__pyx_pf_3rbd_3RBD_version(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self) {
9488 int __pyx_v_major;
9489 int __pyx_v_minor;
9490 int __pyx_v_extra;
9491 PyObject *__pyx_r = NULL((void*)0);
9492 __Pyx_RefNannyDeclarations
9493 PyObject *__pyx_t_1 = NULL((void*)0);
9494 PyObject *__pyx_t_2 = NULL((void*)0);
9495 PyObject *__pyx_t_3 = NULL((void*)0);
9496 PyObject *__pyx_t_4 = NULL((void*)0);
9497 int __pyx_lineno = 0;
9498 const char *__pyx_filename = NULL((void*)0);
9499 int __pyx_clineno = 0;
9500 __Pyx_RefNannySetupContext("version", 0);
9501
9502 /* "rbd.pyx":1064
9503 * librbd version
9504 * """
9505 * cdef int major = 0 # <<<<<<<<<<<<<<
9506 * cdef int minor = 0
9507 * cdef int extra = 0
9508 */
9509 __pyx_v_major = 0;
9510
9511 /* "rbd.pyx":1065
9512 * """
9513 * cdef int major = 0
9514 * cdef int minor = 0 # <<<<<<<<<<<<<<
9515 * cdef int extra = 0
9516 * rbd_version(&major, &minor, &extra)
9517 */
9518 __pyx_v_minor = 0;
9519
9520 /* "rbd.pyx":1066
9521 * cdef int major = 0
9522 * cdef int minor = 0
9523 * cdef int extra = 0 # <<<<<<<<<<<<<<
9524 * rbd_version(&major, &minor, &extra)
9525 * return (major, minor, extra)
9526 */
9527 __pyx_v_extra = 0;
9528
9529 /* "rbd.pyx":1067
9530 * cdef int minor = 0
9531 * cdef int extra = 0
9532 * rbd_version(&major, &minor, &extra) # <<<<<<<<<<<<<<
9533 * return (major, minor, extra)
9534 *
9535 */
9536 rbd_version((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_extra));
9537
9538 /* "rbd.pyx":1068
9539 * cdef int extra = 0
9540 * rbd_version(&major, &minor, &extra)
9541 * return (major, minor, extra) # <<<<<<<<<<<<<<
9542 *
9543 * def create(self, ioctx, name, size, order=None, old_format=True,
9544 */
9545 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
9546 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_major); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__9546; goto __pyx_L1_error;}
9547 __Pyx_GOTREF(__pyx_t_1);
9548 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__9548; goto __pyx_L1_error;}
9549 __Pyx_GOTREF(__pyx_t_2);
9550 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_extra); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__9550; goto __pyx_L1_error;}
9551 __Pyx_GOTREF(__pyx_t_3);
9552 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__9552; goto __pyx_L1_error;}
9553 __Pyx_GOTREF(__pyx_t_4);
9554 __Pyx_GIVEREF(__pyx_t_1);
9555 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_1);
9556 __Pyx_GIVEREF(__pyx_t_2);
9557 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_t_2);
9558 __Pyx_GIVEREF(__pyx_t_3);
9559 PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[2] = __pyx_t_3);
9560 __pyx_t_1 = 0;
9561 __pyx_t_2 = 0;
9562 __pyx_t_3 = 0;
9563 __pyx_r = __pyx_t_4;
9564 __pyx_t_4 = 0;
9565 goto __pyx_L0;
9566
9567 /* "rbd.pyx":1057
9568 * This class wraps librbd CRUD functions.
9569 * """
9570 * def version(self): # <<<<<<<<<<<<<<
9571 * """
9572 * Get the version number of the ``librbd`` C library.
9573 */
9574
9575 /* function exit code */
9576 __pyx_L1_error:;
9577 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
9578 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
9579 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
9580 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
9581 __Pyx_AddTraceback("rbd.RBD.version", __pyx_clineno, __pyx_lineno, __pyx_filename);
9582 __pyx_r = NULL((void*)0);
9583 __pyx_L0:;
9584 __Pyx_XGIVEREF(__pyx_r);
9585 __Pyx_RefNannyFinishContext();
9586 return __pyx_r;
9587}
9588
9589/* "rbd.pyx":1070
9590 * return (major, minor, extra)
9591 *
9592 * def create(self, ioctx, name, size, order=None, old_format=True, # <<<<<<<<<<<<<<
9593 * features=None, stripe_unit=None, stripe_count=None,
9594 * data_pool=None):
9595 */
9596
9597/* Python wrapper */
9598static PyObject *__pyx_pw_3rbd_3RBD_3create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9599static char __pyx_doc_3rbd_3RBD_2create[] = "RBD.create(self, ioctx, name, size, order=None, old_format=True, features=None, stripe_unit=None, stripe_count=None, data_pool=None)\n\n Create an rbd image.\n\n :param ioctx: the context in which to create the image\n :type ioctx: :class:`rados.Ioctx`\n :param name: what the image is called\n :type name: str\n :param size: how big the image is in bytes\n :type size: int\n :param order: the image is split into (2**order) byte objects\n :type order: int\n :param old_format: whether to create an old-style image that\n is accessible by old clients, but can't\n use more advanced features like layering.\n :type old_format: bool\n :param features: bitmask of features to enable\n :type features: int\n :param stripe_unit: stripe unit in bytes (default None to let librbd decide)\n :type stripe_unit: int\n :param stripe_count: objects to stripe over before looping\n :type stripe_count: int\n :param data_pool: optional separate pool for data blocks\n :type data_pool: str\n :raises: :class:`ImageExists`\n :raises: :class:`TypeError`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
9600static PyMethodDef __pyx_mdef_3rbd_3RBD_3create = {"create", (PyCFunction)__pyx_pw_3rbd_3RBD_3create, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_2create};
9601static PyObject *__pyx_pw_3rbd_3RBD_3create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9602 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
9603 PyObject *__pyx_v_ioctx = 0;
9604 PyObject *__pyx_v_name = 0;
9605 PyObject *__pyx_v_size = 0;
9606 PyObject *__pyx_v_order = 0;
9607 PyObject *__pyx_v_old_format = 0;
9608 PyObject *__pyx_v_features = 0;
9609 PyObject *__pyx_v_stripe_unit = 0;
9610 PyObject *__pyx_v_stripe_count = 0;
9611 PyObject *__pyx_v_data_pool = 0;
9612 int __pyx_lineno = 0;
9613 const char *__pyx_filename = NULL((void*)0);
9614 int __pyx_clineno = 0;
9615 PyObject *__pyx_r = 0;
9616 __Pyx_RefNannyDeclarations
9617 __Pyx_RefNannySetupContext("create (wrapper)", 0);
9618 {
9619 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,&__pyx_n_s_size,&__pyx_n_s_order,&__pyx_n_s_old_format,&__pyx_n_s_features,&__pyx_n_s_stripe_unit,&__pyx_n_s_stripe_count,&__pyx_n_s_data_pool,0};
9620 PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
9621 values[4] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
9622 values[5] = ((PyObject *)((PyObject *)Py_True((PyObject *) &_Py_TrueStruct)));
9623
9624 /* "rbd.pyx":1071
9625 *
9626 * def create(self, ioctx, name, size, order=None, old_format=True,
9627 * features=None, stripe_unit=None, stripe_count=None, # <<<<<<<<<<<<<<
9628 * data_pool=None):
9629 * """
9630 */
9631 values[6] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
9632 values[7] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
9633 values[8] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
9634
9635 /* "rbd.pyx":1072
9636 * def create(self, ioctx, name, size, order=None, old_format=True,
9637 * features=None, stripe_unit=None, stripe_count=None,
9638 * data_pool=None): # <<<<<<<<<<<<<<
9639 * """
9640 * Create an rbd image.
9641 */
9642 values[9] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
9643 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
9644 Py_ssize_t kw_args;
9645 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
9646 switch (pos_args) {
9647 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9)(((PyTupleObject *)(__pyx_args))->ob_item[9]);
9648 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8)(((PyTupleObject *)(__pyx_args))->ob_item[8]);
9649 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7)(((PyTupleObject *)(__pyx_args))->ob_item[7]);
9650 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
9651 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
9652 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
9653 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
9654 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
9655 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
9656 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
9657 case 0: break;
9658 default: goto __pyx_L5_argtuple_error;
9659 }
9660 kw_args = PyDict_Size(__pyx_kwds);
9661 switch (pos_args) {
9662 case 0:
9663 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
9664 else goto __pyx_L5_argtuple_error;
9665 case 1:
9666 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
9667 else {
9668 __Pyx_RaiseArgtupleInvalid("create", 0, 4, 10, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__9668; goto __pyx_L3_error;}
9669 }
9670 case 2:
9671 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
9672 else {
9673 __Pyx_RaiseArgtupleInvalid("create", 0, 4, 10, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__9673; goto __pyx_L3_error;}
9674 }
9675 case 3:
9676 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size
)) != 0), 1)
) kw_args--;
9677 else {
9678 __Pyx_RaiseArgtupleInvalid("create", 0, 4, 10, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__9678; goto __pyx_L3_error;}
9679 }
9680 case 4:
9681 if (kw_args > 0) {
9682 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_order);
9683 if (value) { values[4] = value; kw_args--; }
9684 }
9685 case 5:
9686 if (kw_args > 0) {
9687 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old_format);
9688 if (value) { values[5] = value; kw_args--; }
9689 }
9690 case 6:
9691 if (kw_args > 0) {
9692 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features);
9693 if (value) { values[6] = value; kw_args--; }
9694 }
9695 case 7:
9696 if (kw_args > 0) {
9697 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_unit);
9698 if (value) { values[7] = value; kw_args--; }
9699 }
9700 case 8:
9701 if (kw_args > 0) {
9702 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_count);
9703 if (value) { values[8] = value; kw_args--; }
9704 }
9705 case 9:
9706 if (kw_args > 0) {
9707 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_pool);
9708 if (value) { values[9] = value; kw_args--; }
9709 }
9710 }
9711 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
9712 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "create") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__9712; goto __pyx_L3_error;}
9713 }
9714 } else {
9715 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
9716 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9)(((PyTupleObject *)(__pyx_args))->ob_item[9]);
9717 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8)(((PyTupleObject *)(__pyx_args))->ob_item[8]);
9718 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7)(((PyTupleObject *)(__pyx_args))->ob_item[7]);
9719 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
9720 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
9721 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
9722 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
9723 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
9724 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
9725 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
9726 break;
9727 default: goto __pyx_L5_argtuple_error;
9728 }
9729 }
9730 __pyx_v_self = values[0];
9731 __pyx_v_ioctx = values[1];
9732 __pyx_v_name = values[2];
9733 __pyx_v_size = values[3];
9734 __pyx_v_order = values[4];
9735 __pyx_v_old_format = values[5];
9736 __pyx_v_features = values[6];
9737 __pyx_v_stripe_unit = values[7];
9738 __pyx_v_stripe_count = values[8];
9739 __pyx_v_data_pool = values[9];
9740 }
9741 goto __pyx_L4_argument_unpacking_done;
9742 __pyx_L5_argtuple_error:;
9743 __Pyx_RaiseArgtupleInvalid("create", 0, 4, 10, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__9743; goto __pyx_L3_error;}
9744 __pyx_L3_error:;
9745 __Pyx_AddTraceback("rbd.RBD.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
9746 __Pyx_RefNannyFinishContext();
9747 return NULL((void*)0);
9748 __pyx_L4_argument_unpacking_done:;
9749 __pyx_r = __pyx_pf_3rbd_3RBD_2create(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name, __pyx_v_size, __pyx_v_order, __pyx_v_old_format, __pyx_v_features, __pyx_v_stripe_unit, __pyx_v_stripe_count, __pyx_v_data_pool);
9750
9751 /* "rbd.pyx":1070
9752 * return (major, minor, extra)
9753 *
9754 * def create(self, ioctx, name, size, order=None, old_format=True, # <<<<<<<<<<<<<<
9755 * features=None, stripe_unit=None, stripe_count=None,
9756 * data_pool=None):
9757 */
9758
9759 /* function exit code */
9760 __Pyx_RefNannyFinishContext();
9761 return __pyx_r;
9762}
9763
9764static PyObject *__pyx_pf_3rbd_3RBD_2create(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_size, PyObject *__pyx_v_order, PyObject *__pyx_v_old_format, PyObject *__pyx_v_features, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool) {
9765 rados_ioctx_t __pyx_v__ioctx;
9766 char *__pyx_v__name;
9767 uint64_t __pyx_v__size;
9768 int __pyx_v__order;
9769 rbd_image_options_t __pyx_v_opts;
9770 int __pyx_v_ret;
9771 PyObject *__pyx_r = NULL((void*)0);
9772 __Pyx_RefNannyDeclarations
9773 PyObject *__pyx_t_1 = NULL((void*)0);
9774 PyObject *__pyx_t_2 = NULL((void*)0);
9775 PyObject *__pyx_t_3 = NULL((void*)0);
9776 Py_ssize_t __pyx_t_4;
9777 PyObject *__pyx_t_5 = NULL((void*)0);
9778 rados_ioctx_t __pyx_t_6;
9779 char *__pyx_t_7;
9780 uint64_t __pyx_t_8;
9781 int __pyx_t_9;
9782 int __pyx_t_10;
9783 int __pyx_t_11;
9784 int __pyx_t_12;
9785 char const *__pyx_t_13;
9786 int __pyx_t_14;
9787 char const *__pyx_t_15;
9788 PyObject *__pyx_t_16 = NULL((void*)0);
9789 PyObject *__pyx_t_17 = NULL((void*)0);
9790 PyObject *__pyx_t_18 = NULL((void*)0);
9791 PyObject *__pyx_t_19 = NULL((void*)0);
9792 PyObject *__pyx_t_20 = NULL((void*)0);
9793 PyObject *__pyx_t_21 = NULL((void*)0);
9794 int __pyx_lineno = 0;
9795 const char *__pyx_filename = NULL((void*)0);
9796 int __pyx_clineno = 0;
9797 __Pyx_RefNannySetupContext("create", 0);
9798 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
9799 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
9800
9801 /* "rbd.pyx":1101
9802 * :raises: :class:`FunctionNotSupported`
9803 * """
9804 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
9805 * data_pool = cstr(data_pool, 'data_pool', opt=True)
9806 * cdef:
9807 */
9808 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__9808; goto __pyx_L1_error;}
9809 __Pyx_GOTREF(__pyx_t_2);
9810 __pyx_t_3 = NULL((void*)0);
9811 __pyx_t_4 = 0;
9812 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
9813 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
9814 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
9815 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
9816 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
9817 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
9818 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
9819 __pyx_t_4 = 1;
9820 }
9821 }
9822 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__9822; goto __pyx_L1_error;}
9823 __Pyx_GOTREF(__pyx_t_5);
9824 if (__pyx_t_3) {
9825 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
9826 }
9827 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
9828 __Pyx_GIVEREF(__pyx_v_name);
9829 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
9830 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
9831 __Pyx_GIVEREF(__pyx_n_s_name);
9832 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
9833 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__9833; goto __pyx_L1_error;}
9834 __Pyx_GOTREF(__pyx_t_1);
9835 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
9836 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9837 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
9838 __pyx_t_1 = 0;
9839
9840 /* "rbd.pyx":1102
9841 * """
9842 * name = cstr(name, 'name')
9843 * data_pool = cstr(data_pool, 'data_pool', opt=True) # <<<<<<<<<<<<<<
9844 * cdef:
9845 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
9846 */
9847 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__9847; goto __pyx_L1_error;}
9848 __Pyx_GOTREF(__pyx_t_1);
9849 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__9849; goto __pyx_L1_error;}
9850 __Pyx_GOTREF(__pyx_t_2);
9851 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
9852 __Pyx_GIVEREF(__pyx_v_data_pool);
9853 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_data_pool
)
;
9854 __Pyx_INCREF(__pyx_n_s_data_pool)( ((PyObject*)(__pyx_n_s_data_pool))->ob_refcnt++);
9855 __Pyx_GIVEREF(__pyx_n_s_data_pool);
9856 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_data_pool
)
;
9857 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__9857; goto __pyx_L1_error;}
9858 __Pyx_GOTREF(__pyx_t_5);
9859 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__9859; goto __pyx_L1_error;}
9860 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__9860; goto __pyx_L1_error;}
9861 __Pyx_GOTREF(__pyx_t_3);
9862 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
9863 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
9864 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
9865 __Pyx_DECREF_SET(__pyx_v_data_pool, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_data_pool; __pyx_v_data_pool
= __pyx_t_3; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
9866 __pyx_t_3 = 0;
9867
9868 /* "rbd.pyx":1104
9869 * data_pool = cstr(data_pool, 'data_pool', opt=True)
9870 * cdef:
9871 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
9872 * char *_name = name
9873 * uint64_t _size = size
9874 */
9875 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__9875; goto __pyx_L1_error;}
9876 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__9876; goto __pyx_L1_error;}
9877 __pyx_v__ioctx = __pyx_t_6;
9878
9879 /* "rbd.pyx":1105
9880 * cdef:
9881 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
9882 * char *_name = name # <<<<<<<<<<<<<<
9883 * uint64_t _size = size
9884 * int _order = 0
9885 */
9886 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__9886; goto __pyx_L1_error;}
9887 __pyx_v__name = __pyx_t_7;
9888
9889 /* "rbd.pyx":1106
9890 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
9891 * char *_name = name
9892 * uint64_t _size = size # <<<<<<<<<<<<<<
9893 * int _order = 0
9894 * rbd_image_options_t opts
9895 */
9896 __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_v_size); if (unlikely((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__9896; goto __pyx_L1_error;}
9897 __pyx_v__size = __pyx_t_8;
9898
9899 /* "rbd.pyx":1107
9900 * char *_name = name
9901 * uint64_t _size = size
9902 * int _order = 0 # <<<<<<<<<<<<<<
9903 * rbd_image_options_t opts
9904 * if order is not None:
9905 */
9906 __pyx_v__order = 0;
9907
9908 /* "rbd.pyx":1109
9909 * int _order = 0
9910 * rbd_image_options_t opts
9911 * if order is not None: # <<<<<<<<<<<<<<
9912 * _order = order
9913 * if old_format:
9914 */
9915 __pyx_t_9 = (__pyx_v_order != Py_None(&_Py_NoneStruct));
9916 __pyx_t_10 = (__pyx_t_9 != 0);
9917 if (__pyx_t_10) {
9918
9919 /* "rbd.pyx":1110
9920 * rbd_image_options_t opts
9921 * if order is not None:
9922 * _order = order # <<<<<<<<<<<<<<
9923 * if old_format:
9924 * if (features or
9925 */
9926 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_order); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__9926; goto __pyx_L1_error;}
9927 __pyx_v__order = __pyx_t_11;
9928
9929 /* "rbd.pyx":1109
9930 * int _order = 0
9931 * rbd_image_options_t opts
9932 * if order is not None: # <<<<<<<<<<<<<<
9933 * _order = order
9934 * if old_format:
9935 */
9936 }
9937
9938 /* "rbd.pyx":1111
9939 * if order is not None:
9940 * _order = order
9941 * if old_format: # <<<<<<<<<<<<<<
9942 * if (features or
9943 * ((stripe_unit is not None) and stripe_unit != 0) or
9944 */
9945 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_old_format); if (unlikely(__pyx_t_10 < 0)__builtin_expect(!!(__pyx_t_10 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__9945; goto __pyx_L1_error;}
9946 if (__pyx_t_10) {
9947
9948 /* "rbd.pyx":1112
9949 * _order = order
9950 * if old_format:
9951 * if (features or # <<<<<<<<<<<<<<
9952 * ((stripe_unit is not None) and stripe_unit != 0) or
9953 * ((stripe_count is not None) and stripe_count != 0) or
9954 */
9955 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_features); if (unlikely(__pyx_t_9 < 0)__builtin_expect(!!(__pyx_t_9 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__9955; goto __pyx_L1_error;}
9956 if (!__pyx_t_9) {
9957 } else {
9958 __pyx_t_10 = __pyx_t_9;
9959 goto __pyx_L6_bool_binop_done;
9960 }
9961
9962 /* "rbd.pyx":1113
9963 * if old_format:
9964 * if (features or
9965 * ((stripe_unit is not None) and stripe_unit != 0) or # <<<<<<<<<<<<<<
9966 * ((stripe_count is not None) and stripe_count != 0) or
9967 * data_pool):
9968 */
9969 __pyx_t_9 = (__pyx_v_stripe_unit != Py_None(&_Py_NoneStruct));
9970 __pyx_t_12 = (__pyx_t_9 != 0);
9971 if (!__pyx_t_12) {
9972 goto __pyx_L8_next_or;
9973 } else {
9974 }
9975 __pyx_t_3 = PyObject_RichCompare(__pyx_v_stripe_unit, __pyx_int_0, Py_NE3); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__9975; goto __pyx_L1_error;}
9976 __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)__builtin_expect(!!(__pyx_t_12 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__9976; goto __pyx_L1_error;}
9977 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
9978 if (!__pyx_t_12) {
9979 } else {
9980 __pyx_t_10 = __pyx_t_12;
9981 goto __pyx_L6_bool_binop_done;
9982 }
9983 __pyx_L8_next_or:;
9984
9985 /* "rbd.pyx":1114
9986 * if (features or
9987 * ((stripe_unit is not None) and stripe_unit != 0) or
9988 * ((stripe_count is not None) and stripe_count != 0) or # <<<<<<<<<<<<<<
9989 * data_pool):
9990 * raise InvalidArgument('format 1 images do not support feature '
9991 */
9992 __pyx_t_12 = (__pyx_v_stripe_count != Py_None(&_Py_NoneStruct));
9993 __pyx_t_9 = (__pyx_t_12 != 0);
9994 if (!__pyx_t_9) {
9995 goto __pyx_L10_next_or;
9996 } else {
9997 }
9998 __pyx_t_3 = PyObject_RichCompare(__pyx_v_stripe_count, __pyx_int_0, Py_NE3); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__9998; goto __pyx_L1_error;}
9999 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)__builtin_expect(!!(__pyx_t_9 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__9999; goto __pyx_L1_error;}
10000 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10001 if (!__pyx_t_9) {
10002 } else {
10003 __pyx_t_10 = __pyx_t_9;
10004 goto __pyx_L6_bool_binop_done;
10005 }
10006 __pyx_L10_next_or:;
10007
10008 /* "rbd.pyx":1115
10009 * ((stripe_unit is not None) and stripe_unit != 0) or
10010 * ((stripe_count is not None) and stripe_count != 0) or
10011 * data_pool): # <<<<<<<<<<<<<<
10012 * raise InvalidArgument('format 1 images do not support feature '
10013 * 'masks, non-default striping, nor data '
10014 */
10015 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_data_pool); if (unlikely(__pyx_t_9 < 0)__builtin_expect(!!(__pyx_t_9 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__10015; goto __pyx_L1_error;}
10016 __pyx_t_10 = __pyx_t_9;
10017 __pyx_L6_bool_binop_done:;
10018
10019 /* "rbd.pyx":1112
10020 * _order = order
10021 * if old_format:
10022 * if (features or # <<<<<<<<<<<<<<
10023 * ((stripe_unit is not None) and stripe_unit != 0) or
10024 * ((stripe_count is not None) and stripe_count != 0) or
10025 */
10026 if (__pyx_t_10) {
10027
10028 /* "rbd.pyx":1116
10029 * ((stripe_count is not None) and stripe_count != 0) or
10030 * data_pool):
10031 * raise InvalidArgument('format 1 images do not support feature ' # <<<<<<<<<<<<<<
10032 * 'masks, non-default striping, nor data '
10033 * 'pool')
10034 */
10035 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__10035; goto __pyx_L1_error;}
10036 __Pyx_GOTREF(__pyx_t_3);
10037 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__10037; goto __pyx_L1_error;}
10038 __Pyx_GOTREF(__pyx_t_5);
10039 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10040 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
10041 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10042 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__10042; goto __pyx_L1_error;}
10043
10044 /* "rbd.pyx":1112
10045 * _order = order
10046 * if old_format:
10047 * if (features or # <<<<<<<<<<<<<<
10048 * ((stripe_unit is not None) and stripe_unit != 0) or
10049 * ((stripe_count is not None) and stripe_count != 0) or
10050 */
10051 }
10052
10053 /* "rbd.pyx":1119
10054 * 'masks, non-default striping, nor data '
10055 * 'pool')
10056 * with nogil: # <<<<<<<<<<<<<<
10057 * ret = rbd_create(_ioctx, _name, _size, &_order)
10058 * else:
10059 */
10060 {
10061 #ifdef WITH_THREAD1
10062 PyThreadState *_save;
10063 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
10064 #endif
10065 /*try:*/ {
10066
10067 /* "rbd.pyx":1120
10068 * 'pool')
10069 * with nogil:
10070 * ret = rbd_create(_ioctx, _name, _size, &_order) # <<<<<<<<<<<<<<
10071 * else:
10072 * rbd_image_options_create(&opts)
10073 */
10074 __pyx_v_ret = rbd_create(__pyx_v__ioctx, __pyx_v__name, __pyx_v__size, (&__pyx_v__order));
10075 }
10076
10077 /* "rbd.pyx":1119
10078 * 'masks, non-default striping, nor data '
10079 * 'pool')
10080 * with nogil: # <<<<<<<<<<<<<<
10081 * ret = rbd_create(_ioctx, _name, _size, &_order)
10082 * else:
10083 */
10084 /*finally:*/ {
10085 /*normal exit:*/{
10086 #ifdef WITH_THREAD1
10087 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
10088 #endif
10089 goto __pyx_L14;
10090 }
10091 __pyx_L14:;
10092 }
10093 }
10094
10095 /* "rbd.pyx":1111
10096 * if order is not None:
10097 * _order = order
10098 * if old_format: # <<<<<<<<<<<<<<
10099 * if (features or
10100 * ((stripe_unit is not None) and stripe_unit != 0) or
10101 */
10102 goto __pyx_L4;
10103 }
10104
10105 /* "rbd.pyx":1122
10106 * ret = rbd_create(_ioctx, _name, _size, &_order)
10107 * else:
10108 * rbd_image_options_create(&opts) # <<<<<<<<<<<<<<
10109 * try:
10110 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT,
10111 */
10112 /*else*/ {
10113 rbd_image_options_create((&__pyx_v_opts));
10114
10115 /* "rbd.pyx":1123
10116 * else:
10117 * rbd_image_options_create(&opts)
10118 * try: # <<<<<<<<<<<<<<
10119 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT,
10120 * 1 if old_format else 2)
10121 */
10122 /*try:*/ {
10123
10124 /* "rbd.pyx":1124
10125 * rbd_image_options_create(&opts)
10126 * try:
10127 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT, # <<<<<<<<<<<<<<
10128 * 1 if old_format else 2)
10129 * if features is not None:
10130 */
10131 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_FORMAT); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__10131; goto __pyx_L16_error;}
10132 __Pyx_GOTREF(__pyx_t_5);
10133 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__10133; goto __pyx_L16_error;}
10134 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10135
10136 /* "rbd.pyx":1125
10137 * try:
10138 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT,
10139 * 1 if old_format else 2) # <<<<<<<<<<<<<<
10140 * if features is not None:
10141 * rbd_image_options_set_uint64(opts,
10142 */
10143 __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_old_format); if (unlikely(__pyx_t_10 < 0)__builtin_expect(!!(__pyx_t_10 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__10143; goto __pyx_L16_error;}
10144 if (__pyx_t_10) {
10145 __pyx_t_8 = 1;
10146 } else {
10147 __pyx_t_8 = 2;
10148 }
10149
10150 /* "rbd.pyx":1124
10151 * rbd_image_options_create(&opts)
10152 * try:
10153 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT, # <<<<<<<<<<<<<<
10154 * 1 if old_format else 2)
10155 * if features is not None:
10156 */
10157 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_11, __pyx_t_8);
10158
10159 /* "rbd.pyx":1126
10160 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT,
10161 * 1 if old_format else 2)
10162 * if features is not None: # <<<<<<<<<<<<<<
10163 * rbd_image_options_set_uint64(opts,
10164 * RBD_IMAGE_OPTION_FEATURES,
10165 */
10166 __pyx_t_10 = (__pyx_v_features != Py_None(&_Py_NoneStruct));
10167 __pyx_t_9 = (__pyx_t_10 != 0);
10168 if (__pyx_t_9) {
10169
10170 /* "rbd.pyx":1128
10171 * if features is not None:
10172 * rbd_image_options_set_uint64(opts,
10173 * RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
10174 * features)
10175 * if order is not None:
10176 */
10177 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_FEATURES); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__10177; goto __pyx_L16_error;}
10178 __Pyx_GOTREF(__pyx_t_5);
10179 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__10179; goto __pyx_L16_error;}
10180 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10181
10182 /* "rbd.pyx":1129
10183 * rbd_image_options_set_uint64(opts,
10184 * RBD_IMAGE_OPTION_FEATURES,
10185 * features) # <<<<<<<<<<<<<<
10186 * if order is not None:
10187 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
10188 */
10189 __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_v_features); if (unlikely((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__10189; goto __pyx_L16_error;}
10190
10191 /* "rbd.pyx":1127
10192 * 1 if old_format else 2)
10193 * if features is not None:
10194 * rbd_image_options_set_uint64(opts, # <<<<<<<<<<<<<<
10195 * RBD_IMAGE_OPTION_FEATURES,
10196 * features)
10197 */
10198 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_11, __pyx_t_8);
10199
10200 /* "rbd.pyx":1126
10201 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FORMAT,
10202 * 1 if old_format else 2)
10203 * if features is not None: # <<<<<<<<<<<<<<
10204 * rbd_image_options_set_uint64(opts,
10205 * RBD_IMAGE_OPTION_FEATURES,
10206 */
10207 }
10208
10209 /* "rbd.pyx":1130
10210 * RBD_IMAGE_OPTION_FEATURES,
10211 * features)
10212 * if order is not None: # <<<<<<<<<<<<<<
10213 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
10214 * _order)
10215 */
10216 __pyx_t_9 = (__pyx_v_order != Py_None(&_Py_NoneStruct));
10217 __pyx_t_10 = (__pyx_t_9 != 0);
10218 if (__pyx_t_10) {
10219
10220 /* "rbd.pyx":1131
10221 * features)
10222 * if order is not None:
10223 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
10224 * _order)
10225 * if stripe_unit is not None:
10226 */
10227 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_ORDER); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__10227; goto __pyx_L16_error;}
10228 __Pyx_GOTREF(__pyx_t_5);
10229 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__10229; goto __pyx_L16_error;}
10230 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10231
10232 /* "rbd.pyx":1132
10233 * if order is not None:
10234 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
10235 * _order) # <<<<<<<<<<<<<<
10236 * if stripe_unit is not None:
10237 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
10238 */
10239 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_11, __pyx_v__order);
10240
10241 /* "rbd.pyx":1130
10242 * RBD_IMAGE_OPTION_FEATURES,
10243 * features)
10244 * if order is not None: # <<<<<<<<<<<<<<
10245 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
10246 * _order)
10247 */
10248 }
10249
10250 /* "rbd.pyx":1133
10251 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
10252 * _order)
10253 * if stripe_unit is not None: # <<<<<<<<<<<<<<
10254 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
10255 * stripe_unit)
10256 */
10257 __pyx_t_10 = (__pyx_v_stripe_unit != Py_None(&_Py_NoneStruct));
10258 __pyx_t_9 = (__pyx_t_10 != 0);
10259 if (__pyx_t_9) {
10260
10261 /* "rbd.pyx":1134
10262 * _order)
10263 * if stripe_unit is not None:
10264 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
10265 * stripe_unit)
10266 * if stripe_count is not None:
10267 */
10268 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__10268; goto __pyx_L16_error;}
10269 __Pyx_GOTREF(__pyx_t_5);
10270 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__10270; goto __pyx_L16_error;}
10271 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10272
10273 /* "rbd.pyx":1135
10274 * if stripe_unit is not None:
10275 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
10276 * stripe_unit) # <<<<<<<<<<<<<<
10277 * if stripe_count is not None:
10278 * rbd_image_options_set_uint64(opts,
10279 */
10280 __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_unit); if (unlikely((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__10280; goto __pyx_L16_error;}
10281
10282 /* "rbd.pyx":1134
10283 * _order)
10284 * if stripe_unit is not None:
10285 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
10286 * stripe_unit)
10287 * if stripe_count is not None:
10288 */
10289 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_11, __pyx_t_8);
10290
10291 /* "rbd.pyx":1133
10292 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
10293 * _order)
10294 * if stripe_unit is not None: # <<<<<<<<<<<<<<
10295 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
10296 * stripe_unit)
10297 */
10298 }
10299
10300 /* "rbd.pyx":1136
10301 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
10302 * stripe_unit)
10303 * if stripe_count is not None: # <<<<<<<<<<<<<<
10304 * rbd_image_options_set_uint64(opts,
10305 * RBD_IMAGE_OPTION_STRIPE_COUNT,
10306 */
10307 __pyx_t_9 = (__pyx_v_stripe_count != Py_None(&_Py_NoneStruct));
10308 __pyx_t_10 = (__pyx_t_9 != 0);
10309 if (__pyx_t_10) {
10310
10311 /* "rbd.pyx":1138
10312 * if stripe_count is not None:
10313 * rbd_image_options_set_uint64(opts,
10314 * RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
10315 * stripe_count)
10316 * if data_pool is not None:
10317 */
10318 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__10318; goto __pyx_L16_error;}
10319 __Pyx_GOTREF(__pyx_t_5);
10320 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__10320; goto __pyx_L16_error;}
10321 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10322
10323 /* "rbd.pyx":1139
10324 * rbd_image_options_set_uint64(opts,
10325 * RBD_IMAGE_OPTION_STRIPE_COUNT,
10326 * stripe_count) # <<<<<<<<<<<<<<
10327 * if data_pool is not None:
10328 * rbd_image_options_set_string(opts,
10329 */
10330 __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_count); if (unlikely((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__10330; goto __pyx_L16_error;}
10331
10332 /* "rbd.pyx":1137
10333 * stripe_unit)
10334 * if stripe_count is not None:
10335 * rbd_image_options_set_uint64(opts, # <<<<<<<<<<<<<<
10336 * RBD_IMAGE_OPTION_STRIPE_COUNT,
10337 * stripe_count)
10338 */
10339 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_11, __pyx_t_8);
10340
10341 /* "rbd.pyx":1136
10342 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
10343 * stripe_unit)
10344 * if stripe_count is not None: # <<<<<<<<<<<<<<
10345 * rbd_image_options_set_uint64(opts,
10346 * RBD_IMAGE_OPTION_STRIPE_COUNT,
10347 */
10348 }
10349
10350 /* "rbd.pyx":1140
10351 * RBD_IMAGE_OPTION_STRIPE_COUNT,
10352 * stripe_count)
10353 * if data_pool is not None: # <<<<<<<<<<<<<<
10354 * rbd_image_options_set_string(opts,
10355 * RBD_IMAGE_OPTION_DATA_POOL,
10356 */
10357 __pyx_t_10 = (__pyx_v_data_pool != Py_None(&_Py_NoneStruct));
10358 __pyx_t_9 = (__pyx_t_10 != 0);
10359 if (__pyx_t_9) {
10360
10361 /* "rbd.pyx":1142
10362 * if data_pool is not None:
10363 * rbd_image_options_set_string(opts,
10364 * RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
10365 * data_pool)
10366 * with nogil:
10367 */
10368 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__10368; goto __pyx_L16_error;}
10369 __Pyx_GOTREF(__pyx_t_5);
10370 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__10370; goto __pyx_L16_error;}
10371 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10372
10373 /* "rbd.pyx":1143
10374 * rbd_image_options_set_string(opts,
10375 * RBD_IMAGE_OPTION_DATA_POOL,
10376 * data_pool) # <<<<<<<<<<<<<<
10377 * with nogil:
10378 * ret = rbd_create4(_ioctx, _name, _size, opts)
10379 */
10380 __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_v_data_pool); if (unlikely((!__pyx_t_13) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_13) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__10380; goto __pyx_L16_error;}
10381
10382 /* "rbd.pyx":1141
10383 * stripe_count)
10384 * if data_pool is not None:
10385 * rbd_image_options_set_string(opts, # <<<<<<<<<<<<<<
10386 * RBD_IMAGE_OPTION_DATA_POOL,
10387 * data_pool)
10388 */
10389 rbd_image_options_set_string(__pyx_v_opts, __pyx_t_11, __pyx_t_13);
10390
10391 /* "rbd.pyx":1140
10392 * RBD_IMAGE_OPTION_STRIPE_COUNT,
10393 * stripe_count)
10394 * if data_pool is not None: # <<<<<<<<<<<<<<
10395 * rbd_image_options_set_string(opts,
10396 * RBD_IMAGE_OPTION_DATA_POOL,
10397 */
10398 }
10399
10400 /* "rbd.pyx":1144
10401 * RBD_IMAGE_OPTION_DATA_POOL,
10402 * data_pool)
10403 * with nogil: # <<<<<<<<<<<<<<
10404 * ret = rbd_create4(_ioctx, _name, _size, opts)
10405 * finally:
10406 */
10407 {
10408 #ifdef WITH_THREAD1
10409 PyThreadState *_save;
10410 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
10411 #endif
10412 /*try:*/ {
10413
10414 /* "rbd.pyx":1145
10415 * data_pool)
10416 * with nogil:
10417 * ret = rbd_create4(_ioctx, _name, _size, opts) # <<<<<<<<<<<<<<
10418 * finally:
10419 * rbd_image_options_destroy(opts)
10420 */
10421 __pyx_v_ret = rbd_create4(__pyx_v__ioctx, __pyx_v__name, __pyx_v__size, __pyx_v_opts);
10422 }
10423
10424 /* "rbd.pyx":1144
10425 * RBD_IMAGE_OPTION_DATA_POOL,
10426 * data_pool)
10427 * with nogil: # <<<<<<<<<<<<<<
10428 * ret = rbd_create4(_ioctx, _name, _size, opts)
10429 * finally:
10430 */
10431 /*finally:*/ {
10432 /*normal exit:*/{
10433 #ifdef WITH_THREAD1
10434 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
10435 #endif
10436 goto __pyx_L25;
10437 }
10438 __pyx_L25:;
10439 }
10440 }
10441 }
10442
10443 /* "rbd.pyx":1147
10444 * ret = rbd_create4(_ioctx, _name, _size, opts)
10445 * finally:
10446 * rbd_image_options_destroy(opts) # <<<<<<<<<<<<<<
10447 * if ret < 0:
10448 * raise make_ex(ret, 'error creating image')
10449 */
10450 /*finally:*/ {
10451 /*normal exit:*/{
10452 rbd_image_options_destroy(__pyx_v_opts);
10453 goto __pyx_L17;
10454 }
10455 /*exception exit:*/{
10456 __pyx_L16_error:;
10457 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
10458 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
10459 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
10460 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
10461 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
10462 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
10463 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_16, &
__pyx_t_17, &__pyx_t_18) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
10464 __Pyx_XGOTREF(__pyx_t_16);
10465 __Pyx_XGOTREF(__pyx_t_17);
10466 __Pyx_XGOTREF(__pyx_t_18);
10467 __Pyx_XGOTREF(__pyx_t_19);
10468 __Pyx_XGOTREF(__pyx_t_20);
10469 __Pyx_XGOTREF(__pyx_t_21);
10470 __pyx_t_11 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
10471 {
10472 rbd_image_options_destroy(__pyx_v_opts);
10473 }
10474 if (PY_MAJOR_VERSION2 >= 3) {
10475 __Pyx_XGIVEREF(__pyx_t_19);
10476 __Pyx_XGIVEREF(__pyx_t_20);
10477 __Pyx_XGIVEREF(__pyx_t_21);
10478 __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
10479 }
10480 __Pyx_XGIVEREF(__pyx_t_16);
10481 __Pyx_XGIVEREF(__pyx_t_17);
10482 __Pyx_XGIVEREF(__pyx_t_18);
10483 __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
10484 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
10485 __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
10486 goto __pyx_L1_error;
10487 }
10488 __pyx_L17:;
10489 }
10490 }
10491 __pyx_L4:;
10492
10493 /* "rbd.pyx":1148
10494 * finally:
10495 * rbd_image_options_destroy(opts)
10496 * if ret < 0: # <<<<<<<<<<<<<<
10497 * raise make_ex(ret, 'error creating image')
10498 *
10499 */
10500 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
10501 if (__pyx_t_9) {
10502
10503 /* "rbd.pyx":1149
10504 * rbd_image_options_destroy(opts)
10505 * if ret < 0:
10506 * raise make_ex(ret, 'error creating image') # <<<<<<<<<<<<<<
10507 *
10508 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name,
10509 */
10510 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__10510; goto __pyx_L1_error;}
10511 __Pyx_GOTREF(__pyx_t_5);
10512 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_5, __pyx_kp_s_error_creating_image, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__10512; goto __pyx_L1_error;}
10513 __Pyx_GOTREF(__pyx_t_3);
10514 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10515 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
10516 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10517 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__10517; goto __pyx_L1_error;}
10518
10519 /* "rbd.pyx":1148
10520 * finally:
10521 * rbd_image_options_destroy(opts)
10522 * if ret < 0: # <<<<<<<<<<<<<<
10523 * raise make_ex(ret, 'error creating image')
10524 *
10525 */
10526 }
10527
10528 /* "rbd.pyx":1070
10529 * return (major, minor, extra)
10530 *
10531 * def create(self, ioctx, name, size, order=None, old_format=True, # <<<<<<<<<<<<<<
10532 * features=None, stripe_unit=None, stripe_count=None,
10533 * data_pool=None):
10534 */
10535
10536 /* function exit code */
10537 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
10538 goto __pyx_L0;
10539 __pyx_L1_error:;
10540 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
10541 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
10542 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
10543 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
10544 __Pyx_AddTraceback("rbd.RBD.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
10545 __pyx_r = NULL((void*)0);
10546 __pyx_L0:;
10547 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
10548 __Pyx_XDECREF(__pyx_v_data_pool)do { if ((__pyx_v_data_pool) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_data_pool))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_data_pool)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_data_pool
)))); } while (0); } while (0)
;
10549 __Pyx_XGIVEREF(__pyx_r);
10550 __Pyx_RefNannyFinishContext();
10551 return __pyx_r;
10552}
10553
10554/* "rbd.pyx":1151
10555 * raise make_ex(ret, 'error creating image')
10556 *
10557 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name, # <<<<<<<<<<<<<<
10558 * features=None, order=None, stripe_unit=None, stripe_count=None,
10559 * data_pool=None):
10560 */
10561
10562/* Python wrapper */
10563static PyObject *__pyx_pw_3rbd_3RBD_5clone(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10564static char __pyx_doc_3rbd_3RBD_4clone[] = "RBD.clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name, features=None, order=None, stripe_unit=None, stripe_count=None, data_pool=None)\n\n Clone a parent rbd snapshot into a COW sparse child.\n\n :param p_ioctx: the parent context that represents the parent snap\n :type ioctx: :class:`rados.Ioctx`\n :param p_name: the parent image name\n :type name: str\n :param p_snapname: the parent image snapshot name\n :type name: str\n :param c_ioctx: the child context that represents the new clone\n :type ioctx: :class:`rados.Ioctx`\n :param c_name: the clone (child) name\n :type name: str\n :param features: bitmask of features to enable; if set, must include layering\n :type features: int\n :param order: the image is split into (2**order) byte objects\n :type order: int\n :param stripe_unit: stripe unit in bytes (default None to let librbd decide)\n :type stripe_unit: int\n :param stripe_count: objects to stripe over before looping\n :type stripe_count: int\n :param data_pool: optional separate pool for data blocks\n :type data_pool: str\n :raises: :class:`TypeError`\n :raises: :class:`InvalidArgument`\n :raises: :class:`ImageExists`\n :raises: :class:`FunctionNotSupported`\n :raises: :class:`ArgumentOutOfRange`\n ";
10565static PyMethodDef __pyx_mdef_3rbd_3RBD_5clone = {"clone", (PyCFunction)__pyx_pw_3rbd_3RBD_5clone, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_4clone};
10566static PyObject *__pyx_pw_3rbd_3RBD_5clone(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10567 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
10568 PyObject *__pyx_v_p_ioctx = 0;
10569 PyObject *__pyx_v_p_name = 0;
10570 PyObject *__pyx_v_p_snapname = 0;
10571 PyObject *__pyx_v_c_ioctx = 0;
10572 PyObject *__pyx_v_c_name = 0;
10573 PyObject *__pyx_v_features = 0;
10574 PyObject *__pyx_v_order = 0;
10575 PyObject *__pyx_v_stripe_unit = 0;
10576 PyObject *__pyx_v_stripe_count = 0;
10577 PyObject *__pyx_v_data_pool = 0;
10578 int __pyx_lineno = 0;
10579 const char *__pyx_filename = NULL((void*)0);
10580 int __pyx_clineno = 0;
10581 PyObject *__pyx_r = 0;
10582 __Pyx_RefNannyDeclarations
10583 __Pyx_RefNannySetupContext("clone (wrapper)", 0);
10584 {
10585 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_p_ioctx,&__pyx_n_s_p_name,&__pyx_n_s_p_snapname,&__pyx_n_s_c_ioctx,&__pyx_n_s_c_name,&__pyx_n_s_features,&__pyx_n_s_order,&__pyx_n_s_stripe_unit,&__pyx_n_s_stripe_count,&__pyx_n_s_data_pool,0};
10586 PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0};
10587
10588 /* "rbd.pyx":1152
10589 *
10590 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name,
10591 * features=None, order=None, stripe_unit=None, stripe_count=None, # <<<<<<<<<<<<<<
10592 * data_pool=None):
10593 * """
10594 */
10595 values[6] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
10596 values[7] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
10597 values[8] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
10598 values[9] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
10599
10600 /* "rbd.pyx":1153
10601 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name,
10602 * features=None, order=None, stripe_unit=None, stripe_count=None,
10603 * data_pool=None): # <<<<<<<<<<<<<<
10604 * """
10605 * Clone a parent rbd snapshot into a COW sparse child.
10606 */
10607 values[10] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
10608 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
10609 Py_ssize_t kw_args;
10610 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
10611 switch (pos_args) {
10612 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10)(((PyTupleObject *)(__pyx_args))->ob_item[10]);
10613 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9)(((PyTupleObject *)(__pyx_args))->ob_item[9]);
10614 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8)(((PyTupleObject *)(__pyx_args))->ob_item[8]);
10615 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7)(((PyTupleObject *)(__pyx_args))->ob_item[7]);
10616 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
10617 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
10618 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
10619 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
10620 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
10621 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
10622 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
10623 case 0: break;
10624 default: goto __pyx_L5_argtuple_error;
10625 }
10626 kw_args = PyDict_Size(__pyx_kwds);
10627 switch (pos_args) {
10628 case 0:
10629 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
10630 else goto __pyx_L5_argtuple_error;
10631 case 1:
10632 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p_ioctx
)) != 0), 1)
) kw_args--;
10633 else {
10634 __Pyx_RaiseArgtupleInvalid("clone", 0, 6, 11, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10634; goto __pyx_L3_error;}
10635 }
10636 case 2:
10637 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p_name
)) != 0), 1)
) kw_args--;
10638 else {
10639 __Pyx_RaiseArgtupleInvalid("clone", 0, 6, 11, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10639; goto __pyx_L3_error;}
10640 }
10641 case 3:
10642 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p_snapname)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p_snapname
)) != 0), 1)
) kw_args--;
10643 else {
10644 __Pyx_RaiseArgtupleInvalid("clone", 0, 6, 11, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10644; goto __pyx_L3_error;}
10645 }
10646 case 4:
10647 if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c_ioctx)) != 0)__builtin_expect(!!((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c_ioctx
)) != 0), 1)
) kw_args--;
10648 else {
10649 __Pyx_RaiseArgtupleInvalid("clone", 0, 6, 11, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10649; goto __pyx_L3_error;}
10650 }
10651 case 5:
10652 if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c_name)) != 0)__builtin_expect(!!((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c_name
)) != 0), 1)
) kw_args--;
10653 else {
10654 __Pyx_RaiseArgtupleInvalid("clone", 0, 6, 11, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10654; goto __pyx_L3_error;}
10655 }
10656 case 6:
10657 if (kw_args > 0) {
10658 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features);
10659 if (value) { values[6] = value; kw_args--; }
10660 }
10661 case 7:
10662 if (kw_args > 0) {
10663 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_order);
10664 if (value) { values[7] = value; kw_args--; }
10665 }
10666 case 8:
10667 if (kw_args > 0) {
10668 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_unit);
10669 if (value) { values[8] = value; kw_args--; }
10670 }
10671 case 9:
10672 if (kw_args > 0) {
10673 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_count);
10674 if (value) { values[9] = value; kw_args--; }
10675 }
10676 case 10:
10677 if (kw_args > 0) {
10678 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_pool);
10679 if (value) { values[10] = value; kw_args--; }
10680 }
10681 }
10682 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
10683 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clone") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "clone") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10683; goto __pyx_L3_error;}
10684 }
10685 } else {
10686 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
10687 case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10)(((PyTupleObject *)(__pyx_args))->ob_item[10]);
10688 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9)(((PyTupleObject *)(__pyx_args))->ob_item[9]);
10689 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8)(((PyTupleObject *)(__pyx_args))->ob_item[8]);
10690 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7)(((PyTupleObject *)(__pyx_args))->ob_item[7]);
10691 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
10692 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
10693 values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
10694 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
10695 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
10696 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
10697 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
10698 break;
10699 default: goto __pyx_L5_argtuple_error;
10700 }
10701 }
10702 __pyx_v_self = values[0];
10703 __pyx_v_p_ioctx = values[1];
10704 __pyx_v_p_name = values[2];
10705 __pyx_v_p_snapname = values[3];
10706 __pyx_v_c_ioctx = values[4];
10707 __pyx_v_c_name = values[5];
10708 __pyx_v_features = values[6];
10709 __pyx_v_order = values[7];
10710 __pyx_v_stripe_unit = values[8];
10711 __pyx_v_stripe_count = values[9];
10712 __pyx_v_data_pool = values[10];
10713 }
10714 goto __pyx_L4_argument_unpacking_done;
10715 __pyx_L5_argtuple_error:;
10716 __Pyx_RaiseArgtupleInvalid("clone", 0, 6, 11, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__10716; goto __pyx_L3_error;}
10717 __pyx_L3_error:;
10718 __Pyx_AddTraceback("rbd.RBD.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
10719 __Pyx_RefNannyFinishContext();
10720 return NULL((void*)0);
10721 __pyx_L4_argument_unpacking_done:;
10722 __pyx_r = __pyx_pf_3rbd_3RBD_4clone(__pyx_self, __pyx_v_self, __pyx_v_p_ioctx, __pyx_v_p_name, __pyx_v_p_snapname, __pyx_v_c_ioctx, __pyx_v_c_name, __pyx_v_features, __pyx_v_order, __pyx_v_stripe_unit, __pyx_v_stripe_count, __pyx_v_data_pool);
10723
10724 /* "rbd.pyx":1151
10725 * raise make_ex(ret, 'error creating image')
10726 *
10727 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name, # <<<<<<<<<<<<<<
10728 * features=None, order=None, stripe_unit=None, stripe_count=None,
10729 * data_pool=None):
10730 */
10731
10732 /* function exit code */
10733 __Pyx_RefNannyFinishContext();
10734 return __pyx_r;
10735}
10736
10737static PyObject *__pyx_pf_3rbd_3RBD_4clone(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_p_ioctx, PyObject *__pyx_v_p_name, PyObject *__pyx_v_p_snapname, PyObject *__pyx_v_c_ioctx, PyObject *__pyx_v_c_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool) {
10738 rados_ioctx_t __pyx_v__p_ioctx;
10739 rados_ioctx_t __pyx_v__c_ioctx;
10740 char *__pyx_v__p_name;
10741 char *__pyx_v__p_snapname;
10742 char *__pyx_v__c_name;
10743 rbd_image_options_t __pyx_v_opts;
10744 int __pyx_v_ret;
10745 PyObject *__pyx_r = NULL((void*)0);
10746 __Pyx_RefNannyDeclarations
10747 PyObject *__pyx_t_1 = NULL((void*)0);
10748 PyObject *__pyx_t_2 = NULL((void*)0);
10749 PyObject *__pyx_t_3 = NULL((void*)0);
10750 Py_ssize_t __pyx_t_4;
10751 PyObject *__pyx_t_5 = NULL((void*)0);
10752 rados_ioctx_t __pyx_t_6;
10753 char *__pyx_t_7;
10754 int __pyx_t_8;
10755 int __pyx_t_9;
10756 int __pyx_t_10;
10757 uint64_t __pyx_t_11;
10758 char const *__pyx_t_12;
10759 int __pyx_t_13;
10760 char const *__pyx_t_14;
10761 PyObject *__pyx_t_15 = NULL((void*)0);
10762 PyObject *__pyx_t_16 = NULL((void*)0);
10763 PyObject *__pyx_t_17 = NULL((void*)0);
10764 PyObject *__pyx_t_18 = NULL((void*)0);
10765 PyObject *__pyx_t_19 = NULL((void*)0);
10766 PyObject *__pyx_t_20 = NULL((void*)0);
10767 int __pyx_lineno = 0;
10768 const char *__pyx_filename = NULL((void*)0);
10769 int __pyx_clineno = 0;
10770 __Pyx_RefNannySetupContext("clone", 0);
10771 __Pyx_INCREF(__pyx_v_p_name)( ((PyObject*)(__pyx_v_p_name))->ob_refcnt++);
10772 __Pyx_INCREF(__pyx_v_p_snapname)( ((PyObject*)(__pyx_v_p_snapname))->ob_refcnt++);
10773 __Pyx_INCREF(__pyx_v_c_name)( ((PyObject*)(__pyx_v_c_name))->ob_refcnt++);
10774 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
10775
10776 /* "rbd.pyx":1183
10777 * :raises: :class:`ArgumentOutOfRange`
10778 * """
10779 * p_snapname = cstr(p_snapname, 'p_snapname') # <<<<<<<<<<<<<<
10780 * p_name = cstr(p_name, 'p_name')
10781 * c_name = cstr(c_name, 'c_name')
10782 */
10783 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__10783; goto __pyx_L1_error;}
10784 __Pyx_GOTREF(__pyx_t_2);
10785 __pyx_t_3 = NULL((void*)0);
10786 __pyx_t_4 = 0;
10787 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
10788 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
10789 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10790 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
10791 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10792 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10793 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10794 __pyx_t_4 = 1;
10795 }
10796 }
10797 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__10797; goto __pyx_L1_error;}
10798 __Pyx_GOTREF(__pyx_t_5);
10799 if (__pyx_t_3) {
10800 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10801 }
10802 __Pyx_INCREF(__pyx_v_p_snapname)( ((PyObject*)(__pyx_v_p_snapname))->ob_refcnt++);
10803 __Pyx_GIVEREF(__pyx_v_p_snapname);
10804 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_p_snapname)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_p_snapname
)
;
10805 __Pyx_INCREF(__pyx_n_s_p_snapname)( ((PyObject*)(__pyx_n_s_p_snapname))->ob_refcnt++);
10806 __Pyx_GIVEREF(__pyx_n_s_p_snapname);
10807 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_p_snapname)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_p_snapname
)
;
10808 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__10808; goto __pyx_L1_error;}
10809 __Pyx_GOTREF(__pyx_t_1);
10810 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10811 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10812 __Pyx_DECREF_SET(__pyx_v_p_snapname, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_p_snapname; __pyx_v_p_snapname
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
10813 __pyx_t_1 = 0;
10814
10815 /* "rbd.pyx":1184
10816 * """
10817 * p_snapname = cstr(p_snapname, 'p_snapname')
10818 * p_name = cstr(p_name, 'p_name') # <<<<<<<<<<<<<<
10819 * c_name = cstr(c_name, 'c_name')
10820 * data_pool = cstr(data_pool, 'data_pool', opt=True)
10821 */
10822 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__10822; goto __pyx_L1_error;}
10823 __Pyx_GOTREF(__pyx_t_2);
10824 __pyx_t_5 = NULL((void*)0);
10825 __pyx_t_4 = 0;
10826 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
10827 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
10828 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
10829 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
10830 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
10831 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10832 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10833 __pyx_t_4 = 1;
10834 }
10835 }
10836 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__10836; goto __pyx_L1_error;}
10837 __Pyx_GOTREF(__pyx_t_3);
10838 if (__pyx_t_5) {
10839 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
10840 }
10841 __Pyx_INCREF(__pyx_v_p_name)( ((PyObject*)(__pyx_v_p_name))->ob_refcnt++);
10842 __Pyx_GIVEREF(__pyx_v_p_name);
10843 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_p_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_p_name
)
;
10844 __Pyx_INCREF(__pyx_n_s_p_name)( ((PyObject*)(__pyx_n_s_p_name))->ob_refcnt++);
10845 __Pyx_GIVEREF(__pyx_n_s_p_name);
10846 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_p_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_p_name
)
;
10847 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__10847; goto __pyx_L1_error;}
10848 __Pyx_GOTREF(__pyx_t_1);
10849 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
10850 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10851 __Pyx_DECREF_SET(__pyx_v_p_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_p_name; __pyx_v_p_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
10852 __pyx_t_1 = 0;
10853
10854 /* "rbd.pyx":1185
10855 * p_snapname = cstr(p_snapname, 'p_snapname')
10856 * p_name = cstr(p_name, 'p_name')
10857 * c_name = cstr(c_name, 'c_name') # <<<<<<<<<<<<<<
10858 * data_pool = cstr(data_pool, 'data_pool', opt=True)
10859 * cdef:
10860 */
10861 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__10861; goto __pyx_L1_error;}
10862 __Pyx_GOTREF(__pyx_t_2);
10863 __pyx_t_3 = NULL((void*)0);
10864 __pyx_t_4 = 0;
10865 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
10866 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
10867 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
10868 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
10869 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
10870 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
10871 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
10872 __pyx_t_4 = 1;
10873 }
10874 }
10875 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__10875; goto __pyx_L1_error;}
10876 __Pyx_GOTREF(__pyx_t_5);
10877 if (__pyx_t_3) {
10878 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
10879 }
10880 __Pyx_INCREF(__pyx_v_c_name)( ((PyObject*)(__pyx_v_c_name))->ob_refcnt++);
10881 __Pyx_GIVEREF(__pyx_v_c_name);
10882 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_c_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_c_name
)
;
10883 __Pyx_INCREF(__pyx_n_s_c_name)( ((PyObject*)(__pyx_n_s_c_name))->ob_refcnt++);
10884 __Pyx_GIVEREF(__pyx_n_s_c_name);
10885 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_c_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_c_name
)
;
10886 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__10886; goto __pyx_L1_error;}
10887 __Pyx_GOTREF(__pyx_t_1);
10888 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10889 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10890 __Pyx_DECREF_SET(__pyx_v_c_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_c_name; __pyx_v_c_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
10891 __pyx_t_1 = 0;
10892
10893 /* "rbd.pyx":1186
10894 * p_name = cstr(p_name, 'p_name')
10895 * c_name = cstr(c_name, 'c_name')
10896 * data_pool = cstr(data_pool, 'data_pool', opt=True) # <<<<<<<<<<<<<<
10897 * cdef:
10898 * rados_ioctx_t _p_ioctx = convert_ioctx(p_ioctx)
10899 */
10900 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__10900; goto __pyx_L1_error;}
10901 __Pyx_GOTREF(__pyx_t_1);
10902 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__10902; goto __pyx_L1_error;}
10903 __Pyx_GOTREF(__pyx_t_2);
10904 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
10905 __Pyx_GIVEREF(__pyx_v_data_pool);
10906 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_data_pool
)
;
10907 __Pyx_INCREF(__pyx_n_s_data_pool)( ((PyObject*)(__pyx_n_s_data_pool))->ob_refcnt++);
10908 __Pyx_GIVEREF(__pyx_n_s_data_pool);
10909 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_data_pool
)
;
10910 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__10910; goto __pyx_L1_error;}
10911 __Pyx_GOTREF(__pyx_t_5);
10912 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__10912; goto __pyx_L1_error;}
10913 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__10913; goto __pyx_L1_error;}
10914 __Pyx_GOTREF(__pyx_t_3);
10915 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
10916 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
10917 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
10918 __Pyx_DECREF_SET(__pyx_v_data_pool, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_data_pool; __pyx_v_data_pool
= __pyx_t_3; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
10919 __pyx_t_3 = 0;
10920
10921 /* "rbd.pyx":1188
10922 * data_pool = cstr(data_pool, 'data_pool', opt=True)
10923 * cdef:
10924 * rados_ioctx_t _p_ioctx = convert_ioctx(p_ioctx) # <<<<<<<<<<<<<<
10925 * rados_ioctx_t _c_ioctx = convert_ioctx(c_ioctx)
10926 * char *_p_name = p_name
10927 */
10928 if (!(likely(((__pyx_v_p_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_p_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_p_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_p_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__10928; goto __pyx_L1_error;}
10929 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_p_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__10929; goto __pyx_L1_error;}
10930 __pyx_v__p_ioctx = __pyx_t_6;
10931
10932 /* "rbd.pyx":1189
10933 * cdef:
10934 * rados_ioctx_t _p_ioctx = convert_ioctx(p_ioctx)
10935 * rados_ioctx_t _c_ioctx = convert_ioctx(c_ioctx) # <<<<<<<<<<<<<<
10936 * char *_p_name = p_name
10937 * char *_p_snapname = p_snapname
10938 */
10939 if (!(likely(((__pyx_v_c_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_c_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_c_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_c_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__10939; goto __pyx_L1_error;}
10940 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_c_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __pyx_clineno = __LINE__10940; goto __pyx_L1_error;}
10941 __pyx_v__c_ioctx = __pyx_t_6;
10942
10943 /* "rbd.pyx":1190
10944 * rados_ioctx_t _p_ioctx = convert_ioctx(p_ioctx)
10945 * rados_ioctx_t _c_ioctx = convert_ioctx(c_ioctx)
10946 * char *_p_name = p_name # <<<<<<<<<<<<<<
10947 * char *_p_snapname = p_snapname
10948 * char *_c_name = c_name
10949 */
10950 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_p_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__10950; goto __pyx_L1_error;}
10951 __pyx_v__p_name = __pyx_t_7;
10952
10953 /* "rbd.pyx":1191
10954 * rados_ioctx_t _c_ioctx = convert_ioctx(c_ioctx)
10955 * char *_p_name = p_name
10956 * char *_p_snapname = p_snapname # <<<<<<<<<<<<<<
10957 * char *_c_name = c_name
10958 * rbd_image_options_t opts
10959 */
10960 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_p_snapname); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__10960; goto __pyx_L1_error;}
10961 __pyx_v__p_snapname = __pyx_t_7;
10962
10963 /* "rbd.pyx":1192
10964 * char *_p_name = p_name
10965 * char *_p_snapname = p_snapname
10966 * char *_c_name = c_name # <<<<<<<<<<<<<<
10967 * rbd_image_options_t opts
10968 *
10969 */
10970 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_c_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__10970; goto __pyx_L1_error;}
10971 __pyx_v__c_name = __pyx_t_7;
10972
10973 /* "rbd.pyx":1195
10974 * rbd_image_options_t opts
10975 *
10976 * rbd_image_options_create(&opts) # <<<<<<<<<<<<<<
10977 * try:
10978 * if features is not None:
10979 */
10980 rbd_image_options_create((&__pyx_v_opts));
10981
10982 /* "rbd.pyx":1196
10983 *
10984 * rbd_image_options_create(&opts)
10985 * try: # <<<<<<<<<<<<<<
10986 * if features is not None:
10987 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
10988 */
10989 /*try:*/ {
10990
10991 /* "rbd.pyx":1197
10992 * rbd_image_options_create(&opts)
10993 * try:
10994 * if features is not None: # <<<<<<<<<<<<<<
10995 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
10996 * features)
10997 */
10998 __pyx_t_8 = (__pyx_v_features != Py_None(&_Py_NoneStruct));
10999 __pyx_t_9 = (__pyx_t_8 != 0);
11000 if (__pyx_t_9) {
11001
11002 /* "rbd.pyx":1198
11003 * try:
11004 * if features is not None:
11005 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
11006 * features)
11007 * if order is not None:
11008 */
11009 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_FEATURES); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__11009; goto __pyx_L4_error;}
11010 __Pyx_GOTREF(__pyx_t_3);
11011 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __pyx_clineno = __LINE__11011; goto __pyx_L4_error;}
11012 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11013
11014 /* "rbd.pyx":1199
11015 * if features is not None:
11016 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
11017 * features) # <<<<<<<<<<<<<<
11018 * if order is not None:
11019 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
11020 */
11021 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_features); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__11021; goto __pyx_L4_error;}
11022
11023 /* "rbd.pyx":1198
11024 * try:
11025 * if features is not None:
11026 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
11027 * features)
11028 * if order is not None:
11029 */
11030 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
11031
11032 /* "rbd.pyx":1197
11033 * rbd_image_options_create(&opts)
11034 * try:
11035 * if features is not None: # <<<<<<<<<<<<<<
11036 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
11037 * features)
11038 */
11039 }
11040
11041 /* "rbd.pyx":1200
11042 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
11043 * features)
11044 * if order is not None: # <<<<<<<<<<<<<<
11045 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
11046 * order)
11047 */
11048 __pyx_t_9 = (__pyx_v_order != Py_None(&_Py_NoneStruct));
11049 __pyx_t_8 = (__pyx_t_9 != 0);
11050 if (__pyx_t_8) {
11051
11052 /* "rbd.pyx":1201
11053 * features)
11054 * if order is not None:
11055 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
11056 * order)
11057 * if stripe_unit is not None:
11058 */
11059 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_ORDER); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__11059; goto __pyx_L4_error;}
11060 __Pyx_GOTREF(__pyx_t_3);
11061 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__11061; goto __pyx_L4_error;}
11062 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11063
11064 /* "rbd.pyx":1202
11065 * if order is not None:
11066 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
11067 * order) # <<<<<<<<<<<<<<
11068 * if stripe_unit is not None:
11069 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
11070 */
11071 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_order); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__11071; goto __pyx_L4_error;}
11072
11073 /* "rbd.pyx":1201
11074 * features)
11075 * if order is not None:
11076 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
11077 * order)
11078 * if stripe_unit is not None:
11079 */
11080 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
11081
11082 /* "rbd.pyx":1200
11083 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
11084 * features)
11085 * if order is not None: # <<<<<<<<<<<<<<
11086 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
11087 * order)
11088 */
11089 }
11090
11091 /* "rbd.pyx":1203
11092 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
11093 * order)
11094 * if stripe_unit is not None: # <<<<<<<<<<<<<<
11095 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
11096 * stripe_unit)
11097 */
11098 __pyx_t_8 = (__pyx_v_stripe_unit != Py_None(&_Py_NoneStruct));
11099 __pyx_t_9 = (__pyx_t_8 != 0);
11100 if (__pyx_t_9) {
11101
11102 /* "rbd.pyx":1204
11103 * order)
11104 * if stripe_unit is not None:
11105 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
11106 * stripe_unit)
11107 * if stripe_count is not None:
11108 */
11109 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__11109; goto __pyx_L4_error;}
11110 __Pyx_GOTREF(__pyx_t_3);
11111 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__11111; goto __pyx_L4_error;}
11112 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11113
11114 /* "rbd.pyx":1205
11115 * if stripe_unit is not None:
11116 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
11117 * stripe_unit) # <<<<<<<<<<<<<<
11118 * if stripe_count is not None:
11119 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
11120 */
11121 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_unit); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__11121; goto __pyx_L4_error;}
11122
11123 /* "rbd.pyx":1204
11124 * order)
11125 * if stripe_unit is not None:
11126 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
11127 * stripe_unit)
11128 * if stripe_count is not None:
11129 */
11130 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
11131
11132 /* "rbd.pyx":1203
11133 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
11134 * order)
11135 * if stripe_unit is not None: # <<<<<<<<<<<<<<
11136 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
11137 * stripe_unit)
11138 */
11139 }
11140
11141 /* "rbd.pyx":1206
11142 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
11143 * stripe_unit)
11144 * if stripe_count is not None: # <<<<<<<<<<<<<<
11145 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
11146 * stripe_count)
11147 */
11148 __pyx_t_9 = (__pyx_v_stripe_count != Py_None(&_Py_NoneStruct));
11149 __pyx_t_8 = (__pyx_t_9 != 0);
11150 if (__pyx_t_8) {
11151
11152 /* "rbd.pyx":1207
11153 * stripe_unit)
11154 * if stripe_count is not None:
11155 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
11156 * stripe_count)
11157 * if data_pool is not None:
11158 */
11159 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__11159; goto __pyx_L4_error;}
11160 __Pyx_GOTREF(__pyx_t_3);
11161 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__11161; goto __pyx_L4_error;}
11162 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11163
11164 /* "rbd.pyx":1208
11165 * if stripe_count is not None:
11166 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
11167 * stripe_count) # <<<<<<<<<<<<<<
11168 * if data_pool is not None:
11169 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
11170 */
11171 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_count); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__11171; goto __pyx_L4_error;}
11172
11173 /* "rbd.pyx":1207
11174 * stripe_unit)
11175 * if stripe_count is not None:
11176 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
11177 * stripe_count)
11178 * if data_pool is not None:
11179 */
11180 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
11181
11182 /* "rbd.pyx":1206
11183 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
11184 * stripe_unit)
11185 * if stripe_count is not None: # <<<<<<<<<<<<<<
11186 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
11187 * stripe_count)
11188 */
11189 }
11190
11191 /* "rbd.pyx":1209
11192 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
11193 * stripe_count)
11194 * if data_pool is not None: # <<<<<<<<<<<<<<
11195 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
11196 * data_pool)
11197 */
11198 __pyx_t_8 = (__pyx_v_data_pool != Py_None(&_Py_NoneStruct));
11199 __pyx_t_9 = (__pyx_t_8 != 0);
11200 if (__pyx_t_9) {
11201
11202 /* "rbd.pyx":1210
11203 * stripe_count)
11204 * if data_pool is not None:
11205 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
11206 * data_pool)
11207 * with nogil:
11208 */
11209 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__11209; goto __pyx_L4_error;}
11210 __Pyx_GOTREF(__pyx_t_3);
11211 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__11211; goto __pyx_L4_error;}
11212 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11213
11214 /* "rbd.pyx":1211
11215 * if data_pool is not None:
11216 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
11217 * data_pool) # <<<<<<<<<<<<<<
11218 * with nogil:
11219 * ret = rbd_clone3(_p_ioctx, _p_name, _p_snapname,
11220 */
11221 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_data_pool); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__11221; goto __pyx_L4_error;}
11222
11223 /* "rbd.pyx":1210
11224 * stripe_count)
11225 * if data_pool is not None:
11226 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
11227 * data_pool)
11228 * with nogil:
11229 */
11230 rbd_image_options_set_string(__pyx_v_opts, __pyx_t_10, __pyx_t_12);
11231
11232 /* "rbd.pyx":1209
11233 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
11234 * stripe_count)
11235 * if data_pool is not None: # <<<<<<<<<<<<<<
11236 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
11237 * data_pool)
11238 */
11239 }
11240
11241 /* "rbd.pyx":1212
11242 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
11243 * data_pool)
11244 * with nogil: # <<<<<<<<<<<<<<
11245 * ret = rbd_clone3(_p_ioctx, _p_name, _p_snapname,
11246 * _c_ioctx, _c_name, opts)
11247 */
11248 {
11249 #ifdef WITH_THREAD1
11250 PyThreadState *_save;
11251 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
11252 #endif
11253 /*try:*/ {
11254
11255 /* "rbd.pyx":1213
11256 * data_pool)
11257 * with nogil:
11258 * ret = rbd_clone3(_p_ioctx, _p_name, _p_snapname, # <<<<<<<<<<<<<<
11259 * _c_ioctx, _c_name, opts)
11260 * finally:
11261 */
11262 __pyx_v_ret = rbd_clone3(__pyx_v__p_ioctx, __pyx_v__p_name, __pyx_v__p_snapname, __pyx_v__c_ioctx, __pyx_v__c_name, __pyx_v_opts);
11263 }
11264
11265 /* "rbd.pyx":1212
11266 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
11267 * data_pool)
11268 * with nogil: # <<<<<<<<<<<<<<
11269 * ret = rbd_clone3(_p_ioctx, _p_name, _p_snapname,
11270 * _c_ioctx, _c_name, opts)
11271 */
11272 /*finally:*/ {
11273 /*normal exit:*/{
11274 #ifdef WITH_THREAD1
11275 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
11276 #endif
11277 goto __pyx_L13;
11278 }
11279 __pyx_L13:;
11280 }
11281 }
11282 }
11283
11284 /* "rbd.pyx":1216
11285 * _c_ioctx, _c_name, opts)
11286 * finally:
11287 * rbd_image_options_destroy(opts) # <<<<<<<<<<<<<<
11288 * if ret < 0:
11289 * raise make_ex(ret, 'error creating clone')
11290 */
11291 /*finally:*/ {
11292 /*normal exit:*/{
11293 rbd_image_options_destroy(__pyx_v_opts);
11294 goto __pyx_L5;
11295 }
11296 /*exception exit:*/{
11297 __pyx_L4_error:;
11298 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
11299 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
11300 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
11301 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
11302 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
11303 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
11304 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
11305 __Pyx_XGOTREF(__pyx_t_15);
11306 __Pyx_XGOTREF(__pyx_t_16);
11307 __Pyx_XGOTREF(__pyx_t_17);
11308 __Pyx_XGOTREF(__pyx_t_18);
11309 __Pyx_XGOTREF(__pyx_t_19);
11310 __Pyx_XGOTREF(__pyx_t_20);
11311 __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
11312 {
11313 rbd_image_options_destroy(__pyx_v_opts);
11314 }
11315 if (PY_MAJOR_VERSION2 >= 3) {
11316 __Pyx_XGIVEREF(__pyx_t_18);
11317 __Pyx_XGIVEREF(__pyx_t_19);
11318 __Pyx_XGIVEREF(__pyx_t_20);
11319 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
11320 }
11321 __Pyx_XGIVEREF(__pyx_t_15);
11322 __Pyx_XGIVEREF(__pyx_t_16);
11323 __Pyx_XGIVEREF(__pyx_t_17);
11324 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
11325 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
11326 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
11327 goto __pyx_L1_error;
11328 }
11329 __pyx_L5:;
11330 }
11331
11332 /* "rbd.pyx":1217
11333 * finally:
11334 * rbd_image_options_destroy(opts)
11335 * if ret < 0: # <<<<<<<<<<<<<<
11336 * raise make_ex(ret, 'error creating clone')
11337 *
11338 */
11339 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
11340 if (__pyx_t_9) {
11341
11342 /* "rbd.pyx":1218
11343 * rbd_image_options_destroy(opts)
11344 * if ret < 0:
11345 * raise make_ex(ret, 'error creating clone') # <<<<<<<<<<<<<<
11346 *
11347 * def list(self, ioctx):
11348 */
11349 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__11349; goto __pyx_L1_error;}
11350 __Pyx_GOTREF(__pyx_t_3);
11351 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_creating_clone, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__11351; goto __pyx_L1_error;}
11352 __Pyx_GOTREF(__pyx_t_5);
11353 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
11354 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
11355 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11356 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__11356; goto __pyx_L1_error;}
11357
11358 /* "rbd.pyx":1217
11359 * finally:
11360 * rbd_image_options_destroy(opts)
11361 * if ret < 0: # <<<<<<<<<<<<<<
11362 * raise make_ex(ret, 'error creating clone')
11363 *
11364 */
11365 }
11366
11367 /* "rbd.pyx":1151
11368 * raise make_ex(ret, 'error creating image')
11369 *
11370 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name, # <<<<<<<<<<<<<<
11371 * features=None, order=None, stripe_unit=None, stripe_count=None,
11372 * data_pool=None):
11373 */
11374
11375 /* function exit code */
11376 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
11377 goto __pyx_L0;
11378 __pyx_L1_error:;
11379 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
11380 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
11381 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
11382 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
11383 __Pyx_AddTraceback("rbd.RBD.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
11384 __pyx_r = NULL((void*)0);
11385 __pyx_L0:;
11386 __Pyx_XDECREF(__pyx_v_p_name)do { if ((__pyx_v_p_name) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_p_name))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_p_name)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_p_name)))); } while
(0); } while (0)
;
11387 __Pyx_XDECREF(__pyx_v_p_snapname)do { if ((__pyx_v_p_snapname) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_p_snapname))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_p_snapname)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_p_snapname
)))); } while (0); } while (0)
;
11388 __Pyx_XDECREF(__pyx_v_c_name)do { if ((__pyx_v_c_name) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_c_name))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_c_name)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_c_name)))); } while
(0); } while (0)
;
11389 __Pyx_XDECREF(__pyx_v_data_pool)do { if ((__pyx_v_data_pool) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_data_pool))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_data_pool)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_data_pool
)))); } while (0); } while (0)
;
11390 __Pyx_XGIVEREF(__pyx_r);
11391 __Pyx_RefNannyFinishContext();
11392 return __pyx_r;
11393}
11394
11395/* "rbd.pyx":1220
11396 * raise make_ex(ret, 'error creating clone')
11397 *
11398 * def list(self, ioctx): # <<<<<<<<<<<<<<
11399 * """
11400 * List image names.
11401 */
11402
11403/* Python wrapper */
11404static PyObject *__pyx_pw_3rbd_3RBD_7list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11405static char __pyx_doc_3rbd_3RBD_6list[] = "RBD.list(self, ioctx)\n\n List image names.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: list -- a list of image names\n ";
11406static PyMethodDef __pyx_mdef_3rbd_3RBD_7list = {"list", (PyCFunction)__pyx_pw_3rbd_3RBD_7list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_6list};
11407static PyObject *__pyx_pw_3rbd_3RBD_7list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11408 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
11409 PyObject *__pyx_v_ioctx = 0;
11410 int __pyx_lineno = 0;
11411 const char *__pyx_filename = NULL((void*)0);
11412 int __pyx_clineno = 0;
11413 PyObject *__pyx_r = 0;
11414 __Pyx_RefNannyDeclarations
11415 __Pyx_RefNannySetupContext("list (wrapper)", 0);
11416 {
11417 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
11418 PyObject* values[2] = {0,0};
11419 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
11420 Py_ssize_t kw_args;
11421 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
11422 switch (pos_args) {
11423 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
11424 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
11425 case 0: break;
11426 default: goto __pyx_L5_argtuple_error;
11427 }
11428 kw_args = PyDict_Size(__pyx_kwds);
11429 switch (pos_args) {
11430 case 0:
11431 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
11432 else goto __pyx_L5_argtuple_error;
11433 case 1:
11434 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
11435 else {
11436 __Pyx_RaiseArgtupleInvalid("list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__11436; goto __pyx_L3_error;}
11437 }
11438 }
11439 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
11440 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__11440; goto __pyx_L3_error;}
11441 }
11442 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
11443 goto __pyx_L5_argtuple_error;
11444 } else {
11445 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
11446 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
11447 }
11448 __pyx_v_self = values[0];
11449 __pyx_v_ioctx = values[1];
11450 }
11451 goto __pyx_L4_argument_unpacking_done;
11452 __pyx_L5_argtuple_error:;
11453 __Pyx_RaiseArgtupleInvalid("list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__11453; goto __pyx_L3_error;}
11454 __pyx_L3_error:;
11455 __Pyx_AddTraceback("rbd.RBD.list", __pyx_clineno, __pyx_lineno, __pyx_filename);
11456 __Pyx_RefNannyFinishContext();
11457 return NULL((void*)0);
11458 __pyx_L4_argument_unpacking_done:;
11459 __pyx_r = __pyx_pf_3rbd_3RBD_6list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
11460
11461 /* function exit code */
11462 __Pyx_RefNannyFinishContext();
11463 return __pyx_r;
11464}
11465
11466static PyObject *__pyx_pf_3rbd_3RBD_6list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
11467 rados_ioctx_t __pyx_v__ioctx;
11468 size_t __pyx_v_size;
11469 char *__pyx_v_c_names;
11470 int __pyx_v_ret;
11471 PyObject *__pyx_v_name = NULL((void*)0);
11472 PyObject *__pyx_r = NULL((void*)0);
11473 __Pyx_RefNannyDeclarations
11474 rados_ioctx_t __pyx_t_1;
11475 void *__pyx_t_2;
11476 int __pyx_t_3;
11477 PyObject *__pyx_t_4 = NULL((void*)0);
11478 PyObject *__pyx_t_5 = NULL((void*)0);
11479 PyObject *__pyx_t_6 = NULL((void*)0);
11480 Py_ssize_t __pyx_t_7;
11481 PyObject *(*__pyx_t_8)(PyObject *);
11482 PyObject *__pyx_t_9 = NULL((void*)0);
11483 PyObject *__pyx_t_10 = NULL((void*)0);
11484 PyObject *__pyx_t_11 = NULL((void*)0);
11485 int __pyx_t_12;
11486 int __pyx_t_13;
11487 char const *__pyx_t_14;
11488 PyObject *__pyx_t_15 = NULL((void*)0);
11489 PyObject *__pyx_t_16 = NULL((void*)0);
11490 PyObject *__pyx_t_17 = NULL((void*)0);
11491 PyObject *__pyx_t_18 = NULL((void*)0);
11492 PyObject *__pyx_t_19 = NULL((void*)0);
11493 PyObject *__pyx_t_20 = NULL((void*)0);
11494 int __pyx_lineno = 0;
11495 const char *__pyx_filename = NULL((void*)0);
11496 int __pyx_clineno = 0;
11497 __Pyx_RefNannySetupContext("list", 0);
11498
11499 /* "rbd.pyx":1229
11500 * """
11501 * cdef:
11502 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
11503 * size_t size = 512
11504 * char *c_names = NULL
11505 */
11506 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__11506; goto __pyx_L1_error;}
11507 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__11507; goto __pyx_L1_error;}
11508 __pyx_v__ioctx = __pyx_t_1;
11509
11510 /* "rbd.pyx":1230
11511 * cdef:
11512 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
11513 * size_t size = 512 # <<<<<<<<<<<<<<
11514 * char *c_names = NULL
11515 * try:
11516 */
11517 __pyx_v_size = 0x200;
11518
11519 /* "rbd.pyx":1231
11520 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
11521 * size_t size = 512
11522 * char *c_names = NULL # <<<<<<<<<<<<<<
11523 * try:
11524 * while True:
11525 */
11526 __pyx_v_c_names = NULL((void*)0);
11527
11528 /* "rbd.pyx":1232
11529 * size_t size = 512
11530 * char *c_names = NULL
11531 * try: # <<<<<<<<<<<<<<
11532 * while True:
11533 * c_names = <char *>realloc_chk(c_names, size)
11534 */
11535 /*try:*/ {
11536
11537 /* "rbd.pyx":1233
11538 * char *c_names = NULL
11539 * try:
11540 * while True: # <<<<<<<<<<<<<<
11541 * c_names = <char *>realloc_chk(c_names, size)
11542 * with nogil:
11543 */
11544 while (1) {
11545
11546 /* "rbd.pyx":1234
11547 * try:
11548 * while True:
11549 * c_names = <char *>realloc_chk(c_names, size) # <<<<<<<<<<<<<<
11550 * with nogil:
11551 * ret = rbd_list(_ioctx, c_names, &size)
11552 */
11553 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_names, __pyx_v_size); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__11553; goto __pyx_L4_error;}
11554 __pyx_v_c_names = ((char *)__pyx_t_2);
11555
11556 /* "rbd.pyx":1235
11557 * while True:
11558 * c_names = <char *>realloc_chk(c_names, size)
11559 * with nogil: # <<<<<<<<<<<<<<
11560 * ret = rbd_list(_ioctx, c_names, &size)
11561 * if ret >= 0:
11562 */
11563 {
11564 #ifdef WITH_THREAD1
11565 PyThreadState *_save;
11566 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
11567 #endif
11568 /*try:*/ {
11569
11570 /* "rbd.pyx":1236
11571 * c_names = <char *>realloc_chk(c_names, size)
11572 * with nogil:
11573 * ret = rbd_list(_ioctx, c_names, &size) # <<<<<<<<<<<<<<
11574 * if ret >= 0:
11575 * break
11576 */
11577 __pyx_v_ret = rbd_list(__pyx_v__ioctx, __pyx_v_c_names, (&__pyx_v_size));
11578 }
11579
11580 /* "rbd.pyx":1235
11581 * while True:
11582 * c_names = <char *>realloc_chk(c_names, size)
11583 * with nogil: # <<<<<<<<<<<<<<
11584 * ret = rbd_list(_ioctx, c_names, &size)
11585 * if ret >= 0:
11586 */
11587 /*finally:*/ {
11588 /*normal exit:*/{
11589 #ifdef WITH_THREAD1
11590 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
11591 #endif
11592 goto __pyx_L12;
11593 }
11594 __pyx_L12:;
11595 }
11596 }
11597
11598 /* "rbd.pyx":1237
11599 * with nogil:
11600 * ret = rbd_list(_ioctx, c_names, &size)
11601 * if ret >= 0: # <<<<<<<<<<<<<<
11602 * break
11603 * elif ret != -errno.ERANGE:
11604 */
11605 __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
11606 if (__pyx_t_3) {
11607
11608 /* "rbd.pyx":1238
11609 * ret = rbd_list(_ioctx, c_names, &size)
11610 * if ret >= 0:
11611 * break # <<<<<<<<<<<<<<
11612 * elif ret != -errno.ERANGE:
11613 * raise make_ex(ret, 'error listing images')
11614 */
11615 goto __pyx_L7_break;
11616
11617 /* "rbd.pyx":1237
11618 * with nogil:
11619 * ret = rbd_list(_ioctx, c_names, &size)
11620 * if ret >= 0: # <<<<<<<<<<<<<<
11621 * break
11622 * elif ret != -errno.ERANGE:
11623 */
11624 }
11625
11626 /* "rbd.pyx":1239
11627 * if ret >= 0:
11628 * break
11629 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
11630 * raise make_ex(ret, 'error listing images')
11631 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
11632 */
11633 __pyx_t_3 = ((__pyx_v_ret != (-ERANGE34)) != 0);
11634 if (__pyx_t_3) {
11635
11636 /* "rbd.pyx":1240
11637 * break
11638 * elif ret != -errno.ERANGE:
11639 * raise make_ex(ret, 'error listing images') # <<<<<<<<<<<<<<
11640 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
11641 * if name]
11642 */
11643 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__11643; goto __pyx_L4_error;}
11644 __Pyx_GOTREF(__pyx_t_4);
11645 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_images, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__11645; goto __pyx_L4_error;}
11646 __Pyx_GOTREF(__pyx_t_5);
11647 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
11648 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
11649 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
11650 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__11650; goto __pyx_L4_error;}
11651
11652 /* "rbd.pyx":1239
11653 * if ret >= 0:
11654 * break
11655 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
11656 * raise make_ex(ret, 'error listing images')
11657 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
11658 */
11659 }
11660 }
11661 __pyx_L7_break:;
11662
11663 /* "rbd.pyx":1241
11664 * elif ret != -errno.ERANGE:
11665 * raise make_ex(ret, 'error listing images')
11666 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
11667 * if name]
11668 * finally:
11669 */
11670 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
11671 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11671; goto __pyx_L4_error;}
11672 __Pyx_GOTREF(__pyx_t_5);
11673 __pyx_t_4 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_names + 0, __pyx_v_ret - 0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11673; goto __pyx_L4_error;}
11674 __Pyx_GOTREF(__pyx_t_4);
11675 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11675; goto __pyx_L4_error;}
11676 __Pyx_GOTREF(__pyx_t_6);
11677 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
11678 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11678; goto __pyx_L4_error;}
11679 __Pyx_GOTREF(__pyx_t_4);
11680 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
11681 if (likely(PyList_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_4)((((PyObject*)(__pyx_t_4))->ob_type) == &PyTuple_Type)) {
11682 __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++); __pyx_t_7 = 0;
11683 __pyx_t_8 = NULL((void*)0);
11684 } else {
11685 __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11685; goto __pyx_L4_error;}
11686 __Pyx_GOTREF(__pyx_t_6);
11687 __pyx_t_8 = Py_TYPE(__pyx_t_6)(((PyObject*)(__pyx_t_6))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11687; goto __pyx_L4_error;}
11688 }
11689 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
11690 for (;;) {
11691 if (likely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 1)) {
11692 if (likely(PyList_CheckExact(__pyx_t_6))__builtin_expect(!!(((((PyObject*)(__pyx_t_6))->ob_type) ==
&PyList_Type)), 1)
) {
11693 if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)(((PyVarObject*)(__pyx_t_6))->ob_size)) break;
11694 #if CYTHON_COMPILING_IN_CPYTHON1
11695 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7)(((PyListObject *)(__pyx_t_6))->ob_item[__pyx_t_7]); __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_7++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11695; goto __pyx_L4_error;}
11696 #else
11697 __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7)( (((PyObject*)(__pyx_t_6))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_6, __pyx_t_7) )
; __pyx_t_7++; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11697; goto __pyx_L4_error;}
11698 __Pyx_GOTREF(__pyx_t_4);
11699 #endif
11700 } else {
11701 if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)(((PyVarObject*)(__pyx_t_6))->ob_size)) break;
11702 #if CYTHON_COMPILING_IN_CPYTHON1
11703 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7)(((PyTupleObject *)(__pyx_t_6))->ob_item[__pyx_t_7]); __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_7++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11703; goto __pyx_L4_error;}
11704 #else
11705 __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7)( (((PyObject*)(__pyx_t_6))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_6, __pyx_t_7) )
; __pyx_t_7++; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11705; goto __pyx_L4_error;}
11706 __Pyx_GOTREF(__pyx_t_4);
11707 #endif
11708 }
11709 } else {
11710 __pyx_t_4 = __pyx_t_8(__pyx_t_6);
11711 if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {
11712 PyObject* exc_type = PyErr_Occurred();
11713 if (exc_type) {
11714 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
11715 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11715; goto __pyx_L4_error;}
11716 }
11717 break;
11718 }
11719 __Pyx_GOTREF(__pyx_t_4);
11720 }
11721 __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_4; do { if ((tmp) == ((void*)0)) ; else do { if ( --
((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0); } while (0); } while (
0)
;
11722 __pyx_t_4 = 0;
11723
11724 /* "rbd.pyx":1242
11725 * raise make_ex(ret, 'error listing images')
11726 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
11727 * if name] # <<<<<<<<<<<<<<
11728 * finally:
11729 * free(c_names)
11730 */
11731 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__11731; goto __pyx_L4_error;}
11732 if (__pyx_t_3) {
11733
11734 /* "rbd.pyx":1241
11735 * elif ret != -errno.ERANGE:
11736 * raise make_ex(ret, 'error listing images')
11737 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
11738 * if name]
11739 * finally:
11740 */
11741 __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11741; goto __pyx_L4_error;}
11742 __Pyx_GOTREF(__pyx_t_9);
11743 __pyx_t_10 = NULL((void*)0);
11744 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_9))__builtin_expect(!!(((__pyx_t_9)->ob_type == &PyMethod_Type
)), 0)
) {
11745 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_self);
11746 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
11747 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_func);
11748 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
11749 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
11750 __Pyx_DECREF_SET(__pyx_t_9, function)do { PyObject *tmp = (PyObject *) __pyx_t_9; __pyx_t_9 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
11751 }
11752 }
11753 if (!__pyx_t_10) {
11754 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11754; goto __pyx_L4_error;}
11755 __Pyx_GOTREF(__pyx_t_4);
11756 } else {
11757 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11757; goto __pyx_L4_error;}
11758 __Pyx_GOTREF(__pyx_t_11);
11759 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
11760 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
11761 __Pyx_GIVEREF(__pyx_v_name);
11762 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_v_name
)
;
11763 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11763; goto __pyx_L4_error;}
11764 __Pyx_GOTREF(__pyx_t_4);
11765 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
11766 }
11767 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
11768 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_5, (PyObject
*)__pyx_t_4)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__11768; goto __pyx_L4_error;}
11769 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
11770
11771 /* "rbd.pyx":1242
11772 * raise make_ex(ret, 'error listing images')
11773 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
11774 * if name] # <<<<<<<<<<<<<<
11775 * finally:
11776 * free(c_names)
11777 */
11778 }
11779
11780 /* "rbd.pyx":1241
11781 * elif ret != -errno.ERANGE:
11782 * raise make_ex(ret, 'error listing images')
11783 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
11784 * if name]
11785 * finally:
11786 */
11787 }
11788 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
11789 __pyx_r = __pyx_t_5;
11790 __pyx_t_5 = 0;
11791 goto __pyx_L3_return;
11792 }
11793
11794 /* "rbd.pyx":1244
11795 * if name]
11796 * finally:
11797 * free(c_names) # <<<<<<<<<<<<<<
11798 *
11799 * def list2(self, ioctx):
11800 */
11801 /*finally:*/ {
11802 /*exception exit:*/{
11803 __pyx_L4_error:;
11804 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
11805 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
11806 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
11807 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
11808 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
11809 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
11810 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
11811 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
11812 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
11813 __Pyx_XGOTREF(__pyx_t_15);
11814 __Pyx_XGOTREF(__pyx_t_16);
11815 __Pyx_XGOTREF(__pyx_t_17);
11816 __Pyx_XGOTREF(__pyx_t_18);
11817 __Pyx_XGOTREF(__pyx_t_19);
11818 __Pyx_XGOTREF(__pyx_t_20);
11819 __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
11820 {
11821 free(__pyx_v_c_names);
11822 }
11823 if (PY_MAJOR_VERSION2 >= 3) {
11824 __Pyx_XGIVEREF(__pyx_t_18);
11825 __Pyx_XGIVEREF(__pyx_t_19);
11826 __Pyx_XGIVEREF(__pyx_t_20);
11827 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
11828 }
11829 __Pyx_XGIVEREF(__pyx_t_15);
11830 __Pyx_XGIVEREF(__pyx_t_16);
11831 __Pyx_XGIVEREF(__pyx_t_17);
11832 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
11833 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
11834 __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
11835 goto __pyx_L1_error;
11836 }
11837 __pyx_L3_return: {
11838 __pyx_t_20 = __pyx_r;
11839 __pyx_r = 0;
11840 free(__pyx_v_c_names);
11841 __pyx_r = __pyx_t_20;
11842 __pyx_t_20 = 0;
11843 goto __pyx_L0;
11844 }
11845 }
11846
11847 /* "rbd.pyx":1220
11848 * raise make_ex(ret, 'error creating clone')
11849 *
11850 * def list(self, ioctx): # <<<<<<<<<<<<<<
11851 * """
11852 * List image names.
11853 */
11854
11855 /* function exit code */
11856 __pyx_L1_error:;
11857 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
11858 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
11859 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
11860 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
11861 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
11862 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
11863 __Pyx_AddTraceback("rbd.RBD.list", __pyx_clineno, __pyx_lineno, __pyx_filename);
11864 __pyx_r = NULL((void*)0);
11865 __pyx_L0:;
11866 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
11867 __Pyx_XGIVEREF(__pyx_r);
11868 __Pyx_RefNannyFinishContext();
11869 return __pyx_r;
11870}
11871
11872/* "rbd.pyx":1246
11873 * free(c_names)
11874 *
11875 * def list2(self, ioctx): # <<<<<<<<<<<<<<
11876 * """
11877 * Iterate over the images in the pool.
11878 */
11879
11880/* Python wrapper */
11881static PyObject *__pyx_pw_3rbd_3RBD_9list2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11882static char __pyx_doc_3rbd_3RBD_8list2[] = "RBD.list2(self, ioctx)\n\n Iterate over the images in the pool.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :returns: :class:`ImageIterator`\n ";
11883static PyMethodDef __pyx_mdef_3rbd_3RBD_9list2 = {"list2", (PyCFunction)__pyx_pw_3rbd_3RBD_9list2, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_8list2};
11884static PyObject *__pyx_pw_3rbd_3RBD_9list2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11885 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
11886 PyObject *__pyx_v_ioctx = 0;
11887 int __pyx_lineno = 0;
11888 const char *__pyx_filename = NULL((void*)0);
11889 int __pyx_clineno = 0;
11890 PyObject *__pyx_r = 0;
11891 __Pyx_RefNannyDeclarations
11892 __Pyx_RefNannySetupContext("list2 (wrapper)", 0);
11893 {
11894 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
11895 PyObject* values[2] = {0,0};
11896 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
11897 Py_ssize_t kw_args;
11898 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
11899 switch (pos_args) {
11900 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
11901 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
11902 case 0: break;
11903 default: goto __pyx_L5_argtuple_error;
11904 }
11905 kw_args = PyDict_Size(__pyx_kwds);
11906 switch (pos_args) {
11907 case 0:
11908 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
11909 else goto __pyx_L5_argtuple_error;
11910 case 1:
11911 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
11912 else {
11913 __Pyx_RaiseArgtupleInvalid("list2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__11913; goto __pyx_L3_error;}
11914 }
11915 }
11916 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
11917 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "list2") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "list2") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__11917; goto __pyx_L3_error;}
11918 }
11919 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
11920 goto __pyx_L5_argtuple_error;
11921 } else {
11922 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
11923 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
11924 }
11925 __pyx_v_self = values[0];
11926 __pyx_v_ioctx = values[1];
11927 }
11928 goto __pyx_L4_argument_unpacking_done;
11929 __pyx_L5_argtuple_error:;
11930 __Pyx_RaiseArgtupleInvalid("list2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__11930; goto __pyx_L3_error;}
11931 __pyx_L3_error:;
11932 __Pyx_AddTraceback("rbd.RBD.list2", __pyx_clineno, __pyx_lineno, __pyx_filename);
11933 __Pyx_RefNannyFinishContext();
11934 return NULL((void*)0);
11935 __pyx_L4_argument_unpacking_done:;
11936 __pyx_r = __pyx_pf_3rbd_3RBD_8list2(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
11937
11938 /* function exit code */
11939 __Pyx_RefNannyFinishContext();
11940 return __pyx_r;
11941}
11942
11943static PyObject *__pyx_pf_3rbd_3RBD_8list2(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
11944 PyObject *__pyx_r = NULL((void*)0);
11945 __Pyx_RefNannyDeclarations
11946 PyObject *__pyx_t_1 = NULL((void*)0);
11947 PyObject *__pyx_t_2 = NULL((void*)0);
11948 int __pyx_lineno = 0;
11949 const char *__pyx_filename = NULL((void*)0);
11950 int __pyx_clineno = 0;
11951 __Pyx_RefNannySetupContext("list2", 0);
11952
11953 /* "rbd.pyx":1254
11954 * :returns: :class:`ImageIterator`
11955 * """
11956 * return ImageIterator(ioctx) # <<<<<<<<<<<<<<
11957 *
11958 * def remove(self, ioctx, name, on_progress=None):
11959 */
11960 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
11961 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__11961; goto __pyx_L1_error;}
11962 __Pyx_GOTREF(__pyx_t_1);
11963 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
11964 __Pyx_GIVEREF(__pyx_v_ioctx);
11965 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
11966 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_ImageIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__11966; goto __pyx_L1_error;}
11967 __Pyx_GOTREF(__pyx_t_2);
11968 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
11969 __pyx_r = __pyx_t_2;
11970 __pyx_t_2 = 0;
11971 goto __pyx_L0;
11972
11973 /* "rbd.pyx":1246
11974 * free(c_names)
11975 *
11976 * def list2(self, ioctx): # <<<<<<<<<<<<<<
11977 * """
11978 * Iterate over the images in the pool.
11979 */
11980
11981 /* function exit code */
11982 __pyx_L1_error:;
11983 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
11984 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
11985 __Pyx_AddTraceback("rbd.RBD.list2", __pyx_clineno, __pyx_lineno, __pyx_filename);
11986 __pyx_r = NULL((void*)0);
11987 __pyx_L0:;
11988 __Pyx_XGIVEREF(__pyx_r);
11989 __Pyx_RefNannyFinishContext();
11990 return __pyx_r;
11991}
11992
11993/* "rbd.pyx":1256
11994 * return ImageIterator(ioctx)
11995 *
11996 * def remove(self, ioctx, name, on_progress=None): # <<<<<<<<<<<<<<
11997 * """
11998 * Delete an RBD image. This may take a long time, since it does
11999 */
12000
12001/* Python wrapper */
12002static PyObject *__pyx_pw_3rbd_3RBD_11remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12003static char __pyx_doc_3rbd_3RBD_10remove[] = "RBD.remove(self, ioctx, name, on_progress=None)\n\n Delete an RBD image. This may take a long time, since it does\n not return until every object that comprises the image has\n been deleted. Note that all snapshots must be deleted before\n the image can be removed. If there are snapshots left,\n :class:`ImageHasSnapshots` is raised. If the image is still\n open, or the watch from a crashed client has not expired,\n :class:`ImageBusy` is raised.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the image to remove\n :type name: str\n :param on_progress: optional progress callback function\n :type on_progress: callback function\n :raises: :class:`ImageNotFound`, :class:`ImageBusy`,\n :class:`ImageHasSnapshots`\n ";
12004static PyMethodDef __pyx_mdef_3rbd_3RBD_11remove = {"remove", (PyCFunction)__pyx_pw_3rbd_3RBD_11remove, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_10remove};
12005static PyObject *__pyx_pw_3rbd_3RBD_11remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12006 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
12007 PyObject *__pyx_v_ioctx = 0;
12008 PyObject *__pyx_v_name = 0;
12009 PyObject *__pyx_v_on_progress = 0;
12010 int __pyx_lineno = 0;
12011 const char *__pyx_filename = NULL((void*)0);
12012 int __pyx_clineno = 0;
12013 PyObject *__pyx_r = 0;
12014 __Pyx_RefNannyDeclarations
12015 __Pyx_RefNannySetupContext("remove (wrapper)", 0);
12016 {
12017 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,&__pyx_n_s_on_progress,0};
12018 PyObject* values[4] = {0,0,0,0};
12019 values[3] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
12020 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12021 Py_ssize_t kw_args;
12022 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12023 switch (pos_args) {
12024 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12025 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12026 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12027 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12028 case 0: break;
12029 default: goto __pyx_L5_argtuple_error;
12030 }
12031 kw_args = PyDict_Size(__pyx_kwds);
12032 switch (pos_args) {
12033 case 0:
12034 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
12035 else goto __pyx_L5_argtuple_error;
12036 case 1:
12037 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
12038 else {
12039 __Pyx_RaiseArgtupleInvalid("remove", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__12039; goto __pyx_L3_error;}
12040 }
12041 case 2:
12042 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
12043 else {
12044 __Pyx_RaiseArgtupleInvalid("remove", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__12044; goto __pyx_L3_error;}
12045 }
12046 case 3:
12047 if (kw_args > 0) {
12048 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_on_progress);
12049 if (value) { values[3] = value; kw_args--; }
12050 }
12051 }
12052 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12053 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "remove") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__12053; goto __pyx_L3_error;}
12054 }
12055 } else {
12056 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
12057 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12058 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12059 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12060 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12061 break;
12062 default: goto __pyx_L5_argtuple_error;
12063 }
12064 }
12065 __pyx_v_self = values[0];
12066 __pyx_v_ioctx = values[1];
12067 __pyx_v_name = values[2];
12068 __pyx_v_on_progress = values[3];
12069 }
12070 goto __pyx_L4_argument_unpacking_done;
12071 __pyx_L5_argtuple_error:;
12072 __Pyx_RaiseArgtupleInvalid("remove", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__12072; goto __pyx_L3_error;}
12073 __pyx_L3_error:;
12074 __Pyx_AddTraceback("rbd.RBD.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
12075 __Pyx_RefNannyFinishContext();
12076 return NULL((void*)0);
12077 __pyx_L4_argument_unpacking_done:;
12078 __pyx_r = __pyx_pf_3rbd_3RBD_10remove(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name, __pyx_v_on_progress);
12079
12080 /* function exit code */
12081 __Pyx_RefNannyFinishContext();
12082 return __pyx_r;
12083}
12084
12085static PyObject *__pyx_pf_3rbd_3RBD_10remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_on_progress) {
12086 rados_ioctx_t __pyx_v__ioctx;
12087 char *__pyx_v__name;
12088 librbd_progress_fn_t __pyx_v__prog_cb;
12089 void *__pyx_v__prog_arg;
12090 int __pyx_v_ret;
12091 PyObject *__pyx_r = NULL((void*)0);
12092 __Pyx_RefNannyDeclarations
12093 PyObject *__pyx_t_1 = NULL((void*)0);
12094 PyObject *__pyx_t_2 = NULL((void*)0);
12095 PyObject *__pyx_t_3 = NULL((void*)0);
12096 Py_ssize_t __pyx_t_4;
12097 PyObject *__pyx_t_5 = NULL((void*)0);
12098 rados_ioctx_t __pyx_t_6;
12099 char *__pyx_t_7;
12100 int __pyx_t_8;
12101 int __pyx_lineno = 0;
12102 const char *__pyx_filename = NULL((void*)0);
12103 int __pyx_clineno = 0;
12104 __Pyx_RefNannySetupContext("remove", 0);
12105 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
12106
12107 /* "rbd.pyx":1275
12108 * :class:`ImageHasSnapshots`
12109 * """
12110 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
12111 * cdef:
12112 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12113 */
12114 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__12114; goto __pyx_L1_error;}
12115 __Pyx_GOTREF(__pyx_t_2);
12116 __pyx_t_3 = NULL((void*)0);
12117 __pyx_t_4 = 0;
12118 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
12119 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
12120 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
12121 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
12122 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
12123 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
12124 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
12125 __pyx_t_4 = 1;
12126 }
12127 }
12128 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__12128; goto __pyx_L1_error;}
12129 __Pyx_GOTREF(__pyx_t_5);
12130 if (__pyx_t_3) {
12131 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
12132 }
12133 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
12134 __Pyx_GIVEREF(__pyx_v_name);
12135 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
12136 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
12137 __Pyx_GIVEREF(__pyx_n_s_name);
12138 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
12139 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__12139; goto __pyx_L1_error;}
12140 __Pyx_GOTREF(__pyx_t_1);
12141 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
12142 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12143 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
12144 __pyx_t_1 = 0;
12145
12146 /* "rbd.pyx":1277
12147 * name = cstr(name, 'name')
12148 * cdef:
12149 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
12150 * char *_name = name
12151 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
12152 */
12153 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__12153; goto __pyx_L1_error;}
12154 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__12154; goto __pyx_L1_error;}
12155 __pyx_v__ioctx = __pyx_t_6;
12156
12157 /* "rbd.pyx":1278
12158 * cdef:
12159 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12160 * char *_name = name # <<<<<<<<<<<<<<
12161 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
12162 * void *_prog_arg = NULL
12163 */
12164 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__12164; goto __pyx_L1_error;}
12165 __pyx_v__name = __pyx_t_7;
12166
12167 /* "rbd.pyx":1279
12168 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12169 * char *_name = name
12170 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
12171 * void *_prog_arg = NULL
12172 * if on_progress:
12173 */
12174 __pyx_v__prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
12175
12176 /* "rbd.pyx":1280
12177 * char *_name = name
12178 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
12179 * void *_prog_arg = NULL # <<<<<<<<<<<<<<
12180 * if on_progress:
12181 * _prog_cb = &progress_callback
12182 */
12183 __pyx_v__prog_arg = NULL((void*)0);
12184
12185 /* "rbd.pyx":1281
12186 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
12187 * void *_prog_arg = NULL
12188 * if on_progress: # <<<<<<<<<<<<<<
12189 * _prog_cb = &progress_callback
12190 * _prog_arg = <void *>on_progress
12191 */
12192 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_on_progress); if (unlikely(__pyx_t_8 < 0)__builtin_expect(!!(__pyx_t_8 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__12192; goto __pyx_L1_error;}
12193 if (__pyx_t_8) {
12194
12195 /* "rbd.pyx":1282
12196 * void *_prog_arg = NULL
12197 * if on_progress:
12198 * _prog_cb = &progress_callback # <<<<<<<<<<<<<<
12199 * _prog_arg = <void *>on_progress
12200 * with nogil:
12201 */
12202 __pyx_v__prog_cb = (&__pyx_f_3rbd_progress_callback);
12203
12204 /* "rbd.pyx":1283
12205 * if on_progress:
12206 * _prog_cb = &progress_callback
12207 * _prog_arg = <void *>on_progress # <<<<<<<<<<<<<<
12208 * with nogil:
12209 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg)
12210 */
12211 __pyx_v__prog_arg = ((void *)__pyx_v_on_progress);
12212
12213 /* "rbd.pyx":1281
12214 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
12215 * void *_prog_arg = NULL
12216 * if on_progress: # <<<<<<<<<<<<<<
12217 * _prog_cb = &progress_callback
12218 * _prog_arg = <void *>on_progress
12219 */
12220 }
12221
12222 /* "rbd.pyx":1284
12223 * _prog_cb = &progress_callback
12224 * _prog_arg = <void *>on_progress
12225 * with nogil: # <<<<<<<<<<<<<<
12226 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg)
12227 * if ret != 0:
12228 */
12229 {
12230 #ifdef WITH_THREAD1
12231 PyThreadState *_save;
12232 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
12233 #endif
12234 /*try:*/ {
12235
12236 /* "rbd.pyx":1285
12237 * _prog_arg = <void *>on_progress
12238 * with nogil:
12239 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg) # <<<<<<<<<<<<<<
12240 * if ret != 0:
12241 * raise make_ex(ret, 'error removing image')
12242 */
12243 __pyx_v_ret = rbd_remove_with_progress(__pyx_v__ioctx, __pyx_v__name, __pyx_v__prog_cb, __pyx_v__prog_arg);
12244 }
12245
12246 /* "rbd.pyx":1284
12247 * _prog_cb = &progress_callback
12248 * _prog_arg = <void *>on_progress
12249 * with nogil: # <<<<<<<<<<<<<<
12250 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg)
12251 * if ret != 0:
12252 */
12253 /*finally:*/ {
12254 /*normal exit:*/{
12255 #ifdef WITH_THREAD1
12256 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
12257 #endif
12258 goto __pyx_L6;
12259 }
12260 __pyx_L6:;
12261 }
12262 }
12263
12264 /* "rbd.pyx":1286
12265 * with nogil:
12266 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg)
12267 * if ret != 0: # <<<<<<<<<<<<<<
12268 * raise make_ex(ret, 'error removing image')
12269 *
12270 */
12271 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
12272 if (__pyx_t_8) {
12273
12274 /* "rbd.pyx":1287
12275 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg)
12276 * if ret != 0:
12277 * raise make_ex(ret, 'error removing image') # <<<<<<<<<<<<<<
12278 *
12279 * def rename(self, ioctx, src, dest):
12280 */
12281 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__12281; goto __pyx_L1_error;}
12282 __Pyx_GOTREF(__pyx_t_1);
12283 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_removing_image, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__12283; goto __pyx_L1_error;}
12284 __Pyx_GOTREF(__pyx_t_2);
12285 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12286 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12287 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12288 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__12288; goto __pyx_L1_error;}
12289
12290 /* "rbd.pyx":1286
12291 * with nogil:
12292 * ret = rbd_remove_with_progress(_ioctx, _name, _prog_cb, _prog_arg)
12293 * if ret != 0: # <<<<<<<<<<<<<<
12294 * raise make_ex(ret, 'error removing image')
12295 *
12296 */
12297 }
12298
12299 /* "rbd.pyx":1256
12300 * return ImageIterator(ioctx)
12301 *
12302 * def remove(self, ioctx, name, on_progress=None): # <<<<<<<<<<<<<<
12303 * """
12304 * Delete an RBD image. This may take a long time, since it does
12305 */
12306
12307 /* function exit code */
12308 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
12309 goto __pyx_L0;
12310 __pyx_L1_error:;
12311 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
12312 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
12313 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
12314 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
12315 __Pyx_AddTraceback("rbd.RBD.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
12316 __pyx_r = NULL((void*)0);
12317 __pyx_L0:;
12318 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
12319 __Pyx_XGIVEREF(__pyx_r);
12320 __Pyx_RefNannyFinishContext();
12321 return __pyx_r;
12322}
12323
12324/* "rbd.pyx":1289
12325 * raise make_ex(ret, 'error removing image')
12326 *
12327 * def rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
12328 * """
12329 * Rename an RBD image.
12330 */
12331
12332/* Python wrapper */
12333static PyObject *__pyx_pw_3rbd_3RBD_13rename(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12334static char __pyx_doc_3rbd_3RBD_12rename[] = "RBD.rename(self, ioctx, src, dest)\n\n Rename an RBD image.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param src: the current name of the image\n :type src: str\n :param dest: the new name of the image\n :type dest: str\n :raises: :class:`ImageNotFound`, :class:`ImageExists`\n ";
12335static PyMethodDef __pyx_mdef_3rbd_3RBD_13rename = {"rename", (PyCFunction)__pyx_pw_3rbd_3RBD_13rename, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_12rename};
12336static PyObject *__pyx_pw_3rbd_3RBD_13rename(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12337 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
12338 PyObject *__pyx_v_ioctx = 0;
12339 PyObject *__pyx_v_src = 0;
12340 PyObject *__pyx_v_dest = 0;
12341 int __pyx_lineno = 0;
12342 const char *__pyx_filename = NULL((void*)0);
12343 int __pyx_clineno = 0;
12344 PyObject *__pyx_r = 0;
12345 __Pyx_RefNannyDeclarations
12346 __Pyx_RefNannySetupContext("rename (wrapper)", 0);
12347 {
12348 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_src,&__pyx_n_s_dest,0};
12349 PyObject* values[4] = {0,0,0,0};
12350 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12351 Py_ssize_t kw_args;
12352 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12353 switch (pos_args) {
12354 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12355 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12356 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12357 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12358 case 0: break;
12359 default: goto __pyx_L5_argtuple_error;
12360 }
12361 kw_args = PyDict_Size(__pyx_kwds);
12362 switch (pos_args) {
12363 case 0:
12364 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
12365 else goto __pyx_L5_argtuple_error;
12366 case 1:
12367 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
12368 else {
12369 __Pyx_RaiseArgtupleInvalid("rename", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__12369; goto __pyx_L3_error;}
12370 }
12371 case 2:
12372 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src
)) != 0), 1)
) kw_args--;
12373 else {
12374 __Pyx_RaiseArgtupleInvalid("rename", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__12374; goto __pyx_L3_error;}
12375 }
12376 case 3:
12377 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest
)) != 0), 1)
) kw_args--;
12378 else {
12379 __Pyx_RaiseArgtupleInvalid("rename", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__12379; goto __pyx_L3_error;}
12380 }
12381 }
12382 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12383 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rename") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "rename") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__12383; goto __pyx_L3_error;}
12384 }
12385 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
12386 goto __pyx_L5_argtuple_error;
12387 } else {
12388 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12389 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12390 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12391 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12392 }
12393 __pyx_v_self = values[0];
12394 __pyx_v_ioctx = values[1];
12395 __pyx_v_src = values[2];
12396 __pyx_v_dest = values[3];
12397 }
12398 goto __pyx_L4_argument_unpacking_done;
12399 __pyx_L5_argtuple_error:;
12400 __Pyx_RaiseArgtupleInvalid("rename", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__12400; goto __pyx_L3_error;}
12401 __pyx_L3_error:;
12402 __Pyx_AddTraceback("rbd.RBD.rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
12403 __Pyx_RefNannyFinishContext();
12404 return NULL((void*)0);
12405 __pyx_L4_argument_unpacking_done:;
12406 __pyx_r = __pyx_pf_3rbd_3RBD_12rename(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_src, __pyx_v_dest);
12407
12408 /* function exit code */
12409 __Pyx_RefNannyFinishContext();
12410 return __pyx_r;
12411}
12412
12413static PyObject *__pyx_pf_3rbd_3RBD_12rename(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_src, PyObject *__pyx_v_dest) {
12414 rados_ioctx_t __pyx_v__ioctx;
12415 char *__pyx_v__src;
12416 char *__pyx_v__dest;
12417 int __pyx_v_ret;
12418 PyObject *__pyx_r = NULL((void*)0);
12419 __Pyx_RefNannyDeclarations
12420 PyObject *__pyx_t_1 = NULL((void*)0);
12421 PyObject *__pyx_t_2 = NULL((void*)0);
12422 PyObject *__pyx_t_3 = NULL((void*)0);
12423 Py_ssize_t __pyx_t_4;
12424 PyObject *__pyx_t_5 = NULL((void*)0);
12425 rados_ioctx_t __pyx_t_6;
12426 char *__pyx_t_7;
12427 int __pyx_t_8;
12428 int __pyx_lineno = 0;
12429 const char *__pyx_filename = NULL((void*)0);
12430 int __pyx_clineno = 0;
12431 __Pyx_RefNannySetupContext("rename", 0);
12432 __Pyx_INCREF(__pyx_v_src)( ((PyObject*)(__pyx_v_src))->ob_refcnt++);
12433 __Pyx_INCREF(__pyx_v_dest)( ((PyObject*)(__pyx_v_dest))->ob_refcnt++);
12434
12435 /* "rbd.pyx":1301
12436 * :raises: :class:`ImageNotFound`, :class:`ImageExists`
12437 * """
12438 * src = cstr(src, 'src') # <<<<<<<<<<<<<<
12439 * dest = cstr(dest, 'dest')
12440 * cdef:
12441 */
12442 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__12442; goto __pyx_L1_error;}
12443 __Pyx_GOTREF(__pyx_t_2);
12444 __pyx_t_3 = NULL((void*)0);
12445 __pyx_t_4 = 0;
12446 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
12447 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
12448 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
12449 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
12450 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
12451 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
12452 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
12453 __pyx_t_4 = 1;
12454 }
12455 }
12456 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__12456; goto __pyx_L1_error;}
12457 __Pyx_GOTREF(__pyx_t_5);
12458 if (__pyx_t_3) {
12459 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
12460 }
12461 __Pyx_INCREF(__pyx_v_src)( ((PyObject*)(__pyx_v_src))->ob_refcnt++);
12462 __Pyx_GIVEREF(__pyx_v_src);
12463 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_src)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_src
)
;
12464 __Pyx_INCREF(__pyx_n_s_src)( ((PyObject*)(__pyx_n_s_src))->ob_refcnt++);
12465 __Pyx_GIVEREF(__pyx_n_s_src);
12466 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_src)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_src
)
;
12467 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__12467; goto __pyx_L1_error;}
12468 __Pyx_GOTREF(__pyx_t_1);
12469 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
12470 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12471 __Pyx_DECREF_SET(__pyx_v_src, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_src; __pyx_v_src = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
12472 __pyx_t_1 = 0;
12473
12474 /* "rbd.pyx":1302
12475 * """
12476 * src = cstr(src, 'src')
12477 * dest = cstr(dest, 'dest') # <<<<<<<<<<<<<<
12478 * cdef:
12479 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12480 */
12481 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__12481; goto __pyx_L1_error;}
12482 __Pyx_GOTREF(__pyx_t_2);
12483 __pyx_t_5 = NULL((void*)0);
12484 __pyx_t_4 = 0;
12485 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
12486 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
12487 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
12488 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
12489 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
12490 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
12491 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
12492 __pyx_t_4 = 1;
12493 }
12494 }
12495 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__12495; goto __pyx_L1_error;}
12496 __Pyx_GOTREF(__pyx_t_3);
12497 if (__pyx_t_5) {
12498 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
12499 }
12500 __Pyx_INCREF(__pyx_v_dest)( ((PyObject*)(__pyx_v_dest))->ob_refcnt++);
12501 __Pyx_GIVEREF(__pyx_v_dest);
12502 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dest)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_dest
)
;
12503 __Pyx_INCREF(__pyx_n_s_dest)( ((PyObject*)(__pyx_n_s_dest))->ob_refcnt++);
12504 __Pyx_GIVEREF(__pyx_n_s_dest);
12505 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_dest)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_dest
)
;
12506 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__12506; goto __pyx_L1_error;}
12507 __Pyx_GOTREF(__pyx_t_1);
12508 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
12509 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12510 __Pyx_DECREF_SET(__pyx_v_dest, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_dest; __pyx_v_dest =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
12511 __pyx_t_1 = 0;
12512
12513 /* "rbd.pyx":1304
12514 * dest = cstr(dest, 'dest')
12515 * cdef:
12516 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
12517 * char *_src = src
12518 * char *_dest = dest
12519 */
12520 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__12520; goto __pyx_L1_error;}
12521 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__12521; goto __pyx_L1_error;}
12522 __pyx_v__ioctx = __pyx_t_6;
12523
12524 /* "rbd.pyx":1305
12525 * cdef:
12526 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12527 * char *_src = src # <<<<<<<<<<<<<<
12528 * char *_dest = dest
12529 * with nogil:
12530 */
12531 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_src); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; __pyx_clineno = __LINE__12531; goto __pyx_L1_error;}
12532 __pyx_v__src = __pyx_t_7;
12533
12534 /* "rbd.pyx":1306
12535 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12536 * char *_src = src
12537 * char *_dest = dest # <<<<<<<<<<<<<<
12538 * with nogil:
12539 * ret = rbd_rename(_ioctx, _src, _dest)
12540 */
12541 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_dest); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__12541; goto __pyx_L1_error;}
12542 __pyx_v__dest = __pyx_t_7;
12543
12544 /* "rbd.pyx":1307
12545 * char *_src = src
12546 * char *_dest = dest
12547 * with nogil: # <<<<<<<<<<<<<<
12548 * ret = rbd_rename(_ioctx, _src, _dest)
12549 * if ret != 0:
12550 */
12551 {
12552 #ifdef WITH_THREAD1
12553 PyThreadState *_save;
12554 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
12555 #endif
12556 /*try:*/ {
12557
12558 /* "rbd.pyx":1308
12559 * char *_dest = dest
12560 * with nogil:
12561 * ret = rbd_rename(_ioctx, _src, _dest) # <<<<<<<<<<<<<<
12562 * if ret != 0:
12563 * raise make_ex(ret, 'error renaming image')
12564 */
12565 __pyx_v_ret = rbd_rename(__pyx_v__ioctx, __pyx_v__src, __pyx_v__dest);
12566 }
12567
12568 /* "rbd.pyx":1307
12569 * char *_src = src
12570 * char *_dest = dest
12571 * with nogil: # <<<<<<<<<<<<<<
12572 * ret = rbd_rename(_ioctx, _src, _dest)
12573 * if ret != 0:
12574 */
12575 /*finally:*/ {
12576 /*normal exit:*/{
12577 #ifdef WITH_THREAD1
12578 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
12579 #endif
12580 goto __pyx_L5;
12581 }
12582 __pyx_L5:;
12583 }
12584 }
12585
12586 /* "rbd.pyx":1309
12587 * with nogil:
12588 * ret = rbd_rename(_ioctx, _src, _dest)
12589 * if ret != 0: # <<<<<<<<<<<<<<
12590 * raise make_ex(ret, 'error renaming image')
12591 *
12592 */
12593 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
12594 if (__pyx_t_8) {
12595
12596 /* "rbd.pyx":1310
12597 * ret = rbd_rename(_ioctx, _src, _dest)
12598 * if ret != 0:
12599 * raise make_ex(ret, 'error renaming image') # <<<<<<<<<<<<<<
12600 *
12601 * def trash_move(self, ioctx, name, delay=0):
12602 */
12603 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__12603; goto __pyx_L1_error;}
12604 __Pyx_GOTREF(__pyx_t_1);
12605 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_renaming_image, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__12605; goto __pyx_L1_error;}
12606 __Pyx_GOTREF(__pyx_t_2);
12607 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12608 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12609 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12610 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__12610; goto __pyx_L1_error;}
12611
12612 /* "rbd.pyx":1309
12613 * with nogil:
12614 * ret = rbd_rename(_ioctx, _src, _dest)
12615 * if ret != 0: # <<<<<<<<<<<<<<
12616 * raise make_ex(ret, 'error renaming image')
12617 *
12618 */
12619 }
12620
12621 /* "rbd.pyx":1289
12622 * raise make_ex(ret, 'error removing image')
12623 *
12624 * def rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
12625 * """
12626 * Rename an RBD image.
12627 */
12628
12629 /* function exit code */
12630 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
12631 goto __pyx_L0;
12632 __pyx_L1_error:;
12633 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
12634 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
12635 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
12636 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
12637 __Pyx_AddTraceback("rbd.RBD.rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
12638 __pyx_r = NULL((void*)0);
12639 __pyx_L0:;
12640 __Pyx_XDECREF(__pyx_v_src)do { if ((__pyx_v_src) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_src))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_src)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_src)))); } while (0); } while (0)
;
12641 __Pyx_XDECREF(__pyx_v_dest)do { if ((__pyx_v_dest) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_dest))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_dest)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_dest)))); } while (0); } while
(0)
;
12642 __Pyx_XGIVEREF(__pyx_r);
12643 __Pyx_RefNannyFinishContext();
12644 return __pyx_r;
12645}
12646
12647/* "rbd.pyx":1312
12648 * raise make_ex(ret, 'error renaming image')
12649 *
12650 * def trash_move(self, ioctx, name, delay=0): # <<<<<<<<<<<<<<
12651 * """
12652 * Move an RBD image to the trash.
12653 */
12654
12655/* Python wrapper */
12656static PyObject *__pyx_pw_3rbd_3RBD_15trash_move(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12657static char __pyx_doc_3rbd_3RBD_14trash_move[] = "RBD.trash_move(self, ioctx, name, delay=0)\n\n Move an RBD image to the trash.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the image to remove\n :type name: str\n :param delay: time delay in seconds before the image can be deleted\n from trash\n :type delay: int\n :raises: :class:`ImageNotFound`\n ";
12658static PyMethodDef __pyx_mdef_3rbd_3RBD_15trash_move = {"trash_move", (PyCFunction)__pyx_pw_3rbd_3RBD_15trash_move, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_14trash_move};
12659static PyObject *__pyx_pw_3rbd_3RBD_15trash_move(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12660 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
12661 PyObject *__pyx_v_ioctx = 0;
12662 PyObject *__pyx_v_name = 0;
12663 PyObject *__pyx_v_delay = 0;
12664 int __pyx_lineno = 0;
12665 const char *__pyx_filename = NULL((void*)0);
12666 int __pyx_clineno = 0;
12667 PyObject *__pyx_r = 0;
12668 __Pyx_RefNannyDeclarations
12669 __Pyx_RefNannySetupContext("trash_move (wrapper)", 0);
12670 {
12671 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,&__pyx_n_s_delay,0};
12672 PyObject* values[4] = {0,0,0,0};
12673 values[3] = ((PyObject *)((PyObject *)__pyx_int_0));
12674 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12675 Py_ssize_t kw_args;
12676 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12677 switch (pos_args) {
12678 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12679 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12680 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12681 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12682 case 0: break;
12683 default: goto __pyx_L5_argtuple_error;
12684 }
12685 kw_args = PyDict_Size(__pyx_kwds);
12686 switch (pos_args) {
12687 case 0:
12688 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
12689 else goto __pyx_L5_argtuple_error;
12690 case 1:
12691 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
12692 else {
12693 __Pyx_RaiseArgtupleInvalid("trash_move", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__12693; goto __pyx_L3_error;}
12694 }
12695 case 2:
12696 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
12697 else {
12698 __Pyx_RaiseArgtupleInvalid("trash_move", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__12698; goto __pyx_L3_error;}
12699 }
12700 case 3:
12701 if (kw_args > 0) {
12702 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delay);
12703 if (value) { values[3] = value; kw_args--; }
12704 }
12705 }
12706 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12707 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trash_move") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "trash_move") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__12707; goto __pyx_L3_error;}
12708 }
12709 } else {
12710 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
12711 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12712 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12713 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12714 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12715 break;
12716 default: goto __pyx_L5_argtuple_error;
12717 }
12718 }
12719 __pyx_v_self = values[0];
12720 __pyx_v_ioctx = values[1];
12721 __pyx_v_name = values[2];
12722 __pyx_v_delay = values[3];
12723 }
12724 goto __pyx_L4_argument_unpacking_done;
12725 __pyx_L5_argtuple_error:;
12726 __Pyx_RaiseArgtupleInvalid("trash_move", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__12726; goto __pyx_L3_error;}
12727 __pyx_L3_error:;
12728 __Pyx_AddTraceback("rbd.RBD.trash_move", __pyx_clineno, __pyx_lineno, __pyx_filename);
12729 __Pyx_RefNannyFinishContext();
12730 return NULL((void*)0);
12731 __pyx_L4_argument_unpacking_done:;
12732 __pyx_r = __pyx_pf_3rbd_3RBD_14trash_move(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name, __pyx_v_delay);
12733
12734 /* function exit code */
12735 __Pyx_RefNannyFinishContext();
12736 return __pyx_r;
12737}
12738
12739static PyObject *__pyx_pf_3rbd_3RBD_14trash_move(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_delay) {
12740 rados_ioctx_t __pyx_v__ioctx;
12741 char *__pyx_v__name;
12742 uint64_t __pyx_v__delay;
12743 int __pyx_v_ret;
12744 PyObject *__pyx_r = NULL((void*)0);
12745 __Pyx_RefNannyDeclarations
12746 PyObject *__pyx_t_1 = NULL((void*)0);
12747 PyObject *__pyx_t_2 = NULL((void*)0);
12748 PyObject *__pyx_t_3 = NULL((void*)0);
12749 Py_ssize_t __pyx_t_4;
12750 PyObject *__pyx_t_5 = NULL((void*)0);
12751 rados_ioctx_t __pyx_t_6;
12752 char *__pyx_t_7;
12753 uint64_t __pyx_t_8;
12754 int __pyx_t_9;
12755 int __pyx_lineno = 0;
12756 const char *__pyx_filename = NULL((void*)0);
12757 int __pyx_clineno = 0;
12758 __Pyx_RefNannySetupContext("trash_move", 0);
12759 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
12760
12761 /* "rbd.pyx":1325
12762 * :raises: :class:`ImageNotFound`
12763 * """
12764 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
12765 * cdef:
12766 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12767 */
12768 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__12768; goto __pyx_L1_error;}
12769 __Pyx_GOTREF(__pyx_t_2);
12770 __pyx_t_3 = NULL((void*)0);
12771 __pyx_t_4 = 0;
12772 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
12773 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
12774 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
12775 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
12776 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
12777 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
12778 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
12779 __pyx_t_4 = 1;
12780 }
12781 }
12782 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__12782; goto __pyx_L1_error;}
12783 __Pyx_GOTREF(__pyx_t_5);
12784 if (__pyx_t_3) {
12785 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
12786 }
12787 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
12788 __Pyx_GIVEREF(__pyx_v_name);
12789 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
12790 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
12791 __Pyx_GIVEREF(__pyx_n_s_name);
12792 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
12793 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__12793; goto __pyx_L1_error;}
12794 __Pyx_GOTREF(__pyx_t_1);
12795 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
12796 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12797 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
12798 __pyx_t_1 = 0;
12799
12800 /* "rbd.pyx":1327
12801 * name = cstr(name, 'name')
12802 * cdef:
12803 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
12804 * char *_name = name
12805 * uint64_t _delay = delay
12806 */
12807 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__12807; goto __pyx_L1_error;}
12808 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__12808; goto __pyx_L1_error;}
12809 __pyx_v__ioctx = __pyx_t_6;
12810
12811 /* "rbd.pyx":1328
12812 * cdef:
12813 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12814 * char *_name = name # <<<<<<<<<<<<<<
12815 * uint64_t _delay = delay
12816 * with nogil:
12817 */
12818 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__12818; goto __pyx_L1_error;}
12819 __pyx_v__name = __pyx_t_7;
12820
12821 /* "rbd.pyx":1329
12822 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
12823 * char *_name = name
12824 * uint64_t _delay = delay # <<<<<<<<<<<<<<
12825 * with nogil:
12826 * ret = rbd_trash_move(_ioctx, _name, _delay)
12827 */
12828 __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_v_delay); if (unlikely((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__12828; goto __pyx_L1_error;}
12829 __pyx_v__delay = __pyx_t_8;
12830
12831 /* "rbd.pyx":1330
12832 * char *_name = name
12833 * uint64_t _delay = delay
12834 * with nogil: # <<<<<<<<<<<<<<
12835 * ret = rbd_trash_move(_ioctx, _name, _delay)
12836 * if ret != 0:
12837 */
12838 {
12839 #ifdef WITH_THREAD1
12840 PyThreadState *_save;
12841 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
12842 #endif
12843 /*try:*/ {
12844
12845 /* "rbd.pyx":1331
12846 * uint64_t _delay = delay
12847 * with nogil:
12848 * ret = rbd_trash_move(_ioctx, _name, _delay) # <<<<<<<<<<<<<<
12849 * if ret != 0:
12850 * raise make_ex(ret, 'error moving image to trash')
12851 */
12852 __pyx_v_ret = rbd_trash_move(__pyx_v__ioctx, __pyx_v__name, __pyx_v__delay);
12853 }
12854
12855 /* "rbd.pyx":1330
12856 * char *_name = name
12857 * uint64_t _delay = delay
12858 * with nogil: # <<<<<<<<<<<<<<
12859 * ret = rbd_trash_move(_ioctx, _name, _delay)
12860 * if ret != 0:
12861 */
12862 /*finally:*/ {
12863 /*normal exit:*/{
12864 #ifdef WITH_THREAD1
12865 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
12866 #endif
12867 goto __pyx_L5;
12868 }
12869 __pyx_L5:;
12870 }
12871 }
12872
12873 /* "rbd.pyx":1332
12874 * with nogil:
12875 * ret = rbd_trash_move(_ioctx, _name, _delay)
12876 * if ret != 0: # <<<<<<<<<<<<<<
12877 * raise make_ex(ret, 'error moving image to trash')
12878 *
12879 */
12880 __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
12881 if (__pyx_t_9) {
12882
12883 /* "rbd.pyx":1333
12884 * ret = rbd_trash_move(_ioctx, _name, _delay)
12885 * if ret != 0:
12886 * raise make_ex(ret, 'error moving image to trash') # <<<<<<<<<<<<<<
12887 *
12888 * def trash_purge(self, ioctx, expire_ts=None, threshold=-1):
12889 */
12890 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__12890; goto __pyx_L1_error;}
12891 __Pyx_GOTREF(__pyx_t_1);
12892 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_moving_image_to_trash, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__12892; goto __pyx_L1_error;}
12893 __Pyx_GOTREF(__pyx_t_2);
12894 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
12895 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12896 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
12897 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__12897; goto __pyx_L1_error;}
12898
12899 /* "rbd.pyx":1332
12900 * with nogil:
12901 * ret = rbd_trash_move(_ioctx, _name, _delay)
12902 * if ret != 0: # <<<<<<<<<<<<<<
12903 * raise make_ex(ret, 'error moving image to trash')
12904 *
12905 */
12906 }
12907
12908 /* "rbd.pyx":1312
12909 * raise make_ex(ret, 'error renaming image')
12910 *
12911 * def trash_move(self, ioctx, name, delay=0): # <<<<<<<<<<<<<<
12912 * """
12913 * Move an RBD image to the trash.
12914 */
12915
12916 /* function exit code */
12917 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
12918 goto __pyx_L0;
12919 __pyx_L1_error:;
12920 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
12921 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
12922 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
12923 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
12924 __Pyx_AddTraceback("rbd.RBD.trash_move", __pyx_clineno, __pyx_lineno, __pyx_filename);
12925 __pyx_r = NULL((void*)0);
12926 __pyx_L0:;
12927 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
12928 __Pyx_XGIVEREF(__pyx_r);
12929 __Pyx_RefNannyFinishContext();
12930 return __pyx_r;
12931}
12932
12933/* "rbd.pyx":1335
12934 * raise make_ex(ret, 'error moving image to trash')
12935 *
12936 * def trash_purge(self, ioctx, expire_ts=None, threshold=-1): # <<<<<<<<<<<<<<
12937 * """
12938 * Delete RBD images from trash in bulk.
12939 */
12940
12941/* Python wrapper */
12942static PyObject *__pyx_pw_3rbd_3RBD_17trash_purge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12943static char __pyx_doc_3rbd_3RBD_16trash_purge[] = "RBD.trash_purge(self, ioctx, expire_ts=None, threshold=-1)\n\n Delete RBD images from trash in bulk.\n\n By default it removes images with deferment end time less than now.\n\n The timestamp is configurable, e.g. delete images that have expired a\n week ago.\n\n If the threshold is used it deletes images until X% pool usage is met.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param expire_ts: timestamp for images to be considered as expired (UTC)\n :type expire_ts: datetime\n :param threshold: percentage of pool usage to be met (0 to 1)\n :type threshold: float\n ";
12944static PyMethodDef __pyx_mdef_3rbd_3RBD_17trash_purge = {"trash_purge", (PyCFunction)__pyx_pw_3rbd_3RBD_17trash_purge, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_16trash_purge};
12945static PyObject *__pyx_pw_3rbd_3RBD_17trash_purge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12946 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
12947 PyObject *__pyx_v_ioctx = 0;
12948 PyObject *__pyx_v_expire_ts = 0;
12949 PyObject *__pyx_v_threshold = 0;
12950 int __pyx_lineno = 0;
12951 const char *__pyx_filename = NULL((void*)0);
12952 int __pyx_clineno = 0;
12953 PyObject *__pyx_r = 0;
12954 __Pyx_RefNannyDeclarations
12955 __Pyx_RefNannySetupContext("trash_purge (wrapper)", 0);
12956 {
12957 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_expire_ts,&__pyx_n_s_threshold,0};
12958 PyObject* values[4] = {0,0,0,0};
12959 values[2] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
12960 values[3] = ((PyObject *)((PyObject *)__pyx_int_neg_1));
12961 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
12962 Py_ssize_t kw_args;
12963 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
12964 switch (pos_args) {
12965 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12966 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
12967 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
12968 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
12969 case 0: break;
12970 default: goto __pyx_L5_argtuple_error;
12971 }
12972 kw_args = PyDict_Size(__pyx_kwds);
12973 switch (pos_args) {
12974 case 0:
12975 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
12976 else goto __pyx_L5_argtuple_error;
12977 case 1:
12978 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
12979 else {
12980 __Pyx_RaiseArgtupleInvalid("trash_purge", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__12980; goto __pyx_L3_error;}
12981 }
12982 case 2:
12983 if (kw_args > 0) {
12984 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expire_ts);
12985 if (value) { values[2] = value; kw_args--; }
12986 }
12987 case 3:
12988 if (kw_args > 0) {
12989 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_threshold);
12990 if (value) { values[3] = value; kw_args--; }
12991 }
12992 }
12993 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
12994 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trash_purge") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "trash_purge") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__12994; goto __pyx_L3_error;}
12995 }
12996 } else {
12997 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
12998 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
12999 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13000 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13001 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13002 break;
13003 default: goto __pyx_L5_argtuple_error;
13004 }
13005 }
13006 __pyx_v_self = values[0];
13007 __pyx_v_ioctx = values[1];
13008 __pyx_v_expire_ts = values[2];
13009 __pyx_v_threshold = values[3];
13010 }
13011 goto __pyx_L4_argument_unpacking_done;
13012 __pyx_L5_argtuple_error:;
13013 __Pyx_RaiseArgtupleInvalid("trash_purge", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__13013; goto __pyx_L3_error;}
13014 __pyx_L3_error:;
13015 __Pyx_AddTraceback("rbd.RBD.trash_purge", __pyx_clineno, __pyx_lineno, __pyx_filename);
13016 __Pyx_RefNannyFinishContext();
13017 return NULL((void*)0);
13018 __pyx_L4_argument_unpacking_done:;
13019 __pyx_r = __pyx_pf_3rbd_3RBD_16trash_purge(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_expire_ts, __pyx_v_threshold);
13020
13021 /* function exit code */
13022 __Pyx_RefNannyFinishContext();
13023 return __pyx_r;
13024}
13025
13026static PyObject *__pyx_pf_3rbd_3RBD_16trash_purge(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_expire_ts, PyObject *__pyx_v_threshold) {
13027 PyObject *__pyx_v_expire_epoch_ts = NULL((void*)0);
13028 rados_ioctx_t __pyx_v__ioctx;
13029 time_t __pyx_v__expire_ts;
13030 float __pyx_v__threshold;
13031 int __pyx_v_ret;
13032 PyObject *__pyx_r = NULL((void*)0);
13033 __Pyx_RefNannyDeclarations
13034 int __pyx_t_1;
13035 PyObject *__pyx_t_2 = NULL((void*)0);
13036 PyObject *__pyx_t_3 = NULL((void*)0);
13037 PyObject *__pyx_t_4 = NULL((void*)0);
13038 PyObject *__pyx_t_5 = NULL((void*)0);
13039 PyObject *__pyx_t_6 = NULL((void*)0);
13040 rados_ioctx_t __pyx_t_7;
13041 time_t __pyx_t_8;
13042 float __pyx_t_9;
13043 int __pyx_lineno = 0;
13044 const char *__pyx_filename = NULL((void*)0);
13045 int __pyx_clineno = 0;
13046 __Pyx_RefNannySetupContext("trash_purge", 0);
13047
13048 /* "rbd.pyx":1353
13049 * :type threshold: float
13050 * """
13051 * if expire_ts: # <<<<<<<<<<<<<<
13052 * expire_epoch_ts = time.mktime(expire_ts.timetuple())
13053 * else:
13054 */
13055 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_expire_ts); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__13055; goto __pyx_L1_error;}
13056 if (__pyx_t_1) {
13057
13058 /* "rbd.pyx":1354
13059 * """
13060 * if expire_ts:
13061 * expire_epoch_ts = time.mktime(expire_ts.timetuple()) # <<<<<<<<<<<<<<
13062 * else:
13063 * expire_epoch_ts = 0
13064 */
13065 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13065; goto __pyx_L1_error;}
13066 __Pyx_GOTREF(__pyx_t_3);
13067 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_mktime); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13067; goto __pyx_L1_error;}
13068 __Pyx_GOTREF(__pyx_t_4);
13069 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
13070 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expire_ts, __pyx_n_s_timetuple); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13070; goto __pyx_L1_error;}
13071 __Pyx_GOTREF(__pyx_t_5);
13072 __pyx_t_6 = NULL((void*)0);
13073 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
13074 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
13075 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
13076 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
13077 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
13078 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13079 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13080 }
13081 }
13082 if (__pyx_t_6) {
13083 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13083; goto __pyx_L1_error;}
13084 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
13085 } else {
13086 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13086; goto __pyx_L1_error;}
13087 }
13088 __Pyx_GOTREF(__pyx_t_3);
13089 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13090 __pyx_t_5 = NULL((void*)0);
13091 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
13092 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
13093 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
13094 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
13095 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
13096 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13097 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13098 }
13099 }
13100 if (!__pyx_t_5) {
13101 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13101; goto __pyx_L1_error;}
13102 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
13103 __Pyx_GOTREF(__pyx_t_2);
13104 } else {
13105 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13105; goto __pyx_L1_error;}
13106 __Pyx_GOTREF(__pyx_t_6);
13107 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
13108 __Pyx_GIVEREF(__pyx_t_3);
13109 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_3);
13110 __pyx_t_3 = 0;
13111 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__13111; goto __pyx_L1_error;}
13112 __Pyx_GOTREF(__pyx_t_2);
13113 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
13114 }
13115 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
13116 __pyx_v_expire_epoch_ts = __pyx_t_2;
13117 __pyx_t_2 = 0;
13118
13119 /* "rbd.pyx":1353
13120 * :type threshold: float
13121 * """
13122 * if expire_ts: # <<<<<<<<<<<<<<
13123 * expire_epoch_ts = time.mktime(expire_ts.timetuple())
13124 * else:
13125 */
13126 goto __pyx_L3;
13127 }
13128
13129 /* "rbd.pyx":1356
13130 * expire_epoch_ts = time.mktime(expire_ts.timetuple())
13131 * else:
13132 * expire_epoch_ts = 0 # <<<<<<<<<<<<<<
13133 *
13134 * cdef:
13135 */
13136 /*else*/ {
13137 __Pyx_INCREF(__pyx_int_0)( ((PyObject*)(__pyx_int_0))->ob_refcnt++);
13138 __pyx_v_expire_epoch_ts = __pyx_int_0;
13139 }
13140 __pyx_L3:;
13141
13142 /* "rbd.pyx":1359
13143 *
13144 * cdef:
13145 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
13146 * time_t _expire_ts = expire_epoch_ts
13147 * float _threshold = threshold
13148 */
13149 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__13149; goto __pyx_L1_error;}
13150 __pyx_t_7 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_7 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_7 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__13150; goto __pyx_L1_error;}
13151 __pyx_v__ioctx = __pyx_t_7;
13152
13153 /* "rbd.pyx":1360
13154 * cdef:
13155 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13156 * time_t _expire_ts = expire_epoch_ts # <<<<<<<<<<<<<<
13157 * float _threshold = threshold
13158 * with nogil:
13159 */
13160 __pyx_t_8 = __Pyx_PyInt_As_time_t(__pyx_v_expire_epoch_ts); if (unlikely((__pyx_t_8 == (time_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (time_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__13160; goto __pyx_L1_error;}
13161 __pyx_v__expire_ts = __pyx_t_8;
13162
13163 /* "rbd.pyx":1361
13164 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13165 * time_t _expire_ts = expire_epoch_ts
13166 * float _threshold = threshold # <<<<<<<<<<<<<<
13167 * with nogil:
13168 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold)
13169 */
13170 __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_v_threshold)((float) (((((PyObject*)(__pyx_v_threshold))->ob_type) == &
PyFloat_Type) ? (((PyFloatObject *)(__pyx_v_threshold))->ob_fval
) : PyFloat_AsDouble(__pyx_v_threshold)))
; if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_9 == (float)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__13170; goto __pyx_L1_error;}
13171 __pyx_v__threshold = __pyx_t_9;
13172
13173 /* "rbd.pyx":1362
13174 * time_t _expire_ts = expire_epoch_ts
13175 * float _threshold = threshold
13176 * with nogil: # <<<<<<<<<<<<<<
13177 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold)
13178 * if ret != 0:
13179 */
13180 {
13181 #ifdef WITH_THREAD1
13182 PyThreadState *_save;
13183 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
13184 #endif
13185 /*try:*/ {
13186
13187 /* "rbd.pyx":1363
13188 * float _threshold = threshold
13189 * with nogil:
13190 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold) # <<<<<<<<<<<<<<
13191 * if ret != 0:
13192 * raise make_ex(ret, 'error purging images from trash')
13193 */
13194 __pyx_v_ret = rbd_trash_purge(__pyx_v__ioctx, __pyx_v__expire_ts, __pyx_v__threshold);
13195 }
13196
13197 /* "rbd.pyx":1362
13198 * time_t _expire_ts = expire_epoch_ts
13199 * float _threshold = threshold
13200 * with nogil: # <<<<<<<<<<<<<<
13201 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold)
13202 * if ret != 0:
13203 */
13204 /*finally:*/ {
13205 /*normal exit:*/{
13206 #ifdef WITH_THREAD1
13207 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
13208 #endif
13209 goto __pyx_L6;
13210 }
13211 __pyx_L6:;
13212 }
13213 }
13214
13215 /* "rbd.pyx":1364
13216 * with nogil:
13217 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold)
13218 * if ret != 0: # <<<<<<<<<<<<<<
13219 * raise make_ex(ret, 'error purging images from trash')
13220 *
13221 */
13222 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
13223 if (__pyx_t_1) {
13224
13225 /* "rbd.pyx":1365
13226 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold)
13227 * if ret != 0:
13228 * raise make_ex(ret, 'error purging images from trash') # <<<<<<<<<<<<<<
13229 *
13230 * def trash_remove(self, ioctx, image_id, force=False, on_progress=None):
13231 */
13232 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__13232; goto __pyx_L1_error;}
13233 __Pyx_GOTREF(__pyx_t_2);
13234 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_purging_images_from_trash, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__13234; goto __pyx_L1_error;}
13235 __Pyx_GOTREF(__pyx_t_4);
13236 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13237 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
13238 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
13239 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__13239; goto __pyx_L1_error;}
13240
13241 /* "rbd.pyx":1364
13242 * with nogil:
13243 * ret = rbd_trash_purge(_ioctx, _expire_ts, _threshold)
13244 * if ret != 0: # <<<<<<<<<<<<<<
13245 * raise make_ex(ret, 'error purging images from trash')
13246 *
13247 */
13248 }
13249
13250 /* "rbd.pyx":1335
13251 * raise make_ex(ret, 'error moving image to trash')
13252 *
13253 * def trash_purge(self, ioctx, expire_ts=None, threshold=-1): # <<<<<<<<<<<<<<
13254 * """
13255 * Delete RBD images from trash in bulk.
13256 */
13257
13258 /* function exit code */
13259 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
13260 goto __pyx_L0;
13261 __pyx_L1_error:;
13262 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
13263 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
13264 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
13265 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
13266 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
13267 __Pyx_AddTraceback("rbd.RBD.trash_purge", __pyx_clineno, __pyx_lineno, __pyx_filename);
13268 __pyx_r = NULL((void*)0);
13269 __pyx_L0:;
13270 __Pyx_XDECREF(__pyx_v_expire_epoch_ts)do { if ((__pyx_v_expire_epoch_ts) == ((void*)0)) ; else do {
if ( --((PyObject*)(__pyx_v_expire_epoch_ts))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_expire_epoch_ts
)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_expire_epoch_ts
)))); } while (0); } while (0)
;
13271 __Pyx_XGIVEREF(__pyx_r);
13272 __Pyx_RefNannyFinishContext();
13273 return __pyx_r;
13274}
13275
13276/* "rbd.pyx":1367
13277 * raise make_ex(ret, 'error purging images from trash')
13278 *
13279 * def trash_remove(self, ioctx, image_id, force=False, on_progress=None): # <<<<<<<<<<<<<<
13280 * """
13281 * Delete an RBD image from trash. If image deferment time has not
13282 */
13283
13284/* Python wrapper */
13285static PyObject *__pyx_pw_3rbd_3RBD_19trash_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13286static char __pyx_doc_3rbd_3RBD_18trash_remove[] = "RBD.trash_remove(self, ioctx, image_id, force=False, on_progress=None)\n\n Delete an RBD image from trash. If image deferment time has not\n expired :class:`PermissionError` is raised.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_id: the id of the image to remove\n :type image_id: str\n :param force: force remove even if deferment time has not expired\n :type force: bool\n :param on_progress: optional progress callback function\n :type on_progress: callback function\n :raises: :class:`ImageNotFound`, :class:`PermissionError`\n ";
13287static PyMethodDef __pyx_mdef_3rbd_3RBD_19trash_remove = {"trash_remove", (PyCFunction)__pyx_pw_3rbd_3RBD_19trash_remove, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_18trash_remove};
13288static PyObject *__pyx_pw_3rbd_3RBD_19trash_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13289 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
13290 PyObject *__pyx_v_ioctx = 0;
13291 PyObject *__pyx_v_image_id = 0;
13292 PyObject *__pyx_v_force = 0;
13293 PyObject *__pyx_v_on_progress = 0;
13294 int __pyx_lineno = 0;
13295 const char *__pyx_filename = NULL((void*)0);
13296 int __pyx_clineno = 0;
13297 PyObject *__pyx_r = 0;
13298 __Pyx_RefNannyDeclarations
13299 __Pyx_RefNannySetupContext("trash_remove (wrapper)", 0);
13300 {
13301 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_id,&__pyx_n_s_force,&__pyx_n_s_on_progress,0};
13302 PyObject* values[5] = {0,0,0,0,0};
13303 values[3] = ((PyObject *)((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct)));
13304 values[4] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
13305 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
13306 Py_ssize_t kw_args;
13307 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
13308 switch (pos_args) {
13309 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
13310 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
13311 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13312 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13313 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13314 case 0: break;
13315 default: goto __pyx_L5_argtuple_error;
13316 }
13317 kw_args = PyDict_Size(__pyx_kwds);
13318 switch (pos_args) {
13319 case 0:
13320 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
13321 else goto __pyx_L5_argtuple_error;
13322 case 1:
13323 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
13324 else {
13325 __Pyx_RaiseArgtupleInvalid("trash_remove", 0, 3, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__13325; goto __pyx_L3_error;}
13326 }
13327 case 2:
13328 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id
)) != 0), 1)
) kw_args--;
13329 else {
13330 __Pyx_RaiseArgtupleInvalid("trash_remove", 0, 3, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__13330; goto __pyx_L3_error;}
13331 }
13332 case 3:
13333 if (kw_args > 0) {
13334 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
13335 if (value) { values[3] = value; kw_args--; }
13336 }
13337 case 4:
13338 if (kw_args > 0) {
13339 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_on_progress);
13340 if (value) { values[4] = value; kw_args--; }
13341 }
13342 }
13343 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
13344 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trash_remove") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "trash_remove") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__13344; goto __pyx_L3_error;}
13345 }
13346 } else {
13347 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
13348 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
13349 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
13350 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13351 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13352 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13353 break;
13354 default: goto __pyx_L5_argtuple_error;
13355 }
13356 }
13357 __pyx_v_self = values[0];
13358 __pyx_v_ioctx = values[1];
13359 __pyx_v_image_id = values[2];
13360 __pyx_v_force = values[3];
13361 __pyx_v_on_progress = values[4];
13362 }
13363 goto __pyx_L4_argument_unpacking_done;
13364 __pyx_L5_argtuple_error:;
13365 __Pyx_RaiseArgtupleInvalid("trash_remove", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__13365; goto __pyx_L3_error;}
13366 __pyx_L3_error:;
13367 __Pyx_AddTraceback("rbd.RBD.trash_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
13368 __Pyx_RefNannyFinishContext();
13369 return NULL((void*)0);
13370 __pyx_L4_argument_unpacking_done:;
13371 __pyx_r = __pyx_pf_3rbd_3RBD_18trash_remove(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_id, __pyx_v_force, __pyx_v_on_progress);
13372
13373 /* function exit code */
13374 __Pyx_RefNannyFinishContext();
13375 return __pyx_r;
13376}
13377
13378static PyObject *__pyx_pf_3rbd_3RBD_18trash_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_id, PyObject *__pyx_v_force, PyObject *__pyx_v_on_progress) {
13379 rados_ioctx_t __pyx_v__ioctx;
13380 char *__pyx_v__image_id;
13381 int __pyx_v__force;
13382 librbd_progress_fn_t __pyx_v__prog_cb;
13383 void *__pyx_v__prog_arg;
13384 int __pyx_v_ret;
13385 PyObject *__pyx_r = NULL((void*)0);
13386 __Pyx_RefNannyDeclarations
13387 PyObject *__pyx_t_1 = NULL((void*)0);
13388 PyObject *__pyx_t_2 = NULL((void*)0);
13389 PyObject *__pyx_t_3 = NULL((void*)0);
13390 Py_ssize_t __pyx_t_4;
13391 PyObject *__pyx_t_5 = NULL((void*)0);
13392 rados_ioctx_t __pyx_t_6;
13393 char *__pyx_t_7;
13394 int __pyx_t_8;
13395 int __pyx_t_9;
13396 int __pyx_lineno = 0;
13397 const char *__pyx_filename = NULL((void*)0);
13398 int __pyx_clineno = 0;
13399 __Pyx_RefNannySetupContext("trash_remove", 0);
13400 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
13401
13402 /* "rbd.pyx":1382
13403 * :raises: :class:`ImageNotFound`, :class:`PermissionError`
13404 * """
13405 * image_id = cstr(image_id, 'image_id') # <<<<<<<<<<<<<<
13406 * cdef:
13407 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13408 */
13409 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__13409; goto __pyx_L1_error;}
13410 __Pyx_GOTREF(__pyx_t_2);
13411 __pyx_t_3 = NULL((void*)0);
13412 __pyx_t_4 = 0;
13413 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
13414 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
13415 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
13416 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
13417 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
13418 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13419 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13420 __pyx_t_4 = 1;
13421 }
13422 }
13423 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__13423; goto __pyx_L1_error;}
13424 __Pyx_GOTREF(__pyx_t_5);
13425 if (__pyx_t_3) {
13426 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
13427 }
13428 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
13429 __Pyx_GIVEREF(__pyx_v_image_id);
13430 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_id
)
;
13431 __Pyx_INCREF(__pyx_n_s_image_id)( ((PyObject*)(__pyx_n_s_image_id))->ob_refcnt++);
13432 __Pyx_GIVEREF(__pyx_n_s_image_id);
13433 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_id
)
;
13434 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__13434; goto __pyx_L1_error;}
13435 __Pyx_GOTREF(__pyx_t_1);
13436 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13437 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13438 __Pyx_DECREF_SET(__pyx_v_image_id, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_id; __pyx_v_image_id
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
13439 __pyx_t_1 = 0;
13440
13441 /* "rbd.pyx":1384
13442 * image_id = cstr(image_id, 'image_id')
13443 * cdef:
13444 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
13445 * char *_image_id = image_id
13446 * int _force = force
13447 */
13448 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; __pyx_clineno = __LINE__13448; goto __pyx_L1_error;}
13449 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; __pyx_clineno = __LINE__13449; goto __pyx_L1_error;}
13450 __pyx_v__ioctx = __pyx_t_6;
13451
13452 /* "rbd.pyx":1385
13453 * cdef:
13454 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13455 * char *_image_id = image_id # <<<<<<<<<<<<<<
13456 * int _force = force
13457 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
13458 */
13459 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_id); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__13459; goto __pyx_L1_error;}
13460 __pyx_v__image_id = __pyx_t_7;
13461
13462 /* "rbd.pyx":1386
13463 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13464 * char *_image_id = image_id
13465 * int _force = force # <<<<<<<<<<<<<<
13466 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
13467 * void *_prog_arg = NULL
13468 */
13469 __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_force); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__13469; goto __pyx_L1_error;}
13470 __pyx_v__force = __pyx_t_8;
13471
13472 /* "rbd.pyx":1387
13473 * char *_image_id = image_id
13474 * int _force = force
13475 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
13476 * void *_prog_arg = NULL
13477 * if on_progress:
13478 */
13479 __pyx_v__prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
13480
13481 /* "rbd.pyx":1388
13482 * int _force = force
13483 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
13484 * void *_prog_arg = NULL # <<<<<<<<<<<<<<
13485 * if on_progress:
13486 * _prog_cb = &progress_callback
13487 */
13488 __pyx_v__prog_arg = NULL((void*)0);
13489
13490 /* "rbd.pyx":1389
13491 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
13492 * void *_prog_arg = NULL
13493 * if on_progress: # <<<<<<<<<<<<<<
13494 * _prog_cb = &progress_callback
13495 * _prog_arg = <void *>on_progress
13496 */
13497 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_on_progress); if (unlikely(__pyx_t_9 < 0)__builtin_expect(!!(__pyx_t_9 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__13497; goto __pyx_L1_error;}
13498 if (__pyx_t_9) {
13499
13500 /* "rbd.pyx":1390
13501 * void *_prog_arg = NULL
13502 * if on_progress:
13503 * _prog_cb = &progress_callback # <<<<<<<<<<<<<<
13504 * _prog_arg = <void *>on_progress
13505 * with nogil:
13506 */
13507 __pyx_v__prog_cb = (&__pyx_f_3rbd_progress_callback);
13508
13509 /* "rbd.pyx":1391
13510 * if on_progress:
13511 * _prog_cb = &progress_callback
13512 * _prog_arg = <void *>on_progress # <<<<<<<<<<<<<<
13513 * with nogil:
13514 * ret = rbd_trash_remove_with_progress(_ioctx, _image_id, _force,
13515 */
13516 __pyx_v__prog_arg = ((void *)__pyx_v_on_progress);
13517
13518 /* "rbd.pyx":1389
13519 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
13520 * void *_prog_arg = NULL
13521 * if on_progress: # <<<<<<<<<<<<<<
13522 * _prog_cb = &progress_callback
13523 * _prog_arg = <void *>on_progress
13524 */
13525 }
13526
13527 /* "rbd.pyx":1392
13528 * _prog_cb = &progress_callback
13529 * _prog_arg = <void *>on_progress
13530 * with nogil: # <<<<<<<<<<<<<<
13531 * ret = rbd_trash_remove_with_progress(_ioctx, _image_id, _force,
13532 * _prog_cb, _prog_arg)
13533 */
13534 {
13535 #ifdef WITH_THREAD1
13536 PyThreadState *_save;
13537 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
13538 #endif
13539 /*try:*/ {
13540
13541 /* "rbd.pyx":1393
13542 * _prog_arg = <void *>on_progress
13543 * with nogil:
13544 * ret = rbd_trash_remove_with_progress(_ioctx, _image_id, _force, # <<<<<<<<<<<<<<
13545 * _prog_cb, _prog_arg)
13546 * if ret != 0:
13547 */
13548 __pyx_v_ret = rbd_trash_remove_with_progress(__pyx_v__ioctx, __pyx_v__image_id, __pyx_v__force, __pyx_v__prog_cb, __pyx_v__prog_arg);
13549 }
13550
13551 /* "rbd.pyx":1392
13552 * _prog_cb = &progress_callback
13553 * _prog_arg = <void *>on_progress
13554 * with nogil: # <<<<<<<<<<<<<<
13555 * ret = rbd_trash_remove_with_progress(_ioctx, _image_id, _force,
13556 * _prog_cb, _prog_arg)
13557 */
13558 /*finally:*/ {
13559 /*normal exit:*/{
13560 #ifdef WITH_THREAD1
13561 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
13562 #endif
13563 goto __pyx_L6;
13564 }
13565 __pyx_L6:;
13566 }
13567 }
13568
13569 /* "rbd.pyx":1395
13570 * ret = rbd_trash_remove_with_progress(_ioctx, _image_id, _force,
13571 * _prog_cb, _prog_arg)
13572 * if ret != 0: # <<<<<<<<<<<<<<
13573 * raise make_ex(ret, 'error deleting image from trash')
13574 *
13575 */
13576 __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
13577 if (__pyx_t_9) {
13578
13579 /* "rbd.pyx":1396
13580 * _prog_cb, _prog_arg)
13581 * if ret != 0:
13582 * raise make_ex(ret, 'error deleting image from trash') # <<<<<<<<<<<<<<
13583 *
13584 * def trash_get(self, ioctx, image_id):
13585 */
13586 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__13586; goto __pyx_L1_error;}
13587 __Pyx_GOTREF(__pyx_t_1);
13588 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_deleting_image_from_trash, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__13588; goto __pyx_L1_error;}
13589 __Pyx_GOTREF(__pyx_t_2);
13590 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13591 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
13592 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13593 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__13593; goto __pyx_L1_error;}
13594
13595 /* "rbd.pyx":1395
13596 * ret = rbd_trash_remove_with_progress(_ioctx, _image_id, _force,
13597 * _prog_cb, _prog_arg)
13598 * if ret != 0: # <<<<<<<<<<<<<<
13599 * raise make_ex(ret, 'error deleting image from trash')
13600 *
13601 */
13602 }
13603
13604 /* "rbd.pyx":1367
13605 * raise make_ex(ret, 'error purging images from trash')
13606 *
13607 * def trash_remove(self, ioctx, image_id, force=False, on_progress=None): # <<<<<<<<<<<<<<
13608 * """
13609 * Delete an RBD image from trash. If image deferment time has not
13610 */
13611
13612 /* function exit code */
13613 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
13614 goto __pyx_L0;
13615 __pyx_L1_error:;
13616 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
13617 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
13618 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
13619 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
13620 __Pyx_AddTraceback("rbd.RBD.trash_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
13621 __pyx_r = NULL((void*)0);
13622 __pyx_L0:;
13623 __Pyx_XDECREF(__pyx_v_image_id)do { if ((__pyx_v_image_id) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_image_id))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_image_id)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_id)))); }
while (0); } while (0)
;
13624 __Pyx_XGIVEREF(__pyx_r);
13625 __Pyx_RefNannyFinishContext();
13626 return __pyx_r;
13627}
13628
13629/* "rbd.pyx":1398
13630 * raise make_ex(ret, 'error deleting image from trash')
13631 *
13632 * def trash_get(self, ioctx, image_id): # <<<<<<<<<<<<<<
13633 * """
13634 * Retrieve RBD image info from trash.
13635 */
13636
13637/* Python wrapper */
13638static PyObject *__pyx_pw_3rbd_3RBD_21trash_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13639static char __pyx_doc_3rbd_3RBD_20trash_get[] = "RBD.trash_get(self, ioctx, image_id)\n\n Retrieve RBD image info from trash.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_id: the id of the image to restore\n :type image_id: str\n :returns: dict - contains the following keys:\n\n * ``id`` (str) - image id\n\n * ``name`` (str) - image name\n\n * ``source`` (str) - source of deletion\n\n * ``deletion_time`` (datetime) - time of deletion\n\n * ``deferment_end_time`` (datetime) - time that an image is allowed\n to be removed from trash\n\n :raises: :class:`ImageNotFound`\n ";
13640static PyMethodDef __pyx_mdef_3rbd_3RBD_21trash_get = {"trash_get", (PyCFunction)__pyx_pw_3rbd_3RBD_21trash_get, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_20trash_get};
13641static PyObject *__pyx_pw_3rbd_3RBD_21trash_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13642 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
13643 PyObject *__pyx_v_ioctx = 0;
13644 PyObject *__pyx_v_image_id = 0;
13645 int __pyx_lineno = 0;
13646 const char *__pyx_filename = NULL((void*)0);
13647 int __pyx_clineno = 0;
13648 PyObject *__pyx_r = 0;
13649 __Pyx_RefNannyDeclarations
13650 __Pyx_RefNannySetupContext("trash_get (wrapper)", 0);
13651 {
13652 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_id,0};
13653 PyObject* values[3] = {0,0,0};
13654 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
13655 Py_ssize_t kw_args;
13656 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
13657 switch (pos_args) {
13658 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13659 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13660 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13661 case 0: break;
13662 default: goto __pyx_L5_argtuple_error;
13663 }
13664 kw_args = PyDict_Size(__pyx_kwds);
13665 switch (pos_args) {
13666 case 0:
13667 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
13668 else goto __pyx_L5_argtuple_error;
13669 case 1:
13670 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
13671 else {
13672 __Pyx_RaiseArgtupleInvalid("trash_get", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__13672; goto __pyx_L3_error;}
13673 }
13674 case 2:
13675 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id
)) != 0), 1)
) kw_args--;
13676 else {
13677 __Pyx_RaiseArgtupleInvalid("trash_get", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__13677; goto __pyx_L3_error;}
13678 }
13679 }
13680 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
13681 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trash_get") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "trash_get") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__13681; goto __pyx_L3_error;}
13682 }
13683 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
13684 goto __pyx_L5_argtuple_error;
13685 } else {
13686 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
13687 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
13688 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
13689 }
13690 __pyx_v_self = values[0];
13691 __pyx_v_ioctx = values[1];
13692 __pyx_v_image_id = values[2];
13693 }
13694 goto __pyx_L4_argument_unpacking_done;
13695 __pyx_L5_argtuple_error:;
13696 __Pyx_RaiseArgtupleInvalid("trash_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__13696; goto __pyx_L3_error;}
13697 __pyx_L3_error:;
13698 __Pyx_AddTraceback("rbd.RBD.trash_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
13699 __Pyx_RefNannyFinishContext();
13700 return NULL((void*)0);
13701 __pyx_L4_argument_unpacking_done:;
13702 __pyx_r = __pyx_pf_3rbd_3RBD_20trash_get(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_id);
13703
13704 /* function exit code */
13705 __Pyx_RefNannyFinishContext();
13706 return __pyx_r;
13707}
13708
13709static PyObject *__pyx_pf_3rbd_3RBD_20trash_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_id) {
13710 rados_ioctx_t __pyx_v__ioctx;
13711 char *__pyx_v__image_id;
13712 rbd_trash_image_info_t __pyx_v_c_info;
13713 int __pyx_v_ret;
13714 PyObject *__pyx_v___source_string = NULL((void*)0);
13715 PyObject *__pyx_v_info = NULL((void*)0);
13716 PyObject *__pyx_r = NULL((void*)0);
13717 __Pyx_RefNannyDeclarations
13718 PyObject *__pyx_t_1 = NULL((void*)0);
13719 PyObject *__pyx_t_2 = NULL((void*)0);
13720 PyObject *__pyx_t_3 = NULL((void*)0);
13721 Py_ssize_t __pyx_t_4;
13722 PyObject *__pyx_t_5 = NULL((void*)0);
13723 rados_ioctx_t __pyx_t_6;
13724 char *__pyx_t_7;
13725 int __pyx_t_8;
13726 PyObject *__pyx_t_9 = NULL((void*)0);
13727 PyObject *__pyx_t_10 = NULL((void*)0);
13728 int __pyx_lineno = 0;
13729 const char *__pyx_filename = NULL((void*)0);
13730 int __pyx_clineno = 0;
13731 __Pyx_RefNannySetupContext("trash_get", 0);
13732 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
13733
13734 /* "rbd.pyx":1421
13735 * :raises: :class:`ImageNotFound`
13736 * """
13737 * image_id = cstr(image_id, 'image_id') # <<<<<<<<<<<<<<
13738 * cdef:
13739 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13740 */
13741 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__13741; goto __pyx_L1_error;}
13742 __Pyx_GOTREF(__pyx_t_2);
13743 __pyx_t_3 = NULL((void*)0);
13744 __pyx_t_4 = 0;
13745 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
13746 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
13747 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
13748 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
13749 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
13750 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13751 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13752 __pyx_t_4 = 1;
13753 }
13754 }
13755 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__13755; goto __pyx_L1_error;}
13756 __Pyx_GOTREF(__pyx_t_5);
13757 if (__pyx_t_3) {
13758 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
13759 }
13760 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
13761 __Pyx_GIVEREF(__pyx_v_image_id);
13762 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_id
)
;
13763 __Pyx_INCREF(__pyx_n_s_image_id)( ((PyObject*)(__pyx_n_s_image_id))->ob_refcnt++);
13764 __Pyx_GIVEREF(__pyx_n_s_image_id);
13765 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_id
)
;
13766 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__13766; goto __pyx_L1_error;}
13767 __Pyx_GOTREF(__pyx_t_1);
13768 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13769 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13770 __Pyx_DECREF_SET(__pyx_v_image_id, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_id; __pyx_v_image_id
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
13771 __pyx_t_1 = 0;
13772
13773 /* "rbd.pyx":1423
13774 * image_id = cstr(image_id, 'image_id')
13775 * cdef:
13776 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
13777 * char *_image_id = image_id
13778 * rbd_trash_image_info_t c_info
13779 */
13780 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__13780; goto __pyx_L1_error;}
13781 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__13781; goto __pyx_L1_error;}
13782 __pyx_v__ioctx = __pyx_t_6;
13783
13784 /* "rbd.pyx":1424
13785 * cdef:
13786 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
13787 * char *_image_id = image_id # <<<<<<<<<<<<<<
13788 * rbd_trash_image_info_t c_info
13789 * with nogil:
13790 */
13791 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_id); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__13791; goto __pyx_L1_error;}
13792 __pyx_v__image_id = __pyx_t_7;
13793
13794 /* "rbd.pyx":1426
13795 * char *_image_id = image_id
13796 * rbd_trash_image_info_t c_info
13797 * with nogil: # <<<<<<<<<<<<<<
13798 * ret = rbd_trash_get(_ioctx, _image_id, &c_info)
13799 * if ret != 0:
13800 */
13801 {
13802 #ifdef WITH_THREAD1
13803 PyThreadState *_save;
13804 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
13805 #endif
13806 /*try:*/ {
13807
13808 /* "rbd.pyx":1427
13809 * rbd_trash_image_info_t c_info
13810 * with nogil:
13811 * ret = rbd_trash_get(_ioctx, _image_id, &c_info) # <<<<<<<<<<<<<<
13812 * if ret != 0:
13813 * raise make_ex(ret, 'error retrieving image from trash')
13814 */
13815 __pyx_v_ret = rbd_trash_get(__pyx_v__ioctx, __pyx_v__image_id, (&__pyx_v_c_info));
13816 }
13817
13818 /* "rbd.pyx":1426
13819 * char *_image_id = image_id
13820 * rbd_trash_image_info_t c_info
13821 * with nogil: # <<<<<<<<<<<<<<
13822 * ret = rbd_trash_get(_ioctx, _image_id, &c_info)
13823 * if ret != 0:
13824 */
13825 /*finally:*/ {
13826 /*normal exit:*/{
13827 #ifdef WITH_THREAD1
13828 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
13829 #endif
13830 goto __pyx_L5;
13831 }
13832 __pyx_L5:;
13833 }
13834 }
13835
13836 /* "rbd.pyx":1428
13837 * with nogil:
13838 * ret = rbd_trash_get(_ioctx, _image_id, &c_info)
13839 * if ret != 0: # <<<<<<<<<<<<<<
13840 * raise make_ex(ret, 'error retrieving image from trash')
13841 *
13842 */
13843 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
13844 if (__pyx_t_8) {
13845
13846 /* "rbd.pyx":1429
13847 * ret = rbd_trash_get(_ioctx, _image_id, &c_info)
13848 * if ret != 0:
13849 * raise make_ex(ret, 'error retrieving image from trash') # <<<<<<<<<<<<<<
13850 *
13851 * __source_string = ['USER', 'MIRRORING', 'MIGRATION', 'REMOVING']
13852 */
13853 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; __pyx_clineno = __LINE__13853; goto __pyx_L1_error;}
13854 __Pyx_GOTREF(__pyx_t_1);
13855 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_retrieving_image_from_tras, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; __pyx_clineno = __LINE__13855; goto __pyx_L1_error;}
13856 __Pyx_GOTREF(__pyx_t_2);
13857 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13858 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
13859 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
13860 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; __pyx_clineno = __LINE__13860; goto __pyx_L1_error;}
13861
13862 /* "rbd.pyx":1428
13863 * with nogil:
13864 * ret = rbd_trash_get(_ioctx, _image_id, &c_info)
13865 * if ret != 0: # <<<<<<<<<<<<<<
13866 * raise make_ex(ret, 'error retrieving image from trash')
13867 *
13868 */
13869 }
13870
13871 /* "rbd.pyx":1431
13872 * raise make_ex(ret, 'error retrieving image from trash')
13873 *
13874 * __source_string = ['USER', 'MIRRORING', 'MIGRATION', 'REMOVING'] # <<<<<<<<<<<<<<
13875 * info = {
13876 * 'id' : decode_cstr(c_info.id),
13877 */
13878 __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__13878; goto __pyx_L1_error;}
13879 __Pyx_GOTREF(__pyx_t_2);
13880 __Pyx_INCREF(__pyx_n_s_USER)( ((PyObject*)(__pyx_n_s_USER))->ob_refcnt++);
13881 __Pyx_GIVEREF(__pyx_n_s_USER);
13882 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_USER)(((PyListObject *)(__pyx_t_2))->ob_item[0] = (__pyx_n_s_USER
))
;
13883 __Pyx_INCREF(__pyx_n_s_MIRRORING)( ((PyObject*)(__pyx_n_s_MIRRORING))->ob_refcnt++);
13884 __Pyx_GIVEREF(__pyx_n_s_MIRRORING);
13885 PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_MIRRORING)(((PyListObject *)(__pyx_t_2))->ob_item[1] = (__pyx_n_s_MIRRORING
))
;
13886 __Pyx_INCREF(__pyx_n_s_MIGRATION)( ((PyObject*)(__pyx_n_s_MIGRATION))->ob_refcnt++);
13887 __Pyx_GIVEREF(__pyx_n_s_MIGRATION);
13888 PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_MIGRATION)(((PyListObject *)(__pyx_t_2))->ob_item[2] = (__pyx_n_s_MIGRATION
))
;
13889 __Pyx_INCREF(__pyx_n_s_REMOVING)( ((PyObject*)(__pyx_n_s_REMOVING))->ob_refcnt++);
13890 __Pyx_GIVEREF(__pyx_n_s_REMOVING);
13891 PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_REMOVING)(((PyListObject *)(__pyx_t_2))->ob_item[3] = (__pyx_n_s_REMOVING
))
;
13892 __pyx_v___source_string = ((PyObject*)__pyx_t_2);
13893 __pyx_t_2 = 0;
13894
13895 /* "rbd.pyx":1433
13896 * __source_string = ['USER', 'MIRRORING', 'MIGRATION', 'REMOVING']
13897 * info = {
13898 * 'id' : decode_cstr(c_info.id), # <<<<<<<<<<<<<<
13899 * 'name' : decode_cstr(c_info.name),
13900 * 'source' : __source_string[c_info.source],
13901 */
13902 __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13902; goto __pyx_L1_error;}
13903 __Pyx_GOTREF(__pyx_t_2);
13904 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13904; goto __pyx_L1_error;}
13905 __Pyx_GOTREF(__pyx_t_5);
13906 __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_info.id); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13906; goto __pyx_L1_error;}
13907 __Pyx_GOTREF(__pyx_t_3);
13908 __pyx_t_9 = NULL((void*)0);
13909 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
13910 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
13911 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
13912 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
13913 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
13914 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13915 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13916 }
13917 }
13918 if (!__pyx_t_9) {
13919 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13919; goto __pyx_L1_error;}
13920 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
13921 __Pyx_GOTREF(__pyx_t_1);
13922 } else {
13923 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13923; goto __pyx_L1_error;}
13924 __Pyx_GOTREF(__pyx_t_10);
13925 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
13926 __Pyx_GIVEREF(__pyx_t_3);
13927 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_3
)
;
13928 __pyx_t_3 = 0;
13929 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13929; goto __pyx_L1_error;}
13930 __Pyx_GOTREF(__pyx_t_1);
13931 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
13932 }
13933 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13934 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13934; goto __pyx_L1_error;}
13935 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13936
13937 /* "rbd.pyx":1434
13938 * info = {
13939 * 'id' : decode_cstr(c_info.id),
13940 * 'name' : decode_cstr(c_info.name), # <<<<<<<<<<<<<<
13941 * 'source' : __source_string[c_info.source],
13942 * 'deletion_time' : datetime.utcfromtimestamp(c_info.deletion_time),
13943 */
13944 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__13944; goto __pyx_L1_error;}
13945 __Pyx_GOTREF(__pyx_t_5);
13946 __pyx_t_10 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_info.name); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__13946; goto __pyx_L1_error;}
13947 __Pyx_GOTREF(__pyx_t_10);
13948 __pyx_t_3 = NULL((void*)0);
13949 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
13950 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
13951 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
13952 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
13953 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
13954 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
13955 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
13956 }
13957 }
13958 if (!__pyx_t_3) {
13959 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__13959; goto __pyx_L1_error;}
13960 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
13961 __Pyx_GOTREF(__pyx_t_1);
13962 } else {
13963 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__13963; goto __pyx_L1_error;}
13964 __Pyx_GOTREF(__pyx_t_9);
13965 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
13966 __Pyx_GIVEREF(__pyx_t_10);
13967 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_10
)
;
13968 __pyx_t_10 = 0;
13969 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__13969; goto __pyx_L1_error;}
13970 __Pyx_GOTREF(__pyx_t_1);
13971 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
13972 }
13973 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13974 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13974; goto __pyx_L1_error;}
13975 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13976
13977 /* "rbd.pyx":1435
13978 * 'id' : decode_cstr(c_info.id),
13979 * 'name' : decode_cstr(c_info.name),
13980 * 'source' : __source_string[c_info.source], # <<<<<<<<<<<<<<
13981 * 'deletion_time' : datetime.utcfromtimestamp(c_info.deletion_time),
13982 * 'deferment_end_time' : datetime.utcfromtimestamp(c_info.deferment_end_time)
13983 */
13984 __pyx_t_1 = __Pyx_PyInt_From_rbd_trash_image_source_t(__pyx_v_c_info.source); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__13984; goto __pyx_L1_error;}
13985 __Pyx_GOTREF(__pyx_t_1);
13986 __pyx_t_5 = PyObject_GetItem(__pyx_v___source_string, __pyx_t_1); if (unlikely(__pyx_t_5 == NULL)__builtin_expect(!!(__pyx_t_5 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__13986; goto __pyx_L1_error;};
13987 __Pyx_GOTREF(__pyx_t_5);
13988 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
13989 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__13989; goto __pyx_L1_error;}
13990 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
13991
13992 /* "rbd.pyx":1436
13993 * 'name' : decode_cstr(c_info.name),
13994 * 'source' : __source_string[c_info.source],
13995 * 'deletion_time' : datetime.utcfromtimestamp(c_info.deletion_time), # <<<<<<<<<<<<<<
13996 * 'deferment_end_time' : datetime.utcfromtimestamp(c_info.deferment_end_time)
13997 * }
13998 */
13999 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__13999; goto __pyx_L1_error;}
14000 __Pyx_GOTREF(__pyx_t_1);
14001 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__14001; goto __pyx_L1_error;}
14002 __Pyx_GOTREF(__pyx_t_9);
14003 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14004 __pyx_t_1 = __Pyx_PyInt_From_time_t(__pyx_v_c_info.deletion_time); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__14004; goto __pyx_L1_error;}
14005 __Pyx_GOTREF(__pyx_t_1);
14006 __pyx_t_10 = NULL((void*)0);
14007 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_9))__builtin_expect(!!(((__pyx_t_9)->ob_type == &PyMethod_Type
)), 0)
) {
14008 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_self);
14009 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
14010 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_func);
14011 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
14012 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14013 __Pyx_DECREF_SET(__pyx_t_9, function)do { PyObject *tmp = (PyObject *) __pyx_t_9; __pyx_t_9 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14014 }
14015 }
14016 if (!__pyx_t_10) {
14017 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__14017; goto __pyx_L1_error;}
14018 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14019 __Pyx_GOTREF(__pyx_t_5);
14020 } else {
14021 __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__14021; goto __pyx_L1_error;}
14022 __Pyx_GOTREF(__pyx_t_3);
14023 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
14024 __Pyx_GIVEREF(__pyx_t_1);
14025 PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_1)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+1] = __pyx_t_1);
14026 __pyx_t_1 = 0;
14027 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__14027; goto __pyx_L1_error;}
14028 __Pyx_GOTREF(__pyx_t_5);
14029 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14030 }
14031 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14032 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deletion_time, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__14032; goto __pyx_L1_error;}
14033 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14034
14035 /* "rbd.pyx":1437
14036 * 'source' : __source_string[c_info.source],
14037 * 'deletion_time' : datetime.utcfromtimestamp(c_info.deletion_time),
14038 * 'deferment_end_time' : datetime.utcfromtimestamp(c_info.deferment_end_time) # <<<<<<<<<<<<<<
14039 * }
14040 * rbd_trash_get_cleanup(&c_info)
14041 */
14042 __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__14042; goto __pyx_L1_error;}
14043 __Pyx_GOTREF(__pyx_t_9);
14044 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__14044; goto __pyx_L1_error;}
14045 __Pyx_GOTREF(__pyx_t_3);
14046 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14047 __pyx_t_9 = __Pyx_PyInt_From_time_t(__pyx_v_c_info.deferment_end_time); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__14047; goto __pyx_L1_error;}
14048 __Pyx_GOTREF(__pyx_t_9);
14049 __pyx_t_1 = NULL((void*)0);
14050 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
14051 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
14052 if (likely(__pyx_t_1)__builtin_expect(!!(__pyx_t_1), 1)) {
14053 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
14054 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
14055 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14056 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14057 }
14058 }
14059 if (!__pyx_t_1) {
14060 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__14060; goto __pyx_L1_error;}
14061 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
14062 __Pyx_GOTREF(__pyx_t_5);
14063 } else {
14064 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__14064; goto __pyx_L1_error;}
14065 __Pyx_GOTREF(__pyx_t_10);
14066 __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_1); __pyx_t_1 = NULL((void*)0);
14067 __Pyx_GIVEREF(__pyx_t_9);
14068 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_9
)
;
14069 __pyx_t_9 = 0;
14070 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__14070; goto __pyx_L1_error;}
14071 __Pyx_GOTREF(__pyx_t_5);
14072 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
14073 }
14074 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14075 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deferment_end_time, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__14075; goto __pyx_L1_error;}
14076 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14077 __pyx_v_info = ((PyObject*)__pyx_t_2);
14078 __pyx_t_2 = 0;
14079
14080 /* "rbd.pyx":1439
14081 * 'deferment_end_time' : datetime.utcfromtimestamp(c_info.deferment_end_time)
14082 * }
14083 * rbd_trash_get_cleanup(&c_info) # <<<<<<<<<<<<<<
14084 * return info
14085 *
14086 */
14087 rbd_trash_get_cleanup((&__pyx_v_c_info));
14088
14089 /* "rbd.pyx":1440
14090 * }
14091 * rbd_trash_get_cleanup(&c_info)
14092 * return info # <<<<<<<<<<<<<<
14093 *
14094 * def trash_list(self, ioctx):
14095 */
14096 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
14097 __Pyx_INCREF(__pyx_v_info)( ((PyObject*)(__pyx_v_info))->ob_refcnt++);
14098 __pyx_r = __pyx_v_info;
14099 goto __pyx_L0;
14100
14101 /* "rbd.pyx":1398
14102 * raise make_ex(ret, 'error deleting image from trash')
14103 *
14104 * def trash_get(self, ioctx, image_id): # <<<<<<<<<<<<<<
14105 * """
14106 * Retrieve RBD image info from trash.
14107 */
14108
14109 /* function exit code */
14110 __pyx_L1_error:;
14111 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
14112 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
14113 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
14114 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
14115 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
14116 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
14117 __Pyx_AddTraceback("rbd.RBD.trash_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
14118 __pyx_r = NULL((void*)0);
14119 __pyx_L0:;
14120 __Pyx_XDECREF(__pyx_v___source_string)do { if ((__pyx_v___source_string) == ((void*)0)) ; else do {
if ( --((PyObject*)(__pyx_v___source_string))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v___source_string
)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v___source_string
)))); } while (0); } while (0)
;
14121 __Pyx_XDECREF(__pyx_v_info)do { if ((__pyx_v_info) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_info))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_info)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_info)))); } while (0); } while
(0)
;
14122 __Pyx_XDECREF(__pyx_v_image_id)do { if ((__pyx_v_image_id) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_image_id))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_image_id)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_id)))); }
while (0); } while (0)
;
14123 __Pyx_XGIVEREF(__pyx_r);
14124 __Pyx_RefNannyFinishContext();
14125 return __pyx_r;
14126}
14127
14128/* "rbd.pyx":1442
14129 * return info
14130 *
14131 * def trash_list(self, ioctx): # <<<<<<<<<<<<<<
14132 * """
14133 * List all entries from trash.
14134 */
14135
14136/* Python wrapper */
14137static PyObject *__pyx_pw_3rbd_3RBD_23trash_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14138static char __pyx_doc_3rbd_3RBD_22trash_list[] = "RBD.trash_list(self, ioctx)\n\n List all entries from trash.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :returns: :class:`TrashIterator`\n ";
14139static PyMethodDef __pyx_mdef_3rbd_3RBD_23trash_list = {"trash_list", (PyCFunction)__pyx_pw_3rbd_3RBD_23trash_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_22trash_list};
14140static PyObject *__pyx_pw_3rbd_3RBD_23trash_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14141 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
14142 PyObject *__pyx_v_ioctx = 0;
14143 int __pyx_lineno = 0;
14144 const char *__pyx_filename = NULL((void*)0);
14145 int __pyx_clineno = 0;
14146 PyObject *__pyx_r = 0;
14147 __Pyx_RefNannyDeclarations
14148 __Pyx_RefNannySetupContext("trash_list (wrapper)", 0);
14149 {
14150 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
14151 PyObject* values[2] = {0,0};
14152 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
14153 Py_ssize_t kw_args;
14154 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
14155 switch (pos_args) {
14156 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
14157 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
14158 case 0: break;
14159 default: goto __pyx_L5_argtuple_error;
14160 }
14161 kw_args = PyDict_Size(__pyx_kwds);
14162 switch (pos_args) {
14163 case 0:
14164 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
14165 else goto __pyx_L5_argtuple_error;
14166 case 1:
14167 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
14168 else {
14169 __Pyx_RaiseArgtupleInvalid("trash_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__14169; goto __pyx_L3_error;}
14170 }
14171 }
14172 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
14173 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trash_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "trash_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__14173; goto __pyx_L3_error;}
14174 }
14175 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
14176 goto __pyx_L5_argtuple_error;
14177 } else {
14178 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
14179 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
14180 }
14181 __pyx_v_self = values[0];
14182 __pyx_v_ioctx = values[1];
14183 }
14184 goto __pyx_L4_argument_unpacking_done;
14185 __pyx_L5_argtuple_error:;
14186 __Pyx_RaiseArgtupleInvalid("trash_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__14186; goto __pyx_L3_error;}
14187 __pyx_L3_error:;
14188 __Pyx_AddTraceback("rbd.RBD.trash_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
14189 __Pyx_RefNannyFinishContext();
14190 return NULL((void*)0);
14191 __pyx_L4_argument_unpacking_done:;
14192 __pyx_r = __pyx_pf_3rbd_3RBD_22trash_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
14193
14194 /* function exit code */
14195 __Pyx_RefNannyFinishContext();
14196 return __pyx_r;
14197}
14198
14199static PyObject *__pyx_pf_3rbd_3RBD_22trash_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
14200 PyObject *__pyx_r = NULL((void*)0);
14201 __Pyx_RefNannyDeclarations
14202 PyObject *__pyx_t_1 = NULL((void*)0);
14203 PyObject *__pyx_t_2 = NULL((void*)0);
14204 int __pyx_lineno = 0;
14205 const char *__pyx_filename = NULL((void*)0);
14206 int __pyx_clineno = 0;
14207 __Pyx_RefNannySetupContext("trash_list", 0);
14208
14209 /* "rbd.pyx":1450
14210 * :returns: :class:`TrashIterator`
14211 * """
14212 * return TrashIterator(ioctx) # <<<<<<<<<<<<<<
14213 *
14214 * def trash_restore(self, ioctx, image_id, name):
14215 */
14216 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
14217 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__14217; goto __pyx_L1_error;}
14218 __Pyx_GOTREF(__pyx_t_1);
14219 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
14220 __Pyx_GIVEREF(__pyx_v_ioctx);
14221 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
14222 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_TrashIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__14222; goto __pyx_L1_error;}
14223 __Pyx_GOTREF(__pyx_t_2);
14224 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14225 __pyx_r = __pyx_t_2;
14226 __pyx_t_2 = 0;
14227 goto __pyx_L0;
14228
14229 /* "rbd.pyx":1442
14230 * return info
14231 *
14232 * def trash_list(self, ioctx): # <<<<<<<<<<<<<<
14233 * """
14234 * List all entries from trash.
14235 */
14236
14237 /* function exit code */
14238 __pyx_L1_error:;
14239 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
14240 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
14241 __Pyx_AddTraceback("rbd.RBD.trash_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
14242 __pyx_r = NULL((void*)0);
14243 __pyx_L0:;
14244 __Pyx_XGIVEREF(__pyx_r);
14245 __Pyx_RefNannyFinishContext();
14246 return __pyx_r;
14247}
14248
14249/* "rbd.pyx":1452
14250 * return TrashIterator(ioctx)
14251 *
14252 * def trash_restore(self, ioctx, image_id, name): # <<<<<<<<<<<<<<
14253 * """
14254 * Restore an RBD image from trash.
14255 */
14256
14257/* Python wrapper */
14258static PyObject *__pyx_pw_3rbd_3RBD_25trash_restore(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14259static char __pyx_doc_3rbd_3RBD_24trash_restore[] = "RBD.trash_restore(self, ioctx, image_id, name)\n\n Restore an RBD image from trash.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_id: the id of the image to restore\n :type image_id: str\n :param name: the new name of the restored image\n :type name: str\n :raises: :class:`ImageNotFound`\n ";
14260static PyMethodDef __pyx_mdef_3rbd_3RBD_25trash_restore = {"trash_restore", (PyCFunction)__pyx_pw_3rbd_3RBD_25trash_restore, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_24trash_restore};
14261static PyObject *__pyx_pw_3rbd_3RBD_25trash_restore(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14262 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
14263 PyObject *__pyx_v_ioctx = 0;
14264 PyObject *__pyx_v_image_id = 0;
14265 PyObject *__pyx_v_name = 0;
14266 int __pyx_lineno = 0;
14267 const char *__pyx_filename = NULL((void*)0);
14268 int __pyx_clineno = 0;
14269 PyObject *__pyx_r = 0;
14270 __Pyx_RefNannyDeclarations
14271 __Pyx_RefNannySetupContext("trash_restore (wrapper)", 0);
14272 {
14273 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_id,&__pyx_n_s_name,0};
14274 PyObject* values[4] = {0,0,0,0};
14275 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
14276 Py_ssize_t kw_args;
14277 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
14278 switch (pos_args) {
14279 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
14280 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
14281 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
14282 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
14283 case 0: break;
14284 default: goto __pyx_L5_argtuple_error;
14285 }
14286 kw_args = PyDict_Size(__pyx_kwds);
14287 switch (pos_args) {
14288 case 0:
14289 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
14290 else goto __pyx_L5_argtuple_error;
14291 case 1:
14292 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
14293 else {
14294 __Pyx_RaiseArgtupleInvalid("trash_restore", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__14294; goto __pyx_L3_error;}
14295 }
14296 case 2:
14297 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id
)) != 0), 1)
) kw_args--;
14298 else {
14299 __Pyx_RaiseArgtupleInvalid("trash_restore", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__14299; goto __pyx_L3_error;}
14300 }
14301 case 3:
14302 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
14303 else {
14304 __Pyx_RaiseArgtupleInvalid("trash_restore", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__14304; goto __pyx_L3_error;}
14305 }
14306 }
14307 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
14308 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trash_restore") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "trash_restore") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__14308; goto __pyx_L3_error;}
14309 }
14310 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
14311 goto __pyx_L5_argtuple_error;
14312 } else {
14313 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
14314 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
14315 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
14316 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
14317 }
14318 __pyx_v_self = values[0];
14319 __pyx_v_ioctx = values[1];
14320 __pyx_v_image_id = values[2];
14321 __pyx_v_name = values[3];
14322 }
14323 goto __pyx_L4_argument_unpacking_done;
14324 __pyx_L5_argtuple_error:;
14325 __Pyx_RaiseArgtupleInvalid("trash_restore", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__14325; goto __pyx_L3_error;}
14326 __pyx_L3_error:;
14327 __Pyx_AddTraceback("rbd.RBD.trash_restore", __pyx_clineno, __pyx_lineno, __pyx_filename);
14328 __Pyx_RefNannyFinishContext();
14329 return NULL((void*)0);
14330 __pyx_L4_argument_unpacking_done:;
14331 __pyx_r = __pyx_pf_3rbd_3RBD_24trash_restore(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_id, __pyx_v_name);
14332
14333 /* function exit code */
14334 __Pyx_RefNannyFinishContext();
14335 return __pyx_r;
14336}
14337
14338static PyObject *__pyx_pf_3rbd_3RBD_24trash_restore(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_id, PyObject *__pyx_v_name) {
14339 rados_ioctx_t __pyx_v__ioctx;
14340 char *__pyx_v__image_id;
14341 char *__pyx_v__name;
14342 int __pyx_v_ret;
14343 PyObject *__pyx_r = NULL((void*)0);
14344 __Pyx_RefNannyDeclarations
14345 PyObject *__pyx_t_1 = NULL((void*)0);
14346 PyObject *__pyx_t_2 = NULL((void*)0);
14347 PyObject *__pyx_t_3 = NULL((void*)0);
14348 Py_ssize_t __pyx_t_4;
14349 PyObject *__pyx_t_5 = NULL((void*)0);
14350 rados_ioctx_t __pyx_t_6;
14351 char *__pyx_t_7;
14352 int __pyx_t_8;
14353 int __pyx_lineno = 0;
14354 const char *__pyx_filename = NULL((void*)0);
14355 int __pyx_clineno = 0;
14356 __Pyx_RefNannySetupContext("trash_restore", 0);
14357 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
14358 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
14359
14360 /* "rbd.pyx":1464
14361 * :raises: :class:`ImageNotFound`
14362 * """
14363 * image_id = cstr(image_id, 'image_id') # <<<<<<<<<<<<<<
14364 * name = cstr(name, 'name')
14365 * cdef:
14366 */
14367 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__14367; goto __pyx_L1_error;}
14368 __Pyx_GOTREF(__pyx_t_2);
14369 __pyx_t_3 = NULL((void*)0);
14370 __pyx_t_4 = 0;
14371 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
14372 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
14373 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
14374 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
14375 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
14376 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14377 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14378 __pyx_t_4 = 1;
14379 }
14380 }
14381 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__14381; goto __pyx_L1_error;}
14382 __Pyx_GOTREF(__pyx_t_5);
14383 if (__pyx_t_3) {
14384 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
14385 }
14386 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
14387 __Pyx_GIVEREF(__pyx_v_image_id);
14388 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_id
)
;
14389 __Pyx_INCREF(__pyx_n_s_image_id)( ((PyObject*)(__pyx_n_s_image_id))->ob_refcnt++);
14390 __Pyx_GIVEREF(__pyx_n_s_image_id);
14391 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_id
)
;
14392 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; __pyx_clineno = __LINE__14392; goto __pyx_L1_error;}
14393 __Pyx_GOTREF(__pyx_t_1);
14394 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14395 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14396 __Pyx_DECREF_SET(__pyx_v_image_id, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_id; __pyx_v_image_id
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
14397 __pyx_t_1 = 0;
14398
14399 /* "rbd.pyx":1465
14400 * """
14401 * image_id = cstr(image_id, 'image_id')
14402 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
14403 * cdef:
14404 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
14405 */
14406 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__14406; goto __pyx_L1_error;}
14407 __Pyx_GOTREF(__pyx_t_2);
14408 __pyx_t_5 = NULL((void*)0);
14409 __pyx_t_4 = 0;
14410 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
14411 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
14412 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
14413 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
14414 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
14415 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14416 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14417 __pyx_t_4 = 1;
14418 }
14419 }
14420 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__14420; goto __pyx_L1_error;}
14421 __Pyx_GOTREF(__pyx_t_3);
14422 if (__pyx_t_5) {
14423 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
14424 }
14425 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
14426 __Pyx_GIVEREF(__pyx_v_name);
14427 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
14428 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
14429 __Pyx_GIVEREF(__pyx_n_s_name);
14430 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
14431 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__14431; goto __pyx_L1_error;}
14432 __Pyx_GOTREF(__pyx_t_1);
14433 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14434 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14435 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
14436 __pyx_t_1 = 0;
14437
14438 /* "rbd.pyx":1467
14439 * name = cstr(name, 'name')
14440 * cdef:
14441 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
14442 * char *_image_id = image_id
14443 * char *_name = name
14444 */
14445 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__14445; goto __pyx_L1_error;}
14446 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__14446; goto __pyx_L1_error;}
14447 __pyx_v__ioctx = __pyx_t_6;
14448
14449 /* "rbd.pyx":1468
14450 * cdef:
14451 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
14452 * char *_image_id = image_id # <<<<<<<<<<<<<<
14453 * char *_name = name
14454 * with nogil:
14455 */
14456 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_id); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __pyx_clineno = __LINE__14456; goto __pyx_L1_error;}
14457 __pyx_v__image_id = __pyx_t_7;
14458
14459 /* "rbd.pyx":1469
14460 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
14461 * char *_image_id = image_id
14462 * char *_name = name # <<<<<<<<<<<<<<
14463 * with nogil:
14464 * ret = rbd_trash_restore(_ioctx, _image_id, _name)
14465 */
14466 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__14466; goto __pyx_L1_error;}
14467 __pyx_v__name = __pyx_t_7;
14468
14469 /* "rbd.pyx":1470
14470 * char *_image_id = image_id
14471 * char *_name = name
14472 * with nogil: # <<<<<<<<<<<<<<
14473 * ret = rbd_trash_restore(_ioctx, _image_id, _name)
14474 * if ret != 0:
14475 */
14476 {
14477 #ifdef WITH_THREAD1
14478 PyThreadState *_save;
14479 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
14480 #endif
14481 /*try:*/ {
14482
14483 /* "rbd.pyx":1471
14484 * char *_name = name
14485 * with nogil:
14486 * ret = rbd_trash_restore(_ioctx, _image_id, _name) # <<<<<<<<<<<<<<
14487 * if ret != 0:
14488 * raise make_ex(ret, 'error restoring image from trash')
14489 */
14490 __pyx_v_ret = rbd_trash_restore(__pyx_v__ioctx, __pyx_v__image_id, __pyx_v__name);
14491 }
14492
14493 /* "rbd.pyx":1470
14494 * char *_image_id = image_id
14495 * char *_name = name
14496 * with nogil: # <<<<<<<<<<<<<<
14497 * ret = rbd_trash_restore(_ioctx, _image_id, _name)
14498 * if ret != 0:
14499 */
14500 /*finally:*/ {
14501 /*normal exit:*/{
14502 #ifdef WITH_THREAD1
14503 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
14504 #endif
14505 goto __pyx_L5;
14506 }
14507 __pyx_L5:;
14508 }
14509 }
14510
14511 /* "rbd.pyx":1472
14512 * with nogil:
14513 * ret = rbd_trash_restore(_ioctx, _image_id, _name)
14514 * if ret != 0: # <<<<<<<<<<<<<<
14515 * raise make_ex(ret, 'error restoring image from trash')
14516 *
14517 */
14518 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
14519 if (__pyx_t_8) {
14520
14521 /* "rbd.pyx":1473
14522 * ret = rbd_trash_restore(_ioctx, _image_id, _name)
14523 * if ret != 0:
14524 * raise make_ex(ret, 'error restoring image from trash') # <<<<<<<<<<<<<<
14525 *
14526 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name,
14527 */
14528 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__14528; goto __pyx_L1_error;}
14529 __Pyx_GOTREF(__pyx_t_1);
14530 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_restoring_image_from_trash, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__14530; goto __pyx_L1_error;}
14531 __Pyx_GOTREF(__pyx_t_2);
14532 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14533 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
14534 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14535 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__14535; goto __pyx_L1_error;}
14536
14537 /* "rbd.pyx":1472
14538 * with nogil:
14539 * ret = rbd_trash_restore(_ioctx, _image_id, _name)
14540 * if ret != 0: # <<<<<<<<<<<<<<
14541 * raise make_ex(ret, 'error restoring image from trash')
14542 *
14543 */
14544 }
14545
14546 /* "rbd.pyx":1452
14547 * return TrashIterator(ioctx)
14548 *
14549 * def trash_restore(self, ioctx, image_id, name): # <<<<<<<<<<<<<<
14550 * """
14551 * Restore an RBD image from trash.
14552 */
14553
14554 /* function exit code */
14555 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
14556 goto __pyx_L0;
14557 __pyx_L1_error:;
14558 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
14559 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
14560 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
14561 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
14562 __Pyx_AddTraceback("rbd.RBD.trash_restore", __pyx_clineno, __pyx_lineno, __pyx_filename);
14563 __pyx_r = NULL((void*)0);
14564 __pyx_L0:;
14565 __Pyx_XDECREF(__pyx_v_image_id)do { if ((__pyx_v_image_id) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_image_id))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_image_id)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_id)))); }
while (0); } while (0)
;
14566 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
14567 __Pyx_XGIVEREF(__pyx_r);
14568 __Pyx_RefNannyFinishContext();
14569 return __pyx_r;
14570}
14571
14572/* "rbd.pyx":1475
14573 * raise make_ex(ret, 'error restoring image from trash')
14574 *
14575 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name, # <<<<<<<<<<<<<<
14576 * features=None, order=None, stripe_unit=None, stripe_count=None,
14577 * data_pool=None):
14578 */
14579
14580/* Python wrapper */
14581static PyObject *__pyx_pw_3rbd_3RBD_27migration_prepare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14582static char __pyx_doc_3rbd_3RBD_26migration_prepare[] = "RBD.migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name, features=None, order=None, stripe_unit=None, stripe_count=None, data_pool=None)\n\n Prepare an RBD image migration.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_name: the current name of the image\n :type src: str\n :param dest_ioctx: determines which pool to migration into\n :type dest_ioctx: :class:`rados.Ioctx`\n :param dest_image_name: the name of the destination image (may be the same image)\n :type dest_image_name: str\n :param features: bitmask of features to enable; if set, must include layering\n :type features: int\n :param order: the image is split into (2**order) byte objects\n :type order: int\n :param stripe_unit: stripe unit in bytes (default None to let librbd decide)\n :type stripe_unit: int\n :param stripe_count: objects to stripe over before looping\n :type stripe_count: int\n :param data_pool: optional separate pool for data blocks\n :type data_pool: str\n :raises: :class:`TypeError`\n :raises: :class:`InvalidArgument`\n :raises: :class:`ImageExists`\n :raises: :class:`FunctionNotSupported`\n :raises: :class:`ArgumentOutOfRange`\n ";
14583static PyMethodDef __pyx_mdef_3rbd_3RBD_27migration_prepare = {"migration_prepare", (PyCFunction)__pyx_pw_3rbd_3RBD_27migration_prepare, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_26migration_prepare};
14584static PyObject *__pyx_pw_3rbd_3RBD_27migration_prepare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14585 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
14586 PyObject *__pyx_v_ioctx = 0;
14587 PyObject *__pyx_v_image_name = 0;
14588 PyObject *__pyx_v_dest_ioctx = 0;
14589 PyObject *__pyx_v_dest_image_name = 0;
14590 PyObject *__pyx_v_features = 0;
14591 PyObject *__pyx_v_order = 0;
14592 PyObject *__pyx_v_stripe_unit = 0;
14593 PyObject *__pyx_v_stripe_count = 0;
14594 PyObject *__pyx_v_data_pool = 0;
14595 int __pyx_lineno = 0;
14596 const char *__pyx_filename = NULL((void*)0);
14597 int __pyx_clineno = 0;
14598 PyObject *__pyx_r = 0;
14599 __Pyx_RefNannyDeclarations
14600 __Pyx_RefNannySetupContext("migration_prepare (wrapper)", 0);
14601 {
14602 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_name,&__pyx_n_s_dest_ioctx,&__pyx_n_s_dest_image_name,&__pyx_n_s_features,&__pyx_n_s_order,&__pyx_n_s_stripe_unit,&__pyx_n_s_stripe_count,&__pyx_n_s_data_pool,0};
14603 PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
14604
14605 /* "rbd.pyx":1476
14606 *
14607 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name,
14608 * features=None, order=None, stripe_unit=None, stripe_count=None, # <<<<<<<<<<<<<<
14609 * data_pool=None):
14610 * """
14611 */
14612 values[5] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
14613 values[6] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
14614 values[7] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
14615 values[8] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
14616
14617 /* "rbd.pyx":1477
14618 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name,
14619 * features=None, order=None, stripe_unit=None, stripe_count=None,
14620 * data_pool=None): # <<<<<<<<<<<<<<
14621 * """
14622 * Prepare an RBD image migration.
14623 */
14624 values[9] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
14625 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
14626 Py_ssize_t kw_args;
14627 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
14628 switch (pos_args) {
14629 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9)(((PyTupleObject *)(__pyx_args))->ob_item[9]);
14630 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8)(((PyTupleObject *)(__pyx_args))->ob_item[8]);
14631 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7)(((PyTupleObject *)(__pyx_args))->ob_item[7]);
14632 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
14633 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
14634 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
14635 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
14636 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
14637 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
14638 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
14639 case 0: break;
14640 default: goto __pyx_L5_argtuple_error;
14641 }
14642 kw_args = PyDict_Size(__pyx_kwds);
14643 switch (pos_args) {
14644 case 0:
14645 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
14646 else goto __pyx_L5_argtuple_error;
14647 case 1:
14648 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
14649 else {
14650 __Pyx_RaiseArgtupleInvalid("migration_prepare", 0, 5, 10, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__14650; goto __pyx_L3_error;}
14651 }
14652 case 2:
14653 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
14654 else {
14655 __Pyx_RaiseArgtupleInvalid("migration_prepare", 0, 5, 10, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__14655; goto __pyx_L3_error;}
14656 }
14657 case 3:
14658 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_ioctx)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_ioctx
)) != 0), 1)
) kw_args--;
14659 else {
14660 __Pyx_RaiseArgtupleInvalid("migration_prepare", 0, 5, 10, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__14660; goto __pyx_L3_error;}
14661 }
14662 case 4:
14663 if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_image_name)) != 0)__builtin_expect(!!((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_image_name
)) != 0), 1)
) kw_args--;
14664 else {
14665 __Pyx_RaiseArgtupleInvalid("migration_prepare", 0, 5, 10, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__14665; goto __pyx_L3_error;}
14666 }
14667 case 5:
14668 if (kw_args > 0) {
14669 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features);
14670 if (value) { values[5] = value; kw_args--; }
14671 }
14672 case 6:
14673 if (kw_args > 0) {
14674 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_order);
14675 if (value) { values[6] = value; kw_args--; }
14676 }
14677 case 7:
14678 if (kw_args > 0) {
14679 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_unit);
14680 if (value) { values[7] = value; kw_args--; }
14681 }
14682 case 8:
14683 if (kw_args > 0) {
14684 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_count);
14685 if (value) { values[8] = value; kw_args--; }
14686 }
14687 case 9:
14688 if (kw_args > 0) {
14689 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_pool);
14690 if (value) { values[9] = value; kw_args--; }
14691 }
14692 }
14693 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
14694 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "migration_prepare") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "migration_prepare") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__14694; goto __pyx_L3_error;}
14695 }
14696 } else {
14697 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
14698 case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9)(((PyTupleObject *)(__pyx_args))->ob_item[9]);
14699 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8)(((PyTupleObject *)(__pyx_args))->ob_item[8]);
14700 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7)(((PyTupleObject *)(__pyx_args))->ob_item[7]);
14701 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
14702 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
14703 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
14704 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
14705 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
14706 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
14707 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
14708 break;
14709 default: goto __pyx_L5_argtuple_error;
14710 }
14711 }
14712 __pyx_v_self = values[0];
14713 __pyx_v_ioctx = values[1];
14714 __pyx_v_image_name = values[2];
14715 __pyx_v_dest_ioctx = values[3];
14716 __pyx_v_dest_image_name = values[4];
14717 __pyx_v_features = values[5];
14718 __pyx_v_order = values[6];
14719 __pyx_v_stripe_unit = values[7];
14720 __pyx_v_stripe_count = values[8];
14721 __pyx_v_data_pool = values[9];
14722 }
14723 goto __pyx_L4_argument_unpacking_done;
14724 __pyx_L5_argtuple_error:;
14725 __Pyx_RaiseArgtupleInvalid("migration_prepare", 0, 5, 10, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__14725; goto __pyx_L3_error;}
14726 __pyx_L3_error:;
14727 __Pyx_AddTraceback("rbd.RBD.migration_prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
14728 __Pyx_RefNannyFinishContext();
14729 return NULL((void*)0);
14730 __pyx_L4_argument_unpacking_done:;
14731 __pyx_r = __pyx_pf_3rbd_3RBD_26migration_prepare(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_name, __pyx_v_dest_ioctx, __pyx_v_dest_image_name, __pyx_v_features, __pyx_v_order, __pyx_v_stripe_unit, __pyx_v_stripe_count, __pyx_v_data_pool);
14732
14733 /* "rbd.pyx":1475
14734 * raise make_ex(ret, 'error restoring image from trash')
14735 *
14736 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name, # <<<<<<<<<<<<<<
14737 * features=None, order=None, stripe_unit=None, stripe_count=None,
14738 * data_pool=None):
14739 */
14740
14741 /* function exit code */
14742 __Pyx_RefNannyFinishContext();
14743 return __pyx_r;
14744}
14745
14746static PyObject *__pyx_pf_3rbd_3RBD_26migration_prepare(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_dest_ioctx, PyObject *__pyx_v_dest_image_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool) {
14747 rados_ioctx_t __pyx_v__ioctx;
14748 char *__pyx_v__image_name;
14749 rados_ioctx_t __pyx_v__dest_ioctx;
14750 char *__pyx_v__dest_image_name;
14751 rbd_image_options_t __pyx_v_opts;
14752 int __pyx_v_ret;
14753 PyObject *__pyx_r = NULL((void*)0);
14754 __Pyx_RefNannyDeclarations
14755 PyObject *__pyx_t_1 = NULL((void*)0);
14756 PyObject *__pyx_t_2 = NULL((void*)0);
14757 PyObject *__pyx_t_3 = NULL((void*)0);
14758 Py_ssize_t __pyx_t_4;
14759 PyObject *__pyx_t_5 = NULL((void*)0);
14760 rados_ioctx_t __pyx_t_6;
14761 char *__pyx_t_7;
14762 int __pyx_t_8;
14763 int __pyx_t_9;
14764 int __pyx_t_10;
14765 uint64_t __pyx_t_11;
14766 char const *__pyx_t_12;
14767 int __pyx_t_13;
14768 char const *__pyx_t_14;
14769 PyObject *__pyx_t_15 = NULL((void*)0);
14770 PyObject *__pyx_t_16 = NULL((void*)0);
14771 PyObject *__pyx_t_17 = NULL((void*)0);
14772 PyObject *__pyx_t_18 = NULL((void*)0);
14773 PyObject *__pyx_t_19 = NULL((void*)0);
14774 PyObject *__pyx_t_20 = NULL((void*)0);
14775 int __pyx_lineno = 0;
14776 const char *__pyx_filename = NULL((void*)0);
14777 int __pyx_clineno = 0;
14778 __Pyx_RefNannySetupContext("migration_prepare", 0);
14779 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
14780 __Pyx_INCREF(__pyx_v_dest_image_name)( ((PyObject*)(__pyx_v_dest_image_name))->ob_refcnt++);
14781
14782 /* "rbd.pyx":1505
14783 * :raises: :class:`ArgumentOutOfRange`
14784 * """
14785 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
14786 * dest_image_name = cstr(dest_image_name, 'dest_image_name')
14787 * cdef:
14788 */
14789 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__14789; goto __pyx_L1_error;}
14790 __Pyx_GOTREF(__pyx_t_2);
14791 __pyx_t_3 = NULL((void*)0);
14792 __pyx_t_4 = 0;
14793 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
14794 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
14795 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
14796 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
14797 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
14798 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14799 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14800 __pyx_t_4 = 1;
14801 }
14802 }
14803 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__14803; goto __pyx_L1_error;}
14804 __Pyx_GOTREF(__pyx_t_5);
14805 if (__pyx_t_3) {
14806 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
14807 }
14808 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
14809 __Pyx_GIVEREF(__pyx_v_image_name);
14810 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
14811 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
14812 __Pyx_GIVEREF(__pyx_n_s_image_name);
14813 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
14814 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; __pyx_clineno = __LINE__14814; goto __pyx_L1_error;}
14815 __Pyx_GOTREF(__pyx_t_1);
14816 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
14817 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14818 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
14819 __pyx_t_1 = 0;
14820
14821 /* "rbd.pyx":1506
14822 * """
14823 * image_name = cstr(image_name, 'image_name')
14824 * dest_image_name = cstr(dest_image_name, 'dest_image_name') # <<<<<<<<<<<<<<
14825 * cdef:
14826 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
14827 */
14828 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__14828; goto __pyx_L1_error;}
14829 __Pyx_GOTREF(__pyx_t_2);
14830 __pyx_t_5 = NULL((void*)0);
14831 __pyx_t_4 = 0;
14832 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
14833 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
14834 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
14835 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
14836 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
14837 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
14838 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
14839 __pyx_t_4 = 1;
14840 }
14841 }
14842 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__14842; goto __pyx_L1_error;}
14843 __Pyx_GOTREF(__pyx_t_3);
14844 if (__pyx_t_5) {
14845 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
14846 }
14847 __Pyx_INCREF(__pyx_v_dest_image_name)( ((PyObject*)(__pyx_v_dest_image_name))->ob_refcnt++);
14848 __Pyx_GIVEREF(__pyx_v_dest_image_name);
14849 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dest_image_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_dest_image_name
)
;
14850 __Pyx_INCREF(__pyx_n_s_dest_image_name)( ((PyObject*)(__pyx_n_s_dest_image_name))->ob_refcnt++);
14851 __Pyx_GIVEREF(__pyx_n_s_dest_image_name);
14852 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_dest_image_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_dest_image_name
)
;
14853 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__14853; goto __pyx_L1_error;}
14854 __Pyx_GOTREF(__pyx_t_1);
14855 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
14856 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
14857 __Pyx_DECREF_SET(__pyx_v_dest_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_dest_image_name; __pyx_v_dest_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
14858 __pyx_t_1 = 0;
14859
14860 /* "rbd.pyx":1508
14861 * dest_image_name = cstr(dest_image_name, 'dest_image_name')
14862 * cdef:
14863 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
14864 * char *_image_name = image_name
14865 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
14866 */
14867 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__14867; goto __pyx_L1_error;}
14868 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; __pyx_clineno = __LINE__14868; goto __pyx_L1_error;}
14869 __pyx_v__ioctx = __pyx_t_6;
14870
14871 /* "rbd.pyx":1509
14872 * cdef:
14873 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
14874 * char *_image_name = image_name # <<<<<<<<<<<<<<
14875 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
14876 * char *_dest_image_name = dest_image_name
14877 */
14878 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; __pyx_clineno = __LINE__14878; goto __pyx_L1_error;}
14879 __pyx_v__image_name = __pyx_t_7;
14880
14881 /* "rbd.pyx":1510
14882 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
14883 * char *_image_name = image_name
14884 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx) # <<<<<<<<<<<<<<
14885 * char *_dest_image_name = dest_image_name
14886 * rbd_image_options_t opts
14887 */
14888 if (!(likely(((__pyx_v_dest_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dest_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_dest_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_dest_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__14888; goto __pyx_L1_error;}
14889 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_dest_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__14889; goto __pyx_L1_error;}
14890 __pyx_v__dest_ioctx = __pyx_t_6;
14891
14892 /* "rbd.pyx":1511
14893 * char *_image_name = image_name
14894 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
14895 * char *_dest_image_name = dest_image_name # <<<<<<<<<<<<<<
14896 * rbd_image_options_t opts
14897 *
14898 */
14899 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_dest_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__14899; goto __pyx_L1_error;}
14900 __pyx_v__dest_image_name = __pyx_t_7;
14901
14902 /* "rbd.pyx":1514
14903 * rbd_image_options_t opts
14904 *
14905 * rbd_image_options_create(&opts) # <<<<<<<<<<<<<<
14906 * try:
14907 * if features is not None:
14908 */
14909 rbd_image_options_create((&__pyx_v_opts));
14910
14911 /* "rbd.pyx":1515
14912 *
14913 * rbd_image_options_create(&opts)
14914 * try: # <<<<<<<<<<<<<<
14915 * if features is not None:
14916 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
14917 */
14918 /*try:*/ {
14919
14920 /* "rbd.pyx":1516
14921 * rbd_image_options_create(&opts)
14922 * try:
14923 * if features is not None: # <<<<<<<<<<<<<<
14924 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
14925 * features)
14926 */
14927 __pyx_t_8 = (__pyx_v_features != Py_None(&_Py_NoneStruct));
14928 __pyx_t_9 = (__pyx_t_8 != 0);
14929 if (__pyx_t_9) {
14930
14931 /* "rbd.pyx":1517
14932 * try:
14933 * if features is not None:
14934 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
14935 * features)
14936 * if order is not None:
14937 */
14938 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_FEATURES); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__14938; goto __pyx_L4_error;}
14939 __Pyx_GOTREF(__pyx_t_1);
14940 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__14940; goto __pyx_L4_error;}
14941 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14942
14943 /* "rbd.pyx":1518
14944 * if features is not None:
14945 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
14946 * features) # <<<<<<<<<<<<<<
14947 * if order is not None:
14948 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
14949 */
14950 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_features); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__14950; goto __pyx_L4_error;}
14951
14952 /* "rbd.pyx":1517
14953 * try:
14954 * if features is not None:
14955 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
14956 * features)
14957 * if order is not None:
14958 */
14959 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
14960
14961 /* "rbd.pyx":1516
14962 * rbd_image_options_create(&opts)
14963 * try:
14964 * if features is not None: # <<<<<<<<<<<<<<
14965 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
14966 * features)
14967 */
14968 }
14969
14970 /* "rbd.pyx":1519
14971 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
14972 * features)
14973 * if order is not None: # <<<<<<<<<<<<<<
14974 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
14975 * order)
14976 */
14977 __pyx_t_9 = (__pyx_v_order != Py_None(&_Py_NoneStruct));
14978 __pyx_t_8 = (__pyx_t_9 != 0);
14979 if (__pyx_t_8) {
14980
14981 /* "rbd.pyx":1520
14982 * features)
14983 * if order is not None:
14984 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
14985 * order)
14986 * if stripe_unit is not None:
14987 */
14988 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_ORDER); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; __pyx_clineno = __LINE__14988; goto __pyx_L4_error;}
14989 __Pyx_GOTREF(__pyx_t_1);
14990 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; __pyx_clineno = __LINE__14990; goto __pyx_L4_error;}
14991 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
14992
14993 /* "rbd.pyx":1521
14994 * if order is not None:
14995 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
14996 * order) # <<<<<<<<<<<<<<
14997 * if stripe_unit is not None:
14998 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
14999 */
15000 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_order); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __pyx_clineno = __LINE__15000; goto __pyx_L4_error;}
15001
15002 /* "rbd.pyx":1520
15003 * features)
15004 * if order is not None:
15005 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
15006 * order)
15007 * if stripe_unit is not None:
15008 */
15009 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
15010
15011 /* "rbd.pyx":1519
15012 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
15013 * features)
15014 * if order is not None: # <<<<<<<<<<<<<<
15015 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
15016 * order)
15017 */
15018 }
15019
15020 /* "rbd.pyx":1522
15021 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
15022 * order)
15023 * if stripe_unit is not None: # <<<<<<<<<<<<<<
15024 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
15025 * stripe_unit)
15026 */
15027 __pyx_t_8 = (__pyx_v_stripe_unit != Py_None(&_Py_NoneStruct));
15028 __pyx_t_9 = (__pyx_t_8 != 0);
15029 if (__pyx_t_9) {
15030
15031 /* "rbd.pyx":1523
15032 * order)
15033 * if stripe_unit is not None:
15034 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
15035 * stripe_unit)
15036 * if stripe_count is not None:
15037 */
15038 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__15038; goto __pyx_L4_error;}
15039 __Pyx_GOTREF(__pyx_t_1);
15040 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__15040; goto __pyx_L4_error;}
15041 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15042
15043 /* "rbd.pyx":1524
15044 * if stripe_unit is not None:
15045 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
15046 * stripe_unit) # <<<<<<<<<<<<<<
15047 * if stripe_count is not None:
15048 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
15049 */
15050 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_unit); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__15050; goto __pyx_L4_error;}
15051
15052 /* "rbd.pyx":1523
15053 * order)
15054 * if stripe_unit is not None:
15055 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
15056 * stripe_unit)
15057 * if stripe_count is not None:
15058 */
15059 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
15060
15061 /* "rbd.pyx":1522
15062 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
15063 * order)
15064 * if stripe_unit is not None: # <<<<<<<<<<<<<<
15065 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
15066 * stripe_unit)
15067 */
15068 }
15069
15070 /* "rbd.pyx":1525
15071 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
15072 * stripe_unit)
15073 * if stripe_count is not None: # <<<<<<<<<<<<<<
15074 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
15075 * stripe_count)
15076 */
15077 __pyx_t_9 = (__pyx_v_stripe_count != Py_None(&_Py_NoneStruct));
15078 __pyx_t_8 = (__pyx_t_9 != 0);
15079 if (__pyx_t_8) {
15080
15081 /* "rbd.pyx":1526
15082 * stripe_unit)
15083 * if stripe_count is not None:
15084 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
15085 * stripe_count)
15086 * if data_pool is not None:
15087 */
15088 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__15088; goto __pyx_L4_error;}
15089 __Pyx_GOTREF(__pyx_t_1);
15090 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__15090; goto __pyx_L4_error;}
15091 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15092
15093 /* "rbd.pyx":1527
15094 * if stripe_count is not None:
15095 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
15096 * stripe_count) # <<<<<<<<<<<<<<
15097 * if data_pool is not None:
15098 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
15099 */
15100 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_count); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__15100; goto __pyx_L4_error;}
15101
15102 /* "rbd.pyx":1526
15103 * stripe_unit)
15104 * if stripe_count is not None:
15105 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
15106 * stripe_count)
15107 * if data_pool is not None:
15108 */
15109 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
15110
15111 /* "rbd.pyx":1525
15112 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
15113 * stripe_unit)
15114 * if stripe_count is not None: # <<<<<<<<<<<<<<
15115 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
15116 * stripe_count)
15117 */
15118 }
15119
15120 /* "rbd.pyx":1528
15121 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
15122 * stripe_count)
15123 * if data_pool is not None: # <<<<<<<<<<<<<<
15124 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
15125 * data_pool)
15126 */
15127 __pyx_t_8 = (__pyx_v_data_pool != Py_None(&_Py_NoneStruct));
15128 __pyx_t_9 = (__pyx_t_8 != 0);
15129 if (__pyx_t_9) {
15130
15131 /* "rbd.pyx":1529
15132 * stripe_count)
15133 * if data_pool is not None:
15134 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
15135 * data_pool)
15136 * with nogil:
15137 */
15138 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__15138; goto __pyx_L4_error;}
15139 __Pyx_GOTREF(__pyx_t_1);
15140 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__15140; goto __pyx_L4_error;}
15141 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15142
15143 /* "rbd.pyx":1530
15144 * if data_pool is not None:
15145 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
15146 * data_pool) # <<<<<<<<<<<<<<
15147 * with nogil:
15148 * ret = rbd_migration_prepare(_ioctx, _image_name, _dest_ioctx,
15149 */
15150 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_data_pool); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__15150; goto __pyx_L4_error;}
15151
15152 /* "rbd.pyx":1529
15153 * stripe_count)
15154 * if data_pool is not None:
15155 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
15156 * data_pool)
15157 * with nogil:
15158 */
15159 rbd_image_options_set_string(__pyx_v_opts, __pyx_t_10, __pyx_t_12);
15160
15161 /* "rbd.pyx":1528
15162 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
15163 * stripe_count)
15164 * if data_pool is not None: # <<<<<<<<<<<<<<
15165 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
15166 * data_pool)
15167 */
15168 }
15169
15170 /* "rbd.pyx":1531
15171 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
15172 * data_pool)
15173 * with nogil: # <<<<<<<<<<<<<<
15174 * ret = rbd_migration_prepare(_ioctx, _image_name, _dest_ioctx,
15175 * _dest_image_name, opts)
15176 */
15177 {
15178 #ifdef WITH_THREAD1
15179 PyThreadState *_save;
15180 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
15181 #endif
15182 /*try:*/ {
15183
15184 /* "rbd.pyx":1532
15185 * data_pool)
15186 * with nogil:
15187 * ret = rbd_migration_prepare(_ioctx, _image_name, _dest_ioctx, # <<<<<<<<<<<<<<
15188 * _dest_image_name, opts)
15189 * finally:
15190 */
15191 __pyx_v_ret = rbd_migration_prepare(__pyx_v__ioctx, __pyx_v__image_name, __pyx_v__dest_ioctx, __pyx_v__dest_image_name, __pyx_v_opts);
15192 }
15193
15194 /* "rbd.pyx":1531
15195 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
15196 * data_pool)
15197 * with nogil: # <<<<<<<<<<<<<<
15198 * ret = rbd_migration_prepare(_ioctx, _image_name, _dest_ioctx,
15199 * _dest_image_name, opts)
15200 */
15201 /*finally:*/ {
15202 /*normal exit:*/{
15203 #ifdef WITH_THREAD1
15204 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
15205 #endif
15206 goto __pyx_L13;
15207 }
15208 __pyx_L13:;
15209 }
15210 }
15211 }
15212
15213 /* "rbd.pyx":1535
15214 * _dest_image_name, opts)
15215 * finally:
15216 * rbd_image_options_destroy(opts) # <<<<<<<<<<<<<<
15217 * if ret < 0:
15218 * raise make_ex(ret, 'error migrating image %s' % (image_name))
15219 */
15220 /*finally:*/ {
15221 /*normal exit:*/{
15222 rbd_image_options_destroy(__pyx_v_opts);
15223 goto __pyx_L5;
15224 }
15225 /*exception exit:*/{
15226 __pyx_L4_error:;
15227 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
15228 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
15229 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
15230 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
15231 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
15232 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
15233 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
15234 __Pyx_XGOTREF(__pyx_t_15);
15235 __Pyx_XGOTREF(__pyx_t_16);
15236 __Pyx_XGOTREF(__pyx_t_17);
15237 __Pyx_XGOTREF(__pyx_t_18);
15238 __Pyx_XGOTREF(__pyx_t_19);
15239 __Pyx_XGOTREF(__pyx_t_20);
15240 __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
15241 {
15242 rbd_image_options_destroy(__pyx_v_opts);
15243 }
15244 if (PY_MAJOR_VERSION2 >= 3) {
15245 __Pyx_XGIVEREF(__pyx_t_18);
15246 __Pyx_XGIVEREF(__pyx_t_19);
15247 __Pyx_XGIVEREF(__pyx_t_20);
15248 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
15249 }
15250 __Pyx_XGIVEREF(__pyx_t_15);
15251 __Pyx_XGIVEREF(__pyx_t_16);
15252 __Pyx_XGIVEREF(__pyx_t_17);
15253 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
15254 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
15255 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
15256 goto __pyx_L1_error;
15257 }
15258 __pyx_L5:;
15259 }
15260
15261 /* "rbd.pyx":1536
15262 * finally:
15263 * rbd_image_options_destroy(opts)
15264 * if ret < 0: # <<<<<<<<<<<<<<
15265 * raise make_ex(ret, 'error migrating image %s' % (image_name))
15266 *
15267 */
15268 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
15269 if (__pyx_t_9) {
15270
15271 /* "rbd.pyx":1537
15272 * rbd_image_options_destroy(opts)
15273 * if ret < 0:
15274 * raise make_ex(ret, 'error migrating image %s' % (image_name)) # <<<<<<<<<<<<<<
15275 *
15276 * def migration_execute(self, ioctx, image_name, on_progress=None):
15277 */
15278 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__15278; goto __pyx_L1_error;}
15279 __Pyx_GOTREF(__pyx_t_1);
15280 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_migrating_image_s, __pyx_v_image_name)PyString_Format(__pyx_kp_s_error_migrating_image_s, __pyx_v_image_name
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__15280; goto __pyx_L1_error;}
15281 __Pyx_GOTREF(__pyx_t_2);
15282 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__15282; goto __pyx_L1_error;}
15283 __Pyx_GOTREF(__pyx_t_3);
15284 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15285 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15286 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
15287 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
15288 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__15288; goto __pyx_L1_error;}
15289
15290 /* "rbd.pyx":1536
15291 * finally:
15292 * rbd_image_options_destroy(opts)
15293 * if ret < 0: # <<<<<<<<<<<<<<
15294 * raise make_ex(ret, 'error migrating image %s' % (image_name))
15295 *
15296 */
15297 }
15298
15299 /* "rbd.pyx":1475
15300 * raise make_ex(ret, 'error restoring image from trash')
15301 *
15302 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name, # <<<<<<<<<<<<<<
15303 * features=None, order=None, stripe_unit=None, stripe_count=None,
15304 * data_pool=None):
15305 */
15306
15307 /* function exit code */
15308 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
15309 goto __pyx_L0;
15310 __pyx_L1_error:;
15311 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
15312 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
15313 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
15314 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
15315 __Pyx_AddTraceback("rbd.RBD.migration_prepare", __pyx_clineno, __pyx_lineno, __pyx_filename);
15316 __pyx_r = NULL((void*)0);
15317 __pyx_L0:;
15318 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
15319 __Pyx_XDECREF(__pyx_v_dest_image_name)do { if ((__pyx_v_dest_image_name) == ((void*)0)) ; else do {
if ( --((PyObject*)(__pyx_v_dest_image_name))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_dest_image_name
)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dest_image_name
)))); } while (0); } while (0)
;
15320 __Pyx_XGIVEREF(__pyx_r);
15321 __Pyx_RefNannyFinishContext();
15322 return __pyx_r;
15323}
15324
15325/* "rbd.pyx":1539
15326 * raise make_ex(ret, 'error migrating image %s' % (image_name))
15327 *
15328 * def migration_execute(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
15329 * """
15330 * Execute a prepared RBD image migration.
15331 */
15332
15333/* Python wrapper */
15334static PyObject *__pyx_pw_3rbd_3RBD_29migration_execute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15335static char __pyx_doc_3rbd_3RBD_28migration_execute[] = "RBD.migration_execute(self, ioctx, image_name, on_progress=None)\n\n Execute a prepared RBD image migration.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_name: the name of the image\n :type image_name: str\n :param on_progress: optional progress callback function\n :type on_progress: callback function\n :raises: :class:`ImageNotFound`\n ";
15336static PyMethodDef __pyx_mdef_3rbd_3RBD_29migration_execute = {"migration_execute", (PyCFunction)__pyx_pw_3rbd_3RBD_29migration_execute, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_28migration_execute};
15337static PyObject *__pyx_pw_3rbd_3RBD_29migration_execute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15338 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
15339 PyObject *__pyx_v_ioctx = 0;
15340 PyObject *__pyx_v_image_name = 0;
15341 PyObject *__pyx_v_on_progress = 0;
15342 int __pyx_lineno = 0;
15343 const char *__pyx_filename = NULL((void*)0);
15344 int __pyx_clineno = 0;
15345 PyObject *__pyx_r = 0;
15346 __Pyx_RefNannyDeclarations
15347 __Pyx_RefNannySetupContext("migration_execute (wrapper)", 0);
15348 {
15349 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_name,&__pyx_n_s_on_progress,0};
15350 PyObject* values[4] = {0,0,0,0};
15351 values[3] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
15352 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
15353 Py_ssize_t kw_args;
15354 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
15355 switch (pos_args) {
15356 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
15357 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
15358 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15359 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15360 case 0: break;
15361 default: goto __pyx_L5_argtuple_error;
15362 }
15363 kw_args = PyDict_Size(__pyx_kwds);
15364 switch (pos_args) {
15365 case 0:
15366 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
15367 else goto __pyx_L5_argtuple_error;
15368 case 1:
15369 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
15370 else {
15371 __Pyx_RaiseArgtupleInvalid("migration_execute", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__15371; goto __pyx_L3_error;}
15372 }
15373 case 2:
15374 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
15375 else {
15376 __Pyx_RaiseArgtupleInvalid("migration_execute", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__15376; goto __pyx_L3_error;}
15377 }
15378 case 3:
15379 if (kw_args > 0) {
15380 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_on_progress);
15381 if (value) { values[3] = value; kw_args--; }
15382 }
15383 }
15384 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
15385 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "migration_execute") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "migration_execute") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__15385; goto __pyx_L3_error;}
15386 }
15387 } else {
15388 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
15389 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
15390 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
15391 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15392 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15393 break;
15394 default: goto __pyx_L5_argtuple_error;
15395 }
15396 }
15397 __pyx_v_self = values[0];
15398 __pyx_v_ioctx = values[1];
15399 __pyx_v_image_name = values[2];
15400 __pyx_v_on_progress = values[3];
15401 }
15402 goto __pyx_L4_argument_unpacking_done;
15403 __pyx_L5_argtuple_error:;
15404 __Pyx_RaiseArgtupleInvalid("migration_execute", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__15404; goto __pyx_L3_error;}
15405 __pyx_L3_error:;
15406 __Pyx_AddTraceback("rbd.RBD.migration_execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
15407 __Pyx_RefNannyFinishContext();
15408 return NULL((void*)0);
15409 __pyx_L4_argument_unpacking_done:;
15410 __pyx_r = __pyx_pf_3rbd_3RBD_28migration_execute(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_name, __pyx_v_on_progress);
15411
15412 /* function exit code */
15413 __Pyx_RefNannyFinishContext();
15414 return __pyx_r;
15415}
15416
15417static PyObject *__pyx_pf_3rbd_3RBD_28migration_execute(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_on_progress) {
15418 rados_ioctx_t __pyx_v__ioctx;
15419 char *__pyx_v__image_name;
15420 librbd_progress_fn_t __pyx_v__prog_cb;
15421 void *__pyx_v__prog_arg;
15422 int __pyx_v_ret;
15423 PyObject *__pyx_r = NULL((void*)0);
15424 __Pyx_RefNannyDeclarations
15425 PyObject *__pyx_t_1 = NULL((void*)0);
15426 PyObject *__pyx_t_2 = NULL((void*)0);
15427 PyObject *__pyx_t_3 = NULL((void*)0);
15428 Py_ssize_t __pyx_t_4;
15429 PyObject *__pyx_t_5 = NULL((void*)0);
15430 rados_ioctx_t __pyx_t_6;
15431 char *__pyx_t_7;
15432 int __pyx_t_8;
15433 int __pyx_lineno = 0;
15434 const char *__pyx_filename = NULL((void*)0);
15435 int __pyx_clineno = 0;
15436 __Pyx_RefNannySetupContext("migration_execute", 0);
15437 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
15438
15439 /* "rbd.pyx":1551
15440 * :raises: :class:`ImageNotFound`
15441 * """
15442 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
15443 * cdef:
15444 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
15445 */
15446 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__15446; goto __pyx_L1_error;}
15447 __Pyx_GOTREF(__pyx_t_2);
15448 __pyx_t_3 = NULL((void*)0);
15449 __pyx_t_4 = 0;
15450 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
15451 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
15452 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
15453 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
15454 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
15455 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15456 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15457 __pyx_t_4 = 1;
15458 }
15459 }
15460 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__15460; goto __pyx_L1_error;}
15461 __Pyx_GOTREF(__pyx_t_5);
15462 if (__pyx_t_3) {
15463 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
15464 }
15465 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
15466 __Pyx_GIVEREF(__pyx_v_image_name);
15467 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
15468 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
15469 __Pyx_GIVEREF(__pyx_n_s_image_name);
15470 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
15471 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__15471; goto __pyx_L1_error;}
15472 __Pyx_GOTREF(__pyx_t_1);
15473 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
15474 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15475 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
15476 __pyx_t_1 = 0;
15477
15478 /* "rbd.pyx":1553
15479 * image_name = cstr(image_name, 'image_name')
15480 * cdef:
15481 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
15482 * char *_image_name = image_name
15483 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15484 */
15485 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__15485; goto __pyx_L1_error;}
15486 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__15486; goto __pyx_L1_error;}
15487 __pyx_v__ioctx = __pyx_t_6;
15488
15489 /* "rbd.pyx":1554
15490 * cdef:
15491 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
15492 * char *_image_name = image_name # <<<<<<<<<<<<<<
15493 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15494 * void *_prog_arg = NULL
15495 */
15496 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__15496; goto __pyx_L1_error;}
15497 __pyx_v__image_name = __pyx_t_7;
15498
15499 /* "rbd.pyx":1555
15500 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
15501 * char *_image_name = image_name
15502 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
15503 * void *_prog_arg = NULL
15504 * if on_progress:
15505 */
15506 __pyx_v__prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
15507
15508 /* "rbd.pyx":1556
15509 * char *_image_name = image_name
15510 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15511 * void *_prog_arg = NULL # <<<<<<<<<<<<<<
15512 * if on_progress:
15513 * _prog_cb = &progress_callback
15514 */
15515 __pyx_v__prog_arg = NULL((void*)0);
15516
15517 /* "rbd.pyx":1557
15518 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15519 * void *_prog_arg = NULL
15520 * if on_progress: # <<<<<<<<<<<<<<
15521 * _prog_cb = &progress_callback
15522 * _prog_arg = <void *>on_progress
15523 */
15524 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_on_progress); if (unlikely(__pyx_t_8 < 0)__builtin_expect(!!(__pyx_t_8 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __pyx_clineno = __LINE__15524; goto __pyx_L1_error;}
15525 if (__pyx_t_8) {
15526
15527 /* "rbd.pyx":1558
15528 * void *_prog_arg = NULL
15529 * if on_progress:
15530 * _prog_cb = &progress_callback # <<<<<<<<<<<<<<
15531 * _prog_arg = <void *>on_progress
15532 * with nogil:
15533 */
15534 __pyx_v__prog_cb = (&__pyx_f_3rbd_progress_callback);
15535
15536 /* "rbd.pyx":1559
15537 * if on_progress:
15538 * _prog_cb = &progress_callback
15539 * _prog_arg = <void *>on_progress # <<<<<<<<<<<<<<
15540 * with nogil:
15541 * ret = rbd_migration_execute_with_progress(_ioctx, _image_name,
15542 */
15543 __pyx_v__prog_arg = ((void *)__pyx_v_on_progress);
15544
15545 /* "rbd.pyx":1557
15546 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15547 * void *_prog_arg = NULL
15548 * if on_progress: # <<<<<<<<<<<<<<
15549 * _prog_cb = &progress_callback
15550 * _prog_arg = <void *>on_progress
15551 */
15552 }
15553
15554 /* "rbd.pyx":1560
15555 * _prog_cb = &progress_callback
15556 * _prog_arg = <void *>on_progress
15557 * with nogil: # <<<<<<<<<<<<<<
15558 * ret = rbd_migration_execute_with_progress(_ioctx, _image_name,
15559 * _prog_cb, _prog_arg)
15560 */
15561 {
15562 #ifdef WITH_THREAD1
15563 PyThreadState *_save;
15564 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
15565 #endif
15566 /*try:*/ {
15567
15568 /* "rbd.pyx":1561
15569 * _prog_arg = <void *>on_progress
15570 * with nogil:
15571 * ret = rbd_migration_execute_with_progress(_ioctx, _image_name, # <<<<<<<<<<<<<<
15572 * _prog_cb, _prog_arg)
15573 * if ret != 0:
15574 */
15575 __pyx_v_ret = rbd_migration_execute_with_progress(__pyx_v__ioctx, __pyx_v__image_name, __pyx_v__prog_cb, __pyx_v__prog_arg);
15576 }
15577
15578 /* "rbd.pyx":1560
15579 * _prog_cb = &progress_callback
15580 * _prog_arg = <void *>on_progress
15581 * with nogil: # <<<<<<<<<<<<<<
15582 * ret = rbd_migration_execute_with_progress(_ioctx, _image_name,
15583 * _prog_cb, _prog_arg)
15584 */
15585 /*finally:*/ {
15586 /*normal exit:*/{
15587 #ifdef WITH_THREAD1
15588 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
15589 #endif
15590 goto __pyx_L6;
15591 }
15592 __pyx_L6:;
15593 }
15594 }
15595
15596 /* "rbd.pyx":1563
15597 * ret = rbd_migration_execute_with_progress(_ioctx, _image_name,
15598 * _prog_cb, _prog_arg)
15599 * if ret != 0: # <<<<<<<<<<<<<<
15600 * raise make_ex(ret, 'error aborting migration')
15601 *
15602 */
15603 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
15604 if (__pyx_t_8) {
15605
15606 /* "rbd.pyx":1564
15607 * _prog_cb, _prog_arg)
15608 * if ret != 0:
15609 * raise make_ex(ret, 'error aborting migration') # <<<<<<<<<<<<<<
15610 *
15611 * def migration_commit(self, ioctx, image_name, on_progress=None):
15612 */
15613 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__15613; goto __pyx_L1_error;}
15614 __Pyx_GOTREF(__pyx_t_1);
15615 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_aborting_migration, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__15615; goto __pyx_L1_error;}
15616 __Pyx_GOTREF(__pyx_t_2);
15617 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15618 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15619 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15620 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__15620; goto __pyx_L1_error;}
15621
15622 /* "rbd.pyx":1563
15623 * ret = rbd_migration_execute_with_progress(_ioctx, _image_name,
15624 * _prog_cb, _prog_arg)
15625 * if ret != 0: # <<<<<<<<<<<<<<
15626 * raise make_ex(ret, 'error aborting migration')
15627 *
15628 */
15629 }
15630
15631 /* "rbd.pyx":1539
15632 * raise make_ex(ret, 'error migrating image %s' % (image_name))
15633 *
15634 * def migration_execute(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
15635 * """
15636 * Execute a prepared RBD image migration.
15637 */
15638
15639 /* function exit code */
15640 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
15641 goto __pyx_L0;
15642 __pyx_L1_error:;
15643 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
15644 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
15645 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
15646 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
15647 __Pyx_AddTraceback("rbd.RBD.migration_execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
15648 __pyx_r = NULL((void*)0);
15649 __pyx_L0:;
15650 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
15651 __Pyx_XGIVEREF(__pyx_r);
15652 __Pyx_RefNannyFinishContext();
15653 return __pyx_r;
15654}
15655
15656/* "rbd.pyx":1566
15657 * raise make_ex(ret, 'error aborting migration')
15658 *
15659 * def migration_commit(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
15660 * """
15661 * Commit an executed RBD image migration.
15662 */
15663
15664/* Python wrapper */
15665static PyObject *__pyx_pw_3rbd_3RBD_31migration_commit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15666static char __pyx_doc_3rbd_3RBD_30migration_commit[] = "RBD.migration_commit(self, ioctx, image_name, on_progress=None)\n\n Commit an executed RBD image migration.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_name: the name of the image\n :type image_name: str\n :param on_progress: optional progress callback function\n :type on_progress: callback function\n :raises: :class:`ImageNotFound`\n ";
15667static PyMethodDef __pyx_mdef_3rbd_3RBD_31migration_commit = {"migration_commit", (PyCFunction)__pyx_pw_3rbd_3RBD_31migration_commit, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_30migration_commit};
15668static PyObject *__pyx_pw_3rbd_3RBD_31migration_commit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15669 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
15670 PyObject *__pyx_v_ioctx = 0;
15671 PyObject *__pyx_v_image_name = 0;
15672 PyObject *__pyx_v_on_progress = 0;
15673 int __pyx_lineno = 0;
15674 const char *__pyx_filename = NULL((void*)0);
15675 int __pyx_clineno = 0;
15676 PyObject *__pyx_r = 0;
15677 __Pyx_RefNannyDeclarations
15678 __Pyx_RefNannySetupContext("migration_commit (wrapper)", 0);
15679 {
15680 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_name,&__pyx_n_s_on_progress,0};
15681 PyObject* values[4] = {0,0,0,0};
15682 values[3] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
15683 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
15684 Py_ssize_t kw_args;
15685 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
15686 switch (pos_args) {
15687 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
15688 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
15689 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15690 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15691 case 0: break;
15692 default: goto __pyx_L5_argtuple_error;
15693 }
15694 kw_args = PyDict_Size(__pyx_kwds);
15695 switch (pos_args) {
15696 case 0:
15697 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
15698 else goto __pyx_L5_argtuple_error;
15699 case 1:
15700 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
15701 else {
15702 __Pyx_RaiseArgtupleInvalid("migration_commit", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__15702; goto __pyx_L3_error;}
15703 }
15704 case 2:
15705 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
15706 else {
15707 __Pyx_RaiseArgtupleInvalid("migration_commit", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__15707; goto __pyx_L3_error;}
15708 }
15709 case 3:
15710 if (kw_args > 0) {
15711 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_on_progress);
15712 if (value) { values[3] = value; kw_args--; }
15713 }
15714 }
15715 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
15716 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "migration_commit") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "migration_commit") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__15716; goto __pyx_L3_error;}
15717 }
15718 } else {
15719 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
15720 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
15721 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
15722 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
15723 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
15724 break;
15725 default: goto __pyx_L5_argtuple_error;
15726 }
15727 }
15728 __pyx_v_self = values[0];
15729 __pyx_v_ioctx = values[1];
15730 __pyx_v_image_name = values[2];
15731 __pyx_v_on_progress = values[3];
15732 }
15733 goto __pyx_L4_argument_unpacking_done;
15734 __pyx_L5_argtuple_error:;
15735 __Pyx_RaiseArgtupleInvalid("migration_commit", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__15735; goto __pyx_L3_error;}
15736 __pyx_L3_error:;
15737 __Pyx_AddTraceback("rbd.RBD.migration_commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
15738 __Pyx_RefNannyFinishContext();
15739 return NULL((void*)0);
15740 __pyx_L4_argument_unpacking_done:;
15741 __pyx_r = __pyx_pf_3rbd_3RBD_30migration_commit(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_name, __pyx_v_on_progress);
15742
15743 /* function exit code */
15744 __Pyx_RefNannyFinishContext();
15745 return __pyx_r;
15746}
15747
15748static PyObject *__pyx_pf_3rbd_3RBD_30migration_commit(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_on_progress) {
15749 rados_ioctx_t __pyx_v__ioctx;
15750 char *__pyx_v__image_name;
15751 librbd_progress_fn_t __pyx_v__prog_cb;
15752 void *__pyx_v__prog_arg;
15753 int __pyx_v_ret;
15754 PyObject *__pyx_r = NULL((void*)0);
15755 __Pyx_RefNannyDeclarations
15756 PyObject *__pyx_t_1 = NULL((void*)0);
15757 PyObject *__pyx_t_2 = NULL((void*)0);
15758 PyObject *__pyx_t_3 = NULL((void*)0);
15759 Py_ssize_t __pyx_t_4;
15760 PyObject *__pyx_t_5 = NULL((void*)0);
15761 rados_ioctx_t __pyx_t_6;
15762 char *__pyx_t_7;
15763 int __pyx_t_8;
15764 int __pyx_lineno = 0;
15765 const char *__pyx_filename = NULL((void*)0);
15766 int __pyx_clineno = 0;
15767 __Pyx_RefNannySetupContext("migration_commit", 0);
15768 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
15769
15770 /* "rbd.pyx":1578
15771 * :raises: :class:`ImageNotFound`
15772 * """
15773 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
15774 * cdef:
15775 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
15776 */
15777 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__15777; goto __pyx_L1_error;}
15778 __Pyx_GOTREF(__pyx_t_2);
15779 __pyx_t_3 = NULL((void*)0);
15780 __pyx_t_4 = 0;
15781 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
15782 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
15783 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
15784 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
15785 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
15786 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
15787 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
15788 __pyx_t_4 = 1;
15789 }
15790 }
15791 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__15791; goto __pyx_L1_error;}
15792 __Pyx_GOTREF(__pyx_t_5);
15793 if (__pyx_t_3) {
15794 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
15795 }
15796 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
15797 __Pyx_GIVEREF(__pyx_v_image_name);
15798 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
15799 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
15800 __Pyx_GIVEREF(__pyx_n_s_image_name);
15801 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
15802 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__15802; goto __pyx_L1_error;}
15803 __Pyx_GOTREF(__pyx_t_1);
15804 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
15805 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15806 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
15807 __pyx_t_1 = 0;
15808
15809 /* "rbd.pyx":1580
15810 * image_name = cstr(image_name, 'image_name')
15811 * cdef:
15812 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
15813 * char *_image_name = image_name
15814 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15815 */
15816 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__15816; goto __pyx_L1_error;}
15817 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__15817; goto __pyx_L1_error;}
15818 __pyx_v__ioctx = __pyx_t_6;
15819
15820 /* "rbd.pyx":1581
15821 * cdef:
15822 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
15823 * char *_image_name = image_name # <<<<<<<<<<<<<<
15824 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15825 * void *_prog_arg = NULL
15826 */
15827 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; __pyx_clineno = __LINE__15827; goto __pyx_L1_error;}
15828 __pyx_v__image_name = __pyx_t_7;
15829
15830 /* "rbd.pyx":1582
15831 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
15832 * char *_image_name = image_name
15833 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
15834 * void *_prog_arg = NULL
15835 * if on_progress:
15836 */
15837 __pyx_v__prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
15838
15839 /* "rbd.pyx":1583
15840 * char *_image_name = image_name
15841 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15842 * void *_prog_arg = NULL # <<<<<<<<<<<<<<
15843 * if on_progress:
15844 * _prog_cb = &progress_callback
15845 */
15846 __pyx_v__prog_arg = NULL((void*)0);
15847
15848 /* "rbd.pyx":1584
15849 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15850 * void *_prog_arg = NULL
15851 * if on_progress: # <<<<<<<<<<<<<<
15852 * _prog_cb = &progress_callback
15853 * _prog_arg = <void *>on_progress
15854 */
15855 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_on_progress); if (unlikely(__pyx_t_8 < 0)__builtin_expect(!!(__pyx_t_8 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __pyx_clineno = __LINE__15855; goto __pyx_L1_error;}
15856 if (__pyx_t_8) {
15857
15858 /* "rbd.pyx":1585
15859 * void *_prog_arg = NULL
15860 * if on_progress:
15861 * _prog_cb = &progress_callback # <<<<<<<<<<<<<<
15862 * _prog_arg = <void *>on_progress
15863 * with nogil:
15864 */
15865 __pyx_v__prog_cb = (&__pyx_f_3rbd_progress_callback);
15866
15867 /* "rbd.pyx":1586
15868 * if on_progress:
15869 * _prog_cb = &progress_callback
15870 * _prog_arg = <void *>on_progress # <<<<<<<<<<<<<<
15871 * with nogil:
15872 * ret = rbd_migration_commit_with_progress(_ioctx, _image_name,
15873 */
15874 __pyx_v__prog_arg = ((void *)__pyx_v_on_progress);
15875
15876 /* "rbd.pyx":1584
15877 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
15878 * void *_prog_arg = NULL
15879 * if on_progress: # <<<<<<<<<<<<<<
15880 * _prog_cb = &progress_callback
15881 * _prog_arg = <void *>on_progress
15882 */
15883 }
15884
15885 /* "rbd.pyx":1587
15886 * _prog_cb = &progress_callback
15887 * _prog_arg = <void *>on_progress
15888 * with nogil: # <<<<<<<<<<<<<<
15889 * ret = rbd_migration_commit_with_progress(_ioctx, _image_name,
15890 * _prog_cb, _prog_arg)
15891 */
15892 {
15893 #ifdef WITH_THREAD1
15894 PyThreadState *_save;
15895 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
15896 #endif
15897 /*try:*/ {
15898
15899 /* "rbd.pyx":1588
15900 * _prog_arg = <void *>on_progress
15901 * with nogil:
15902 * ret = rbd_migration_commit_with_progress(_ioctx, _image_name, # <<<<<<<<<<<<<<
15903 * _prog_cb, _prog_arg)
15904 * if ret != 0:
15905 */
15906 __pyx_v_ret = rbd_migration_commit_with_progress(__pyx_v__ioctx, __pyx_v__image_name, __pyx_v__prog_cb, __pyx_v__prog_arg);
15907 }
15908
15909 /* "rbd.pyx":1587
15910 * _prog_cb = &progress_callback
15911 * _prog_arg = <void *>on_progress
15912 * with nogil: # <<<<<<<<<<<<<<
15913 * ret = rbd_migration_commit_with_progress(_ioctx, _image_name,
15914 * _prog_cb, _prog_arg)
15915 */
15916 /*finally:*/ {
15917 /*normal exit:*/{
15918 #ifdef WITH_THREAD1
15919 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
15920 #endif
15921 goto __pyx_L6;
15922 }
15923 __pyx_L6:;
15924 }
15925 }
15926
15927 /* "rbd.pyx":1590
15928 * ret = rbd_migration_commit_with_progress(_ioctx, _image_name,
15929 * _prog_cb, _prog_arg)
15930 * if ret != 0: # <<<<<<<<<<<<<<
15931 * raise make_ex(ret, 'error aborting migration')
15932 *
15933 */
15934 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
15935 if (__pyx_t_8) {
15936
15937 /* "rbd.pyx":1591
15938 * _prog_cb, _prog_arg)
15939 * if ret != 0:
15940 * raise make_ex(ret, 'error aborting migration') # <<<<<<<<<<<<<<
15941 *
15942 * def migration_abort(self, ioctx, image_name, on_progress=None):
15943 */
15944 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__15944; goto __pyx_L1_error;}
15945 __Pyx_GOTREF(__pyx_t_1);
15946 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_aborting_migration, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__15946; goto __pyx_L1_error;}
15947 __Pyx_GOTREF(__pyx_t_2);
15948 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
15949 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
15950 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
15951 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__15951; goto __pyx_L1_error;}
15952
15953 /* "rbd.pyx":1590
15954 * ret = rbd_migration_commit_with_progress(_ioctx, _image_name,
15955 * _prog_cb, _prog_arg)
15956 * if ret != 0: # <<<<<<<<<<<<<<
15957 * raise make_ex(ret, 'error aborting migration')
15958 *
15959 */
15960 }
15961
15962 /* "rbd.pyx":1566
15963 * raise make_ex(ret, 'error aborting migration')
15964 *
15965 * def migration_commit(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
15966 * """
15967 * Commit an executed RBD image migration.
15968 */
15969
15970 /* function exit code */
15971 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
15972 goto __pyx_L0;
15973 __pyx_L1_error:;
15974 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
15975 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
15976 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
15977 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
15978 __Pyx_AddTraceback("rbd.RBD.migration_commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
15979 __pyx_r = NULL((void*)0);
15980 __pyx_L0:;
15981 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
15982 __Pyx_XGIVEREF(__pyx_r);
15983 __Pyx_RefNannyFinishContext();
15984 return __pyx_r;
15985}
15986
15987/* "rbd.pyx":1593
15988 * raise make_ex(ret, 'error aborting migration')
15989 *
15990 * def migration_abort(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
15991 * """
15992 * Cancel a previously started but interrupted migration.
15993 */
15994
15995/* Python wrapper */
15996static PyObject *__pyx_pw_3rbd_3RBD_33migration_abort(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15997static char __pyx_doc_3rbd_3RBD_32migration_abort[] = "RBD.migration_abort(self, ioctx, image_name, on_progress=None)\n\n Cancel a previously started but interrupted migration.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_name: the name of the image\n :type image_name: str\n :param on_progress: optional progress callback function\n :type on_progress: callback function\n :raises: :class:`ImageNotFound`\n ";
15998static PyMethodDef __pyx_mdef_3rbd_3RBD_33migration_abort = {"migration_abort", (PyCFunction)__pyx_pw_3rbd_3RBD_33migration_abort, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_32migration_abort};
15999static PyObject *__pyx_pw_3rbd_3RBD_33migration_abort(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16000 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
16001 PyObject *__pyx_v_ioctx = 0;
16002 PyObject *__pyx_v_image_name = 0;
16003 PyObject *__pyx_v_on_progress = 0;
16004 int __pyx_lineno = 0;
16005 const char *__pyx_filename = NULL((void*)0);
16006 int __pyx_clineno = 0;
16007 PyObject *__pyx_r = 0;
16008 __Pyx_RefNannyDeclarations
16009 __Pyx_RefNannySetupContext("migration_abort (wrapper)", 0);
16010 {
16011 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_name,&__pyx_n_s_on_progress,0};
16012 PyObject* values[4] = {0,0,0,0};
16013 values[3] = ((PyObject *)((PyObject *)Py_None(&_Py_NoneStruct)));
16014 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
16015 Py_ssize_t kw_args;
16016 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
16017 switch (pos_args) {
16018 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
16019 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
16020 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16021 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16022 case 0: break;
16023 default: goto __pyx_L5_argtuple_error;
16024 }
16025 kw_args = PyDict_Size(__pyx_kwds);
16026 switch (pos_args) {
16027 case 0:
16028 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
16029 else goto __pyx_L5_argtuple_error;
16030 case 1:
16031 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
16032 else {
16033 __Pyx_RaiseArgtupleInvalid("migration_abort", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__16033; goto __pyx_L3_error;}
16034 }
16035 case 2:
16036 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
16037 else {
16038 __Pyx_RaiseArgtupleInvalid("migration_abort", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__16038; goto __pyx_L3_error;}
16039 }
16040 case 3:
16041 if (kw_args > 0) {
16042 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_on_progress);
16043 if (value) { values[3] = value; kw_args--; }
16044 }
16045 }
16046 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
16047 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "migration_abort") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "migration_abort") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__16047; goto __pyx_L3_error;}
16048 }
16049 } else {
16050 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
16051 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
16052 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
16053 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16054 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16055 break;
16056 default: goto __pyx_L5_argtuple_error;
16057 }
16058 }
16059 __pyx_v_self = values[0];
16060 __pyx_v_ioctx = values[1];
16061 __pyx_v_image_name = values[2];
16062 __pyx_v_on_progress = values[3];
16063 }
16064 goto __pyx_L4_argument_unpacking_done;
16065 __pyx_L5_argtuple_error:;
16066 __Pyx_RaiseArgtupleInvalid("migration_abort", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__16066; goto __pyx_L3_error;}
16067 __pyx_L3_error:;
16068 __Pyx_AddTraceback("rbd.RBD.migration_abort", __pyx_clineno, __pyx_lineno, __pyx_filename);
16069 __Pyx_RefNannyFinishContext();
16070 return NULL((void*)0);
16071 __pyx_L4_argument_unpacking_done:;
16072 __pyx_r = __pyx_pf_3rbd_3RBD_32migration_abort(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_name, __pyx_v_on_progress);
16073
16074 /* function exit code */
16075 __Pyx_RefNannyFinishContext();
16076 return __pyx_r;
16077}
16078
16079static PyObject *__pyx_pf_3rbd_3RBD_32migration_abort(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name, PyObject *__pyx_v_on_progress) {
16080 rados_ioctx_t __pyx_v__ioctx;
16081 char *__pyx_v__image_name;
16082 librbd_progress_fn_t __pyx_v__prog_cb;
16083 void *__pyx_v__prog_arg;
16084 int __pyx_v_ret;
16085 PyObject *__pyx_r = NULL((void*)0);
16086 __Pyx_RefNannyDeclarations
16087 PyObject *__pyx_t_1 = NULL((void*)0);
16088 PyObject *__pyx_t_2 = NULL((void*)0);
16089 PyObject *__pyx_t_3 = NULL((void*)0);
16090 Py_ssize_t __pyx_t_4;
16091 PyObject *__pyx_t_5 = NULL((void*)0);
16092 rados_ioctx_t __pyx_t_6;
16093 char *__pyx_t_7;
16094 int __pyx_t_8;
16095 int __pyx_lineno = 0;
16096 const char *__pyx_filename = NULL((void*)0);
16097 int __pyx_clineno = 0;
16098 __Pyx_RefNannySetupContext("migration_abort", 0);
16099 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
16100
16101 /* "rbd.pyx":1605
16102 * :raises: :class:`ImageNotFound`
16103 * """
16104 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
16105 * cdef:
16106 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
16107 */
16108 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__16108; goto __pyx_L1_error;}
16109 __Pyx_GOTREF(__pyx_t_2);
16110 __pyx_t_3 = NULL((void*)0);
16111 __pyx_t_4 = 0;
16112 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
16113 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
16114 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16115 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
16116 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16117 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16118 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16119 __pyx_t_4 = 1;
16120 }
16121 }
16122 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__16122; goto __pyx_L1_error;}
16123 __Pyx_GOTREF(__pyx_t_5);
16124 if (__pyx_t_3) {
16125 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16126 }
16127 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
16128 __Pyx_GIVEREF(__pyx_v_image_name);
16129 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
16130 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
16131 __Pyx_GIVEREF(__pyx_n_s_image_name);
16132 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
16133 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__16133; goto __pyx_L1_error;}
16134 __Pyx_GOTREF(__pyx_t_1);
16135 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16136 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16137 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
16138 __pyx_t_1 = 0;
16139
16140 /* "rbd.pyx":1607
16141 * image_name = cstr(image_name, 'image_name')
16142 * cdef:
16143 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
16144 * char *_image_name = image_name
16145 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
16146 */
16147 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__16147; goto __pyx_L1_error;}
16148 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__16148; goto __pyx_L1_error;}
16149 __pyx_v__ioctx = __pyx_t_6;
16150
16151 /* "rbd.pyx":1608
16152 * cdef:
16153 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
16154 * char *_image_name = image_name # <<<<<<<<<<<<<<
16155 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
16156 * void *_prog_arg = NULL
16157 */
16158 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__16158; goto __pyx_L1_error;}
16159 __pyx_v__image_name = __pyx_t_7;
16160
16161 /* "rbd.pyx":1609
16162 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
16163 * char *_image_name = image_name
16164 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
16165 * void *_prog_arg = NULL
16166 * if on_progress:
16167 */
16168 __pyx_v__prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
16169
16170 /* "rbd.pyx":1610
16171 * char *_image_name = image_name
16172 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
16173 * void *_prog_arg = NULL # <<<<<<<<<<<<<<
16174 * if on_progress:
16175 * _prog_cb = &progress_callback
16176 */
16177 __pyx_v__prog_arg = NULL((void*)0);
16178
16179 /* "rbd.pyx":1611
16180 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
16181 * void *_prog_arg = NULL
16182 * if on_progress: # <<<<<<<<<<<<<<
16183 * _prog_cb = &progress_callback
16184 * _prog_arg = <void *>on_progress
16185 */
16186 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_on_progress); if (unlikely(__pyx_t_8 < 0)__builtin_expect(!!(__pyx_t_8 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__16186; goto __pyx_L1_error;}
16187 if (__pyx_t_8) {
16188
16189 /* "rbd.pyx":1612
16190 * void *_prog_arg = NULL
16191 * if on_progress:
16192 * _prog_cb = &progress_callback # <<<<<<<<<<<<<<
16193 * _prog_arg = <void *>on_progress
16194 * with nogil:
16195 */
16196 __pyx_v__prog_cb = (&__pyx_f_3rbd_progress_callback);
16197
16198 /* "rbd.pyx":1613
16199 * if on_progress:
16200 * _prog_cb = &progress_callback
16201 * _prog_arg = <void *>on_progress # <<<<<<<<<<<<<<
16202 * with nogil:
16203 * ret = rbd_migration_abort_with_progress(_ioctx, _image_name,
16204 */
16205 __pyx_v__prog_arg = ((void *)__pyx_v_on_progress);
16206
16207 /* "rbd.pyx":1611
16208 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
16209 * void *_prog_arg = NULL
16210 * if on_progress: # <<<<<<<<<<<<<<
16211 * _prog_cb = &progress_callback
16212 * _prog_arg = <void *>on_progress
16213 */
16214 }
16215
16216 /* "rbd.pyx":1614
16217 * _prog_cb = &progress_callback
16218 * _prog_arg = <void *>on_progress
16219 * with nogil: # <<<<<<<<<<<<<<
16220 * ret = rbd_migration_abort_with_progress(_ioctx, _image_name,
16221 * _prog_cb, _prog_arg)
16222 */
16223 {
16224 #ifdef WITH_THREAD1
16225 PyThreadState *_save;
16226 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
16227 #endif
16228 /*try:*/ {
16229
16230 /* "rbd.pyx":1615
16231 * _prog_arg = <void *>on_progress
16232 * with nogil:
16233 * ret = rbd_migration_abort_with_progress(_ioctx, _image_name, # <<<<<<<<<<<<<<
16234 * _prog_cb, _prog_arg)
16235 * if ret != 0:
16236 */
16237 __pyx_v_ret = rbd_migration_abort_with_progress(__pyx_v__ioctx, __pyx_v__image_name, __pyx_v__prog_cb, __pyx_v__prog_arg);
16238 }
16239
16240 /* "rbd.pyx":1614
16241 * _prog_cb = &progress_callback
16242 * _prog_arg = <void *>on_progress
16243 * with nogil: # <<<<<<<<<<<<<<
16244 * ret = rbd_migration_abort_with_progress(_ioctx, _image_name,
16245 * _prog_cb, _prog_arg)
16246 */
16247 /*finally:*/ {
16248 /*normal exit:*/{
16249 #ifdef WITH_THREAD1
16250 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
16251 #endif
16252 goto __pyx_L6;
16253 }
16254 __pyx_L6:;
16255 }
16256 }
16257
16258 /* "rbd.pyx":1617
16259 * ret = rbd_migration_abort_with_progress(_ioctx, _image_name,
16260 * _prog_cb, _prog_arg)
16261 * if ret != 0: # <<<<<<<<<<<<<<
16262 * raise make_ex(ret, 'error aborting migration')
16263 *
16264 */
16265 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
16266 if (__pyx_t_8) {
16267
16268 /* "rbd.pyx":1618
16269 * _prog_cb, _prog_arg)
16270 * if ret != 0:
16271 * raise make_ex(ret, 'error aborting migration') # <<<<<<<<<<<<<<
16272 *
16273 * def migration_status(self, ioctx, image_name):
16274 */
16275 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__16275; goto __pyx_L1_error;}
16276 __Pyx_GOTREF(__pyx_t_1);
16277 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_aborting_migration, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__16277; goto __pyx_L1_error;}
16278 __Pyx_GOTREF(__pyx_t_2);
16279 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16280 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
16281 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16282 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__16282; goto __pyx_L1_error;}
16283
16284 /* "rbd.pyx":1617
16285 * ret = rbd_migration_abort_with_progress(_ioctx, _image_name,
16286 * _prog_cb, _prog_arg)
16287 * if ret != 0: # <<<<<<<<<<<<<<
16288 * raise make_ex(ret, 'error aborting migration')
16289 *
16290 */
16291 }
16292
16293 /* "rbd.pyx":1593
16294 * raise make_ex(ret, 'error aborting migration')
16295 *
16296 * def migration_abort(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
16297 * """
16298 * Cancel a previously started but interrupted migration.
16299 */
16300
16301 /* function exit code */
16302 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
16303 goto __pyx_L0;
16304 __pyx_L1_error:;
16305 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
16306 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
16307 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
16308 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
16309 __Pyx_AddTraceback("rbd.RBD.migration_abort", __pyx_clineno, __pyx_lineno, __pyx_filename);
16310 __pyx_r = NULL((void*)0);
16311 __pyx_L0:;
16312 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
16313 __Pyx_XGIVEREF(__pyx_r);
16314 __Pyx_RefNannyFinishContext();
16315 return __pyx_r;
16316}
16317
16318/* "rbd.pyx":1620
16319 * raise make_ex(ret, 'error aborting migration')
16320 *
16321 * def migration_status(self, ioctx, image_name): # <<<<<<<<<<<<<<
16322 * """
16323 * Return RBD image migration status.
16324 */
16325
16326/* Python wrapper */
16327static PyObject *__pyx_pw_3rbd_3RBD_35migration_status(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16328static char __pyx_doc_3rbd_3RBD_34migration_status[] = "RBD.migration_status(self, ioctx, image_name)\n\n Return RBD image migration status.\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param image_name: the name of the image\n :type image_name: str\n :returns: dict - contains the following keys:\n\n * ``source_pool_id`` (int) - source image pool id\n\n * ``source_pool_namespace`` (str) - source image pool namespace\n\n * ``source_image_name`` (str) - source image name\n\n * ``source_image_id`` (str) - source image id\n\n * ``dest_pool_id`` (int) - destination image pool id\n\n * ``dest_pool_namespace`` (str) - destination image pool namespace\n\n * ``dest_image_name`` (str) - destination image name\n\n * ``dest_image_id`` (str) - destination image id\n\n * ``state`` (int) - current migration state\n\n * ``state_description`` (str) - migration state description\n\n :raises: :class:`ImageNotFound`\n ";
16329static PyMethodDef __pyx_mdef_3rbd_3RBD_35migration_status = {"migration_status", (PyCFunction)__pyx_pw_3rbd_3RBD_35migration_status, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_34migration_status};
16330static PyObject *__pyx_pw_3rbd_3RBD_35migration_status(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16331 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
16332 PyObject *__pyx_v_ioctx = 0;
16333 PyObject *__pyx_v_image_name = 0;
16334 int __pyx_lineno = 0;
16335 const char *__pyx_filename = NULL((void*)0);
16336 int __pyx_clineno = 0;
16337 PyObject *__pyx_r = 0;
16338 __Pyx_RefNannyDeclarations
16339 __Pyx_RefNannySetupContext("migration_status (wrapper)", 0);
16340 {
16341 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_image_name,0};
16342 PyObject* values[3] = {0,0,0};
16343 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
16344 Py_ssize_t kw_args;
16345 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
16346 switch (pos_args) {
16347 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
16348 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16349 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16350 case 0: break;
16351 default: goto __pyx_L5_argtuple_error;
16352 }
16353 kw_args = PyDict_Size(__pyx_kwds);
16354 switch (pos_args) {
16355 case 0:
16356 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
16357 else goto __pyx_L5_argtuple_error;
16358 case 1:
16359 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
16360 else {
16361 __Pyx_RaiseArgtupleInvalid("migration_status", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__16361; goto __pyx_L3_error;}
16362 }
16363 case 2:
16364 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
16365 else {
16366 __Pyx_RaiseArgtupleInvalid("migration_status", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__16366; goto __pyx_L3_error;}
16367 }
16368 }
16369 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
16370 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "migration_status") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "migration_status") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__16370; goto __pyx_L3_error;}
16371 }
16372 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
16373 goto __pyx_L5_argtuple_error;
16374 } else {
16375 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16376 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16377 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
16378 }
16379 __pyx_v_self = values[0];
16380 __pyx_v_ioctx = values[1];
16381 __pyx_v_image_name = values[2];
16382 }
16383 goto __pyx_L4_argument_unpacking_done;
16384 __pyx_L5_argtuple_error:;
16385 __Pyx_RaiseArgtupleInvalid("migration_status", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__16385; goto __pyx_L3_error;}
16386 __pyx_L3_error:;
16387 __Pyx_AddTraceback("rbd.RBD.migration_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
16388 __Pyx_RefNannyFinishContext();
16389 return NULL((void*)0);
16390 __pyx_L4_argument_unpacking_done:;
16391 __pyx_r = __pyx_pf_3rbd_3RBD_34migration_status(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_image_name);
16392
16393 /* function exit code */
16394 __Pyx_RefNannyFinishContext();
16395 return __pyx_r;
16396}
16397
16398static PyObject *__pyx_pf_3rbd_3RBD_34migration_status(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_image_name) {
16399 rados_ioctx_t __pyx_v__ioctx;
16400 char *__pyx_v__image_name;
16401 rbd_image_migration_status_t __pyx_v_c_status;
16402 int __pyx_v_ret;
16403 PyObject *__pyx_v_status = NULL((void*)0);
16404 PyObject *__pyx_r = NULL((void*)0);
16405 __Pyx_RefNannyDeclarations
16406 PyObject *__pyx_t_1 = NULL((void*)0);
16407 PyObject *__pyx_t_2 = NULL((void*)0);
16408 PyObject *__pyx_t_3 = NULL((void*)0);
16409 Py_ssize_t __pyx_t_4;
16410 PyObject *__pyx_t_5 = NULL((void*)0);
16411 rados_ioctx_t __pyx_t_6;
16412 char *__pyx_t_7;
16413 int __pyx_t_8;
16414 PyObject *__pyx_t_9 = NULL((void*)0);
16415 PyObject *__pyx_t_10 = NULL((void*)0);
16416 int __pyx_lineno = 0;
16417 const char *__pyx_filename = NULL((void*)0);
16418 int __pyx_clineno = 0;
16419 __Pyx_RefNannySetupContext("migration_status", 0);
16420 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
16421
16422 /* "rbd.pyx":1652
16423 * :raises: :class:`ImageNotFound`
16424 * """
16425 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
16426 * cdef:
16427 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
16428 */
16429 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__16429; goto __pyx_L1_error;}
16430 __Pyx_GOTREF(__pyx_t_2);
16431 __pyx_t_3 = NULL((void*)0);
16432 __pyx_t_4 = 0;
16433 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
16434 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
16435 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16436 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
16437 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16438 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16439 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16440 __pyx_t_4 = 1;
16441 }
16442 }
16443 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__16443; goto __pyx_L1_error;}
16444 __Pyx_GOTREF(__pyx_t_5);
16445 if (__pyx_t_3) {
16446 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16447 }
16448 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
16449 __Pyx_GIVEREF(__pyx_v_image_name);
16450 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
16451 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
16452 __Pyx_GIVEREF(__pyx_n_s_image_name);
16453 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
16454 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__16454; goto __pyx_L1_error;}
16455 __Pyx_GOTREF(__pyx_t_1);
16456 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16457 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16458 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
16459 __pyx_t_1 = 0;
16460
16461 /* "rbd.pyx":1654
16462 * image_name = cstr(image_name, 'image_name')
16463 * cdef:
16464 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
16465 * char *_image_name = image_name
16466 * rbd_image_migration_status_t c_status
16467 */
16468 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__16468; goto __pyx_L1_error;}
16469 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__16469; goto __pyx_L1_error;}
16470 __pyx_v__ioctx = __pyx_t_6;
16471
16472 /* "rbd.pyx":1655
16473 * cdef:
16474 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
16475 * char *_image_name = image_name # <<<<<<<<<<<<<<
16476 * rbd_image_migration_status_t c_status
16477 * with nogil:
16478 */
16479 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__16479; goto __pyx_L1_error;}
16480 __pyx_v__image_name = __pyx_t_7;
16481
16482 /* "rbd.pyx":1657
16483 * char *_image_name = image_name
16484 * rbd_image_migration_status_t c_status
16485 * with nogil: # <<<<<<<<<<<<<<
16486 * ret = rbd_migration_status(_ioctx, _image_name, &c_status,
16487 * sizeof(c_status))
16488 */
16489 {
16490 #ifdef WITH_THREAD1
16491 PyThreadState *_save;
16492 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
16493 #endif
16494 /*try:*/ {
16495
16496 /* "rbd.pyx":1658
16497 * rbd_image_migration_status_t c_status
16498 * with nogil:
16499 * ret = rbd_migration_status(_ioctx, _image_name, &c_status, # <<<<<<<<<<<<<<
16500 * sizeof(c_status))
16501 * if ret != 0:
16502 */
16503 __pyx_v_ret = rbd_migration_status(__pyx_v__ioctx, __pyx_v__image_name, (&__pyx_v_c_status), (sizeof(__pyx_v_c_status)));
16504 }
16505
16506 /* "rbd.pyx":1657
16507 * char *_image_name = image_name
16508 * rbd_image_migration_status_t c_status
16509 * with nogil: # <<<<<<<<<<<<<<
16510 * ret = rbd_migration_status(_ioctx, _image_name, &c_status,
16511 * sizeof(c_status))
16512 */
16513 /*finally:*/ {
16514 /*normal exit:*/{
16515 #ifdef WITH_THREAD1
16516 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
16517 #endif
16518 goto __pyx_L5;
16519 }
16520 __pyx_L5:;
16521 }
16522 }
16523
16524 /* "rbd.pyx":1660
16525 * ret = rbd_migration_status(_ioctx, _image_name, &c_status,
16526 * sizeof(c_status))
16527 * if ret != 0: # <<<<<<<<<<<<<<
16528 * raise make_ex(ret, 'error getting migration status')
16529 *
16530 */
16531 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
16532 if (__pyx_t_8) {
16533
16534 /* "rbd.pyx":1661
16535 * sizeof(c_status))
16536 * if ret != 0:
16537 * raise make_ex(ret, 'error getting migration status') # <<<<<<<<<<<<<<
16538 *
16539 * status = {
16540 */
16541 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__16541; goto __pyx_L1_error;}
16542 __Pyx_GOTREF(__pyx_t_1);
16543 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_getting_migration_status, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__16543; goto __pyx_L1_error;}
16544 __Pyx_GOTREF(__pyx_t_2);
16545 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16546 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
16547 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
16548 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__16548; goto __pyx_L1_error;}
16549
16550 /* "rbd.pyx":1660
16551 * ret = rbd_migration_status(_ioctx, _image_name, &c_status,
16552 * sizeof(c_status))
16553 * if ret != 0: # <<<<<<<<<<<<<<
16554 * raise make_ex(ret, 'error getting migration status')
16555 *
16556 */
16557 }
16558
16559 /* "rbd.pyx":1664
16560 *
16561 * status = {
16562 * 'source_pool_id' : c_status.source_pool_id, # <<<<<<<<<<<<<<
16563 * 'source_pool_namespace' : decode_cstr(c_status.source_pool_namespace),
16564 * 'source_image_name' : decode_cstr(c_status.source_image_name),
16565 */
16566 __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16566; goto __pyx_L1_error;}
16567 __Pyx_GOTREF(__pyx_t_2);
16568 __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_c_status.source_pool_id); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16568; goto __pyx_L1_error;}
16569 __Pyx_GOTREF(__pyx_t_1);
16570 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source_pool_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16570; goto __pyx_L1_error;}
16571 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16572
16573 /* "rbd.pyx":1665
16574 * status = {
16575 * 'source_pool_id' : c_status.source_pool_id,
16576 * 'source_pool_namespace' : decode_cstr(c_status.source_pool_namespace), # <<<<<<<<<<<<<<
16577 * 'source_image_name' : decode_cstr(c_status.source_image_name),
16578 * 'source_image_id' : decode_cstr(c_status.source_image_id),
16579 */
16580 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__16580; goto __pyx_L1_error;}
16581 __Pyx_GOTREF(__pyx_t_5);
16582 __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.source_pool_namespace); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__16582; goto __pyx_L1_error;}
16583 __Pyx_GOTREF(__pyx_t_3);
16584 __pyx_t_9 = NULL((void*)0);
16585 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16586 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16587 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
16588 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16589 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
16590 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16591 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16592 }
16593 }
16594 if (!__pyx_t_9) {
16595 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__16595; goto __pyx_L1_error;}
16596 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16597 __Pyx_GOTREF(__pyx_t_1);
16598 } else {
16599 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__16599; goto __pyx_L1_error;}
16600 __Pyx_GOTREF(__pyx_t_10);
16601 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
16602 __Pyx_GIVEREF(__pyx_t_3);
16603 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_3
)
;
16604 __pyx_t_3 = 0;
16605 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__16605; goto __pyx_L1_error;}
16606 __Pyx_GOTREF(__pyx_t_1);
16607 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
16608 }
16609 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16610 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source_pool_namespace, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16610; goto __pyx_L1_error;}
16611 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16612
16613 /* "rbd.pyx":1666
16614 * 'source_pool_id' : c_status.source_pool_id,
16615 * 'source_pool_namespace' : decode_cstr(c_status.source_pool_namespace),
16616 * 'source_image_name' : decode_cstr(c_status.source_image_name), # <<<<<<<<<<<<<<
16617 * 'source_image_id' : decode_cstr(c_status.source_image_id),
16618 * 'dest_pool_id' : c_status.source_pool_id,
16619 */
16620 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__16620; goto __pyx_L1_error;}
16621 __Pyx_GOTREF(__pyx_t_5);
16622 __pyx_t_10 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.source_image_name); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__16622; goto __pyx_L1_error;}
16623 __Pyx_GOTREF(__pyx_t_10);
16624 __pyx_t_3 = NULL((void*)0);
16625 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16626 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16627 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16628 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16629 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16630 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16631 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16632 }
16633 }
16634 if (!__pyx_t_3) {
16635 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__16635; goto __pyx_L1_error;}
16636 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
16637 __Pyx_GOTREF(__pyx_t_1);
16638 } else {
16639 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__16639; goto __pyx_L1_error;}
16640 __Pyx_GOTREF(__pyx_t_9);
16641 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16642 __Pyx_GIVEREF(__pyx_t_10);
16643 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_10
)
;
16644 __pyx_t_10 = 0;
16645 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__16645; goto __pyx_L1_error;}
16646 __Pyx_GOTREF(__pyx_t_1);
16647 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
16648 }
16649 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16650 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source_image_name, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16650; goto __pyx_L1_error;}
16651 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16652
16653 /* "rbd.pyx":1667
16654 * 'source_pool_namespace' : decode_cstr(c_status.source_pool_namespace),
16655 * 'source_image_name' : decode_cstr(c_status.source_image_name),
16656 * 'source_image_id' : decode_cstr(c_status.source_image_id), # <<<<<<<<<<<<<<
16657 * 'dest_pool_id' : c_status.source_pool_id,
16658 * 'dest_pool_namespace' : decode_cstr(c_status.dest_pool_namespace),
16659 */
16660 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__16660; goto __pyx_L1_error;}
16661 __Pyx_GOTREF(__pyx_t_5);
16662 __pyx_t_9 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.source_image_id); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__16662; goto __pyx_L1_error;}
16663 __Pyx_GOTREF(__pyx_t_9);
16664 __pyx_t_10 = NULL((void*)0);
16665 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16666 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16667 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
16668 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16669 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
16670 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16671 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16672 }
16673 }
16674 if (!__pyx_t_10) {
16675 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__16675; goto __pyx_L1_error;}
16676 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
16677 __Pyx_GOTREF(__pyx_t_1);
16678 } else {
16679 __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__16679; goto __pyx_L1_error;}
16680 __Pyx_GOTREF(__pyx_t_3);
16681 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
16682 __Pyx_GIVEREF(__pyx_t_9);
16683 PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+1] = __pyx_t_9);
16684 __pyx_t_9 = 0;
16685 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__16685; goto __pyx_L1_error;}
16686 __Pyx_GOTREF(__pyx_t_1);
16687 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16688 }
16689 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16690 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source_image_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16690; goto __pyx_L1_error;}
16691 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16692
16693 /* "rbd.pyx":1668
16694 * 'source_image_name' : decode_cstr(c_status.source_image_name),
16695 * 'source_image_id' : decode_cstr(c_status.source_image_id),
16696 * 'dest_pool_id' : c_status.source_pool_id, # <<<<<<<<<<<<<<
16697 * 'dest_pool_namespace' : decode_cstr(c_status.dest_pool_namespace),
16698 * 'dest_image_name' : decode_cstr(c_status.dest_image_name),
16699 */
16700 __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_c_status.source_pool_id); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__16700; goto __pyx_L1_error;}
16701 __Pyx_GOTREF(__pyx_t_1);
16702 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dest_pool_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16702; goto __pyx_L1_error;}
16703 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16704
16705 /* "rbd.pyx":1669
16706 * 'source_image_id' : decode_cstr(c_status.source_image_id),
16707 * 'dest_pool_id' : c_status.source_pool_id,
16708 * 'dest_pool_namespace' : decode_cstr(c_status.dest_pool_namespace), # <<<<<<<<<<<<<<
16709 * 'dest_image_name' : decode_cstr(c_status.dest_image_name),
16710 * 'dest_image_id' : decode_cstr(c_status.dest_image_id),
16711 */
16712 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__16712; goto __pyx_L1_error;}
16713 __Pyx_GOTREF(__pyx_t_5);
16714 __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.dest_pool_namespace); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__16714; goto __pyx_L1_error;}
16715 __Pyx_GOTREF(__pyx_t_3);
16716 __pyx_t_9 = NULL((void*)0);
16717 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16718 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16719 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
16720 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16721 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
16722 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16723 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16724 }
16725 }
16726 if (!__pyx_t_9) {
16727 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__16727; goto __pyx_L1_error;}
16728 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16729 __Pyx_GOTREF(__pyx_t_1);
16730 } else {
16731 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__16731; goto __pyx_L1_error;}
16732 __Pyx_GOTREF(__pyx_t_10);
16733 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
16734 __Pyx_GIVEREF(__pyx_t_3);
16735 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_3
)
;
16736 __pyx_t_3 = 0;
16737 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__16737; goto __pyx_L1_error;}
16738 __Pyx_GOTREF(__pyx_t_1);
16739 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
16740 }
16741 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16742 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dest_pool_namespace, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16742; goto __pyx_L1_error;}
16743 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16744
16745 /* "rbd.pyx":1670
16746 * 'dest_pool_id' : c_status.source_pool_id,
16747 * 'dest_pool_namespace' : decode_cstr(c_status.dest_pool_namespace),
16748 * 'dest_image_name' : decode_cstr(c_status.dest_image_name), # <<<<<<<<<<<<<<
16749 * 'dest_image_id' : decode_cstr(c_status.dest_image_id),
16750 * 'state' : c_status.state,
16751 */
16752 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__16752; goto __pyx_L1_error;}
16753 __Pyx_GOTREF(__pyx_t_5);
16754 __pyx_t_10 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.dest_image_name); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__16754; goto __pyx_L1_error;}
16755 __Pyx_GOTREF(__pyx_t_10);
16756 __pyx_t_3 = NULL((void*)0);
16757 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16758 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16759 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
16760 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16761 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
16762 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16763 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16764 }
16765 }
16766 if (!__pyx_t_3) {
16767 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__16767; goto __pyx_L1_error;}
16768 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
16769 __Pyx_GOTREF(__pyx_t_1);
16770 } else {
16771 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__16771; goto __pyx_L1_error;}
16772 __Pyx_GOTREF(__pyx_t_9);
16773 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
16774 __Pyx_GIVEREF(__pyx_t_10);
16775 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_10
)
;
16776 __pyx_t_10 = 0;
16777 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__16777; goto __pyx_L1_error;}
16778 __Pyx_GOTREF(__pyx_t_1);
16779 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
16780 }
16781 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16782 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dest_image_name, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16782; goto __pyx_L1_error;}
16783 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16784
16785 /* "rbd.pyx":1671
16786 * 'dest_pool_namespace' : decode_cstr(c_status.dest_pool_namespace),
16787 * 'dest_image_name' : decode_cstr(c_status.dest_image_name),
16788 * 'dest_image_id' : decode_cstr(c_status.dest_image_id), # <<<<<<<<<<<<<<
16789 * 'state' : c_status.state,
16790 * 'state_description' : decode_cstr(c_status.state_description)
16791 */
16792 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__16792; goto __pyx_L1_error;}
16793 __Pyx_GOTREF(__pyx_t_5);
16794 __pyx_t_9 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.dest_image_id); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__16794; goto __pyx_L1_error;}
16795 __Pyx_GOTREF(__pyx_t_9);
16796 __pyx_t_10 = NULL((void*)0);
16797 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16798 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16799 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
16800 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16801 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
16802 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16803 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16804 }
16805 }
16806 if (!__pyx_t_10) {
16807 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__16807; goto __pyx_L1_error;}
16808 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
16809 __Pyx_GOTREF(__pyx_t_1);
16810 } else {
16811 __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__16811; goto __pyx_L1_error;}
16812 __Pyx_GOTREF(__pyx_t_3);
16813 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
16814 __Pyx_GIVEREF(__pyx_t_9);
16815 PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+1] = __pyx_t_9);
16816 __pyx_t_9 = 0;
16817 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__16817; goto __pyx_L1_error;}
16818 __Pyx_GOTREF(__pyx_t_1);
16819 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16820 }
16821 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16822 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dest_image_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16822; goto __pyx_L1_error;}
16823 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16824
16825 /* "rbd.pyx":1672
16826 * 'dest_image_name' : decode_cstr(c_status.dest_image_name),
16827 * 'dest_image_id' : decode_cstr(c_status.dest_image_id),
16828 * 'state' : c_status.state, # <<<<<<<<<<<<<<
16829 * 'state_description' : decode_cstr(c_status.state_description)
16830 * }
16831 */
16832 __pyx_t_1 = __Pyx_PyInt_From_rbd_image_migration_state_t(__pyx_v_c_status.state); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__16832; goto __pyx_L1_error;}
16833 __Pyx_GOTREF(__pyx_t_1);
16834 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_state, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16834; goto __pyx_L1_error;}
16835 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16836
16837 /* "rbd.pyx":1673
16838 * 'dest_image_id' : decode_cstr(c_status.dest_image_id),
16839 * 'state' : c_status.state,
16840 * 'state_description' : decode_cstr(c_status.state_description) # <<<<<<<<<<<<<<
16841 * }
16842 *
16843 */
16844 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__16844; goto __pyx_L1_error;}
16845 __Pyx_GOTREF(__pyx_t_5);
16846 __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.state_description); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__16846; goto __pyx_L1_error;}
16847 __Pyx_GOTREF(__pyx_t_3);
16848 __pyx_t_9 = NULL((void*)0);
16849 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
16850 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
16851 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
16852 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
16853 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
16854 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
16855 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
16856 }
16857 }
16858 if (!__pyx_t_9) {
16859 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__16859; goto __pyx_L1_error;}
16860 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
16861 __Pyx_GOTREF(__pyx_t_1);
16862 } else {
16863 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__16863; goto __pyx_L1_error;}
16864 __Pyx_GOTREF(__pyx_t_10);
16865 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
16866 __Pyx_GIVEREF(__pyx_t_3);
16867 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_3
)
;
16868 __pyx_t_3 = 0;
16869 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; __pyx_clineno = __LINE__16869; goto __pyx_L1_error;}
16870 __Pyx_GOTREF(__pyx_t_1);
16871 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
16872 }
16873 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
16874 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_state_description, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; __pyx_clineno = __LINE__16874; goto __pyx_L1_error;}
16875 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
16876 __pyx_v_status = ((PyObject*)__pyx_t_2);
16877 __pyx_t_2 = 0;
16878
16879 /* "rbd.pyx":1676
16880 * }
16881 *
16882 * rbd_migration_status_cleanup(&c_status) # <<<<<<<<<<<<<<
16883 *
16884 * return status
16885 */
16886 rbd_migration_status_cleanup((&__pyx_v_c_status));
16887
16888 /* "rbd.pyx":1678
16889 * rbd_migration_status_cleanup(&c_status)
16890 *
16891 * return status # <<<<<<<<<<<<<<
16892 *
16893 * def mirror_mode_get(self, ioctx):
16894 */
16895 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
16896 __Pyx_INCREF(__pyx_v_status)( ((PyObject*)(__pyx_v_status))->ob_refcnt++);
16897 __pyx_r = __pyx_v_status;
16898 goto __pyx_L0;
16899
16900 /* "rbd.pyx":1620
16901 * raise make_ex(ret, 'error aborting migration')
16902 *
16903 * def migration_status(self, ioctx, image_name): # <<<<<<<<<<<<<<
16904 * """
16905 * Return RBD image migration status.
16906 */
16907
16908 /* function exit code */
16909 __pyx_L1_error:;
16910 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
16911 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
16912 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
16913 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
16914 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
16915 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
16916 __Pyx_AddTraceback("rbd.RBD.migration_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
16917 __pyx_r = NULL((void*)0);
16918 __pyx_L0:;
16919 __Pyx_XDECREF(__pyx_v_status)do { if ((__pyx_v_status) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_status))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_status)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_status)))); } while
(0); } while (0)
;
16920 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
16921 __Pyx_XGIVEREF(__pyx_r);
16922 __Pyx_RefNannyFinishContext();
16923 return __pyx_r;
16924}
16925
16926/* "rbd.pyx":1680
16927 * return status
16928 *
16929 * def mirror_mode_get(self, ioctx): # <<<<<<<<<<<<<<
16930 * """
16931 * Get pool mirror mode.
16932 */
16933
16934/* Python wrapper */
16935static PyObject *__pyx_pw_3rbd_3RBD_37mirror_mode_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16936static char __pyx_doc_3rbd_3RBD_36mirror_mode_get[] = "RBD.mirror_mode_get(self, ioctx)\n\n Get pool mirror mode.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: int - pool mirror mode\n ";
16937static PyMethodDef __pyx_mdef_3rbd_3RBD_37mirror_mode_get = {"mirror_mode_get", (PyCFunction)__pyx_pw_3rbd_3RBD_37mirror_mode_get, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_36mirror_mode_get};
16938static PyObject *__pyx_pw_3rbd_3RBD_37mirror_mode_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16939 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
16940 PyObject *__pyx_v_ioctx = 0;
16941 int __pyx_lineno = 0;
16942 const char *__pyx_filename = NULL((void*)0);
16943 int __pyx_clineno = 0;
16944 PyObject *__pyx_r = 0;
16945 __Pyx_RefNannyDeclarations
16946 __Pyx_RefNannySetupContext("mirror_mode_get (wrapper)", 0);
16947 {
16948 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
16949 PyObject* values[2] = {0,0};
16950 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
16951 Py_ssize_t kw_args;
16952 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
16953 switch (pos_args) {
16954 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16955 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16956 case 0: break;
16957 default: goto __pyx_L5_argtuple_error;
16958 }
16959 kw_args = PyDict_Size(__pyx_kwds);
16960 switch (pos_args) {
16961 case 0:
16962 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
16963 else goto __pyx_L5_argtuple_error;
16964 case 1:
16965 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
16966 else {
16967 __Pyx_RaiseArgtupleInvalid("mirror_mode_get", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__16967; goto __pyx_L3_error;}
16968 }
16969 }
16970 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
16971 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_mode_get") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_mode_get") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__16971; goto __pyx_L3_error;}
16972 }
16973 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
16974 goto __pyx_L5_argtuple_error;
16975 } else {
16976 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
16977 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
16978 }
16979 __pyx_v_self = values[0];
16980 __pyx_v_ioctx = values[1];
16981 }
16982 goto __pyx_L4_argument_unpacking_done;
16983 __pyx_L5_argtuple_error:;
16984 __Pyx_RaiseArgtupleInvalid("mirror_mode_get", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__16984; goto __pyx_L3_error;}
16985 __pyx_L3_error:;
16986 __Pyx_AddTraceback("rbd.RBD.mirror_mode_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
16987 __Pyx_RefNannyFinishContext();
16988 return NULL((void*)0);
16989 __pyx_L4_argument_unpacking_done:;
16990 __pyx_r = __pyx_pf_3rbd_3RBD_36mirror_mode_get(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
16991
16992 /* function exit code */
16993 __Pyx_RefNannyFinishContext();
16994 return __pyx_r;
16995}
16996
16997static PyObject *__pyx_pf_3rbd_3RBD_36mirror_mode_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
16998 rados_ioctx_t __pyx_v__ioctx;
16999 rbd_mirror_mode_t __pyx_v_mirror_mode;
17000 int __pyx_v_ret;
17001 PyObject *__pyx_r = NULL((void*)0);
17002 __Pyx_RefNannyDeclarations
17003 rados_ioctx_t __pyx_t_1;
17004 int __pyx_t_2;
17005 PyObject *__pyx_t_3 = NULL((void*)0);
17006 PyObject *__pyx_t_4 = NULL((void*)0);
17007 int __pyx_lineno = 0;
17008 const char *__pyx_filename = NULL((void*)0);
17009 int __pyx_clineno = 0;
17010 __Pyx_RefNannySetupContext("mirror_mode_get", 0);
17011
17012 /* "rbd.pyx":1689
17013 * """
17014 * cdef:
17015 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
17016 * rbd_mirror_mode_t mirror_mode
17017 * with nogil:
17018 */
17019 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__17019; goto __pyx_L1_error;}
17020 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __pyx_clineno = __LINE__17020; goto __pyx_L1_error;}
17021 __pyx_v__ioctx = __pyx_t_1;
17022
17023 /* "rbd.pyx":1691
17024 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17025 * rbd_mirror_mode_t mirror_mode
17026 * with nogil: # <<<<<<<<<<<<<<
17027 * ret = rbd_mirror_mode_get(_ioctx, &mirror_mode)
17028 * if ret != 0:
17029 */
17030 {
17031 #ifdef WITH_THREAD1
17032 PyThreadState *_save;
17033 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
17034 #endif
17035 /*try:*/ {
17036
17037 /* "rbd.pyx":1692
17038 * rbd_mirror_mode_t mirror_mode
17039 * with nogil:
17040 * ret = rbd_mirror_mode_get(_ioctx, &mirror_mode) # <<<<<<<<<<<<<<
17041 * if ret != 0:
17042 * raise make_ex(ret, 'error getting mirror mode')
17043 */
17044 __pyx_v_ret = rbd_mirror_mode_get(__pyx_v__ioctx, (&__pyx_v_mirror_mode));
17045 }
17046
17047 /* "rbd.pyx":1691
17048 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17049 * rbd_mirror_mode_t mirror_mode
17050 * with nogil: # <<<<<<<<<<<<<<
17051 * ret = rbd_mirror_mode_get(_ioctx, &mirror_mode)
17052 * if ret != 0:
17053 */
17054 /*finally:*/ {
17055 /*normal exit:*/{
17056 #ifdef WITH_THREAD1
17057 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
17058 #endif
17059 goto __pyx_L5;
17060 }
17061 __pyx_L5:;
17062 }
17063 }
17064
17065 /* "rbd.pyx":1693
17066 * with nogil:
17067 * ret = rbd_mirror_mode_get(_ioctx, &mirror_mode)
17068 * if ret != 0: # <<<<<<<<<<<<<<
17069 * raise make_ex(ret, 'error getting mirror mode')
17070 * return mirror_mode
17071 */
17072 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
17073 if (__pyx_t_2) {
17074
17075 /* "rbd.pyx":1694
17076 * ret = rbd_mirror_mode_get(_ioctx, &mirror_mode)
17077 * if ret != 0:
17078 * raise make_ex(ret, 'error getting mirror mode') # <<<<<<<<<<<<<<
17079 * return mirror_mode
17080 *
17081 */
17082 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__17082; goto __pyx_L1_error;}
17083 __Pyx_GOTREF(__pyx_t_3);
17084 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_getting_mirror_mode, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__17084; goto __pyx_L1_error;}
17085 __Pyx_GOTREF(__pyx_t_4);
17086 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
17087 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
17088 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
17089 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__17089; goto __pyx_L1_error;}
17090
17091 /* "rbd.pyx":1693
17092 * with nogil:
17093 * ret = rbd_mirror_mode_get(_ioctx, &mirror_mode)
17094 * if ret != 0: # <<<<<<<<<<<<<<
17095 * raise make_ex(ret, 'error getting mirror mode')
17096 * return mirror_mode
17097 */
17098 }
17099
17100 /* "rbd.pyx":1695
17101 * if ret != 0:
17102 * raise make_ex(ret, 'error getting mirror mode')
17103 * return mirror_mode # <<<<<<<<<<<<<<
17104 *
17105 * def mirror_mode_set(self, ioctx, mirror_mode):
17106 */
17107 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
17108 __pyx_t_4 = __Pyx_PyInt_From_rbd_mirror_mode_t(__pyx_v_mirror_mode); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__17108; goto __pyx_L1_error;}
17109 __Pyx_GOTREF(__pyx_t_4);
17110 __pyx_r = __pyx_t_4;
17111 __pyx_t_4 = 0;
17112 goto __pyx_L0;
17113
17114 /* "rbd.pyx":1680
17115 * return status
17116 *
17117 * def mirror_mode_get(self, ioctx): # <<<<<<<<<<<<<<
17118 * """
17119 * Get pool mirror mode.
17120 */
17121
17122 /* function exit code */
17123 __pyx_L1_error:;
17124 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
17125 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
17126 __Pyx_AddTraceback("rbd.RBD.mirror_mode_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
17127 __pyx_r = NULL((void*)0);
17128 __pyx_L0:;
17129 __Pyx_XGIVEREF(__pyx_r);
17130 __Pyx_RefNannyFinishContext();
17131 return __pyx_r;
17132}
17133
17134/* "rbd.pyx":1697
17135 * return mirror_mode
17136 *
17137 * def mirror_mode_set(self, ioctx, mirror_mode): # <<<<<<<<<<<<<<
17138 * """
17139 * Set pool mirror mode.
17140 */
17141
17142/* Python wrapper */
17143static PyObject *__pyx_pw_3rbd_3RBD_39mirror_mode_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17144static char __pyx_doc_3rbd_3RBD_38mirror_mode_set[] = "RBD.mirror_mode_set(self, ioctx, mirror_mode)\n\n Set pool mirror mode.\n\n :param ioctx: determines which RADOS pool is written\n :type ioctx: :class:`rados.Ioctx`\n :param mirror_mode: mirror mode to set\n :type mirror_mode: int\n ";
17145static PyMethodDef __pyx_mdef_3rbd_3RBD_39mirror_mode_set = {"mirror_mode_set", (PyCFunction)__pyx_pw_3rbd_3RBD_39mirror_mode_set, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_38mirror_mode_set};
17146static PyObject *__pyx_pw_3rbd_3RBD_39mirror_mode_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17147 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
17148 PyObject *__pyx_v_ioctx = 0;
17149 PyObject *__pyx_v_mirror_mode = 0;
17150 int __pyx_lineno = 0;
17151 const char *__pyx_filename = NULL((void*)0);
17152 int __pyx_clineno = 0;
17153 PyObject *__pyx_r = 0;
17154 __Pyx_RefNannyDeclarations
17155 __Pyx_RefNannySetupContext("mirror_mode_set (wrapper)", 0);
17156 {
17157 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_mirror_mode,0};
17158 PyObject* values[3] = {0,0,0};
17159 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
17160 Py_ssize_t kw_args;
17161 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
17162 switch (pos_args) {
17163 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17164 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17165 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17166 case 0: break;
17167 default: goto __pyx_L5_argtuple_error;
17168 }
17169 kw_args = PyDict_Size(__pyx_kwds);
17170 switch (pos_args) {
17171 case 0:
17172 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
17173 else goto __pyx_L5_argtuple_error;
17174 case 1:
17175 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
17176 else {
17177 __Pyx_RaiseArgtupleInvalid("mirror_mode_set", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__17177; goto __pyx_L3_error;}
17178 }
17179 case 2:
17180 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mirror_mode)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mirror_mode
)) != 0), 1)
) kw_args--;
17181 else {
17182 __Pyx_RaiseArgtupleInvalid("mirror_mode_set", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__17182; goto __pyx_L3_error;}
17183 }
17184 }
17185 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
17186 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_mode_set") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_mode_set") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__17186; goto __pyx_L3_error;}
17187 }
17188 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
17189 goto __pyx_L5_argtuple_error;
17190 } else {
17191 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17192 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17193 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17194 }
17195 __pyx_v_self = values[0];
17196 __pyx_v_ioctx = values[1];
17197 __pyx_v_mirror_mode = values[2];
17198 }
17199 goto __pyx_L4_argument_unpacking_done;
17200 __pyx_L5_argtuple_error:;
17201 __Pyx_RaiseArgtupleInvalid("mirror_mode_set", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__17201; goto __pyx_L3_error;}
17202 __pyx_L3_error:;
17203 __Pyx_AddTraceback("rbd.RBD.mirror_mode_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
17204 __Pyx_RefNannyFinishContext();
17205 return NULL((void*)0);
17206 __pyx_L4_argument_unpacking_done:;
17207 __pyx_r = __pyx_pf_3rbd_3RBD_38mirror_mode_set(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_mirror_mode);
17208
17209 /* function exit code */
17210 __Pyx_RefNannyFinishContext();
17211 return __pyx_r;
17212}
17213
17214static PyObject *__pyx_pf_3rbd_3RBD_38mirror_mode_set(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_mirror_mode) {
17215 rados_ioctx_t __pyx_v__ioctx;
17216 rbd_mirror_mode_t __pyx_v__mirror_mode;
17217 int __pyx_v_ret;
17218 PyObject *__pyx_r = NULL((void*)0);
17219 __Pyx_RefNannyDeclarations
17220 rados_ioctx_t __pyx_t_1;
17221 rbd_mirror_mode_t __pyx_t_2;
17222 int __pyx_t_3;
17223 PyObject *__pyx_t_4 = NULL((void*)0);
17224 PyObject *__pyx_t_5 = NULL((void*)0);
17225 int __pyx_lineno = 0;
17226 const char *__pyx_filename = NULL((void*)0);
17227 int __pyx_clineno = 0;
17228 __Pyx_RefNannySetupContext("mirror_mode_set", 0);
17229
17230 /* "rbd.pyx":1707
17231 * """
17232 * cdef:
17233 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
17234 * rbd_mirror_mode_t _mirror_mode = mirror_mode
17235 * with nogil:
17236 */
17237 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__17237; goto __pyx_L1_error;}
17238 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__17238; goto __pyx_L1_error;}
17239 __pyx_v__ioctx = __pyx_t_1;
17240
17241 /* "rbd.pyx":1708
17242 * cdef:
17243 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17244 * rbd_mirror_mode_t _mirror_mode = mirror_mode # <<<<<<<<<<<<<<
17245 * with nogil:
17246 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode)
17247 */
17248 __pyx_t_2 = ((rbd_mirror_mode_t)__Pyx_PyInt_As_rbd_mirror_mode_t(__pyx_v_mirror_mode)); if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; __pyx_clineno = __LINE__17248; goto __pyx_L1_error;}
17249 __pyx_v__mirror_mode = __pyx_t_2;
17250
17251 /* "rbd.pyx":1709
17252 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17253 * rbd_mirror_mode_t _mirror_mode = mirror_mode
17254 * with nogil: # <<<<<<<<<<<<<<
17255 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode)
17256 * if ret != 0:
17257 */
17258 {
17259 #ifdef WITH_THREAD1
17260 PyThreadState *_save;
17261 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
17262 #endif
17263 /*try:*/ {
17264
17265 /* "rbd.pyx":1710
17266 * rbd_mirror_mode_t _mirror_mode = mirror_mode
17267 * with nogil:
17268 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode) # <<<<<<<<<<<<<<
17269 * if ret != 0:
17270 * raise make_ex(ret, 'error setting mirror mode')
17271 */
17272 __pyx_v_ret = rbd_mirror_mode_set(__pyx_v__ioctx, __pyx_v__mirror_mode);
17273 }
17274
17275 /* "rbd.pyx":1709
17276 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17277 * rbd_mirror_mode_t _mirror_mode = mirror_mode
17278 * with nogil: # <<<<<<<<<<<<<<
17279 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode)
17280 * if ret != 0:
17281 */
17282 /*finally:*/ {
17283 /*normal exit:*/{
17284 #ifdef WITH_THREAD1
17285 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
17286 #endif
17287 goto __pyx_L5;
17288 }
17289 __pyx_L5:;
17290 }
17291 }
17292
17293 /* "rbd.pyx":1711
17294 * with nogil:
17295 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode)
17296 * if ret != 0: # <<<<<<<<<<<<<<
17297 * raise make_ex(ret, 'error setting mirror mode')
17298 *
17299 */
17300 __pyx_t_3 = ((__pyx_v_ret != 0) != 0);
17301 if (__pyx_t_3) {
17302
17303 /* "rbd.pyx":1712
17304 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode)
17305 * if ret != 0:
17306 * raise make_ex(ret, 'error setting mirror mode') # <<<<<<<<<<<<<<
17307 *
17308 * def mirror_peer_add(self, ioctx, cluster_name, client_name):
17309 */
17310 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__17310; goto __pyx_L1_error;}
17311 __Pyx_GOTREF(__pyx_t_4);
17312 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_setting_mirror_mode, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__17312; goto __pyx_L1_error;}
17313 __Pyx_GOTREF(__pyx_t_5);
17314 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
17315 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
17316 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
17317 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__17317; goto __pyx_L1_error;}
17318
17319 /* "rbd.pyx":1711
17320 * with nogil:
17321 * ret = rbd_mirror_mode_set(_ioctx, _mirror_mode)
17322 * if ret != 0: # <<<<<<<<<<<<<<
17323 * raise make_ex(ret, 'error setting mirror mode')
17324 *
17325 */
17326 }
17327
17328 /* "rbd.pyx":1697
17329 * return mirror_mode
17330 *
17331 * def mirror_mode_set(self, ioctx, mirror_mode): # <<<<<<<<<<<<<<
17332 * """
17333 * Set pool mirror mode.
17334 */
17335
17336 /* function exit code */
17337 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
17338 goto __pyx_L0;
17339 __pyx_L1_error:;
17340 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
17341 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
17342 __Pyx_AddTraceback("rbd.RBD.mirror_mode_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
17343 __pyx_r = NULL((void*)0);
17344 __pyx_L0:;
17345 __Pyx_XGIVEREF(__pyx_r);
17346 __Pyx_RefNannyFinishContext();
17347 return __pyx_r;
17348}
17349
17350/* "rbd.pyx":1714
17351 * raise make_ex(ret, 'error setting mirror mode')
17352 *
17353 * def mirror_peer_add(self, ioctx, cluster_name, client_name): # <<<<<<<<<<<<<<
17354 * """
17355 * Add mirror peer.
17356 */
17357
17358/* Python wrapper */
17359static PyObject *__pyx_pw_3rbd_3RBD_41mirror_peer_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17360static char __pyx_doc_3rbd_3RBD_40mirror_peer_add[] = "RBD.mirror_peer_add(self, ioctx, cluster_name, client_name)\n\n Add mirror peer.\n\n :param ioctx: determines which RADOS pool is used\n :type ioctx: :class:`rados.Ioctx`\n :param cluster_name: mirror peer cluster name\n :type cluster_name: str\n :param client_name: mirror peer client name\n :type client_name: str\n :returns: str - peer uuid\n ";
17361static PyMethodDef __pyx_mdef_3rbd_3RBD_41mirror_peer_add = {"mirror_peer_add", (PyCFunction)__pyx_pw_3rbd_3RBD_41mirror_peer_add, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_40mirror_peer_add};
17362static PyObject *__pyx_pw_3rbd_3RBD_41mirror_peer_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17363 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
17364 PyObject *__pyx_v_ioctx = 0;
17365 PyObject *__pyx_v_cluster_name = 0;
17366 PyObject *__pyx_v_client_name = 0;
17367 int __pyx_lineno = 0;
17368 const char *__pyx_filename = NULL((void*)0);
17369 int __pyx_clineno = 0;
17370 PyObject *__pyx_r = 0;
17371 __Pyx_RefNannyDeclarations
17372 __Pyx_RefNannySetupContext("mirror_peer_add (wrapper)", 0);
17373 {
17374 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_cluster_name,&__pyx_n_s_client_name,0};
17375 PyObject* values[4] = {0,0,0,0};
17376 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
17377 Py_ssize_t kw_args;
17378 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
17379 switch (pos_args) {
17380 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
17381 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17382 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17383 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17384 case 0: break;
17385 default: goto __pyx_L5_argtuple_error;
17386 }
17387 kw_args = PyDict_Size(__pyx_kwds);
17388 switch (pos_args) {
17389 case 0:
17390 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
17391 else goto __pyx_L5_argtuple_error;
17392 case 1:
17393 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
17394 else {
17395 __Pyx_RaiseArgtupleInvalid("mirror_peer_add", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__17395; goto __pyx_L3_error;}
17396 }
17397 case 2:
17398 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cluster_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cluster_name
)) != 0), 1)
) kw_args--;
17399 else {
17400 __Pyx_RaiseArgtupleInvalid("mirror_peer_add", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__17400; goto __pyx_L3_error;}
17401 }
17402 case 3:
17403 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_client_name)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_client_name
)) != 0), 1)
) kw_args--;
17404 else {
17405 __Pyx_RaiseArgtupleInvalid("mirror_peer_add", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__17405; goto __pyx_L3_error;}
17406 }
17407 }
17408 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
17409 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_add") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_add") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__17409; goto __pyx_L3_error;}
17410 }
17411 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
17412 goto __pyx_L5_argtuple_error;
17413 } else {
17414 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17415 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17416 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17417 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
17418 }
17419 __pyx_v_self = values[0];
17420 __pyx_v_ioctx = values[1];
17421 __pyx_v_cluster_name = values[2];
17422 __pyx_v_client_name = values[3];
17423 }
17424 goto __pyx_L4_argument_unpacking_done;
17425 __pyx_L5_argtuple_error:;
17426 __Pyx_RaiseArgtupleInvalid("mirror_peer_add", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__17426; goto __pyx_L3_error;}
17427 __pyx_L3_error:;
17428 __Pyx_AddTraceback("rbd.RBD.mirror_peer_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
17429 __Pyx_RefNannyFinishContext();
17430 return NULL((void*)0);
17431 __pyx_L4_argument_unpacking_done:;
17432 __pyx_r = __pyx_pf_3rbd_3RBD_40mirror_peer_add(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_cluster_name, __pyx_v_client_name);
17433
17434 /* function exit code */
17435 __Pyx_RefNannyFinishContext();
17436 return __pyx_r;
17437}
17438
17439static PyObject *__pyx_pf_3rbd_3RBD_40mirror_peer_add(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_cluster_name, PyObject *__pyx_v_client_name) {
17440 rados_ioctx_t __pyx_v__ioctx;
17441 char *__pyx_v__uuid;
17442 size_t __pyx_v__uuid_max_length;
17443 char *__pyx_v__cluster_name;
17444 char *__pyx_v__client_name;
17445 int __pyx_v_ret;
17446 PyObject *__pyx_r = NULL((void*)0);
17447 __Pyx_RefNannyDeclarations
17448 PyObject *__pyx_t_1 = NULL((void*)0);
17449 PyObject *__pyx_t_2 = NULL((void*)0);
17450 PyObject *__pyx_t_3 = NULL((void*)0);
17451 Py_ssize_t __pyx_t_4;
17452 PyObject *__pyx_t_5 = NULL((void*)0);
17453 rados_ioctx_t __pyx_t_6;
17454 char *__pyx_t_7;
17455 void *__pyx_t_8;
17456 int __pyx_t_9;
17457 PyObject *__pyx_t_10 = NULL((void*)0);
17458 int __pyx_t_11;
17459 int __pyx_t_12;
17460 char const *__pyx_t_13;
17461 PyObject *__pyx_t_14 = NULL((void*)0);
17462 PyObject *__pyx_t_15 = NULL((void*)0);
17463 PyObject *__pyx_t_16 = NULL((void*)0);
17464 PyObject *__pyx_t_17 = NULL((void*)0);
17465 PyObject *__pyx_t_18 = NULL((void*)0);
17466 PyObject *__pyx_t_19 = NULL((void*)0);
17467 int __pyx_lineno = 0;
17468 const char *__pyx_filename = NULL((void*)0);
17469 int __pyx_clineno = 0;
17470 __Pyx_RefNannySetupContext("mirror_peer_add", 0);
17471 __Pyx_INCREF(__pyx_v_cluster_name)( ((PyObject*)(__pyx_v_cluster_name))->ob_refcnt++);
17472 __Pyx_INCREF(__pyx_v_client_name)( ((PyObject*)(__pyx_v_client_name))->ob_refcnt++);
17473
17474 /* "rbd.pyx":1726
17475 * :returns: str - peer uuid
17476 * """
17477 * cluster_name = cstr(cluster_name, 'cluster_name') # <<<<<<<<<<<<<<
17478 * client_name = cstr(client_name, 'client_name')
17479 * cdef:
17480 */
17481 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__17481; goto __pyx_L1_error;}
17482 __Pyx_GOTREF(__pyx_t_2);
17483 __pyx_t_3 = NULL((void*)0);
17484 __pyx_t_4 = 0;
17485 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
17486 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
17487 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
17488 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
17489 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
17490 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
17491 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
17492 __pyx_t_4 = 1;
17493 }
17494 }
17495 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__17495; goto __pyx_L1_error;}
17496 __Pyx_GOTREF(__pyx_t_5);
17497 if (__pyx_t_3) {
17498 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
17499 }
17500 __Pyx_INCREF(__pyx_v_cluster_name)( ((PyObject*)(__pyx_v_cluster_name))->ob_refcnt++);
17501 __Pyx_GIVEREF(__pyx_v_cluster_name);
17502 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_cluster_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_cluster_name
)
;
17503 __Pyx_INCREF(__pyx_n_s_cluster_name)( ((PyObject*)(__pyx_n_s_cluster_name))->ob_refcnt++);
17504 __Pyx_GIVEREF(__pyx_n_s_cluster_name);
17505 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_cluster_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_cluster_name
)
;
17506 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__17506; goto __pyx_L1_error;}
17507 __Pyx_GOTREF(__pyx_t_1);
17508 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
17509 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17510 __Pyx_DECREF_SET(__pyx_v_cluster_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cluster_name; __pyx_v_cluster_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
17511 __pyx_t_1 = 0;
17512
17513 /* "rbd.pyx":1727
17514 * """
17515 * cluster_name = cstr(cluster_name, 'cluster_name')
17516 * client_name = cstr(client_name, 'client_name') # <<<<<<<<<<<<<<
17517 * cdef:
17518 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17519 */
17520 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__17520; goto __pyx_L1_error;}
17521 __Pyx_GOTREF(__pyx_t_2);
17522 __pyx_t_5 = NULL((void*)0);
17523 __pyx_t_4 = 0;
17524 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
17525 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
17526 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
17527 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
17528 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
17529 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
17530 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
17531 __pyx_t_4 = 1;
17532 }
17533 }
17534 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__17534; goto __pyx_L1_error;}
17535 __Pyx_GOTREF(__pyx_t_3);
17536 if (__pyx_t_5) {
17537 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
17538 }
17539 __Pyx_INCREF(__pyx_v_client_name)( ((PyObject*)(__pyx_v_client_name))->ob_refcnt++);
17540 __Pyx_GIVEREF(__pyx_v_client_name);
17541 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_client_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_client_name
)
;
17542 __Pyx_INCREF(__pyx_n_s_client_name)( ((PyObject*)(__pyx_n_s_client_name))->ob_refcnt++);
17543 __Pyx_GIVEREF(__pyx_n_s_client_name);
17544 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_client_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_client_name
)
;
17545 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__17545; goto __pyx_L1_error;}
17546 __Pyx_GOTREF(__pyx_t_1);
17547 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
17548 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17549 __Pyx_DECREF_SET(__pyx_v_client_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_client_name; __pyx_v_client_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
17550 __pyx_t_1 = 0;
17551
17552 /* "rbd.pyx":1729
17553 * client_name = cstr(client_name, 'client_name')
17554 * cdef:
17555 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
17556 * char *_uuid = NULL
17557 * size_t _uuid_max_length = 512
17558 */
17559 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__17559; goto __pyx_L1_error;}
17560 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__17560; goto __pyx_L1_error;}
17561 __pyx_v__ioctx = __pyx_t_6;
17562
17563 /* "rbd.pyx":1730
17564 * cdef:
17565 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17566 * char *_uuid = NULL # <<<<<<<<<<<<<<
17567 * size_t _uuid_max_length = 512
17568 * char *_cluster_name = cluster_name
17569 */
17570 __pyx_v__uuid = NULL((void*)0);
17571
17572 /* "rbd.pyx":1731
17573 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17574 * char *_uuid = NULL
17575 * size_t _uuid_max_length = 512 # <<<<<<<<<<<<<<
17576 * char *_cluster_name = cluster_name
17577 * char *_client_name = client_name
17578 */
17579 __pyx_v__uuid_max_length = 0x200;
17580
17581 /* "rbd.pyx":1732
17582 * char *_uuid = NULL
17583 * size_t _uuid_max_length = 512
17584 * char *_cluster_name = cluster_name # <<<<<<<<<<<<<<
17585 * char *_client_name = client_name
17586 * try:
17587 */
17588 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_cluster_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; __pyx_clineno = __LINE__17588; goto __pyx_L1_error;}
17589 __pyx_v__cluster_name = __pyx_t_7;
17590
17591 /* "rbd.pyx":1733
17592 * size_t _uuid_max_length = 512
17593 * char *_cluster_name = cluster_name
17594 * char *_client_name = client_name # <<<<<<<<<<<<<<
17595 * try:
17596 * _uuid = <char *>realloc_chk(_uuid, _uuid_max_length)
17597 */
17598 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_client_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__17598; goto __pyx_L1_error;}
17599 __pyx_v__client_name = __pyx_t_7;
17600
17601 /* "rbd.pyx":1734
17602 * char *_cluster_name = cluster_name
17603 * char *_client_name = client_name
17604 * try: # <<<<<<<<<<<<<<
17605 * _uuid = <char *>realloc_chk(_uuid, _uuid_max_length)
17606 * ret = rbd_mirror_peer_add(_ioctx, _uuid, _uuid_max_length,
17607 */
17608 /*try:*/ {
17609
17610 /* "rbd.pyx":1735
17611 * char *_client_name = client_name
17612 * try:
17613 * _uuid = <char *>realloc_chk(_uuid, _uuid_max_length) # <<<<<<<<<<<<<<
17614 * ret = rbd_mirror_peer_add(_ioctx, _uuid, _uuid_max_length,
17615 * _cluster_name, _client_name)
17616 */
17617 __pyx_t_8 = __pyx_f_3rbd_realloc_chk(__pyx_v__uuid, __pyx_v__uuid_max_length); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__17617; goto __pyx_L4_error;}
17618 __pyx_v__uuid = ((char *)__pyx_t_8);
17619
17620 /* "rbd.pyx":1736
17621 * try:
17622 * _uuid = <char *>realloc_chk(_uuid, _uuid_max_length)
17623 * ret = rbd_mirror_peer_add(_ioctx, _uuid, _uuid_max_length, # <<<<<<<<<<<<<<
17624 * _cluster_name, _client_name)
17625 * if ret != 0:
17626 */
17627 __pyx_v_ret = rbd_mirror_peer_add(__pyx_v__ioctx, __pyx_v__uuid, __pyx_v__uuid_max_length, __pyx_v__cluster_name, __pyx_v__client_name);
17628
17629 /* "rbd.pyx":1738
17630 * ret = rbd_mirror_peer_add(_ioctx, _uuid, _uuid_max_length,
17631 * _cluster_name, _client_name)
17632 * if ret != 0: # <<<<<<<<<<<<<<
17633 * raise make_ex(ret, 'error adding mirror peer')
17634 * return decode_cstr(_uuid)
17635 */
17636 __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
17637 if (__pyx_t_9) {
17638
17639 /* "rbd.pyx":1739
17640 * _cluster_name, _client_name)
17641 * if ret != 0:
17642 * raise make_ex(ret, 'error adding mirror peer') # <<<<<<<<<<<<<<
17643 * return decode_cstr(_uuid)
17644 * finally:
17645 */
17646 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__17646; goto __pyx_L4_error;}
17647 __Pyx_GOTREF(__pyx_t_1);
17648 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_adding_mirror_peer, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__17648; goto __pyx_L4_error;}
17649 __Pyx_GOTREF(__pyx_t_2);
17650 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
17651 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
17652 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17653 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__17653; goto __pyx_L4_error;}
17654
17655 /* "rbd.pyx":1738
17656 * ret = rbd_mirror_peer_add(_ioctx, _uuid, _uuid_max_length,
17657 * _cluster_name, _client_name)
17658 * if ret != 0: # <<<<<<<<<<<<<<
17659 * raise make_ex(ret, 'error adding mirror peer')
17660 * return decode_cstr(_uuid)
17661 */
17662 }
17663
17664 /* "rbd.pyx":1740
17665 * if ret != 0:
17666 * raise make_ex(ret, 'error adding mirror peer')
17667 * return decode_cstr(_uuid) # <<<<<<<<<<<<<<
17668 * finally:
17669 * free(_uuid)
17670 */
17671 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
17672 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__17672; goto __pyx_L4_error;}
17673 __Pyx_GOTREF(__pyx_t_1);
17674 __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v__uuid); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__17674; goto __pyx_L4_error;}
17675 __Pyx_GOTREF(__pyx_t_3);
17676 __pyx_t_5 = NULL((void*)0);
17677 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
17678 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
17679 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
17680 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
17681 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
17682 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
17683 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
17684 }
17685 }
17686 if (!__pyx_t_5) {
17687 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__17687; goto __pyx_L4_error;}
17688 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
17689 __Pyx_GOTREF(__pyx_t_2);
17690 } else {
17691 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__17691; goto __pyx_L4_error;}
17692 __Pyx_GOTREF(__pyx_t_10);
17693 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
17694 __Pyx_GIVEREF(__pyx_t_3);
17695 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_3
)
;
17696 __pyx_t_3 = 0;
17697 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__17697; goto __pyx_L4_error;}
17698 __Pyx_GOTREF(__pyx_t_2);
17699 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
17700 }
17701 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
17702 __pyx_r = __pyx_t_2;
17703 __pyx_t_2 = 0;
17704 goto __pyx_L3_return;
17705 }
17706
17707 /* "rbd.pyx":1742
17708 * return decode_cstr(_uuid)
17709 * finally:
17710 * free(_uuid) # <<<<<<<<<<<<<<
17711 *
17712 * def mirror_peer_remove(self, ioctx, uuid):
17713 */
17714 /*finally:*/ {
17715 /*exception exit:*/{
17716 __pyx_L4_error:;
17717 __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
17718 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
17719 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
17720 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
17721 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
17722 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
17723 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
17724 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_14, &
__pyx_t_15, &__pyx_t_16) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
17725 __Pyx_XGOTREF(__pyx_t_14);
17726 __Pyx_XGOTREF(__pyx_t_15);
17727 __Pyx_XGOTREF(__pyx_t_16);
17728 __Pyx_XGOTREF(__pyx_t_17);
17729 __Pyx_XGOTREF(__pyx_t_18);
17730 __Pyx_XGOTREF(__pyx_t_19);
17731 __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
17732 {
17733 free(__pyx_v__uuid);
17734 }
17735 if (PY_MAJOR_VERSION2 >= 3) {
17736 __Pyx_XGIVEREF(__pyx_t_17);
17737 __Pyx_XGIVEREF(__pyx_t_18);
17738 __Pyx_XGIVEREF(__pyx_t_19);
17739 __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
17740 }
17741 __Pyx_XGIVEREF(__pyx_t_14);
17742 __Pyx_XGIVEREF(__pyx_t_15);
17743 __Pyx_XGIVEREF(__pyx_t_16);
17744 __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
17745 __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
17746 __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
17747 goto __pyx_L1_error;
17748 }
17749 __pyx_L3_return: {
17750 __pyx_t_19 = __pyx_r;
17751 __pyx_r = 0;
17752 free(__pyx_v__uuid);
17753 __pyx_r = __pyx_t_19;
17754 __pyx_t_19 = 0;
17755 goto __pyx_L0;
17756 }
17757 }
17758
17759 /* "rbd.pyx":1714
17760 * raise make_ex(ret, 'error setting mirror mode')
17761 *
17762 * def mirror_peer_add(self, ioctx, cluster_name, client_name): # <<<<<<<<<<<<<<
17763 * """
17764 * Add mirror peer.
17765 */
17766
17767 /* function exit code */
17768 __pyx_L1_error:;
17769 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
17770 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
17771 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
17772 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
17773 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
17774 __Pyx_AddTraceback("rbd.RBD.mirror_peer_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
17775 __pyx_r = NULL((void*)0);
17776 __pyx_L0:;
17777 __Pyx_XDECREF(__pyx_v_cluster_name)do { if ((__pyx_v_cluster_name) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_cluster_name))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(__pyx_v_cluster_name)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cluster_name
)))); } while (0); } while (0)
;
17778 __Pyx_XDECREF(__pyx_v_client_name)do { if ((__pyx_v_client_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_client_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_client_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_client_name
)))); } while (0); } while (0)
;
17779 __Pyx_XGIVEREF(__pyx_r);
17780 __Pyx_RefNannyFinishContext();
17781 return __pyx_r;
17782}
17783
17784/* "rbd.pyx":1744
17785 * free(_uuid)
17786 *
17787 * def mirror_peer_remove(self, ioctx, uuid): # <<<<<<<<<<<<<<
17788 * """
17789 * Remove mirror peer.
17790 */
17791
17792/* Python wrapper */
17793static PyObject *__pyx_pw_3rbd_3RBD_43mirror_peer_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17794static char __pyx_doc_3rbd_3RBD_42mirror_peer_remove[] = "RBD.mirror_peer_remove(self, ioctx, uuid)\n\n Remove mirror peer.\n\n :param ioctx: determines which RADOS pool is used\n :type ioctx: :class:`rados.Ioctx`\n :param uuid: peer uuid\n :type uuid: str\n ";
17795static PyMethodDef __pyx_mdef_3rbd_3RBD_43mirror_peer_remove = {"mirror_peer_remove", (PyCFunction)__pyx_pw_3rbd_3RBD_43mirror_peer_remove, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_42mirror_peer_remove};
17796static PyObject *__pyx_pw_3rbd_3RBD_43mirror_peer_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17797 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
17798 PyObject *__pyx_v_ioctx = 0;
17799 PyObject *__pyx_v_uuid = 0;
17800 int __pyx_lineno = 0;
17801 const char *__pyx_filename = NULL((void*)0);
17802 int __pyx_clineno = 0;
17803 PyObject *__pyx_r = 0;
17804 __Pyx_RefNannyDeclarations
17805 __Pyx_RefNannySetupContext("mirror_peer_remove (wrapper)", 0);
17806 {
17807 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_uuid,0};
17808 PyObject* values[3] = {0,0,0};
17809 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
17810 Py_ssize_t kw_args;
17811 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
17812 switch (pos_args) {
17813 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17814 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17815 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17816 case 0: break;
17817 default: goto __pyx_L5_argtuple_error;
17818 }
17819 kw_args = PyDict_Size(__pyx_kwds);
17820 switch (pos_args) {
17821 case 0:
17822 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
17823 else goto __pyx_L5_argtuple_error;
17824 case 1:
17825 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
17826 else {
17827 __Pyx_RaiseArgtupleInvalid("mirror_peer_remove", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__17827; goto __pyx_L3_error;}
17828 }
17829 case 2:
17830 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid
)) != 0), 1)
) kw_args--;
17831 else {
17832 __Pyx_RaiseArgtupleInvalid("mirror_peer_remove", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__17832; goto __pyx_L3_error;}
17833 }
17834 }
17835 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
17836 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_remove") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_remove") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__17836; goto __pyx_L3_error;}
17837 }
17838 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
17839 goto __pyx_L5_argtuple_error;
17840 } else {
17841 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
17842 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
17843 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
17844 }
17845 __pyx_v_self = values[0];
17846 __pyx_v_ioctx = values[1];
17847 __pyx_v_uuid = values[2];
17848 }
17849 goto __pyx_L4_argument_unpacking_done;
17850 __pyx_L5_argtuple_error:;
17851 __Pyx_RaiseArgtupleInvalid("mirror_peer_remove", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__17851; goto __pyx_L3_error;}
17852 __pyx_L3_error:;
17853 __Pyx_AddTraceback("rbd.RBD.mirror_peer_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
17854 __Pyx_RefNannyFinishContext();
17855 return NULL((void*)0);
17856 __pyx_L4_argument_unpacking_done:;
17857 __pyx_r = __pyx_pf_3rbd_3RBD_42mirror_peer_remove(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_uuid);
17858
17859 /* function exit code */
17860 __Pyx_RefNannyFinishContext();
17861 return __pyx_r;
17862}
17863
17864static PyObject *__pyx_pf_3rbd_3RBD_42mirror_peer_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid) {
17865 rados_ioctx_t __pyx_v__ioctx;
17866 char *__pyx_v__uuid;
17867 int __pyx_v_ret;
17868 PyObject *__pyx_r = NULL((void*)0);
17869 __Pyx_RefNannyDeclarations
17870 PyObject *__pyx_t_1 = NULL((void*)0);
17871 PyObject *__pyx_t_2 = NULL((void*)0);
17872 PyObject *__pyx_t_3 = NULL((void*)0);
17873 Py_ssize_t __pyx_t_4;
17874 PyObject *__pyx_t_5 = NULL((void*)0);
17875 rados_ioctx_t __pyx_t_6;
17876 char *__pyx_t_7;
17877 int __pyx_t_8;
17878 int __pyx_lineno = 0;
17879 const char *__pyx_filename = NULL((void*)0);
17880 int __pyx_clineno = 0;
17881 __Pyx_RefNannySetupContext("mirror_peer_remove", 0);
17882 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
17883
17884 /* "rbd.pyx":1753
17885 * :type uuid: str
17886 * """
17887 * uuid = cstr(uuid, 'uuid') # <<<<<<<<<<<<<<
17888 * cdef:
17889 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17890 */
17891 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__17891; goto __pyx_L1_error;}
17892 __Pyx_GOTREF(__pyx_t_2);
17893 __pyx_t_3 = NULL((void*)0);
17894 __pyx_t_4 = 0;
17895 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
17896 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
17897 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
17898 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
17899 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
17900 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
17901 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
17902 __pyx_t_4 = 1;
17903 }
17904 }
17905 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__17905; goto __pyx_L1_error;}
17906 __Pyx_GOTREF(__pyx_t_5);
17907 if (__pyx_t_3) {
17908 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
17909 }
17910 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
17911 __Pyx_GIVEREF(__pyx_v_uuid);
17912 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_uuid
)
;
17913 __Pyx_INCREF(__pyx_n_s_uuid)( ((PyObject*)(__pyx_n_s_uuid))->ob_refcnt++);
17914 __Pyx_GIVEREF(__pyx_n_s_uuid);
17915 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_uuid
)
;
17916 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__17916; goto __pyx_L1_error;}
17917 __Pyx_GOTREF(__pyx_t_1);
17918 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
17919 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
17920 __Pyx_DECREF_SET(__pyx_v_uuid, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_uuid; __pyx_v_uuid =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
17921 __pyx_t_1 = 0;
17922
17923 /* "rbd.pyx":1755
17924 * uuid = cstr(uuid, 'uuid')
17925 * cdef:
17926 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
17927 * char *_uuid = uuid
17928 * with nogil:
17929 */
17930 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__17930; goto __pyx_L1_error;}
17931 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__17931; goto __pyx_L1_error;}
17932 __pyx_v__ioctx = __pyx_t_6;
17933
17934 /* "rbd.pyx":1756
17935 * cdef:
17936 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17937 * char *_uuid = uuid # <<<<<<<<<<<<<<
17938 * with nogil:
17939 * ret = rbd_mirror_peer_remove(_ioctx, _uuid)
17940 */
17941 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_uuid); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__17941; goto __pyx_L1_error;}
17942 __pyx_v__uuid = __pyx_t_7;
17943
17944 /* "rbd.pyx":1757
17945 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17946 * char *_uuid = uuid
17947 * with nogil: # <<<<<<<<<<<<<<
17948 * ret = rbd_mirror_peer_remove(_ioctx, _uuid)
17949 * if ret != 0:
17950 */
17951 {
17952 #ifdef WITH_THREAD1
17953 PyThreadState *_save;
17954 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
17955 #endif
17956 /*try:*/ {
17957
17958 /* "rbd.pyx":1758
17959 * char *_uuid = uuid
17960 * with nogil:
17961 * ret = rbd_mirror_peer_remove(_ioctx, _uuid) # <<<<<<<<<<<<<<
17962 * if ret != 0:
17963 * raise make_ex(ret, 'error removing mirror peer')
17964 */
17965 __pyx_v_ret = rbd_mirror_peer_remove(__pyx_v__ioctx, __pyx_v__uuid);
17966 }
17967
17968 /* "rbd.pyx":1757
17969 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
17970 * char *_uuid = uuid
17971 * with nogil: # <<<<<<<<<<<<<<
17972 * ret = rbd_mirror_peer_remove(_ioctx, _uuid)
17973 * if ret != 0:
17974 */
17975 /*finally:*/ {
17976 /*normal exit:*/{
17977 #ifdef WITH_THREAD1
17978 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
17979 #endif
17980 goto __pyx_L5;
17981 }
17982 __pyx_L5:;
17983 }
17984 }
17985
17986 /* "rbd.pyx":1759
17987 * with nogil:
17988 * ret = rbd_mirror_peer_remove(_ioctx, _uuid)
17989 * if ret != 0: # <<<<<<<<<<<<<<
17990 * raise make_ex(ret, 'error removing mirror peer')
17991 *
17992 */
17993 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
17994 if (__pyx_t_8) {
17995
17996 /* "rbd.pyx":1760
17997 * ret = rbd_mirror_peer_remove(_ioctx, _uuid)
17998 * if ret != 0:
17999 * raise make_ex(ret, 'error removing mirror peer') # <<<<<<<<<<<<<<
18000 *
18001 * def mirror_peer_list(self, ioctx):
18002 */
18003 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__18003; goto __pyx_L1_error;}
18004 __Pyx_GOTREF(__pyx_t_1);
18005 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_removing_mirror_peer, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__18005; goto __pyx_L1_error;}
18006 __Pyx_GOTREF(__pyx_t_2);
18007 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
18008 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18009 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18010 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__18010; goto __pyx_L1_error;}
18011
18012 /* "rbd.pyx":1759
18013 * with nogil:
18014 * ret = rbd_mirror_peer_remove(_ioctx, _uuid)
18015 * if ret != 0: # <<<<<<<<<<<<<<
18016 * raise make_ex(ret, 'error removing mirror peer')
18017 *
18018 */
18019 }
18020
18021 /* "rbd.pyx":1744
18022 * free(_uuid)
18023 *
18024 * def mirror_peer_remove(self, ioctx, uuid): # <<<<<<<<<<<<<<
18025 * """
18026 * Remove mirror peer.
18027 */
18028
18029 /* function exit code */
18030 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
18031 goto __pyx_L0;
18032 __pyx_L1_error:;
18033 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
18034 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
18035 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
18036 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
18037 __Pyx_AddTraceback("rbd.RBD.mirror_peer_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
18038 __pyx_r = NULL((void*)0);
18039 __pyx_L0:;
18040 __Pyx_XDECREF(__pyx_v_uuid)do { if ((__pyx_v_uuid) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_uuid))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_uuid)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_uuid)))); } while (0); } while
(0)
;
18041 __Pyx_XGIVEREF(__pyx_r);
18042 __Pyx_RefNannyFinishContext();
18043 return __pyx_r;
18044}
18045
18046/* "rbd.pyx":1762
18047 * raise make_ex(ret, 'error removing mirror peer')
18048 *
18049 * def mirror_peer_list(self, ioctx): # <<<<<<<<<<<<<<
18050 * """
18051 * Iterate over the peers of a pool.
18052 */
18053
18054/* Python wrapper */
18055static PyObject *__pyx_pw_3rbd_3RBD_45mirror_peer_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18056static char __pyx_doc_3rbd_3RBD_44mirror_peer_list[] = "RBD.mirror_peer_list(self, ioctx)\n\n Iterate over the peers of a pool.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: :class:`MirrorPeerIterator`\n ";
18057static PyMethodDef __pyx_mdef_3rbd_3RBD_45mirror_peer_list = {"mirror_peer_list", (PyCFunction)__pyx_pw_3rbd_3RBD_45mirror_peer_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_44mirror_peer_list};
18058static PyObject *__pyx_pw_3rbd_3RBD_45mirror_peer_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18059 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
18060 PyObject *__pyx_v_ioctx = 0;
18061 int __pyx_lineno = 0;
18062 const char *__pyx_filename = NULL((void*)0);
18063 int __pyx_clineno = 0;
18064 PyObject *__pyx_r = 0;
18065 __Pyx_RefNannyDeclarations
18066 __Pyx_RefNannySetupContext("mirror_peer_list (wrapper)", 0);
18067 {
18068 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
18069 PyObject* values[2] = {0,0};
18070 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
18071 Py_ssize_t kw_args;
18072 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
18073 switch (pos_args) {
18074 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18075 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18076 case 0: break;
18077 default: goto __pyx_L5_argtuple_error;
18078 }
18079 kw_args = PyDict_Size(__pyx_kwds);
18080 switch (pos_args) {
18081 case 0:
18082 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
18083 else goto __pyx_L5_argtuple_error;
18084 case 1:
18085 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
18086 else {
18087 __Pyx_RaiseArgtupleInvalid("mirror_peer_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__18087; goto __pyx_L3_error;}
18088 }
18089 }
18090 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
18091 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__18091; goto __pyx_L3_error;}
18092 }
18093 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
18094 goto __pyx_L5_argtuple_error;
18095 } else {
18096 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18097 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18098 }
18099 __pyx_v_self = values[0];
18100 __pyx_v_ioctx = values[1];
18101 }
18102 goto __pyx_L4_argument_unpacking_done;
18103 __pyx_L5_argtuple_error:;
18104 __Pyx_RaiseArgtupleInvalid("mirror_peer_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__18104; goto __pyx_L3_error;}
18105 __pyx_L3_error:;
18106 __Pyx_AddTraceback("rbd.RBD.mirror_peer_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
18107 __Pyx_RefNannyFinishContext();
18108 return NULL((void*)0);
18109 __pyx_L4_argument_unpacking_done:;
18110 __pyx_r = __pyx_pf_3rbd_3RBD_44mirror_peer_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
18111
18112 /* function exit code */
18113 __Pyx_RefNannyFinishContext();
18114 return __pyx_r;
18115}
18116
18117static PyObject *__pyx_pf_3rbd_3RBD_44mirror_peer_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
18118 PyObject *__pyx_r = NULL((void*)0);
18119 __Pyx_RefNannyDeclarations
18120 PyObject *__pyx_t_1 = NULL((void*)0);
18121 PyObject *__pyx_t_2 = NULL((void*)0);
18122 int __pyx_lineno = 0;
18123 const char *__pyx_filename = NULL((void*)0);
18124 int __pyx_clineno = 0;
18125 __Pyx_RefNannySetupContext("mirror_peer_list", 0);
18126
18127 /* "rbd.pyx":1770
18128 * :returns: :class:`MirrorPeerIterator`
18129 * """
18130 * return MirrorPeerIterator(ioctx) # <<<<<<<<<<<<<<
18131 *
18132 * def mirror_peer_set_client(self, ioctx, uuid, client_name):
18133 */
18134 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
18135 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__18135; goto __pyx_L1_error;}
18136 __Pyx_GOTREF(__pyx_t_1);
18137 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
18138 __Pyx_GIVEREF(__pyx_v_ioctx);
18139 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
18140 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_MirrorPeerIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__18140; goto __pyx_L1_error;}
18141 __Pyx_GOTREF(__pyx_t_2);
18142 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
18143 __pyx_r = __pyx_t_2;
18144 __pyx_t_2 = 0;
18145 goto __pyx_L0;
18146
18147 /* "rbd.pyx":1762
18148 * raise make_ex(ret, 'error removing mirror peer')
18149 *
18150 * def mirror_peer_list(self, ioctx): # <<<<<<<<<<<<<<
18151 * """
18152 * Iterate over the peers of a pool.
18153 */
18154
18155 /* function exit code */
18156 __pyx_L1_error:;
18157 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
18158 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
18159 __Pyx_AddTraceback("rbd.RBD.mirror_peer_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
18160 __pyx_r = NULL((void*)0);
18161 __pyx_L0:;
18162 __Pyx_XGIVEREF(__pyx_r);
18163 __Pyx_RefNannyFinishContext();
18164 return __pyx_r;
18165}
18166
18167/* "rbd.pyx":1772
18168 * return MirrorPeerIterator(ioctx)
18169 *
18170 * def mirror_peer_set_client(self, ioctx, uuid, client_name): # <<<<<<<<<<<<<<
18171 * """
18172 * Set mirror peer client name
18173 */
18174
18175/* Python wrapper */
18176static PyObject *__pyx_pw_3rbd_3RBD_47mirror_peer_set_client(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18177static char __pyx_doc_3rbd_3RBD_46mirror_peer_set_client[] = "RBD.mirror_peer_set_client(self, ioctx, uuid, client_name)\n\n Set mirror peer client name\n\n :param ioctx: determines which RADOS pool is written\n :type ioctx: :class:`rados.Ioctx`\n :param uuid: uuid of the mirror peer\n :type uuid: str\n :param client_name: client name of the mirror peer to set\n :type client_name: str\n ";
18178static PyMethodDef __pyx_mdef_3rbd_3RBD_47mirror_peer_set_client = {"mirror_peer_set_client", (PyCFunction)__pyx_pw_3rbd_3RBD_47mirror_peer_set_client, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_46mirror_peer_set_client};
18179static PyObject *__pyx_pw_3rbd_3RBD_47mirror_peer_set_client(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18180 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
18181 PyObject *__pyx_v_ioctx = 0;
18182 PyObject *__pyx_v_uuid = 0;
18183 PyObject *__pyx_v_client_name = 0;
18184 int __pyx_lineno = 0;
18185 const char *__pyx_filename = NULL((void*)0);
18186 int __pyx_clineno = 0;
18187 PyObject *__pyx_r = 0;
18188 __Pyx_RefNannyDeclarations
18189 __Pyx_RefNannySetupContext("mirror_peer_set_client (wrapper)", 0);
18190 {
18191 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_uuid,&__pyx_n_s_client_name,0};
18192 PyObject* values[4] = {0,0,0,0};
18193 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
18194 Py_ssize_t kw_args;
18195 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
18196 switch (pos_args) {
18197 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
18198 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
18199 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18200 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18201 case 0: break;
18202 default: goto __pyx_L5_argtuple_error;
18203 }
18204 kw_args = PyDict_Size(__pyx_kwds);
18205 switch (pos_args) {
18206 case 0:
18207 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
18208 else goto __pyx_L5_argtuple_error;
18209 case 1:
18210 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
18211 else {
18212 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_client", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__18212; goto __pyx_L3_error;}
18213 }
18214 case 2:
18215 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid
)) != 0), 1)
) kw_args--;
18216 else {
18217 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_client", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__18217; goto __pyx_L3_error;}
18218 }
18219 case 3:
18220 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_client_name)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_client_name
)) != 0), 1)
) kw_args--;
18221 else {
18222 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_client", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__18222; goto __pyx_L3_error;}
18223 }
18224 }
18225 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
18226 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_set_client") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_set_client") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__18226; goto __pyx_L3_error;}
18227 }
18228 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
18229 goto __pyx_L5_argtuple_error;
18230 } else {
18231 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18232 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18233 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
18234 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
18235 }
18236 __pyx_v_self = values[0];
18237 __pyx_v_ioctx = values[1];
18238 __pyx_v_uuid = values[2];
18239 __pyx_v_client_name = values[3];
18240 }
18241 goto __pyx_L4_argument_unpacking_done;
18242 __pyx_L5_argtuple_error:;
18243 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_client", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__18243; goto __pyx_L3_error;}
18244 __pyx_L3_error:;
18245 __Pyx_AddTraceback("rbd.RBD.mirror_peer_set_client", __pyx_clineno, __pyx_lineno, __pyx_filename);
18246 __Pyx_RefNannyFinishContext();
18247 return NULL((void*)0);
18248 __pyx_L4_argument_unpacking_done:;
18249 __pyx_r = __pyx_pf_3rbd_3RBD_46mirror_peer_set_client(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_uuid, __pyx_v_client_name);
18250
18251 /* function exit code */
18252 __Pyx_RefNannyFinishContext();
18253 return __pyx_r;
18254}
18255
18256static PyObject *__pyx_pf_3rbd_3RBD_46mirror_peer_set_client(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid, PyObject *__pyx_v_client_name) {
18257 rados_ioctx_t __pyx_v__ioctx;
18258 char *__pyx_v__uuid;
18259 char *__pyx_v__client_name;
18260 int __pyx_v_ret;
18261 PyObject *__pyx_r = NULL((void*)0);
18262 __Pyx_RefNannyDeclarations
18263 PyObject *__pyx_t_1 = NULL((void*)0);
18264 PyObject *__pyx_t_2 = NULL((void*)0);
18265 PyObject *__pyx_t_3 = NULL((void*)0);
18266 Py_ssize_t __pyx_t_4;
18267 PyObject *__pyx_t_5 = NULL((void*)0);
18268 rados_ioctx_t __pyx_t_6;
18269 char *__pyx_t_7;
18270 int __pyx_t_8;
18271 int __pyx_lineno = 0;
18272 const char *__pyx_filename = NULL((void*)0);
18273 int __pyx_clineno = 0;
18274 __Pyx_RefNannySetupContext("mirror_peer_set_client", 0);
18275 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
18276 __Pyx_INCREF(__pyx_v_client_name)( ((PyObject*)(__pyx_v_client_name))->ob_refcnt++);
18277
18278 /* "rbd.pyx":1783
18279 * :type client_name: str
18280 * """
18281 * uuid = cstr(uuid, 'uuid') # <<<<<<<<<<<<<<
18282 * client_name = cstr(client_name, 'client_name')
18283 * cdef:
18284 */
18285 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__18285; goto __pyx_L1_error;}
18286 __Pyx_GOTREF(__pyx_t_2);
18287 __pyx_t_3 = NULL((void*)0);
18288 __pyx_t_4 = 0;
18289 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
18290 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
18291 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
18292 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
18293 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
18294 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
18295 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
18296 __pyx_t_4 = 1;
18297 }
18298 }
18299 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__18299; goto __pyx_L1_error;}
18300 __Pyx_GOTREF(__pyx_t_5);
18301 if (__pyx_t_3) {
18302 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
18303 }
18304 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
18305 __Pyx_GIVEREF(__pyx_v_uuid);
18306 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_uuid
)
;
18307 __Pyx_INCREF(__pyx_n_s_uuid)( ((PyObject*)(__pyx_n_s_uuid))->ob_refcnt++);
18308 __Pyx_GIVEREF(__pyx_n_s_uuid);
18309 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_uuid
)
;
18310 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__18310; goto __pyx_L1_error;}
18311 __Pyx_GOTREF(__pyx_t_1);
18312 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
18313 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18314 __Pyx_DECREF_SET(__pyx_v_uuid, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_uuid; __pyx_v_uuid =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
18315 __pyx_t_1 = 0;
18316
18317 /* "rbd.pyx":1784
18318 * """
18319 * uuid = cstr(uuid, 'uuid')
18320 * client_name = cstr(client_name, 'client_name') # <<<<<<<<<<<<<<
18321 * cdef:
18322 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18323 */
18324 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__18324; goto __pyx_L1_error;}
18325 __Pyx_GOTREF(__pyx_t_2);
18326 __pyx_t_5 = NULL((void*)0);
18327 __pyx_t_4 = 0;
18328 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
18329 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
18330 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
18331 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
18332 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
18333 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
18334 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
18335 __pyx_t_4 = 1;
18336 }
18337 }
18338 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__18338; goto __pyx_L1_error;}
18339 __Pyx_GOTREF(__pyx_t_3);
18340 if (__pyx_t_5) {
18341 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
18342 }
18343 __Pyx_INCREF(__pyx_v_client_name)( ((PyObject*)(__pyx_v_client_name))->ob_refcnt++);
18344 __Pyx_GIVEREF(__pyx_v_client_name);
18345 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_client_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_client_name
)
;
18346 __Pyx_INCREF(__pyx_n_s_client_name)( ((PyObject*)(__pyx_n_s_client_name))->ob_refcnt++);
18347 __Pyx_GIVEREF(__pyx_n_s_client_name);
18348 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_client_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_client_name
)
;
18349 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__18349; goto __pyx_L1_error;}
18350 __Pyx_GOTREF(__pyx_t_1);
18351 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
18352 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18353 __Pyx_DECREF_SET(__pyx_v_client_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_client_name; __pyx_v_client_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
18354 __pyx_t_1 = 0;
18355
18356 /* "rbd.pyx":1786
18357 * client_name = cstr(client_name, 'client_name')
18358 * cdef:
18359 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
18360 * char *_uuid = uuid
18361 * char *_client_name = client_name
18362 */
18363 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__18363; goto __pyx_L1_error;}
18364 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__18364; goto __pyx_L1_error;}
18365 __pyx_v__ioctx = __pyx_t_6;
18366
18367 /* "rbd.pyx":1787
18368 * cdef:
18369 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18370 * char *_uuid = uuid # <<<<<<<<<<<<<<
18371 * char *_client_name = client_name
18372 * with nogil:
18373 */
18374 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_uuid); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__18374; goto __pyx_L1_error;}
18375 __pyx_v__uuid = __pyx_t_7;
18376
18377 /* "rbd.pyx":1788
18378 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18379 * char *_uuid = uuid
18380 * char *_client_name = client_name # <<<<<<<<<<<<<<
18381 * with nogil:
18382 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name)
18383 */
18384 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_client_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__18384; goto __pyx_L1_error;}
18385 __pyx_v__client_name = __pyx_t_7;
18386
18387 /* "rbd.pyx":1789
18388 * char *_uuid = uuid
18389 * char *_client_name = client_name
18390 * with nogil: # <<<<<<<<<<<<<<
18391 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name)
18392 * if ret != 0:
18393 */
18394 {
18395 #ifdef WITH_THREAD1
18396 PyThreadState *_save;
18397 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
18398 #endif
18399 /*try:*/ {
18400
18401 /* "rbd.pyx":1790
18402 * char *_client_name = client_name
18403 * with nogil:
18404 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name) # <<<<<<<<<<<<<<
18405 * if ret != 0:
18406 * raise make_ex(ret, 'error setting mirror peer client')
18407 */
18408 __pyx_v_ret = rbd_mirror_peer_set_client(__pyx_v__ioctx, __pyx_v__uuid, __pyx_v__client_name);
18409 }
18410
18411 /* "rbd.pyx":1789
18412 * char *_uuid = uuid
18413 * char *_client_name = client_name
18414 * with nogil: # <<<<<<<<<<<<<<
18415 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name)
18416 * if ret != 0:
18417 */
18418 /*finally:*/ {
18419 /*normal exit:*/{
18420 #ifdef WITH_THREAD1
18421 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
18422 #endif
18423 goto __pyx_L5;
18424 }
18425 __pyx_L5:;
18426 }
18427 }
18428
18429 /* "rbd.pyx":1791
18430 * with nogil:
18431 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name)
18432 * if ret != 0: # <<<<<<<<<<<<<<
18433 * raise make_ex(ret, 'error setting mirror peer client')
18434 *
18435 */
18436 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
18437 if (__pyx_t_8) {
18438
18439 /* "rbd.pyx":1792
18440 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name)
18441 * if ret != 0:
18442 * raise make_ex(ret, 'error setting mirror peer client') # <<<<<<<<<<<<<<
18443 *
18444 * def mirror_peer_set_cluster(self, ioctx, uuid, cluster_name):
18445 */
18446 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__18446; goto __pyx_L1_error;}
18447 __Pyx_GOTREF(__pyx_t_1);
18448 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_setting_mirror_peer_client, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__18448; goto __pyx_L1_error;}
18449 __Pyx_GOTREF(__pyx_t_2);
18450 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
18451 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18452 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18453 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__18453; goto __pyx_L1_error;}
18454
18455 /* "rbd.pyx":1791
18456 * with nogil:
18457 * ret = rbd_mirror_peer_set_client(_ioctx, _uuid, _client_name)
18458 * if ret != 0: # <<<<<<<<<<<<<<
18459 * raise make_ex(ret, 'error setting mirror peer client')
18460 *
18461 */
18462 }
18463
18464 /* "rbd.pyx":1772
18465 * return MirrorPeerIterator(ioctx)
18466 *
18467 * def mirror_peer_set_client(self, ioctx, uuid, client_name): # <<<<<<<<<<<<<<
18468 * """
18469 * Set mirror peer client name
18470 */
18471
18472 /* function exit code */
18473 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
18474 goto __pyx_L0;
18475 __pyx_L1_error:;
18476 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
18477 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
18478 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
18479 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
18480 __Pyx_AddTraceback("rbd.RBD.mirror_peer_set_client", __pyx_clineno, __pyx_lineno, __pyx_filename);
18481 __pyx_r = NULL((void*)0);
18482 __pyx_L0:;
18483 __Pyx_XDECREF(__pyx_v_uuid)do { if ((__pyx_v_uuid) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_uuid))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_uuid)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_uuid)))); } while (0); } while
(0)
;
18484 __Pyx_XDECREF(__pyx_v_client_name)do { if ((__pyx_v_client_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_client_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_client_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_client_name
)))); } while (0); } while (0)
;
18485 __Pyx_XGIVEREF(__pyx_r);
18486 __Pyx_RefNannyFinishContext();
18487 return __pyx_r;
18488}
18489
18490/* "rbd.pyx":1794
18491 * raise make_ex(ret, 'error setting mirror peer client')
18492 *
18493 * def mirror_peer_set_cluster(self, ioctx, uuid, cluster_name): # <<<<<<<<<<<<<<
18494 * """
18495 * Set mirror peer cluster name
18496 */
18497
18498/* Python wrapper */
18499static PyObject *__pyx_pw_3rbd_3RBD_49mirror_peer_set_cluster(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18500static char __pyx_doc_3rbd_3RBD_48mirror_peer_set_cluster[] = "RBD.mirror_peer_set_cluster(self, ioctx, uuid, cluster_name)\n\n Set mirror peer cluster name\n\n :param ioctx: determines which RADOS pool is written\n :type ioctx: :class:`rados.Ioctx`\n :param uuid: uuid of the mirror peer\n :type uuid: str\n :param cluster_name: cluster name of the mirror peer to set\n :type cluster_name: str\n ";
18501static PyMethodDef __pyx_mdef_3rbd_3RBD_49mirror_peer_set_cluster = {"mirror_peer_set_cluster", (PyCFunction)__pyx_pw_3rbd_3RBD_49mirror_peer_set_cluster, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_48mirror_peer_set_cluster};
18502static PyObject *__pyx_pw_3rbd_3RBD_49mirror_peer_set_cluster(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18503 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
18504 PyObject *__pyx_v_ioctx = 0;
18505 PyObject *__pyx_v_uuid = 0;
18506 PyObject *__pyx_v_cluster_name = 0;
18507 int __pyx_lineno = 0;
18508 const char *__pyx_filename = NULL((void*)0);
18509 int __pyx_clineno = 0;
18510 PyObject *__pyx_r = 0;
18511 __Pyx_RefNannyDeclarations
18512 __Pyx_RefNannySetupContext("mirror_peer_set_cluster (wrapper)", 0);
18513 {
18514 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_uuid,&__pyx_n_s_cluster_name,0};
18515 PyObject* values[4] = {0,0,0,0};
18516 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
18517 Py_ssize_t kw_args;
18518 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
18519 switch (pos_args) {
18520 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
18521 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
18522 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18523 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18524 case 0: break;
18525 default: goto __pyx_L5_argtuple_error;
18526 }
18527 kw_args = PyDict_Size(__pyx_kwds);
18528 switch (pos_args) {
18529 case 0:
18530 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
18531 else goto __pyx_L5_argtuple_error;
18532 case 1:
18533 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
18534 else {
18535 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_cluster", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__18535; goto __pyx_L3_error;}
18536 }
18537 case 2:
18538 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid
)) != 0), 1)
) kw_args--;
18539 else {
18540 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_cluster", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__18540; goto __pyx_L3_error;}
18541 }
18542 case 3:
18543 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cluster_name)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cluster_name
)) != 0), 1)
) kw_args--;
18544 else {
18545 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_cluster", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__18545; goto __pyx_L3_error;}
18546 }
18547 }
18548 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
18549 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_set_cluster") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_set_cluster") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__18549; goto __pyx_L3_error;}
18550 }
18551 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
18552 goto __pyx_L5_argtuple_error;
18553 } else {
18554 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18555 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18556 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
18557 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
18558 }
18559 __pyx_v_self = values[0];
18560 __pyx_v_ioctx = values[1];
18561 __pyx_v_uuid = values[2];
18562 __pyx_v_cluster_name = values[3];
18563 }
18564 goto __pyx_L4_argument_unpacking_done;
18565 __pyx_L5_argtuple_error:;
18566 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_cluster", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__18566; goto __pyx_L3_error;}
18567 __pyx_L3_error:;
18568 __Pyx_AddTraceback("rbd.RBD.mirror_peer_set_cluster", __pyx_clineno, __pyx_lineno, __pyx_filename);
18569 __Pyx_RefNannyFinishContext();
18570 return NULL((void*)0);
18571 __pyx_L4_argument_unpacking_done:;
18572 __pyx_r = __pyx_pf_3rbd_3RBD_48mirror_peer_set_cluster(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_uuid, __pyx_v_cluster_name);
18573
18574 /* function exit code */
18575 __Pyx_RefNannyFinishContext();
18576 return __pyx_r;
18577}
18578
18579static PyObject *__pyx_pf_3rbd_3RBD_48mirror_peer_set_cluster(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid, PyObject *__pyx_v_cluster_name) {
18580 rados_ioctx_t __pyx_v__ioctx;
18581 char *__pyx_v__uuid;
18582 char *__pyx_v__cluster_name;
18583 int __pyx_v_ret;
18584 PyObject *__pyx_r = NULL((void*)0);
18585 __Pyx_RefNannyDeclarations
18586 PyObject *__pyx_t_1 = NULL((void*)0);
18587 PyObject *__pyx_t_2 = NULL((void*)0);
18588 PyObject *__pyx_t_3 = NULL((void*)0);
18589 Py_ssize_t __pyx_t_4;
18590 PyObject *__pyx_t_5 = NULL((void*)0);
18591 rados_ioctx_t __pyx_t_6;
18592 char *__pyx_t_7;
18593 int __pyx_t_8;
18594 int __pyx_lineno = 0;
18595 const char *__pyx_filename = NULL((void*)0);
18596 int __pyx_clineno = 0;
18597 __Pyx_RefNannySetupContext("mirror_peer_set_cluster", 0);
18598 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
18599 __Pyx_INCREF(__pyx_v_cluster_name)( ((PyObject*)(__pyx_v_cluster_name))->ob_refcnt++);
18600
18601 /* "rbd.pyx":1805
18602 * :type cluster_name: str
18603 * """
18604 * uuid = cstr(uuid, 'uuid') # <<<<<<<<<<<<<<
18605 * cluster_name = cstr(cluster_name, 'cluster_name')
18606 * cdef:
18607 */
18608 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__18608; goto __pyx_L1_error;}
18609 __Pyx_GOTREF(__pyx_t_2);
18610 __pyx_t_3 = NULL((void*)0);
18611 __pyx_t_4 = 0;
18612 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
18613 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
18614 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
18615 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
18616 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
18617 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
18618 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
18619 __pyx_t_4 = 1;
18620 }
18621 }
18622 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__18622; goto __pyx_L1_error;}
18623 __Pyx_GOTREF(__pyx_t_5);
18624 if (__pyx_t_3) {
18625 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
18626 }
18627 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
18628 __Pyx_GIVEREF(__pyx_v_uuid);
18629 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_uuid
)
;
18630 __Pyx_INCREF(__pyx_n_s_uuid)( ((PyObject*)(__pyx_n_s_uuid))->ob_refcnt++);
18631 __Pyx_GIVEREF(__pyx_n_s_uuid);
18632 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_uuid
)
;
18633 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__18633; goto __pyx_L1_error;}
18634 __Pyx_GOTREF(__pyx_t_1);
18635 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
18636 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18637 __Pyx_DECREF_SET(__pyx_v_uuid, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_uuid; __pyx_v_uuid =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
18638 __pyx_t_1 = 0;
18639
18640 /* "rbd.pyx":1806
18641 * """
18642 * uuid = cstr(uuid, 'uuid')
18643 * cluster_name = cstr(cluster_name, 'cluster_name') # <<<<<<<<<<<<<<
18644 * cdef:
18645 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18646 */
18647 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__18647; goto __pyx_L1_error;}
18648 __Pyx_GOTREF(__pyx_t_2);
18649 __pyx_t_5 = NULL((void*)0);
18650 __pyx_t_4 = 0;
18651 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
18652 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
18653 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
18654 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
18655 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
18656 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
18657 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
18658 __pyx_t_4 = 1;
18659 }
18660 }
18661 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__18661; goto __pyx_L1_error;}
18662 __Pyx_GOTREF(__pyx_t_3);
18663 if (__pyx_t_5) {
18664 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
18665 }
18666 __Pyx_INCREF(__pyx_v_cluster_name)( ((PyObject*)(__pyx_v_cluster_name))->ob_refcnt++);
18667 __Pyx_GIVEREF(__pyx_v_cluster_name);
18668 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_cluster_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_cluster_name
)
;
18669 __Pyx_INCREF(__pyx_n_s_cluster_name)( ((PyObject*)(__pyx_n_s_cluster_name))->ob_refcnt++);
18670 __Pyx_GIVEREF(__pyx_n_s_cluster_name);
18671 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_cluster_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_cluster_name
)
;
18672 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__18672; goto __pyx_L1_error;}
18673 __Pyx_GOTREF(__pyx_t_1);
18674 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
18675 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18676 __Pyx_DECREF_SET(__pyx_v_cluster_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cluster_name; __pyx_v_cluster_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
18677 __pyx_t_1 = 0;
18678
18679 /* "rbd.pyx":1808
18680 * cluster_name = cstr(cluster_name, 'cluster_name')
18681 * cdef:
18682 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
18683 * char *_uuid = uuid
18684 * char *_cluster_name = cluster_name
18685 */
18686 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__18686; goto __pyx_L1_error;}
18687 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__18687; goto __pyx_L1_error;}
18688 __pyx_v__ioctx = __pyx_t_6;
18689
18690 /* "rbd.pyx":1809
18691 * cdef:
18692 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18693 * char *_uuid = uuid # <<<<<<<<<<<<<<
18694 * char *_cluster_name = cluster_name
18695 * with nogil:
18696 */
18697 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_uuid); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__18697; goto __pyx_L1_error;}
18698 __pyx_v__uuid = __pyx_t_7;
18699
18700 /* "rbd.pyx":1810
18701 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18702 * char *_uuid = uuid
18703 * char *_cluster_name = cluster_name # <<<<<<<<<<<<<<
18704 * with nogil:
18705 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name)
18706 */
18707 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_cluster_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__18707; goto __pyx_L1_error;}
18708 __pyx_v__cluster_name = __pyx_t_7;
18709
18710 /* "rbd.pyx":1811
18711 * char *_uuid = uuid
18712 * char *_cluster_name = cluster_name
18713 * with nogil: # <<<<<<<<<<<<<<
18714 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name)
18715 * if ret != 0:
18716 */
18717 {
18718 #ifdef WITH_THREAD1
18719 PyThreadState *_save;
18720 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
18721 #endif
18722 /*try:*/ {
18723
18724 /* "rbd.pyx":1812
18725 * char *_cluster_name = cluster_name
18726 * with nogil:
18727 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name) # <<<<<<<<<<<<<<
18728 * if ret != 0:
18729 * raise make_ex(ret, 'error setting mirror peer cluster')
18730 */
18731 __pyx_v_ret = rbd_mirror_peer_set_cluster(__pyx_v__ioctx, __pyx_v__uuid, __pyx_v__cluster_name);
18732 }
18733
18734 /* "rbd.pyx":1811
18735 * char *_uuid = uuid
18736 * char *_cluster_name = cluster_name
18737 * with nogil: # <<<<<<<<<<<<<<
18738 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name)
18739 * if ret != 0:
18740 */
18741 /*finally:*/ {
18742 /*normal exit:*/{
18743 #ifdef WITH_THREAD1
18744 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
18745 #endif
18746 goto __pyx_L5;
18747 }
18748 __pyx_L5:;
18749 }
18750 }
18751
18752 /* "rbd.pyx":1813
18753 * with nogil:
18754 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name)
18755 * if ret != 0: # <<<<<<<<<<<<<<
18756 * raise make_ex(ret, 'error setting mirror peer cluster')
18757 *
18758 */
18759 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
18760 if (__pyx_t_8) {
18761
18762 /* "rbd.pyx":1814
18763 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name)
18764 * if ret != 0:
18765 * raise make_ex(ret, 'error setting mirror peer cluster') # <<<<<<<<<<<<<<
18766 *
18767 * def mirror_peer_get_attributes(self, ioctx, uuid):
18768 */
18769 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__18769; goto __pyx_L1_error;}
18770 __Pyx_GOTREF(__pyx_t_1);
18771 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_setting_mirror_peer_cluste, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__18771; goto __pyx_L1_error;}
18772 __Pyx_GOTREF(__pyx_t_2);
18773 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
18774 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18775 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18776 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__18776; goto __pyx_L1_error;}
18777
18778 /* "rbd.pyx":1813
18779 * with nogil:
18780 * ret = rbd_mirror_peer_set_cluster(_ioctx, _uuid, _cluster_name)
18781 * if ret != 0: # <<<<<<<<<<<<<<
18782 * raise make_ex(ret, 'error setting mirror peer cluster')
18783 *
18784 */
18785 }
18786
18787 /* "rbd.pyx":1794
18788 * raise make_ex(ret, 'error setting mirror peer client')
18789 *
18790 * def mirror_peer_set_cluster(self, ioctx, uuid, cluster_name): # <<<<<<<<<<<<<<
18791 * """
18792 * Set mirror peer cluster name
18793 */
18794
18795 /* function exit code */
18796 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
18797 goto __pyx_L0;
18798 __pyx_L1_error:;
18799 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
18800 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
18801 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
18802 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
18803 __Pyx_AddTraceback("rbd.RBD.mirror_peer_set_cluster", __pyx_clineno, __pyx_lineno, __pyx_filename);
18804 __pyx_r = NULL((void*)0);
18805 __pyx_L0:;
18806 __Pyx_XDECREF(__pyx_v_uuid)do { if ((__pyx_v_uuid) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_uuid))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_uuid)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_uuid)))); } while (0); } while
(0)
;
18807 __Pyx_XDECREF(__pyx_v_cluster_name)do { if ((__pyx_v_cluster_name) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_cluster_name))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(__pyx_v_cluster_name)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cluster_name
)))); } while (0); } while (0)
;
18808 __Pyx_XGIVEREF(__pyx_r);
18809 __Pyx_RefNannyFinishContext();
18810 return __pyx_r;
18811}
18812
18813/* "rbd.pyx":1816
18814 * raise make_ex(ret, 'error setting mirror peer cluster')
18815 *
18816 * def mirror_peer_get_attributes(self, ioctx, uuid): # <<<<<<<<<<<<<<
18817 * """
18818 * Get optional mirror peer attributes
18819 */
18820
18821/* Python wrapper */
18822static PyObject *__pyx_pw_3rbd_3RBD_51mirror_peer_get_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18823static char __pyx_doc_3rbd_3RBD_50mirror_peer_get_attributes[] = "RBD.mirror_peer_get_attributes(self, ioctx, uuid)\n\n Get optional mirror peer attributes\n\n :param ioctx: determines which RADOS pool is written\n :type ioctx: :class:`rados.Ioctx`\n :param uuid: uuid of the mirror peer\n :type uuid: str\n\n :returns: dict - contains the following keys:\n\n * ``mon_host`` (str) - monitor addresses\n\n * ``key`` (str) - CephX key\n ";
18824static PyMethodDef __pyx_mdef_3rbd_3RBD_51mirror_peer_get_attributes = {"mirror_peer_get_attributes", (PyCFunction)__pyx_pw_3rbd_3RBD_51mirror_peer_get_attributes, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_50mirror_peer_get_attributes};
18825static PyObject *__pyx_pw_3rbd_3RBD_51mirror_peer_get_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18826 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
18827 PyObject *__pyx_v_ioctx = 0;
18828 PyObject *__pyx_v_uuid = 0;
18829 int __pyx_lineno = 0;
18830 const char *__pyx_filename = NULL((void*)0);
18831 int __pyx_clineno = 0;
18832 PyObject *__pyx_r = 0;
18833 __Pyx_RefNannyDeclarations
18834 __Pyx_RefNannySetupContext("mirror_peer_get_attributes (wrapper)", 0);
18835 {
18836 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_uuid,0};
18837 PyObject* values[3] = {0,0,0};
18838 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
18839 Py_ssize_t kw_args;
18840 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
18841 switch (pos_args) {
18842 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
18843 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18844 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18845 case 0: break;
18846 default: goto __pyx_L5_argtuple_error;
18847 }
18848 kw_args = PyDict_Size(__pyx_kwds);
18849 switch (pos_args) {
18850 case 0:
18851 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
18852 else goto __pyx_L5_argtuple_error;
18853 case 1:
18854 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
18855 else {
18856 __Pyx_RaiseArgtupleInvalid("mirror_peer_get_attributes", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__18856; goto __pyx_L3_error;}
18857 }
18858 case 2:
18859 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid
)) != 0), 1)
) kw_args--;
18860 else {
18861 __Pyx_RaiseArgtupleInvalid("mirror_peer_get_attributes", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__18861; goto __pyx_L3_error;}
18862 }
18863 }
18864 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
18865 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_get_attributes") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_get_attributes") < 0),
0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__18865; goto __pyx_L3_error;}
18866 }
18867 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
18868 goto __pyx_L5_argtuple_error;
18869 } else {
18870 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
18871 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
18872 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
18873 }
18874 __pyx_v_self = values[0];
18875 __pyx_v_ioctx = values[1];
18876 __pyx_v_uuid = values[2];
18877 }
18878 goto __pyx_L4_argument_unpacking_done;
18879 __pyx_L5_argtuple_error:;
18880 __Pyx_RaiseArgtupleInvalid("mirror_peer_get_attributes", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__18880; goto __pyx_L3_error;}
18881 __pyx_L3_error:;
18882 __Pyx_AddTraceback("rbd.RBD.mirror_peer_get_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
18883 __Pyx_RefNannyFinishContext();
18884 return NULL((void*)0);
18885 __pyx_L4_argument_unpacking_done:;
18886 __pyx_r = __pyx_pf_3rbd_3RBD_50mirror_peer_get_attributes(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_uuid);
18887
18888 /* function exit code */
18889 __Pyx_RefNannyFinishContext();
18890 return __pyx_r;
18891}
18892
18893static PyObject *__pyx_pf_3rbd_3RBD_50mirror_peer_get_attributes(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid) {
18894 rados_ioctx_t __pyx_v__ioctx;
18895 char *__pyx_v__uuid;
18896 char *__pyx_v__keys;
18897 char *__pyx_v__vals;
18898 size_t __pyx_v__keys_size;
18899 size_t __pyx_v__vals_size;
18900 size_t __pyx_v__count;
18901 int __pyx_v_ret;
18902 PyObject *__pyx_v_keys = NULL((void*)0);
18903 PyObject *__pyx_v_vals = NULL((void*)0);
18904 PyObject *__pyx_v_x = NULL((void*)0);
18905 PyObject *__pyx_r = NULL((void*)0);
18906 __Pyx_RefNannyDeclarations
18907 PyObject *__pyx_t_1 = NULL((void*)0);
18908 PyObject *__pyx_t_2 = NULL((void*)0);
18909 PyObject *__pyx_t_3 = NULL((void*)0);
18910 Py_ssize_t __pyx_t_4;
18911 PyObject *__pyx_t_5 = NULL((void*)0);
18912 rados_ioctx_t __pyx_t_6;
18913 char *__pyx_t_7;
18914 void *__pyx_t_8;
18915 int __pyx_t_9;
18916 PyObject *(*__pyx_t_10)(PyObject *);
18917 PyObject *__pyx_t_11 = NULL((void*)0);
18918 PyObject *__pyx_t_12 = NULL((void*)0);
18919 int __pyx_t_13;
18920 int __pyx_t_14;
18921 char const *__pyx_t_15;
18922 PyObject *__pyx_t_16 = NULL((void*)0);
18923 PyObject *__pyx_t_17 = NULL((void*)0);
18924 PyObject *__pyx_t_18 = NULL((void*)0);
18925 PyObject *__pyx_t_19 = NULL((void*)0);
18926 PyObject *__pyx_t_20 = NULL((void*)0);
18927 PyObject *__pyx_t_21 = NULL((void*)0);
18928 int __pyx_lineno = 0;
18929 const char *__pyx_filename = NULL((void*)0);
18930 int __pyx_clineno = 0;
18931 __Pyx_RefNannySetupContext("mirror_peer_get_attributes", 0);
18932 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
18933
18934 /* "rbd.pyx":1831
18935 * * ``key`` (str) - CephX key
18936 * """
18937 * uuid = cstr(uuid, 'uuid') # <<<<<<<<<<<<<<
18938 * cdef:
18939 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18940 */
18941 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__18941; goto __pyx_L1_error;}
18942 __Pyx_GOTREF(__pyx_t_2);
18943 __pyx_t_3 = NULL((void*)0);
18944 __pyx_t_4 = 0;
18945 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
18946 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
18947 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
18948 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
18949 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
18950 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
18951 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
18952 __pyx_t_4 = 1;
18953 }
18954 }
18955 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__18955; goto __pyx_L1_error;}
18956 __Pyx_GOTREF(__pyx_t_5);
18957 if (__pyx_t_3) {
18958 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
18959 }
18960 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
18961 __Pyx_GIVEREF(__pyx_v_uuid);
18962 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_uuid
)
;
18963 __Pyx_INCREF(__pyx_n_s_uuid)( ((PyObject*)(__pyx_n_s_uuid))->ob_refcnt++);
18964 __Pyx_GIVEREF(__pyx_n_s_uuid);
18965 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_uuid
)
;
18966 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__18966; goto __pyx_L1_error;}
18967 __Pyx_GOTREF(__pyx_t_1);
18968 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
18969 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
18970 __Pyx_DECREF_SET(__pyx_v_uuid, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_uuid; __pyx_v_uuid =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
18971 __pyx_t_1 = 0;
18972
18973 /* "rbd.pyx":1833
18974 * uuid = cstr(uuid, 'uuid')
18975 * cdef:
18976 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
18977 * char *_uuid = uuid
18978 * char *_keys = NULL
18979 */
18980 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__18980; goto __pyx_L1_error;}
18981 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__18981; goto __pyx_L1_error;}
18982 __pyx_v__ioctx = __pyx_t_6;
18983
18984 /* "rbd.pyx":1834
18985 * cdef:
18986 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18987 * char *_uuid = uuid # <<<<<<<<<<<<<<
18988 * char *_keys = NULL
18989 * char *_vals = NULL
18990 */
18991 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_uuid); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__18991; goto __pyx_L1_error;}
18992 __pyx_v__uuid = __pyx_t_7;
18993
18994 /* "rbd.pyx":1835
18995 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
18996 * char *_uuid = uuid
18997 * char *_keys = NULL # <<<<<<<<<<<<<<
18998 * char *_vals = NULL
18999 * size_t _keys_size = 512
19000 */
19001 __pyx_v__keys = NULL((void*)0);
19002
19003 /* "rbd.pyx":1836
19004 * char *_uuid = uuid
19005 * char *_keys = NULL
19006 * char *_vals = NULL # <<<<<<<<<<<<<<
19007 * size_t _keys_size = 512
19008 * size_t _vals_size = 512
19009 */
19010 __pyx_v__vals = NULL((void*)0);
19011
19012 /* "rbd.pyx":1837
19013 * char *_keys = NULL
19014 * char *_vals = NULL
19015 * size_t _keys_size = 512 # <<<<<<<<<<<<<<
19016 * size_t _vals_size = 512
19017 * size_t _count = 0
19018 */
19019 __pyx_v__keys_size = 0x200;
19020
19021 /* "rbd.pyx":1838
19022 * char *_vals = NULL
19023 * size_t _keys_size = 512
19024 * size_t _vals_size = 512 # <<<<<<<<<<<<<<
19025 * size_t _count = 0
19026 * try:
19027 */
19028 __pyx_v__vals_size = 0x200;
19029
19030 /* "rbd.pyx":1839
19031 * size_t _keys_size = 512
19032 * size_t _vals_size = 512
19033 * size_t _count = 0 # <<<<<<<<<<<<<<
19034 * try:
19035 * while True:
19036 */
19037 __pyx_v__count = 0;
19038
19039 /* "rbd.pyx":1840
19040 * size_t _vals_size = 512
19041 * size_t _count = 0
19042 * try: # <<<<<<<<<<<<<<
19043 * while True:
19044 * _keys = <char *>realloc_chk(_keys, _keys_size)
19045 */
19046 /*try:*/ {
19047
19048 /* "rbd.pyx":1841
19049 * size_t _count = 0
19050 * try:
19051 * while True: # <<<<<<<<<<<<<<
19052 * _keys = <char *>realloc_chk(_keys, _keys_size)
19053 * _vals = <char *>realloc_chk(_vals, _vals_size)
19054 */
19055 while (1) {
19056
19057 /* "rbd.pyx":1842
19058 * try:
19059 * while True:
19060 * _keys = <char *>realloc_chk(_keys, _keys_size) # <<<<<<<<<<<<<<
19061 * _vals = <char *>realloc_chk(_vals, _vals_size)
19062 * with nogil:
19063 */
19064 __pyx_t_8 = __pyx_f_3rbd_realloc_chk(__pyx_v__keys, __pyx_v__keys_size); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__19064; goto __pyx_L4_error;}
19065 __pyx_v__keys = ((char *)__pyx_t_8);
19066
19067 /* "rbd.pyx":1843
19068 * while True:
19069 * _keys = <char *>realloc_chk(_keys, _keys_size)
19070 * _vals = <char *>realloc_chk(_vals, _vals_size) # <<<<<<<<<<<<<<
19071 * with nogil:
19072 * ret = rbd_mirror_peer_get_attributes(_ioctx, _uuid, _keys,
19073 */
19074 __pyx_t_8 = __pyx_f_3rbd_realloc_chk(__pyx_v__vals, __pyx_v__vals_size); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__19074; goto __pyx_L4_error;}
19075 __pyx_v__vals = ((char *)__pyx_t_8);
19076
19077 /* "rbd.pyx":1844
19078 * _keys = <char *>realloc_chk(_keys, _keys_size)
19079 * _vals = <char *>realloc_chk(_vals, _vals_size)
19080 * with nogil: # <<<<<<<<<<<<<<
19081 * ret = rbd_mirror_peer_get_attributes(_ioctx, _uuid, _keys,
19082 * &_keys_size, _vals,
19083 */
19084 {
19085 #ifdef WITH_THREAD1
19086 PyThreadState *_save;
19087 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
19088 #endif
19089 /*try:*/ {
19090
19091 /* "rbd.pyx":1845
19092 * _vals = <char *>realloc_chk(_vals, _vals_size)
19093 * with nogil:
19094 * ret = rbd_mirror_peer_get_attributes(_ioctx, _uuid, _keys, # <<<<<<<<<<<<<<
19095 * &_keys_size, _vals,
19096 * &_vals_size, &_count)
19097 */
19098 __pyx_v_ret = rbd_mirror_peer_get_attributes(__pyx_v__ioctx, __pyx_v__uuid, __pyx_v__keys, (&__pyx_v__keys_size), __pyx_v__vals, (&__pyx_v__vals_size), (&__pyx_v__count));
19099 }
19100
19101 /* "rbd.pyx":1844
19102 * _keys = <char *>realloc_chk(_keys, _keys_size)
19103 * _vals = <char *>realloc_chk(_vals, _vals_size)
19104 * with nogil: # <<<<<<<<<<<<<<
19105 * ret = rbd_mirror_peer_get_attributes(_ioctx, _uuid, _keys,
19106 * &_keys_size, _vals,
19107 */
19108 /*finally:*/ {
19109 /*normal exit:*/{
19110 #ifdef WITH_THREAD1
19111 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
19112 #endif
19113 goto __pyx_L12;
19114 }
19115 __pyx_L12:;
19116 }
19117 }
19118
19119 /* "rbd.pyx":1848
19120 * &_keys_size, _vals,
19121 * &_vals_size, &_count)
19122 * if ret >= 0: # <<<<<<<<<<<<<<
19123 * break
19124 * elif ret != -errno.ERANGE:
19125 */
19126 __pyx_t_9 = ((__pyx_v_ret >= 0) != 0);
19127 if (__pyx_t_9) {
19128
19129 /* "rbd.pyx":1849
19130 * &_vals_size, &_count)
19131 * if ret >= 0:
19132 * break # <<<<<<<<<<<<<<
19133 * elif ret != -errno.ERANGE:
19134 * raise make_ex(ret, 'error getting mirror peer attributes')
19135 */
19136 goto __pyx_L7_break;
19137
19138 /* "rbd.pyx":1848
19139 * &_keys_size, _vals,
19140 * &_vals_size, &_count)
19141 * if ret >= 0: # <<<<<<<<<<<<<<
19142 * break
19143 * elif ret != -errno.ERANGE:
19144 */
19145 }
19146
19147 /* "rbd.pyx":1850
19148 * if ret >= 0:
19149 * break
19150 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
19151 * raise make_ex(ret, 'error getting mirror peer attributes')
19152 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]]
19153 */
19154 __pyx_t_9 = ((__pyx_v_ret != (-ERANGE34)) != 0);
19155 if (__pyx_t_9) {
19156
19157 /* "rbd.pyx":1851
19158 * break
19159 * elif ret != -errno.ERANGE:
19160 * raise make_ex(ret, 'error getting mirror peer attributes') # <<<<<<<<<<<<<<
19161 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]]
19162 * vals = [decode_cstr(x) for x in _vals[:_vals_size].split(b'\0')[:-1]]
19163 */
19164 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__19164; goto __pyx_L4_error;}
19165 __Pyx_GOTREF(__pyx_t_1);
19166 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_getting_mirror_peer_attrib, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__19166; goto __pyx_L4_error;}
19167 __Pyx_GOTREF(__pyx_t_2);
19168 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19169 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
19170 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19171 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__19171; goto __pyx_L4_error;}
19172
19173 /* "rbd.pyx":1850
19174 * if ret >= 0:
19175 * break
19176 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
19177 * raise make_ex(ret, 'error getting mirror peer attributes')
19178 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]]
19179 */
19180 }
19181 }
19182 __pyx_L7_break:;
19183
19184 /* "rbd.pyx":1852
19185 * elif ret != -errno.ERANGE:
19186 * raise make_ex(ret, 'error getting mirror peer attributes')
19187 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]] # <<<<<<<<<<<<<<
19188 * vals = [decode_cstr(x) for x in _vals[:_vals_size].split(b'\0')[:-1]]
19189 * return dict(zip(keys, vals))
19190 */
19191 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19191; goto __pyx_L4_error;}
19192 __Pyx_GOTREF(__pyx_t_2);
19193 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v__keys + 0, __pyx_v__keys_size - 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19193; goto __pyx_L4_error;}
19194 __Pyx_GOTREF(__pyx_t_1);
19195 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19195; goto __pyx_L4_error;}
19196 __Pyx_GOTREF(__pyx_t_5);
19197 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19198 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__7, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19198; goto __pyx_L4_error;}
19199 __Pyx_GOTREF(__pyx_t_1);
19200 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19201 __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL((void*)0), NULL((void*)0), &__pyx_slice__8, 0, 1, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19201; goto __pyx_L4_error;}
19202 __Pyx_GOTREF(__pyx_t_5);
19203 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19204 if (likely(PyList_CheckExact(__pyx_t_5))__builtin_expect(!!(((((PyObject*)(__pyx_t_5))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_5)((((PyObject*)(__pyx_t_5))->ob_type) == &PyTuple_Type)) {
19205 __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_4 = 0;
19206 __pyx_t_10 = NULL((void*)0);
19207 } else {
19208 __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19208; goto __pyx_L4_error;}
19209 __Pyx_GOTREF(__pyx_t_1);
19210 __pyx_t_10 = Py_TYPE(__pyx_t_1)(((PyObject*)(__pyx_t_1))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19210; goto __pyx_L4_error;}
19211 }
19212 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19213 for (;;) {
19214 if (likely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 1)) {
19215 if (likely(PyList_CheckExact(__pyx_t_1))__builtin_expect(!!(((((PyObject*)(__pyx_t_1))->ob_type) ==
&PyList_Type)), 1)
) {
19216 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
19217 #if CYTHON_COMPILING_IN_CPYTHON1
19218 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4)(((PyListObject *)(__pyx_t_1))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19218; goto __pyx_L4_error;}
19219 #else
19220 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19220; goto __pyx_L4_error;}
19221 __Pyx_GOTREF(__pyx_t_5);
19222 #endif
19223 } else {
19224 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
19225 #if CYTHON_COMPILING_IN_CPYTHON1
19226 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_1))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19226; goto __pyx_L4_error;}
19227 #else
19228 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19228; goto __pyx_L4_error;}
19229 __Pyx_GOTREF(__pyx_t_5);
19230 #endif
19231 }
19232 } else {
19233 __pyx_t_5 = __pyx_t_10(__pyx_t_1);
19234 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
19235 PyObject* exc_type = PyErr_Occurred();
19236 if (exc_type) {
19237 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
19238 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19238; goto __pyx_L4_error;}
19239 }
19240 break;
19241 }
19242 __Pyx_GOTREF(__pyx_t_5);
19243 }
19244 __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_x; __pyx_v_x = __pyx_t_5
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
19245 __pyx_t_5 = 0;
19246 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19246; goto __pyx_L4_error;}
19247 __Pyx_GOTREF(__pyx_t_3);
19248 __pyx_t_11 = NULL((void*)0);
19249 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
19250 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
19251 if (likely(__pyx_t_11)__builtin_expect(!!(__pyx_t_11), 1)) {
19252 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
19253 __Pyx_INCREF(__pyx_t_11)( ((PyObject*)(__pyx_t_11))->ob_refcnt++);
19254 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19255 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19256 }
19257 }
19258 if (!__pyx_t_11) {
19259 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_x); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19259; goto __pyx_L4_error;}
19260 __Pyx_GOTREF(__pyx_t_5);
19261 } else {
19262 __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)__builtin_expect(!!(!__pyx_t_12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19262; goto __pyx_L4_error;}
19263 __Pyx_GOTREF(__pyx_t_12);
19264 __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11)(((PyTupleObject *)(__pyx_t_12))->ob_item[0] = __pyx_t_11); __pyx_t_11 = NULL((void*)0);
19265 __Pyx_INCREF(__pyx_v_x)( ((PyObject*)(__pyx_v_x))->ob_refcnt++);
19266 __Pyx_GIVEREF(__pyx_v_x);
19267 PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_x)(((PyTupleObject *)(__pyx_t_12))->ob_item[0+1] = __pyx_v_x
)
;
19268 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19268; goto __pyx_L4_error;}
19269 __Pyx_GOTREF(__pyx_t_5);
19270 __Pyx_DECREF(__pyx_t_12)do { if ( --((PyObject*)(__pyx_t_12))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_12)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_12)))); } while
(0)
; __pyx_t_12 = 0;
19271 }
19272 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
19273 if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_2, (PyObject
*)__pyx_t_5)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__19273; goto __pyx_L4_error;}
19274 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19275 }
19276 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19277 __pyx_v_keys = ((PyObject*)__pyx_t_2);
19278 __pyx_t_2 = 0;
19279
19280 /* "rbd.pyx":1853
19281 * raise make_ex(ret, 'error getting mirror peer attributes')
19282 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]]
19283 * vals = [decode_cstr(x) for x in _vals[:_vals_size].split(b'\0')[:-1]] # <<<<<<<<<<<<<<
19284 * return dict(zip(keys, vals))
19285 * finally:
19286 */
19287 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19287; goto __pyx_L4_error;}
19288 __Pyx_GOTREF(__pyx_t_2);
19289 __pyx_t_1 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v__vals + 0, __pyx_v__vals_size - 0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19289; goto __pyx_L4_error;}
19290 __Pyx_GOTREF(__pyx_t_1);
19291 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19291; goto __pyx_L4_error;}
19292 __Pyx_GOTREF(__pyx_t_5);
19293 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19294 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19294; goto __pyx_L4_error;}
19295 __Pyx_GOTREF(__pyx_t_1);
19296 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19297 __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL((void*)0), NULL((void*)0), &__pyx_slice__10, 0, 1, 1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19297; goto __pyx_L4_error;}
19298 __Pyx_GOTREF(__pyx_t_5);
19299 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19300 if (likely(PyList_CheckExact(__pyx_t_5))__builtin_expect(!!(((((PyObject*)(__pyx_t_5))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_5)((((PyObject*)(__pyx_t_5))->ob_type) == &PyTuple_Type)) {
19301 __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_4 = 0;
19302 __pyx_t_10 = NULL((void*)0);
19303 } else {
19304 __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19304; goto __pyx_L4_error;}
19305 __Pyx_GOTREF(__pyx_t_1);
19306 __pyx_t_10 = Py_TYPE(__pyx_t_1)(((PyObject*)(__pyx_t_1))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19306; goto __pyx_L4_error;}
19307 }
19308 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19309 for (;;) {
19310 if (likely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 1)) {
19311 if (likely(PyList_CheckExact(__pyx_t_1))__builtin_expect(!!(((((PyObject*)(__pyx_t_1))->ob_type) ==
&PyList_Type)), 1)
) {
19312 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
19313 #if CYTHON_COMPILING_IN_CPYTHON1
19314 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4)(((PyListObject *)(__pyx_t_1))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19314; goto __pyx_L4_error;}
19315 #else
19316 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19316; goto __pyx_L4_error;}
19317 __Pyx_GOTREF(__pyx_t_5);
19318 #endif
19319 } else {
19320 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
19321 #if CYTHON_COMPILING_IN_CPYTHON1
19322 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_1))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19322; goto __pyx_L4_error;}
19323 #else
19324 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19324; goto __pyx_L4_error;}
19325 __Pyx_GOTREF(__pyx_t_5);
19326 #endif
19327 }
19328 } else {
19329 __pyx_t_5 = __pyx_t_10(__pyx_t_1);
19330 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
19331 PyObject* exc_type = PyErr_Occurred();
19332 if (exc_type) {
19333 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
19334 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19334; goto __pyx_L4_error;}
19335 }
19336 break;
19337 }
19338 __Pyx_GOTREF(__pyx_t_5);
19339 }
19340 __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_x; __pyx_v_x = __pyx_t_5
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
19341 __pyx_t_5 = 0;
19342 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19342; goto __pyx_L4_error;}
19343 __Pyx_GOTREF(__pyx_t_3);
19344 __pyx_t_12 = NULL((void*)0);
19345 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
19346 __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
19347 if (likely(__pyx_t_12)__builtin_expect(!!(__pyx_t_12), 1)) {
19348 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
19349 __Pyx_INCREF(__pyx_t_12)( ((PyObject*)(__pyx_t_12))->ob_refcnt++);
19350 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19351 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19352 }
19353 }
19354 if (!__pyx_t_12) {
19355 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_x); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19355; goto __pyx_L4_error;}
19356 __Pyx_GOTREF(__pyx_t_5);
19357 } else {
19358 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19358; goto __pyx_L4_error;}
19359 __Pyx_GOTREF(__pyx_t_11);
19360 __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_12); __pyx_t_12 = NULL((void*)0);
19361 __Pyx_INCREF(__pyx_v_x)( ((PyObject*)(__pyx_v_x))->ob_refcnt++);
19362 __Pyx_GIVEREF(__pyx_v_x);
19363 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_x)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_v_x
)
;
19364 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19364; goto __pyx_L4_error;}
19365 __Pyx_GOTREF(__pyx_t_5);
19366 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
19367 }
19368 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
19369 if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_2, (PyObject
*)__pyx_t_5)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__19369; goto __pyx_L4_error;}
19370 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19371 }
19372 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19373 __pyx_v_vals = ((PyObject*)__pyx_t_2);
19374 __pyx_t_2 = 0;
19375
19376 /* "rbd.pyx":1854
19377 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]]
19378 * vals = [decode_cstr(x) for x in _vals[:_vals_size].split(b'\0')[:-1]]
19379 * return dict(zip(keys, vals)) # <<<<<<<<<<<<<<
19380 * finally:
19381 * free(_keys)
19382 */
19383 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
19384 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__19384; goto __pyx_L4_error;}
19385 __Pyx_GOTREF(__pyx_t_2);
19386 __Pyx_INCREF(__pyx_v_keys)( ((PyObject*)(__pyx_v_keys))->ob_refcnt++);
19387 __Pyx_GIVEREF(__pyx_v_keys);
19388 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_keys)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_keys
)
;
19389 __Pyx_INCREF(__pyx_v_vals)( ((PyObject*)(__pyx_v_vals))->ob_refcnt++);
19390 __Pyx_GIVEREF(__pyx_v_vals);
19391 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_vals)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_vals
)
;
19392 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__19392; goto __pyx_L4_error;}
19393 __Pyx_GOTREF(__pyx_t_1);
19394 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19395 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__19395; goto __pyx_L4_error;}
19396 __Pyx_GOTREF(__pyx_t_2);
19397 __Pyx_GIVEREF(__pyx_t_1);
19398 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
19399 __pyx_t_1 = 0;
19400 __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__19400; goto __pyx_L4_error;}
19401 __Pyx_GOTREF(__pyx_t_1);
19402 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19403 __pyx_r = __pyx_t_1;
19404 __pyx_t_1 = 0;
19405 goto __pyx_L3_return;
19406 }
19407
19408 /* "rbd.pyx":1856
19409 * return dict(zip(keys, vals))
19410 * finally:
19411 * free(_keys) # <<<<<<<<<<<<<<
19412 * free(_vals)
19413 *
19414 */
19415 /*finally:*/ {
19416 /*exception exit:*/{
19417 __pyx_L4_error:;
19418 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
19419 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
; __pyx_t_12 = 0;
19420 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
19421 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
19422 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
19423 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
19424 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
19425 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
19426 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_16, &
__pyx_t_17, &__pyx_t_18) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
19427 __Pyx_XGOTREF(__pyx_t_16);
19428 __Pyx_XGOTREF(__pyx_t_17);
19429 __Pyx_XGOTREF(__pyx_t_18);
19430 __Pyx_XGOTREF(__pyx_t_19);
19431 __Pyx_XGOTREF(__pyx_t_20);
19432 __Pyx_XGOTREF(__pyx_t_21);
19433 __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
19434 {
19435 free(__pyx_v__keys);
19436
19437 /* "rbd.pyx":1857
19438 * finally:
19439 * free(_keys)
19440 * free(_vals) # <<<<<<<<<<<<<<
19441 *
19442 * def mirror_peer_set_attributes(self, ioctx, uuid, attributes):
19443 */
19444 free(__pyx_v__vals);
19445 }
19446 if (PY_MAJOR_VERSION2 >= 3) {
19447 __Pyx_XGIVEREF(__pyx_t_19);
19448 __Pyx_XGIVEREF(__pyx_t_20);
19449 __Pyx_XGIVEREF(__pyx_t_21);
19450 __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
19451 }
19452 __Pyx_XGIVEREF(__pyx_t_16);
19453 __Pyx_XGIVEREF(__pyx_t_17);
19454 __Pyx_XGIVEREF(__pyx_t_18);
19455 __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
19456 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
19457 __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
19458 goto __pyx_L1_error;
19459 }
19460 __pyx_L3_return: {
19461 __pyx_t_21 = __pyx_r;
19462 __pyx_r = 0;
19463
19464 /* "rbd.pyx":1856
19465 * return dict(zip(keys, vals))
19466 * finally:
19467 * free(_keys) # <<<<<<<<<<<<<<
19468 * free(_vals)
19469 *
19470 */
19471 free(__pyx_v__keys);
19472
19473 /* "rbd.pyx":1857
19474 * finally:
19475 * free(_keys)
19476 * free(_vals) # <<<<<<<<<<<<<<
19477 *
19478 * def mirror_peer_set_attributes(self, ioctx, uuid, attributes):
19479 */
19480 free(__pyx_v__vals);
19481 __pyx_r = __pyx_t_21;
19482 __pyx_t_21 = 0;
19483 goto __pyx_L0;
19484 }
19485 }
19486
19487 /* "rbd.pyx":1816
19488 * raise make_ex(ret, 'error setting mirror peer cluster')
19489 *
19490 * def mirror_peer_get_attributes(self, ioctx, uuid): # <<<<<<<<<<<<<<
19491 * """
19492 * Get optional mirror peer attributes
19493 */
19494
19495 /* function exit code */
19496 __pyx_L1_error:;
19497 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
19498 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
19499 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
19500 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
19501 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
19502 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
;
19503 __Pyx_AddTraceback("rbd.RBD.mirror_peer_get_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
19504 __pyx_r = NULL((void*)0);
19505 __pyx_L0:;
19506 __Pyx_XDECREF(__pyx_v_keys)do { if ((__pyx_v_keys) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_keys))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_keys)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_keys)))); } while (0); } while
(0)
;
19507 __Pyx_XDECREF(__pyx_v_vals)do { if ((__pyx_v_vals) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_vals))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_vals)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_vals)))); } while (0); } while
(0)
;
19508 __Pyx_XDECREF(__pyx_v_x)do { if ((__pyx_v_x) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_x))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_v_x)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_x)))); } while (0); } while (0)
;
19509 __Pyx_XDECREF(__pyx_v_uuid)do { if ((__pyx_v_uuid) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_uuid))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_uuid)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_uuid)))); } while (0); } while
(0)
;
19510 __Pyx_XGIVEREF(__pyx_r);
19511 __Pyx_RefNannyFinishContext();
19512 return __pyx_r;
19513}
19514
19515/* "rbd.pyx":1859
19516 * free(_vals)
19517 *
19518 * def mirror_peer_set_attributes(self, ioctx, uuid, attributes): # <<<<<<<<<<<<<<
19519 * """
19520 * Set optional mirror peer attributes
19521 */
19522
19523/* Python wrapper */
19524static PyObject *__pyx_pw_3rbd_3RBD_53mirror_peer_set_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19525static char __pyx_doc_3rbd_3RBD_52mirror_peer_set_attributes[] = "RBD.mirror_peer_set_attributes(self, ioctx, uuid, attributes)\n\n Set optional mirror peer attributes\n\n :param ioctx: determines which RADOS pool is written\n :type ioctx: :class:`rados.Ioctx`\n :param uuid: uuid of the mirror peer\n :type uuid: str\n :param attributes: 'mon_host' and 'key' attributes\n :type attributes: dict\n ";
19526static PyMethodDef __pyx_mdef_3rbd_3RBD_53mirror_peer_set_attributes = {"mirror_peer_set_attributes", (PyCFunction)__pyx_pw_3rbd_3RBD_53mirror_peer_set_attributes, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_52mirror_peer_set_attributes};
19527static PyObject *__pyx_pw_3rbd_3RBD_53mirror_peer_set_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19528 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
19529 PyObject *__pyx_v_ioctx = 0;
19530 PyObject *__pyx_v_uuid = 0;
19531 PyObject *__pyx_v_attributes = 0;
19532 int __pyx_lineno = 0;
19533 const char *__pyx_filename = NULL((void*)0);
19534 int __pyx_clineno = 0;
19535 PyObject *__pyx_r = 0;
19536 __Pyx_RefNannyDeclarations
19537 __Pyx_RefNannySetupContext("mirror_peer_set_attributes (wrapper)", 0);
19538 {
19539 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_uuid,&__pyx_n_s_attributes,0};
19540 PyObject* values[4] = {0,0,0,0};
19541 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
19542 Py_ssize_t kw_args;
19543 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
19544 switch (pos_args) {
19545 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
19546 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
19547 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
19548 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
19549 case 0: break;
19550 default: goto __pyx_L5_argtuple_error;
19551 }
19552 kw_args = PyDict_Size(__pyx_kwds);
19553 switch (pos_args) {
19554 case 0:
19555 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
19556 else goto __pyx_L5_argtuple_error;
19557 case 1:
19558 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
19559 else {
19560 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_attributes", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__19560; goto __pyx_L3_error;}
19561 }
19562 case 2:
19563 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uuid
)) != 0), 1)
) kw_args--;
19564 else {
19565 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_attributes", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__19565; goto __pyx_L3_error;}
19566 }
19567 case 3:
19568 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes
)) != 0), 1)
) kw_args--;
19569 else {
19570 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_attributes", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__19570; goto __pyx_L3_error;}
19571 }
19572 }
19573 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
19574 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_peer_set_attributes") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_peer_set_attributes") < 0),
0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__19574; goto __pyx_L3_error;}
19575 }
19576 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
19577 goto __pyx_L5_argtuple_error;
19578 } else {
19579 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
19580 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
19581 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
19582 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
19583 }
19584 __pyx_v_self = values[0];
19585 __pyx_v_ioctx = values[1];
19586 __pyx_v_uuid = values[2];
19587 __pyx_v_attributes = values[3];
19588 }
19589 goto __pyx_L4_argument_unpacking_done;
19590 __pyx_L5_argtuple_error:;
19591 __Pyx_RaiseArgtupleInvalid("mirror_peer_set_attributes", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__19591; goto __pyx_L3_error;}
19592 __pyx_L3_error:;
19593 __Pyx_AddTraceback("rbd.RBD.mirror_peer_set_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
19594 __Pyx_RefNannyFinishContext();
19595 return NULL((void*)0);
19596 __pyx_L4_argument_unpacking_done:;
19597 __pyx_r = __pyx_pf_3rbd_3RBD_52mirror_peer_set_attributes(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_uuid, __pyx_v_attributes);
19598
19599 /* function exit code */
19600 __Pyx_RefNannyFinishContext();
19601 return __pyx_r;
19602}
19603
19604static PyObject *__pyx_pf_3rbd_3RBD_52mirror_peer_set_attributes(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_uuid, PyObject *__pyx_v_attributes) {
19605 PyObject *__pyx_v_keys_str = NULL((void*)0);
19606 PyObject *__pyx_v_vals_str = NULL((void*)0);
19607 rados_ioctx_t __pyx_v__ioctx;
19608 char *__pyx_v__uuid;
19609 char *__pyx_v__keys;
19610 char *__pyx_v__vals;
19611 size_t __pyx_v__count;
19612 int __pyx_v_ret;
19613 PyObject *__pyx_v_x = NULL((void*)0);
19614 PyObject *__pyx_r = NULL((void*)0);
19615 __Pyx_RefNannyDeclarations
19616 PyObject *__pyx_t_1 = NULL((void*)0);
19617 PyObject *__pyx_t_2 = NULL((void*)0);
19618 PyObject *__pyx_t_3 = NULL((void*)0);
19619 Py_ssize_t __pyx_t_4;
19620 PyObject *__pyx_t_5 = NULL((void*)0);
19621 PyObject *(*__pyx_t_6)(PyObject *);
19622 PyObject *__pyx_t_7 = NULL((void*)0);
19623 PyObject *__pyx_t_8 = NULL((void*)0);
19624 Py_ssize_t __pyx_t_9;
19625 PyObject *__pyx_t_10 = NULL((void*)0);
19626 rados_ioctx_t __pyx_t_11;
19627 char *__pyx_t_12;
19628 int __pyx_t_13;
19629 int __pyx_lineno = 0;
19630 const char *__pyx_filename = NULL((void*)0);
19631 int __pyx_clineno = 0;
19632 __Pyx_RefNannySetupContext("mirror_peer_set_attributes", 0);
19633 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
19634
19635 /* "rbd.pyx":1870
19636 * :type attributes: dict
19637 * """
19638 * uuid = cstr(uuid, 'uuid') # <<<<<<<<<<<<<<
19639 * keys_str = b'\0'.join([cstr(x[0], 'key') for x in attributes.items()])
19640 * vals_str = b'\0'.join([cstr(x[1], 'val') for x in attributes.items()])
19641 */
19642 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__19642; goto __pyx_L1_error;}
19643 __Pyx_GOTREF(__pyx_t_2);
19644 __pyx_t_3 = NULL((void*)0);
19645 __pyx_t_4 = 0;
19646 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
19647 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
19648 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
19649 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
19650 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
19651 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19652 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19653 __pyx_t_4 = 1;
19654 }
19655 }
19656 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__19656; goto __pyx_L1_error;}
19657 __Pyx_GOTREF(__pyx_t_5);
19658 if (__pyx_t_3) {
19659 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
19660 }
19661 __Pyx_INCREF(__pyx_v_uuid)( ((PyObject*)(__pyx_v_uuid))->ob_refcnt++);
19662 __Pyx_GIVEREF(__pyx_v_uuid);
19663 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_uuid
)
;
19664 __Pyx_INCREF(__pyx_n_s_uuid)( ((PyObject*)(__pyx_n_s_uuid))->ob_refcnt++);
19665 __Pyx_GIVEREF(__pyx_n_s_uuid);
19666 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_uuid)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_uuid
)
;
19667 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__19667; goto __pyx_L1_error;}
19668 __Pyx_GOTREF(__pyx_t_1);
19669 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19670 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19671 __Pyx_DECREF_SET(__pyx_v_uuid, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_uuid; __pyx_v_uuid =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
19672 __pyx_t_1 = 0;
19673
19674 /* "rbd.pyx":1871
19675 * """
19676 * uuid = cstr(uuid, 'uuid')
19677 * keys_str = b'\0'.join([cstr(x[0], 'key') for x in attributes.items()]) # <<<<<<<<<<<<<<
19678 * vals_str = b'\0'.join([cstr(x[1], 'val') for x in attributes.items()])
19679 * cdef:
19680 */
19681 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19681; goto __pyx_L1_error;}
19682 __Pyx_GOTREF(__pyx_t_1);
19683 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19683; goto __pyx_L1_error;}
19684 __Pyx_GOTREF(__pyx_t_5);
19685 __pyx_t_3 = NULL((void*)0);
19686 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
19687 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
19688 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
19689 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
19690 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
19691 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19692 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19693 }
19694 }
19695 if (__pyx_t_3) {
19696 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19696; goto __pyx_L1_error;}
19697 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
19698 } else {
19699 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19699; goto __pyx_L1_error;}
19700 }
19701 __Pyx_GOTREF(__pyx_t_2);
19702 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19703 if (likely(PyList_CheckExact(__pyx_t_2))__builtin_expect(!!(((((PyObject*)(__pyx_t_2))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_2)((((PyObject*)(__pyx_t_2))->ob_type) == &PyTuple_Type)) {
19704 __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_4 = 0;
19705 __pyx_t_6 = NULL((void*)0);
19706 } else {
19707 __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19707; goto __pyx_L1_error;}
19708 __Pyx_GOTREF(__pyx_t_5);
19709 __pyx_t_6 = Py_TYPE(__pyx_t_5)(((PyObject*)(__pyx_t_5))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19709; goto __pyx_L1_error;}
19710 }
19711 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19712 for (;;) {
19713 if (likely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 1)) {
19714 if (likely(PyList_CheckExact(__pyx_t_5))__builtin_expect(!!(((((PyObject*)(__pyx_t_5))->ob_type) ==
&PyList_Type)), 1)
) {
19715 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)(((PyVarObject*)(__pyx_t_5))->ob_size)) break;
19716 #if CYTHON_COMPILING_IN_CPYTHON1
19717 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4)(((PyListObject *)(__pyx_t_5))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19717; goto __pyx_L1_error;}
19718 #else
19719 __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_4)( (((PyObject*)(__pyx_t_5))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_5, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19719; goto __pyx_L1_error;}
19720 __Pyx_GOTREF(__pyx_t_2);
19721 #endif
19722 } else {
19723 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)(((PyVarObject*)(__pyx_t_5))->ob_size)) break;
19724 #if CYTHON_COMPILING_IN_CPYTHON1
19725 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19725; goto __pyx_L1_error;}
19726 #else
19727 __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_4)( (((PyObject*)(__pyx_t_5))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_5, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19727; goto __pyx_L1_error;}
19728 __Pyx_GOTREF(__pyx_t_2);
19729 #endif
19730 }
19731 } else {
19732 __pyx_t_2 = __pyx_t_6(__pyx_t_5);
19733 if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {
19734 PyObject* exc_type = PyErr_Occurred();
19735 if (exc_type) {
19736 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
19737 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19737; goto __pyx_L1_error;}
19738 }
19739 break;
19740 }
19741 __Pyx_GOTREF(__pyx_t_2);
19742 }
19743 __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2)do { PyObject *tmp = (PyObject *) __pyx_v_x; __pyx_v_x = __pyx_t_2
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
19744 __pyx_t_2 = 0;
19745 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19745; goto __pyx_L1_error;}
19746 __Pyx_GOTREF(__pyx_t_3);
19747 __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(0 < (long
)((Py_ssize_t)(((size_t)-1)>>1)) || 0 == (long)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(0 > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
0 == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(long) == sizeof(Py_ssize_t) && (1 || __builtin_expect
(!!(0 < (long)((Py_ssize_t)(((size_t)-1)>>1)) || 0 ==
(long)((Py_ssize_t)(((size_t)-1)>>1))), 1))) ) ? __Pyx_GetItemInt_Fast
(__pyx_v_x, (Py_ssize_t)0, 0, 0, 1) : (0 ? (PyErr_SetString(PyExc_IndexError
, "list index out of range"), (PyObject*)((void*)0)) : __Pyx_GetItemInt_Generic
(__pyx_v_x, __Pyx_PyInt_From_long(0))))
; if (unlikely(__pyx_t_7 == NULL)__builtin_expect(!!(__pyx_t_7 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19747; goto __pyx_L1_error;};
19748 __Pyx_GOTREF(__pyx_t_7);
19749 __pyx_t_8 = NULL((void*)0);
19750 __pyx_t_9 = 0;
19751 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
19752 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
19753 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
19754 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
19755 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
19756 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19757 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19758 __pyx_t_9 = 1;
19759 }
19760 }
19761 __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19761; goto __pyx_L1_error;}
19762 __Pyx_GOTREF(__pyx_t_10);
19763 if (__pyx_t_8) {
19764 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
19765 }
19766 __Pyx_GIVEREF(__pyx_t_7);
19767 PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+__pyx_t_9] = __pyx_t_7
)
;
19768 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
19769 __Pyx_GIVEREF(__pyx_n_s_key);
19770 PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_10))->ob_item[1+__pyx_t_9] = __pyx_n_s_key
)
;
19771 __pyx_t_7 = 0;
19772 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19772; goto __pyx_L1_error;}
19773 __Pyx_GOTREF(__pyx_t_2);
19774 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
19775 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
19776 if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_1, (PyObject
*)__pyx_t_2)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19776; goto __pyx_L1_error;}
19777 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19778 }
19779 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19780 __pyx_t_5 = __Pyx_PyBytes_Join_PyString_Join(__pyx_kp_b__5, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__19780; goto __pyx_L1_error;}
19781 __Pyx_GOTREF(__pyx_t_5);
19782 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19783 __pyx_v_keys_str = __pyx_t_5;
19784 __pyx_t_5 = 0;
19785
19786 /* "rbd.pyx":1872
19787 * uuid = cstr(uuid, 'uuid')
19788 * keys_str = b'\0'.join([cstr(x[0], 'key') for x in attributes.items()])
19789 * vals_str = b'\0'.join([cstr(x[1], 'val') for x in attributes.items()]) # <<<<<<<<<<<<<<
19790 * cdef:
19791 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
19792 */
19793 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19793; goto __pyx_L1_error;}
19794 __Pyx_GOTREF(__pyx_t_5);
19795 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attributes, __pyx_n_s_items); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19795; goto __pyx_L1_error;}
19796 __Pyx_GOTREF(__pyx_t_2);
19797 __pyx_t_3 = NULL((void*)0);
19798 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
19799 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
19800 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
19801 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
19802 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
19803 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19804 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19805 }
19806 }
19807 if (__pyx_t_3) {
19808 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19808; goto __pyx_L1_error;}
19809 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
19810 } else {
19811 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19811; goto __pyx_L1_error;}
19812 }
19813 __Pyx_GOTREF(__pyx_t_1);
19814 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19815 if (likely(PyList_CheckExact(__pyx_t_1))__builtin_expect(!!(((((PyObject*)(__pyx_t_1))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_1)((((PyObject*)(__pyx_t_1))->ob_type) == &PyTuple_Type)) {
19816 __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++); __pyx_t_4 = 0;
19817 __pyx_t_6 = NULL((void*)0);
19818 } else {
19819 __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19819; goto __pyx_L1_error;}
19820 __Pyx_GOTREF(__pyx_t_2);
19821 __pyx_t_6 = Py_TYPE(__pyx_t_2)(((PyObject*)(__pyx_t_2))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19821; goto __pyx_L1_error;}
19822 }
19823 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19824 for (;;) {
19825 if (likely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 1)) {
19826 if (likely(PyList_CheckExact(__pyx_t_2))__builtin_expect(!!(((((PyObject*)(__pyx_t_2))->ob_type) ==
&PyList_Type)), 1)
) {
19827 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)(((PyVarObject*)(__pyx_t_2))->ob_size)) break;
19828 #if CYTHON_COMPILING_IN_CPYTHON1
19829 __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4)(((PyListObject *)(__pyx_t_2))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19829; goto __pyx_L1_error;}
19830 #else
19831 __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4)( (((PyObject*)(__pyx_t_2))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_2, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19831; goto __pyx_L1_error;}
19832 __Pyx_GOTREF(__pyx_t_1);
19833 #endif
19834 } else {
19835 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)(((PyVarObject*)(__pyx_t_2))->ob_size)) break;
19836 #if CYTHON_COMPILING_IN_CPYTHON1
19837 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4)(((PyTupleObject *)(__pyx_t_2))->ob_item[__pyx_t_4]); __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_4++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19837; goto __pyx_L1_error;}
19838 #else
19839 __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4)( (((PyObject*)(__pyx_t_2))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_2, __pyx_t_4) )
; __pyx_t_4++; if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19839; goto __pyx_L1_error;}
19840 __Pyx_GOTREF(__pyx_t_1);
19841 #endif
19842 }
19843 } else {
19844 __pyx_t_1 = __pyx_t_6(__pyx_t_2);
19845 if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {
19846 PyObject* exc_type = PyErr_Occurred();
19847 if (exc_type) {
19848 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
19849 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19849; goto __pyx_L1_error;}
19850 }
19851 break;
19852 }
19853 __Pyx_GOTREF(__pyx_t_1);
19854 }
19855 __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_x; __pyx_v_x = __pyx_t_1
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
19856 __pyx_t_1 = 0;
19857 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19857; goto __pyx_L1_error;}
19858 __Pyx_GOTREF(__pyx_t_3);
19859 __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(1 < (long
)((Py_ssize_t)(((size_t)-1)>>1)) || 1 == (long)((Py_ssize_t
)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(1 > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1) ||
1 == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)), 1)))
|| (sizeof(long) == sizeof(Py_ssize_t) && (1 || __builtin_expect
(!!(1 < (long)((Py_ssize_t)(((size_t)-1)>>1)) || 1 ==
(long)((Py_ssize_t)(((size_t)-1)>>1))), 1))) ) ? __Pyx_GetItemInt_Fast
(__pyx_v_x, (Py_ssize_t)1, 0, 0, 1) : (0 ? (PyErr_SetString(PyExc_IndexError
, "list index out of range"), (PyObject*)((void*)0)) : __Pyx_GetItemInt_Generic
(__pyx_v_x, __Pyx_PyInt_From_long(1))))
; if (unlikely(__pyx_t_10 == NULL)__builtin_expect(!!(__pyx_t_10 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19859; goto __pyx_L1_error;};
19860 __Pyx_GOTREF(__pyx_t_10);
19861 __pyx_t_7 = NULL((void*)0);
19862 __pyx_t_9 = 0;
19863 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
19864 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
19865 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
19866 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
19867 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
19868 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
19869 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
19870 __pyx_t_9 = 1;
19871 }
19872 }
19873 __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19873; goto __pyx_L1_error;}
19874 __Pyx_GOTREF(__pyx_t_8);
19875 if (__pyx_t_7) {
19876 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
19877 }
19878 __Pyx_GIVEREF(__pyx_t_10);
19879 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_10)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+__pyx_t_9] = __pyx_t_10
)
;
19880 __Pyx_INCREF(__pyx_n_s_val)( ((PyObject*)(__pyx_n_s_val))->ob_refcnt++);
19881 __Pyx_GIVEREF(__pyx_n_s_val);
19882 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_n_s_val)(((PyTupleObject *)(__pyx_t_8))->ob_item[1+__pyx_t_9] = __pyx_n_s_val
)
;
19883 __pyx_t_10 = 0;
19884 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19884; goto __pyx_L1_error;}
19885 __Pyx_GOTREF(__pyx_t_1);
19886 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
19887 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
19888 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_5, (PyObject
*)__pyx_t_1)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19888; goto __pyx_L1_error;}
19889 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
19890 }
19891 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
19892 __pyx_t_2 = __Pyx_PyBytes_Join_PyString_Join(__pyx_kp_b__5, __pyx_t_5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__19892; goto __pyx_L1_error;}
19893 __Pyx_GOTREF(__pyx_t_2);
19894 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
19895 __pyx_v_vals_str = __pyx_t_2;
19896 __pyx_t_2 = 0;
19897
19898 /* "rbd.pyx":1874
19899 * vals_str = b'\0'.join([cstr(x[1], 'val') for x in attributes.items()])
19900 * cdef:
19901 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
19902 * char *_uuid = uuid
19903 * char *_keys = keys_str
19904 */
19905 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; __pyx_clineno = __LINE__19905; goto __pyx_L1_error;}
19906 __pyx_t_11 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_11 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_11 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; __pyx_clineno = __LINE__19906; goto __pyx_L1_error;}
19907 __pyx_v__ioctx = __pyx_t_11;
19908
19909 /* "rbd.pyx":1875
19910 * cdef:
19911 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
19912 * char *_uuid = uuid # <<<<<<<<<<<<<<
19913 * char *_keys = keys_str
19914 * char *_vals = vals_str
19915 */
19916 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_uuid); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__19916; goto __pyx_L1_error;}
19917 __pyx_v__uuid = __pyx_t_12;
19918
19919 /* "rbd.pyx":1876
19920 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
19921 * char *_uuid = uuid
19922 * char *_keys = keys_str # <<<<<<<<<<<<<<
19923 * char *_vals = vals_str
19924 * size_t _count = len(attributes)
19925 */
19926 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_keys_str); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__19926; goto __pyx_L1_error;}
19927 __pyx_v__keys = __pyx_t_12;
19928
19929 /* "rbd.pyx":1877
19930 * char *_uuid = uuid
19931 * char *_keys = keys_str
19932 * char *_vals = vals_str # <<<<<<<<<<<<<<
19933 * size_t _count = len(attributes)
19934 *
19935 */
19936 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_vals_str); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1877; __pyx_clineno = __LINE__19936; goto __pyx_L1_error;}
19937 __pyx_v__vals = __pyx_t_12;
19938
19939 /* "rbd.pyx":1878
19940 * char *_keys = keys_str
19941 * char *_vals = vals_str
19942 * size_t _count = len(attributes) # <<<<<<<<<<<<<<
19943 *
19944 * with nogil:
19945 */
19946 __pyx_t_4 = PyObject_LengthPyObject_Size(__pyx_v_attributes); if (unlikely(__pyx_t_4 == -1)__builtin_expect(!!(__pyx_t_4 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__19946; goto __pyx_L1_error;}
19947 __pyx_v__count = __pyx_t_4;
19948
19949 /* "rbd.pyx":1880
19950 * size_t _count = len(attributes)
19951 *
19952 * with nogil: # <<<<<<<<<<<<<<
19953 * ret = rbd_mirror_peer_set_attributes(_ioctx, _uuid, _keys, _vals,
19954 * _count)
19955 */
19956 {
19957 #ifdef WITH_THREAD1
19958 PyThreadState *_save;
19959 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
19960 #endif
19961 /*try:*/ {
19962
19963 /* "rbd.pyx":1881
19964 *
19965 * with nogil:
19966 * ret = rbd_mirror_peer_set_attributes(_ioctx, _uuid, _keys, _vals, # <<<<<<<<<<<<<<
19967 * _count)
19968 * if ret != 0:
19969 */
19970 __pyx_v_ret = rbd_mirror_peer_set_attributes(__pyx_v__ioctx, __pyx_v__uuid, __pyx_v__keys, __pyx_v__vals, __pyx_v__count);
19971 }
19972
19973 /* "rbd.pyx":1880
19974 * size_t _count = len(attributes)
19975 *
19976 * with nogil: # <<<<<<<<<<<<<<
19977 * ret = rbd_mirror_peer_set_attributes(_ioctx, _uuid, _keys, _vals,
19978 * _count)
19979 */
19980 /*finally:*/ {
19981 /*normal exit:*/{
19982 #ifdef WITH_THREAD1
19983 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
19984 #endif
19985 goto __pyx_L9;
19986 }
19987 __pyx_L9:;
19988 }
19989 }
19990
19991 /* "rbd.pyx":1883
19992 * ret = rbd_mirror_peer_set_attributes(_ioctx, _uuid, _keys, _vals,
19993 * _count)
19994 * if ret != 0: # <<<<<<<<<<<<<<
19995 * raise make_ex(ret, 'error setting mirror peer attributes')
19996 *
19997 */
19998 __pyx_t_13 = ((__pyx_v_ret != 0) != 0);
19999 if (__pyx_t_13) {
20000
20001 /* "rbd.pyx":1884
20002 * _count)
20003 * if ret != 0:
20004 * raise make_ex(ret, 'error setting mirror peer attributes') # <<<<<<<<<<<<<<
20005 *
20006 * def mirror_image_status_list(self, ioctx):
20007 */
20008 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__20008; goto __pyx_L1_error;}
20009 __Pyx_GOTREF(__pyx_t_2);
20010 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_setting_mirror_peer_attrib, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__20010; goto __pyx_L1_error;}
20011 __Pyx_GOTREF(__pyx_t_5);
20012 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20013 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
20014 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
20015 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__20015; goto __pyx_L1_error;}
20016
20017 /* "rbd.pyx":1883
20018 * ret = rbd_mirror_peer_set_attributes(_ioctx, _uuid, _keys, _vals,
20019 * _count)
20020 * if ret != 0: # <<<<<<<<<<<<<<
20021 * raise make_ex(ret, 'error setting mirror peer attributes')
20022 *
20023 */
20024 }
20025
20026 /* "rbd.pyx":1859
20027 * free(_vals)
20028 *
20029 * def mirror_peer_set_attributes(self, ioctx, uuid, attributes): # <<<<<<<<<<<<<<
20030 * """
20031 * Set optional mirror peer attributes
20032 */
20033
20034 /* function exit code */
20035 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
20036 goto __pyx_L0;
20037 __pyx_L1_error:;
20038 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
20039 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
20040 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
20041 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
20042 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
20043 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
20044 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
20045 __Pyx_AddTraceback("rbd.RBD.mirror_peer_set_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
20046 __pyx_r = NULL((void*)0);
20047 __pyx_L0:;
20048 __Pyx_XDECREF(__pyx_v_keys_str)do { if ((__pyx_v_keys_str) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_keys_str))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_keys_str)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_keys_str)))); }
while (0); } while (0)
;
20049 __Pyx_XDECREF(__pyx_v_vals_str)do { if ((__pyx_v_vals_str) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_vals_str))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_vals_str)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_vals_str)))); }
while (0); } while (0)
;
20050 __Pyx_XDECREF(__pyx_v_x)do { if ((__pyx_v_x) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_x))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_v_x)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_x)))); } while (0); } while (0)
;
20051 __Pyx_XDECREF(__pyx_v_uuid)do { if ((__pyx_v_uuid) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_uuid))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_uuid)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_uuid)))); } while (0); } while
(0)
;
20052 __Pyx_XGIVEREF(__pyx_r);
20053 __Pyx_RefNannyFinishContext();
20054 return __pyx_r;
20055}
20056
20057/* "rbd.pyx":1886
20058 * raise make_ex(ret, 'error setting mirror peer attributes')
20059 *
20060 * def mirror_image_status_list(self, ioctx): # <<<<<<<<<<<<<<
20061 * """
20062 * Iterate over the mirror image statuses of a pool.
20063 */
20064
20065/* Python wrapper */
20066static PyObject *__pyx_pw_3rbd_3RBD_55mirror_image_status_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20067static char __pyx_doc_3rbd_3RBD_54mirror_image_status_list[] = "RBD.mirror_image_status_list(self, ioctx)\n\n Iterate over the mirror image statuses of a pool.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: :class:`MirrorImageStatusIterator`\n ";
20068static PyMethodDef __pyx_mdef_3rbd_3RBD_55mirror_image_status_list = {"mirror_image_status_list", (PyCFunction)__pyx_pw_3rbd_3RBD_55mirror_image_status_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_54mirror_image_status_list};
20069static PyObject *__pyx_pw_3rbd_3RBD_55mirror_image_status_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20070 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
20071 PyObject *__pyx_v_ioctx = 0;
20072 int __pyx_lineno = 0;
20073 const char *__pyx_filename = NULL((void*)0);
20074 int __pyx_clineno = 0;
20075 PyObject *__pyx_r = 0;
20076 __Pyx_RefNannyDeclarations
20077 __Pyx_RefNannySetupContext("mirror_image_status_list (wrapper)", 0);
20078 {
20079 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
20080 PyObject* values[2] = {0,0};
20081 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
20082 Py_ssize_t kw_args;
20083 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
20084 switch (pos_args) {
20085 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20086 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20087 case 0: break;
20088 default: goto __pyx_L5_argtuple_error;
20089 }
20090 kw_args = PyDict_Size(__pyx_kwds);
20091 switch (pos_args) {
20092 case 0:
20093 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
20094 else goto __pyx_L5_argtuple_error;
20095 case 1:
20096 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
20097 else {
20098 __Pyx_RaiseArgtupleInvalid("mirror_image_status_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__20098; goto __pyx_L3_error;}
20099 }
20100 }
20101 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
20102 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_image_status_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_image_status_list") < 0), 0
)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__20102; goto __pyx_L3_error;}
20103 }
20104 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
20105 goto __pyx_L5_argtuple_error;
20106 } else {
20107 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20108 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20109 }
20110 __pyx_v_self = values[0];
20111 __pyx_v_ioctx = values[1];
20112 }
20113 goto __pyx_L4_argument_unpacking_done;
20114 __pyx_L5_argtuple_error:;
20115 __Pyx_RaiseArgtupleInvalid("mirror_image_status_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__20115; goto __pyx_L3_error;}
20116 __pyx_L3_error:;
20117 __Pyx_AddTraceback("rbd.RBD.mirror_image_status_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
20118 __Pyx_RefNannyFinishContext();
20119 return NULL((void*)0);
20120 __pyx_L4_argument_unpacking_done:;
20121 __pyx_r = __pyx_pf_3rbd_3RBD_54mirror_image_status_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
20122
20123 /* function exit code */
20124 __Pyx_RefNannyFinishContext();
20125 return __pyx_r;
20126}
20127
20128static PyObject *__pyx_pf_3rbd_3RBD_54mirror_image_status_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
20129 PyObject *__pyx_r = NULL((void*)0);
20130 __Pyx_RefNannyDeclarations
20131 PyObject *__pyx_t_1 = NULL((void*)0);
20132 PyObject *__pyx_t_2 = NULL((void*)0);
20133 int __pyx_lineno = 0;
20134 const char *__pyx_filename = NULL((void*)0);
20135 int __pyx_clineno = 0;
20136 __Pyx_RefNannySetupContext("mirror_image_status_list", 0);
20137
20138 /* "rbd.pyx":1894
20139 * :returns: :class:`MirrorImageStatusIterator`
20140 * """
20141 * return MirrorImageStatusIterator(ioctx) # <<<<<<<<<<<<<<
20142 *
20143 * def mirror_image_status_summary(self, ioctx):
20144 */
20145 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
20146 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__20146; goto __pyx_L1_error;}
20147 __Pyx_GOTREF(__pyx_t_1);
20148 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
20149 __Pyx_GIVEREF(__pyx_v_ioctx);
20150 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
20151 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_MirrorImageStatusIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__20151; goto __pyx_L1_error;}
20152 __Pyx_GOTREF(__pyx_t_2);
20153 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
20154 __pyx_r = __pyx_t_2;
20155 __pyx_t_2 = 0;
20156 goto __pyx_L0;
20157
20158 /* "rbd.pyx":1886
20159 * raise make_ex(ret, 'error setting mirror peer attributes')
20160 *
20161 * def mirror_image_status_list(self, ioctx): # <<<<<<<<<<<<<<
20162 * """
20163 * Iterate over the mirror image statuses of a pool.
20164 */
20165
20166 /* function exit code */
20167 __pyx_L1_error:;
20168 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
20169 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
20170 __Pyx_AddTraceback("rbd.RBD.mirror_image_status_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
20171 __pyx_r = NULL((void*)0);
20172 __pyx_L0:;
20173 __Pyx_XGIVEREF(__pyx_r);
20174 __Pyx_RefNannyFinishContext();
20175 return __pyx_r;
20176}
20177
20178/* "rbd.pyx":1896
20179 * return MirrorImageStatusIterator(ioctx)
20180 *
20181 * def mirror_image_status_summary(self, ioctx): # <<<<<<<<<<<<<<
20182 * """
20183 * Get mirror image status summary of a pool.
20184 */
20185
20186/* Python wrapper */
20187static PyObject *__pyx_pw_3rbd_3RBD_57mirror_image_status_summary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20188static char __pyx_doc_3rbd_3RBD_56mirror_image_status_summary[] = "RBD.mirror_image_status_summary(self, ioctx)\n\n Get mirror image status summary of a pool.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: list - a list of (state, count) tuples\n ";
20189static PyMethodDef __pyx_mdef_3rbd_3RBD_57mirror_image_status_summary = {"mirror_image_status_summary", (PyCFunction)__pyx_pw_3rbd_3RBD_57mirror_image_status_summary, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_56mirror_image_status_summary};
20190static PyObject *__pyx_pw_3rbd_3RBD_57mirror_image_status_summary(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20191 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
20192 PyObject *__pyx_v_ioctx = 0;
20193 int __pyx_lineno = 0;
20194 const char *__pyx_filename = NULL((void*)0);
20195 int __pyx_clineno = 0;
20196 PyObject *__pyx_r = 0;
20197 __Pyx_RefNannyDeclarations
20198 __Pyx_RefNannySetupContext("mirror_image_status_summary (wrapper)", 0);
20199 {
20200 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
20201 PyObject* values[2] = {0,0};
20202 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
20203 Py_ssize_t kw_args;
20204 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
20205 switch (pos_args) {
20206 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20207 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20208 case 0: break;
20209 default: goto __pyx_L5_argtuple_error;
20210 }
20211 kw_args = PyDict_Size(__pyx_kwds);
20212 switch (pos_args) {
20213 case 0:
20214 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
20215 else goto __pyx_L5_argtuple_error;
20216 case 1:
20217 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
20218 else {
20219 __Pyx_RaiseArgtupleInvalid("mirror_image_status_summary", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__20219; goto __pyx_L3_error;}
20220 }
20221 }
20222 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
20223 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_image_status_summary") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_image_status_summary") < 0)
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__20223; goto __pyx_L3_error;}
20224 }
20225 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
20226 goto __pyx_L5_argtuple_error;
20227 } else {
20228 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20229 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20230 }
20231 __pyx_v_self = values[0];
20232 __pyx_v_ioctx = values[1];
20233 }
20234 goto __pyx_L4_argument_unpacking_done;
20235 __pyx_L5_argtuple_error:;
20236 __Pyx_RaiseArgtupleInvalid("mirror_image_status_summary", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__20236; goto __pyx_L3_error;}
20237 __pyx_L3_error:;
20238 __Pyx_AddTraceback("rbd.RBD.mirror_image_status_summary", __pyx_clineno, __pyx_lineno, __pyx_filename);
20239 __Pyx_RefNannyFinishContext();
20240 return NULL((void*)0);
20241 __pyx_L4_argument_unpacking_done:;
20242 __pyx_r = __pyx_pf_3rbd_3RBD_56mirror_image_status_summary(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
20243
20244 /* function exit code */
20245 __Pyx_RefNannyFinishContext();
20246 return __pyx_r;
20247}
20248
20249static PyObject *__pyx_pf_3rbd_3RBD_56mirror_image_status_summary(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
20250 rados_ioctx_t __pyx_v__ioctx;
20251 rbd_mirror_image_status_state_t *__pyx_v_states;
20252 int *__pyx_v_counts;
20253 size_t __pyx_v_maxlen;
20254 int __pyx_v_ret;
20255 size_t __pyx_v_i;
20256 PyObject *__pyx_r = NULL((void*)0);
20257 __Pyx_RefNannyDeclarations
20258 rados_ioctx_t __pyx_t_1;
20259 void *__pyx_t_2;
20260 int __pyx_t_3;
20261 PyObject *__pyx_t_4 = NULL((void*)0);
20262 PyObject *__pyx_t_5 = NULL((void*)0);
20263 size_t __pyx_t_6;
20264 size_t __pyx_t_7;
20265 PyObject *__pyx_t_8 = NULL((void*)0);
20266 PyObject *__pyx_t_9 = NULL((void*)0);
20267 int __pyx_t_10;
20268 int __pyx_t_11;
20269 char const *__pyx_t_12;
20270 PyObject *__pyx_t_13 = NULL((void*)0);
20271 PyObject *__pyx_t_14 = NULL((void*)0);
20272 PyObject *__pyx_t_15 = NULL((void*)0);
20273 PyObject *__pyx_t_16 = NULL((void*)0);
20274 PyObject *__pyx_t_17 = NULL((void*)0);
20275 PyObject *__pyx_t_18 = NULL((void*)0);
20276 int __pyx_lineno = 0;
20277 const char *__pyx_filename = NULL((void*)0);
20278 int __pyx_clineno = 0;
20279 __Pyx_RefNannySetupContext("mirror_image_status_summary", 0);
20280
20281 /* "rbd.pyx":1905
20282 * """
20283 * cdef:
20284 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
20285 * rbd_mirror_image_status_state_t *states = NULL
20286 * int *counts = NULL
20287 */
20288 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__20288; goto __pyx_L1_error;}
20289 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__20289; goto __pyx_L1_error;}
20290 __pyx_v__ioctx = __pyx_t_1;
20291
20292 /* "rbd.pyx":1906
20293 * cdef:
20294 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
20295 * rbd_mirror_image_status_state_t *states = NULL # <<<<<<<<<<<<<<
20296 * int *counts = NULL
20297 * size_t maxlen = 32
20298 */
20299 __pyx_v_states = NULL((void*)0);
20300
20301 /* "rbd.pyx":1907
20302 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
20303 * rbd_mirror_image_status_state_t *states = NULL
20304 * int *counts = NULL # <<<<<<<<<<<<<<
20305 * size_t maxlen = 32
20306 * try:
20307 */
20308 __pyx_v_counts = NULL((void*)0);
20309
20310 /* "rbd.pyx":1908
20311 * rbd_mirror_image_status_state_t *states = NULL
20312 * int *counts = NULL
20313 * size_t maxlen = 32 # <<<<<<<<<<<<<<
20314 * try:
20315 * states = <rbd_mirror_image_status_state_t *>realloc_chk(states,
20316 */
20317 __pyx_v_maxlen = 32;
20318
20319 /* "rbd.pyx":1909
20320 * int *counts = NULL
20321 * size_t maxlen = 32
20322 * try: # <<<<<<<<<<<<<<
20323 * states = <rbd_mirror_image_status_state_t *>realloc_chk(states,
20324 * sizeof(rbd_mirror_image_status_state_t) * maxlen)
20325 */
20326 /*try:*/ {
20327
20328 /* "rbd.pyx":1910
20329 * size_t maxlen = 32
20330 * try:
20331 * states = <rbd_mirror_image_status_state_t *>realloc_chk(states, # <<<<<<<<<<<<<<
20332 * sizeof(rbd_mirror_image_status_state_t) * maxlen)
20333 * counts = <int *>realloc_chk(counts, sizeof(int) * maxlen)
20334 */
20335 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_states, ((sizeof(rbd_mirror_image_status_state_t)) * __pyx_v_maxlen)); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__20335; goto __pyx_L4_error;}
20336 __pyx_v_states = ((rbd_mirror_image_status_state_t *)__pyx_t_2);
20337
20338 /* "rbd.pyx":1912
20339 * states = <rbd_mirror_image_status_state_t *>realloc_chk(states,
20340 * sizeof(rbd_mirror_image_status_state_t) * maxlen)
20341 * counts = <int *>realloc_chk(counts, sizeof(int) * maxlen) # <<<<<<<<<<<<<<
20342 * with nogil:
20343 * ret = rbd_mirror_image_status_summary(_ioctx, states, counts,
20344 */
20345 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_counts, ((sizeof(int)) * __pyx_v_maxlen)); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__20345; goto __pyx_L4_error;}
20346 __pyx_v_counts = ((int *)__pyx_t_2);
20347
20348 /* "rbd.pyx":1913
20349 * sizeof(rbd_mirror_image_status_state_t) * maxlen)
20350 * counts = <int *>realloc_chk(counts, sizeof(int) * maxlen)
20351 * with nogil: # <<<<<<<<<<<<<<
20352 * ret = rbd_mirror_image_status_summary(_ioctx, states, counts,
20353 * &maxlen)
20354 */
20355 {
20356 #ifdef WITH_THREAD1
20357 PyThreadState *_save;
20358 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
20359 #endif
20360 /*try:*/ {
20361
20362 /* "rbd.pyx":1914
20363 * counts = <int *>realloc_chk(counts, sizeof(int) * maxlen)
20364 * with nogil:
20365 * ret = rbd_mirror_image_status_summary(_ioctx, states, counts, # <<<<<<<<<<<<<<
20366 * &maxlen)
20367 * if ret < 0:
20368 */
20369 __pyx_v_ret = rbd_mirror_image_status_summary(__pyx_v__ioctx, __pyx_v_states, __pyx_v_counts, (&__pyx_v_maxlen));
20370 }
20371
20372 /* "rbd.pyx":1913
20373 * sizeof(rbd_mirror_image_status_state_t) * maxlen)
20374 * counts = <int *>realloc_chk(counts, sizeof(int) * maxlen)
20375 * with nogil: # <<<<<<<<<<<<<<
20376 * ret = rbd_mirror_image_status_summary(_ioctx, states, counts,
20377 * &maxlen)
20378 */
20379 /*finally:*/ {
20380 /*normal exit:*/{
20381 #ifdef WITH_THREAD1
20382 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
20383 #endif
20384 goto __pyx_L8;
20385 }
20386 __pyx_L8:;
20387 }
20388 }
20389
20390 /* "rbd.pyx":1916
20391 * ret = rbd_mirror_image_status_summary(_ioctx, states, counts,
20392 * &maxlen)
20393 * if ret < 0: # <<<<<<<<<<<<<<
20394 * raise make_ex(ret, 'error getting mirror image status summary')
20395 * return [(states[i], counts[i]) for i in range(maxlen)]
20396 */
20397 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
20398 if (__pyx_t_3) {
20399
20400 /* "rbd.pyx":1917
20401 * &maxlen)
20402 * if ret < 0:
20403 * raise make_ex(ret, 'error getting mirror image status summary') # <<<<<<<<<<<<<<
20404 * return [(states[i], counts[i]) for i in range(maxlen)]
20405 * finally:
20406 */
20407 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__20407; goto __pyx_L4_error;}
20408 __Pyx_GOTREF(__pyx_t_4);
20409 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_getting_mirror_image_statu, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__20409; goto __pyx_L4_error;}
20410 __Pyx_GOTREF(__pyx_t_5);
20411 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
20412 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
20413 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
20414 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__20414; goto __pyx_L4_error;}
20415
20416 /* "rbd.pyx":1916
20417 * ret = rbd_mirror_image_status_summary(_ioctx, states, counts,
20418 * &maxlen)
20419 * if ret < 0: # <<<<<<<<<<<<<<
20420 * raise make_ex(ret, 'error getting mirror image status summary')
20421 * return [(states[i], counts[i]) for i in range(maxlen)]
20422 */
20423 }
20424
20425 /* "rbd.pyx":1918
20426 * if ret < 0:
20427 * raise make_ex(ret, 'error getting mirror image status summary')
20428 * return [(states[i], counts[i]) for i in range(maxlen)] # <<<<<<<<<<<<<<
20429 * finally:
20430 * free(states)
20431 */
20432 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
20433 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__20433; goto __pyx_L4_error;}
20434 __Pyx_GOTREF(__pyx_t_5);
20435 __pyx_t_6 = __pyx_v_maxlen;
20436 for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
20437 __pyx_v_i = __pyx_t_7;
20438 __pyx_t_4 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t((__pyx_v_states[__pyx_v_i])); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__20438; goto __pyx_L4_error;}
20439 __Pyx_GOTREF(__pyx_t_4);
20440 __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_counts[__pyx_v_i])); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__20440; goto __pyx_L4_error;}
20441 __Pyx_GOTREF(__pyx_t_8);
20442 __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__20442; goto __pyx_L4_error;}
20443 __Pyx_GOTREF(__pyx_t_9);
20444 __Pyx_GIVEREF(__pyx_t_4);
20445 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_4);
20446 __Pyx_GIVEREF(__pyx_t_8);
20447 PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[1] = __pyx_t_8);
20448 __pyx_t_4 = 0;
20449 __pyx_t_8 = 0;
20450 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_9))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_5, (PyObject
*)__pyx_t_9)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__20450; goto __pyx_L4_error;}
20451 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
20452 }
20453 __pyx_r = __pyx_t_5;
20454 __pyx_t_5 = 0;
20455 goto __pyx_L3_return;
20456 }
20457
20458 /* "rbd.pyx":1920
20459 * return [(states[i], counts[i]) for i in range(maxlen)]
20460 * finally:
20461 * free(states) # <<<<<<<<<<<<<<
20462 * free(counts)
20463 *
20464 */
20465 /*finally:*/ {
20466 /*exception exit:*/{
20467 __pyx_L4_error:;
20468 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
20469 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
20470 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
20471 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
20472 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
20473 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
20474 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_13, &
__pyx_t_14, &__pyx_t_15) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
20475 __Pyx_XGOTREF(__pyx_t_13);
20476 __Pyx_XGOTREF(__pyx_t_14);
20477 __Pyx_XGOTREF(__pyx_t_15);
20478 __Pyx_XGOTREF(__pyx_t_16);
20479 __Pyx_XGOTREF(__pyx_t_17);
20480 __Pyx_XGOTREF(__pyx_t_18);
20481 __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
20482 {
20483 free(__pyx_v_states);
20484
20485 /* "rbd.pyx":1921
20486 * finally:
20487 * free(states)
20488 * free(counts) # <<<<<<<<<<<<<<
20489 *
20490 * def mirror_image_instance_id_list(self, ioctx):
20491 */
20492 free(__pyx_v_counts);
20493 }
20494 if (PY_MAJOR_VERSION2 >= 3) {
20495 __Pyx_XGIVEREF(__pyx_t_16);
20496 __Pyx_XGIVEREF(__pyx_t_17);
20497 __Pyx_XGIVEREF(__pyx_t_18);
20498 __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
20499 }
20500 __Pyx_XGIVEREF(__pyx_t_13);
20501 __Pyx_XGIVEREF(__pyx_t_14);
20502 __Pyx_XGIVEREF(__pyx_t_15);
20503 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
20504 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
20505 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
20506 goto __pyx_L1_error;
20507 }
20508 __pyx_L3_return: {
20509 __pyx_t_18 = __pyx_r;
20510 __pyx_r = 0;
20511
20512 /* "rbd.pyx":1920
20513 * return [(states[i], counts[i]) for i in range(maxlen)]
20514 * finally:
20515 * free(states) # <<<<<<<<<<<<<<
20516 * free(counts)
20517 *
20518 */
20519 free(__pyx_v_states);
20520
20521 /* "rbd.pyx":1921
20522 * finally:
20523 * free(states)
20524 * free(counts) # <<<<<<<<<<<<<<
20525 *
20526 * def mirror_image_instance_id_list(self, ioctx):
20527 */
20528 free(__pyx_v_counts);
20529 __pyx_r = __pyx_t_18;
20530 __pyx_t_18 = 0;
20531 goto __pyx_L0;
20532 }
20533 }
20534
20535 /* "rbd.pyx":1896
20536 * return MirrorImageStatusIterator(ioctx)
20537 *
20538 * def mirror_image_status_summary(self, ioctx): # <<<<<<<<<<<<<<
20539 * """
20540 * Get mirror image status summary of a pool.
20541 */
20542
20543 /* function exit code */
20544 __pyx_L1_error:;
20545 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
20546 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
20547 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
20548 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
20549 __Pyx_AddTraceback("rbd.RBD.mirror_image_status_summary", __pyx_clineno, __pyx_lineno, __pyx_filename);
20550 __pyx_r = NULL((void*)0);
20551 __pyx_L0:;
20552 __Pyx_XGIVEREF(__pyx_r);
20553 __Pyx_RefNannyFinishContext();
20554 return __pyx_r;
20555}
20556
20557/* "rbd.pyx":1923
20558 * free(counts)
20559 *
20560 * def mirror_image_instance_id_list(self, ioctx): # <<<<<<<<<<<<<<
20561 * """
20562 * Iterate over the mirror image instance ids of a pool.
20563 */
20564
20565/* Python wrapper */
20566static PyObject *__pyx_pw_3rbd_3RBD_59mirror_image_instance_id_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20567static char __pyx_doc_3rbd_3RBD_58mirror_image_instance_id_list[] = "RBD.mirror_image_instance_id_list(self, ioctx)\n\n Iterate over the mirror image instance ids of a pool.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: :class:`MirrorImageInstanceIdIterator`\n ";
20568static PyMethodDef __pyx_mdef_3rbd_3RBD_59mirror_image_instance_id_list = {"mirror_image_instance_id_list", (PyCFunction)__pyx_pw_3rbd_3RBD_59mirror_image_instance_id_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_58mirror_image_instance_id_list};
20569static PyObject *__pyx_pw_3rbd_3RBD_59mirror_image_instance_id_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20570 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
20571 PyObject *__pyx_v_ioctx = 0;
20572 int __pyx_lineno = 0;
20573 const char *__pyx_filename = NULL((void*)0);
20574 int __pyx_clineno = 0;
20575 PyObject *__pyx_r = 0;
20576 __Pyx_RefNannyDeclarations
20577 __Pyx_RefNannySetupContext("mirror_image_instance_id_list (wrapper)", 0);
20578 {
20579 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
20580 PyObject* values[2] = {0,0};
20581 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
20582 Py_ssize_t kw_args;
20583 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
20584 switch (pos_args) {
20585 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20586 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20587 case 0: break;
20588 default: goto __pyx_L5_argtuple_error;
20589 }
20590 kw_args = PyDict_Size(__pyx_kwds);
20591 switch (pos_args) {
20592 case 0:
20593 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
20594 else goto __pyx_L5_argtuple_error;
20595 case 1:
20596 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
20597 else {
20598 __Pyx_RaiseArgtupleInvalid("mirror_image_instance_id_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__20598; goto __pyx_L3_error;}
20599 }
20600 }
20601 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
20602 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mirror_image_instance_id_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "mirror_image_instance_id_list") < 0
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__20602; goto __pyx_L3_error;}
20603 }
20604 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
20605 goto __pyx_L5_argtuple_error;
20606 } else {
20607 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20608 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20609 }
20610 __pyx_v_self = values[0];
20611 __pyx_v_ioctx = values[1];
20612 }
20613 goto __pyx_L4_argument_unpacking_done;
20614 __pyx_L5_argtuple_error:;
20615 __Pyx_RaiseArgtupleInvalid("mirror_image_instance_id_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__20615; goto __pyx_L3_error;}
20616 __pyx_L3_error:;
20617 __Pyx_AddTraceback("rbd.RBD.mirror_image_instance_id_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
20618 __Pyx_RefNannyFinishContext();
20619 return NULL((void*)0);
20620 __pyx_L4_argument_unpacking_done:;
20621 __pyx_r = __pyx_pf_3rbd_3RBD_58mirror_image_instance_id_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
20622
20623 /* function exit code */
20624 __Pyx_RefNannyFinishContext();
20625 return __pyx_r;
20626}
20627
20628static PyObject *__pyx_pf_3rbd_3RBD_58mirror_image_instance_id_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
20629 PyObject *__pyx_r = NULL((void*)0);
20630 __Pyx_RefNannyDeclarations
20631 PyObject *__pyx_t_1 = NULL((void*)0);
20632 PyObject *__pyx_t_2 = NULL((void*)0);
20633 int __pyx_lineno = 0;
20634 const char *__pyx_filename = NULL((void*)0);
20635 int __pyx_clineno = 0;
20636 __Pyx_RefNannySetupContext("mirror_image_instance_id_list", 0);
20637
20638 /* "rbd.pyx":1931
20639 * :returns: :class:`MirrorImageInstanceIdIterator`
20640 * """
20641 * return MirrorImageInstanceIdIterator(ioctx) # <<<<<<<<<<<<<<
20642 *
20643 * def pool_metadata_get(self, ioctx, key):
20644 */
20645 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
20646 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__20646; goto __pyx_L1_error;}
20647 __Pyx_GOTREF(__pyx_t_1);
20648 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
20649 __Pyx_GIVEREF(__pyx_v_ioctx);
20650 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
20651 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_MirrorImageInstanceIdIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; __pyx_clineno = __LINE__20651; goto __pyx_L1_error;}
20652 __Pyx_GOTREF(__pyx_t_2);
20653 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
20654 __pyx_r = __pyx_t_2;
20655 __pyx_t_2 = 0;
20656 goto __pyx_L0;
20657
20658 /* "rbd.pyx":1923
20659 * free(counts)
20660 *
20661 * def mirror_image_instance_id_list(self, ioctx): # <<<<<<<<<<<<<<
20662 * """
20663 * Iterate over the mirror image instance ids of a pool.
20664 */
20665
20666 /* function exit code */
20667 __pyx_L1_error:;
20668 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
20669 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
20670 __Pyx_AddTraceback("rbd.RBD.mirror_image_instance_id_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
20671 __pyx_r = NULL((void*)0);
20672 __pyx_L0:;
20673 __Pyx_XGIVEREF(__pyx_r);
20674 __Pyx_RefNannyFinishContext();
20675 return __pyx_r;
20676}
20677
20678/* "rbd.pyx":1933
20679 * return MirrorImageInstanceIdIterator(ioctx)
20680 *
20681 * def pool_metadata_get(self, ioctx, key): # <<<<<<<<<<<<<<
20682 * """
20683 * Get pool metadata for the given key.
20684 */
20685
20686/* Python wrapper */
20687static PyObject *__pyx_pw_3rbd_3RBD_61pool_metadata_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20688static char __pyx_doc_3rbd_3RBD_60pool_metadata_get[] = "RBD.pool_metadata_get(self, ioctx, key)\n\n Get pool metadata for the given key.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :param key: metadata key\n :type key: str\n :returns: str - metadata value\n ";
20689static PyMethodDef __pyx_mdef_3rbd_3RBD_61pool_metadata_get = {"pool_metadata_get", (PyCFunction)__pyx_pw_3rbd_3RBD_61pool_metadata_get, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_60pool_metadata_get};
20690static PyObject *__pyx_pw_3rbd_3RBD_61pool_metadata_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20691 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
20692 PyObject *__pyx_v_ioctx = 0;
20693 PyObject *__pyx_v_key = 0;
20694 int __pyx_lineno = 0;
20695 const char *__pyx_filename = NULL((void*)0);
20696 int __pyx_clineno = 0;
20697 PyObject *__pyx_r = 0;
20698 __Pyx_RefNannyDeclarations
20699 __Pyx_RefNannySetupContext("pool_metadata_get (wrapper)", 0);
20700 {
20701 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_key,0};
20702 PyObject* values[3] = {0,0,0};
20703 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
20704 Py_ssize_t kw_args;
20705 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
20706 switch (pos_args) {
20707 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
20708 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20709 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20710 case 0: break;
20711 default: goto __pyx_L5_argtuple_error;
20712 }
20713 kw_args = PyDict_Size(__pyx_kwds);
20714 switch (pos_args) {
20715 case 0:
20716 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
20717 else goto __pyx_L5_argtuple_error;
20718 case 1:
20719 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
20720 else {
20721 __Pyx_RaiseArgtupleInvalid("pool_metadata_get", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__20721; goto __pyx_L3_error;}
20722 }
20723 case 2:
20724 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key
)) != 0), 1)
) kw_args--;
20725 else {
20726 __Pyx_RaiseArgtupleInvalid("pool_metadata_get", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__20726; goto __pyx_L3_error;}
20727 }
20728 }
20729 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
20730 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pool_metadata_get") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "pool_metadata_get") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__20730; goto __pyx_L3_error;}
20731 }
20732 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
20733 goto __pyx_L5_argtuple_error;
20734 } else {
20735 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
20736 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
20737 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
20738 }
20739 __pyx_v_self = values[0];
20740 __pyx_v_ioctx = values[1];
20741 __pyx_v_key = values[2];
20742 }
20743 goto __pyx_L4_argument_unpacking_done;
20744 __pyx_L5_argtuple_error:;
20745 __Pyx_RaiseArgtupleInvalid("pool_metadata_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__20745; goto __pyx_L3_error;}
20746 __pyx_L3_error:;
20747 __Pyx_AddTraceback("rbd.RBD.pool_metadata_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
20748 __Pyx_RefNannyFinishContext();
20749 return NULL((void*)0);
20750 __pyx_L4_argument_unpacking_done:;
20751 __pyx_r = __pyx_pf_3rbd_3RBD_60pool_metadata_get(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_key);
20752
20753 /* function exit code */
20754 __Pyx_RefNannyFinishContext();
20755 return __pyx_r;
20756}
20757
20758static PyObject *__pyx_pf_3rbd_3RBD_60pool_metadata_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_key) {
20759 rados_ioctx_t __pyx_v__ioctx;
20760 char *__pyx_v__key;
20761 size_t __pyx_v_size;
20762 char *__pyx_v_value;
20763 int __pyx_v_ret;
20764 PyObject *__pyx_r = NULL((void*)0);
20765 __Pyx_RefNannyDeclarations
20766 PyObject *__pyx_t_1 = NULL((void*)0);
20767 PyObject *__pyx_t_2 = NULL((void*)0);
20768 PyObject *__pyx_t_3 = NULL((void*)0);
20769 Py_ssize_t __pyx_t_4;
20770 PyObject *__pyx_t_5 = NULL((void*)0);
20771 rados_ioctx_t __pyx_t_6;
20772 char *__pyx_t_7;
20773 void *__pyx_t_8;
20774 int __pyx_t_9;
20775 PyObject *__pyx_t_10 = NULL((void*)0);
20776 int __pyx_t_11;
20777 int __pyx_t_12;
20778 char const *__pyx_t_13;
20779 PyObject *__pyx_t_14 = NULL((void*)0);
20780 PyObject *__pyx_t_15 = NULL((void*)0);
20781 PyObject *__pyx_t_16 = NULL((void*)0);
20782 PyObject *__pyx_t_17 = NULL((void*)0);
20783 PyObject *__pyx_t_18 = NULL((void*)0);
20784 PyObject *__pyx_t_19 = NULL((void*)0);
20785 int __pyx_lineno = 0;
20786 const char *__pyx_filename = NULL((void*)0);
20787 int __pyx_clineno = 0;
20788 __Pyx_RefNannySetupContext("pool_metadata_get", 0);
20789 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
20790
20791 /* "rbd.pyx":1943
20792 * :returns: str - metadata value
20793 * """
20794 * key = cstr(key, 'key') # <<<<<<<<<<<<<<
20795 * cdef:
20796 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
20797 */
20798 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__20798; goto __pyx_L1_error;}
20799 __Pyx_GOTREF(__pyx_t_2);
20800 __pyx_t_3 = NULL((void*)0);
20801 __pyx_t_4 = 0;
20802 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
20803 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
20804 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
20805 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
20806 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
20807 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
20808 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
20809 __pyx_t_4 = 1;
20810 }
20811 }
20812 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__20812; goto __pyx_L1_error;}
20813 __Pyx_GOTREF(__pyx_t_5);
20814 if (__pyx_t_3) {
20815 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
20816 }
20817 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
20818 __Pyx_GIVEREF(__pyx_v_key);
20819 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_key
)
;
20820 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
20821 __Pyx_GIVEREF(__pyx_n_s_key);
20822 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_key
)
;
20823 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__20823; goto __pyx_L1_error;}
20824 __Pyx_GOTREF(__pyx_t_1);
20825 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
20826 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20827 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
20828 __pyx_t_1 = 0;
20829
20830 /* "rbd.pyx":1945
20831 * key = cstr(key, 'key')
20832 * cdef:
20833 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
20834 * char *_key = key
20835 * size_t size = 4096
20836 */
20837 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__20837; goto __pyx_L1_error;}
20838 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__20838; goto __pyx_L1_error;}
20839 __pyx_v__ioctx = __pyx_t_6;
20840
20841 /* "rbd.pyx":1946
20842 * cdef:
20843 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
20844 * char *_key = key # <<<<<<<<<<<<<<
20845 * size_t size = 4096
20846 * char *value = NULL
20847 */
20848 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__20848; goto __pyx_L1_error;}
20849 __pyx_v__key = __pyx_t_7;
20850
20851 /* "rbd.pyx":1947
20852 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
20853 * char *_key = key
20854 * size_t size = 4096 # <<<<<<<<<<<<<<
20855 * char *value = NULL
20856 * int ret
20857 */
20858 __pyx_v_size = 0x1000;
20859
20860 /* "rbd.pyx":1948
20861 * char *_key = key
20862 * size_t size = 4096
20863 * char *value = NULL # <<<<<<<<<<<<<<
20864 * int ret
20865 * try:
20866 */
20867 __pyx_v_value = NULL((void*)0);
20868
20869 /* "rbd.pyx":1950
20870 * char *value = NULL
20871 * int ret
20872 * try: # <<<<<<<<<<<<<<
20873 * while True:
20874 * value = <char *>realloc_chk(value, size)
20875 */
20876 /*try:*/ {
20877
20878 /* "rbd.pyx":1951
20879 * int ret
20880 * try:
20881 * while True: # <<<<<<<<<<<<<<
20882 * value = <char *>realloc_chk(value, size)
20883 * with nogil:
20884 */
20885 while (1) {
20886
20887 /* "rbd.pyx":1952
20888 * try:
20889 * while True:
20890 * value = <char *>realloc_chk(value, size) # <<<<<<<<<<<<<<
20891 * with nogil:
20892 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size)
20893 */
20894 __pyx_t_8 = __pyx_f_3rbd_realloc_chk(__pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__20894; goto __pyx_L4_error;}
20895 __pyx_v_value = ((char *)__pyx_t_8);
20896
20897 /* "rbd.pyx":1953
20898 * while True:
20899 * value = <char *>realloc_chk(value, size)
20900 * with nogil: # <<<<<<<<<<<<<<
20901 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size)
20902 * if ret != -errno.ERANGE:
20903 */
20904 {
20905 #ifdef WITH_THREAD1
20906 PyThreadState *_save;
20907 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
20908 #endif
20909 /*try:*/ {
20910
20911 /* "rbd.pyx":1954
20912 * value = <char *>realloc_chk(value, size)
20913 * with nogil:
20914 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size) # <<<<<<<<<<<<<<
20915 * if ret != -errno.ERANGE:
20916 * break
20917 */
20918 __pyx_v_ret = rbd_pool_metadata_get(__pyx_v__ioctx, __pyx_v__key, __pyx_v_value, (&__pyx_v_size));
20919 }
20920
20921 /* "rbd.pyx":1953
20922 * while True:
20923 * value = <char *>realloc_chk(value, size)
20924 * with nogil: # <<<<<<<<<<<<<<
20925 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size)
20926 * if ret != -errno.ERANGE:
20927 */
20928 /*finally:*/ {
20929 /*normal exit:*/{
20930 #ifdef WITH_THREAD1
20931 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
20932 #endif
20933 goto __pyx_L12;
20934 }
20935 __pyx_L12:;
20936 }
20937 }
20938
20939 /* "rbd.pyx":1955
20940 * with nogil:
20941 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size)
20942 * if ret != -errno.ERANGE: # <<<<<<<<<<<<<<
20943 * break
20944 * if ret == -errno.ENOENT:
20945 */
20946 __pyx_t_9 = ((__pyx_v_ret != (-ERANGE34)) != 0);
20947 if (__pyx_t_9) {
20948
20949 /* "rbd.pyx":1956
20950 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size)
20951 * if ret != -errno.ERANGE:
20952 * break # <<<<<<<<<<<<<<
20953 * if ret == -errno.ENOENT:
20954 * raise KeyError('no metadata %s' % (key))
20955 */
20956 goto __pyx_L7_break;
20957
20958 /* "rbd.pyx":1955
20959 * with nogil:
20960 * ret = rbd_pool_metadata_get(_ioctx, _key, value, &size)
20961 * if ret != -errno.ERANGE: # <<<<<<<<<<<<<<
20962 * break
20963 * if ret == -errno.ENOENT:
20964 */
20965 }
20966 }
20967 __pyx_L7_break:;
20968
20969 /* "rbd.pyx":1957
20970 * if ret != -errno.ERANGE:
20971 * break
20972 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
20973 * raise KeyError('no metadata %s' % (key))
20974 * if ret != 0:
20975 */
20976 __pyx_t_9 = ((__pyx_v_ret == (-ENOENT2)) != 0);
20977 if (__pyx_t_9) {
20978
20979 /* "rbd.pyx":1958
20980 * break
20981 * if ret == -errno.ENOENT:
20982 * raise KeyError('no metadata %s' % (key)) # <<<<<<<<<<<<<<
20983 * if ret != 0:
20984 * raise make_ex(ret, 'error getting metadata %s' % (key))
20985 */
20986 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_no_metadata_s, __pyx_v_key)PyString_Format(__pyx_kp_s_no_metadata_s, __pyx_v_key); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__20986; goto __pyx_L4_error;}
20987 __Pyx_GOTREF(__pyx_t_1);
20988 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__20988; goto __pyx_L4_error;}
20989 __Pyx_GOTREF(__pyx_t_2);
20990 __Pyx_GIVEREF(__pyx_t_1);
20991 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
20992 __pyx_t_1 = 0;
20993 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__20993; goto __pyx_L4_error;}
20994 __Pyx_GOTREF(__pyx_t_1);
20995 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
20996 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
20997 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
20998 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__20998; goto __pyx_L4_error;}
20999
21000 /* "rbd.pyx":1957
21001 * if ret != -errno.ERANGE:
21002 * break
21003 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
21004 * raise KeyError('no metadata %s' % (key))
21005 * if ret != 0:
21006 */
21007 }
21008
21009 /* "rbd.pyx":1959
21010 * if ret == -errno.ENOENT:
21011 * raise KeyError('no metadata %s' % (key))
21012 * if ret != 0: # <<<<<<<<<<<<<<
21013 * raise make_ex(ret, 'error getting metadata %s' % (key))
21014 * return decode_cstr(value)
21015 */
21016 __pyx_t_9 = ((__pyx_v_ret != 0) != 0);
21017 if (__pyx_t_9) {
21018
21019 /* "rbd.pyx":1960
21020 * raise KeyError('no metadata %s' % (key))
21021 * if ret != 0:
21022 * raise make_ex(ret, 'error getting metadata %s' % (key)) # <<<<<<<<<<<<<<
21023 * return decode_cstr(value)
21024 * finally:
21025 */
21026 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__21026; goto __pyx_L4_error;}
21027 __Pyx_GOTREF(__pyx_t_1);
21028 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_metadata_s, __pyx_v_key)PyString_Format(__pyx_kp_s_error_getting_metadata_s, __pyx_v_key
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__21028; goto __pyx_L4_error;}
21029 __Pyx_GOTREF(__pyx_t_2);
21030 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__21030; goto __pyx_L4_error;}
21031 __Pyx_GOTREF(__pyx_t_5);
21032 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
21033 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21034 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
21035 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
21036 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__21036; goto __pyx_L4_error;}
21037
21038 /* "rbd.pyx":1959
21039 * if ret == -errno.ENOENT:
21040 * raise KeyError('no metadata %s' % (key))
21041 * if ret != 0: # <<<<<<<<<<<<<<
21042 * raise make_ex(ret, 'error getting metadata %s' % (key))
21043 * return decode_cstr(value)
21044 */
21045 }
21046
21047 /* "rbd.pyx":1961
21048 * if ret != 0:
21049 * raise make_ex(ret, 'error getting metadata %s' % (key))
21050 * return decode_cstr(value) # <<<<<<<<<<<<<<
21051 * finally:
21052 * free(value)
21053 */
21054 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
21055 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__21055; goto __pyx_L4_error;}
21056 __Pyx_GOTREF(__pyx_t_2);
21057 __pyx_t_1 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_value); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__21057; goto __pyx_L4_error;}
21058 __Pyx_GOTREF(__pyx_t_1);
21059 __pyx_t_3 = NULL((void*)0);
21060 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
21061 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
21062 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
21063 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
21064 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
21065 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
21066 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
21067 }
21068 }
21069 if (!__pyx_t_3) {
21070 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__21070; goto __pyx_L4_error;}
21071 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
21072 __Pyx_GOTREF(__pyx_t_5);
21073 } else {
21074 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__21074; goto __pyx_L4_error;}
21075 __Pyx_GOTREF(__pyx_t_10);
21076 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
21077 __Pyx_GIVEREF(__pyx_t_1);
21078 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_1)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_1
)
;
21079 __pyx_t_1 = 0;
21080 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__21080; goto __pyx_L4_error;}
21081 __Pyx_GOTREF(__pyx_t_5);
21082 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
21083 }
21084 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21085 __pyx_r = __pyx_t_5;
21086 __pyx_t_5 = 0;
21087 goto __pyx_L3_return;
21088 }
21089
21090 /* "rbd.pyx":1963
21091 * return decode_cstr(value)
21092 * finally:
21093 * free(value) # <<<<<<<<<<<<<<
21094 *
21095 * def pool_metadata_set(self, ioctx, key, value):
21096 */
21097 /*finally:*/ {
21098 /*exception exit:*/{
21099 __pyx_L4_error:;
21100 __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
21101 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
21102 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
21103 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
21104 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
21105 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
21106 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
21107 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_14, &
__pyx_t_15, &__pyx_t_16) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
21108 __Pyx_XGOTREF(__pyx_t_14);
21109 __Pyx_XGOTREF(__pyx_t_15);
21110 __Pyx_XGOTREF(__pyx_t_16);
21111 __Pyx_XGOTREF(__pyx_t_17);
21112 __Pyx_XGOTREF(__pyx_t_18);
21113 __Pyx_XGOTREF(__pyx_t_19);
21114 __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
21115 {
21116 free(__pyx_v_value);
21117 }
21118 if (PY_MAJOR_VERSION2 >= 3) {
21119 __Pyx_XGIVEREF(__pyx_t_17);
21120 __Pyx_XGIVEREF(__pyx_t_18);
21121 __Pyx_XGIVEREF(__pyx_t_19);
21122 __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
21123 }
21124 __Pyx_XGIVEREF(__pyx_t_14);
21125 __Pyx_XGIVEREF(__pyx_t_15);
21126 __Pyx_XGIVEREF(__pyx_t_16);
21127 __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
21128 __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
21129 __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
21130 goto __pyx_L1_error;
21131 }
21132 __pyx_L3_return: {
21133 __pyx_t_19 = __pyx_r;
21134 __pyx_r = 0;
21135 free(__pyx_v_value);
21136 __pyx_r = __pyx_t_19;
21137 __pyx_t_19 = 0;
21138 goto __pyx_L0;
21139 }
21140 }
21141
21142 /* "rbd.pyx":1933
21143 * return MirrorImageInstanceIdIterator(ioctx)
21144 *
21145 * def pool_metadata_get(self, ioctx, key): # <<<<<<<<<<<<<<
21146 * """
21147 * Get pool metadata for the given key.
21148 */
21149
21150 /* function exit code */
21151 __pyx_L1_error:;
21152 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
21153 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
21154 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
21155 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
21156 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
21157 __Pyx_AddTraceback("rbd.RBD.pool_metadata_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
21158 __pyx_r = NULL((void*)0);
21159 __pyx_L0:;
21160 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
21161 __Pyx_XGIVEREF(__pyx_r);
21162 __Pyx_RefNannyFinishContext();
21163 return __pyx_r;
21164}
21165
21166/* "rbd.pyx":1965
21167 * free(value)
21168 *
21169 * def pool_metadata_set(self, ioctx, key, value): # <<<<<<<<<<<<<<
21170 * """
21171 * Set pool metadata for the given key.
21172 */
21173
21174/* Python wrapper */
21175static PyObject *__pyx_pw_3rbd_3RBD_63pool_metadata_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21176static char __pyx_doc_3rbd_3RBD_62pool_metadata_set[] = "RBD.pool_metadata_set(self, ioctx, key, value)\n\n Set pool metadata for the given key.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :param key: metadata key\n :type key: str\n :param value: metadata value\n :type value: str\n ";
21177static PyMethodDef __pyx_mdef_3rbd_3RBD_63pool_metadata_set = {"pool_metadata_set", (PyCFunction)__pyx_pw_3rbd_3RBD_63pool_metadata_set, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_62pool_metadata_set};
21178static PyObject *__pyx_pw_3rbd_3RBD_63pool_metadata_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21179 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
21180 PyObject *__pyx_v_ioctx = 0;
21181 PyObject *__pyx_v_key = 0;
21182 PyObject *__pyx_v_value = 0;
21183 int __pyx_lineno = 0;
21184 const char *__pyx_filename = NULL((void*)0);
21185 int __pyx_clineno = 0;
21186 PyObject *__pyx_r = 0;
21187 __Pyx_RefNannyDeclarations
21188 __Pyx_RefNannySetupContext("pool_metadata_set (wrapper)", 0);
21189 {
21190 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_key,&__pyx_n_s_value,0};
21191 PyObject* values[4] = {0,0,0,0};
21192 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
21193 Py_ssize_t kw_args;
21194 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
21195 switch (pos_args) {
21196 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
21197 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
21198 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21199 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21200 case 0: break;
21201 default: goto __pyx_L5_argtuple_error;
21202 }
21203 kw_args = PyDict_Size(__pyx_kwds);
21204 switch (pos_args) {
21205 case 0:
21206 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
21207 else goto __pyx_L5_argtuple_error;
21208 case 1:
21209 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
21210 else {
21211 __Pyx_RaiseArgtupleInvalid("pool_metadata_set", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__21211; goto __pyx_L3_error;}
21212 }
21213 case 2:
21214 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key
)) != 0), 1)
) kw_args--;
21215 else {
21216 __Pyx_RaiseArgtupleInvalid("pool_metadata_set", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__21216; goto __pyx_L3_error;}
21217 }
21218 case 3:
21219 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
21220 else {
21221 __Pyx_RaiseArgtupleInvalid("pool_metadata_set", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__21221; goto __pyx_L3_error;}
21222 }
21223 }
21224 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
21225 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pool_metadata_set") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "pool_metadata_set") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__21225; goto __pyx_L3_error;}
21226 }
21227 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
21228 goto __pyx_L5_argtuple_error;
21229 } else {
21230 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21231 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21232 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
21233 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
21234 }
21235 __pyx_v_self = values[0];
21236 __pyx_v_ioctx = values[1];
21237 __pyx_v_key = values[2];
21238 __pyx_v_value = values[3];
21239 }
21240 goto __pyx_L4_argument_unpacking_done;
21241 __pyx_L5_argtuple_error:;
21242 __Pyx_RaiseArgtupleInvalid("pool_metadata_set", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__21242; goto __pyx_L3_error;}
21243 __pyx_L3_error:;
21244 __Pyx_AddTraceback("rbd.RBD.pool_metadata_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
21245 __Pyx_RefNannyFinishContext();
21246 return NULL((void*)0);
21247 __pyx_L4_argument_unpacking_done:;
21248 __pyx_r = __pyx_pf_3rbd_3RBD_62pool_metadata_set(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_key, __pyx_v_value);
21249
21250 /* function exit code */
21251 __Pyx_RefNannyFinishContext();
21252 return __pyx_r;
21253}
21254
21255static PyObject *__pyx_pf_3rbd_3RBD_62pool_metadata_set(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
21256 rados_ioctx_t __pyx_v__ioctx;
21257 char *__pyx_v__key;
21258 char *__pyx_v__value;
21259 int __pyx_v_ret;
21260 PyObject *__pyx_r = NULL((void*)0);
21261 __Pyx_RefNannyDeclarations
21262 PyObject *__pyx_t_1 = NULL((void*)0);
21263 PyObject *__pyx_t_2 = NULL((void*)0);
21264 PyObject *__pyx_t_3 = NULL((void*)0);
21265 Py_ssize_t __pyx_t_4;
21266 PyObject *__pyx_t_5 = NULL((void*)0);
21267 rados_ioctx_t __pyx_t_6;
21268 char *__pyx_t_7;
21269 int __pyx_t_8;
21270 int __pyx_lineno = 0;
21271 const char *__pyx_filename = NULL((void*)0);
21272 int __pyx_clineno = 0;
21273 __Pyx_RefNannySetupContext("pool_metadata_set", 0);
21274 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
21275 __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++);
21276
21277 /* "rbd.pyx":1976
21278 * :type value: str
21279 * """
21280 * key = cstr(key, 'key') # <<<<<<<<<<<<<<
21281 * value = cstr(value, 'value')
21282 * cdef:
21283 */
21284 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__21284; goto __pyx_L1_error;}
21285 __Pyx_GOTREF(__pyx_t_2);
21286 __pyx_t_3 = NULL((void*)0);
21287 __pyx_t_4 = 0;
21288 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
21289 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
21290 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
21291 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
21292 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
21293 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
21294 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
21295 __pyx_t_4 = 1;
21296 }
21297 }
21298 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__21298; goto __pyx_L1_error;}
21299 __Pyx_GOTREF(__pyx_t_5);
21300 if (__pyx_t_3) {
21301 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
21302 }
21303 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
21304 __Pyx_GIVEREF(__pyx_v_key);
21305 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_key
)
;
21306 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
21307 __Pyx_GIVEREF(__pyx_n_s_key);
21308 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_key
)
;
21309 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__21309; goto __pyx_L1_error;}
21310 __Pyx_GOTREF(__pyx_t_1);
21311 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
21312 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21313 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
21314 __pyx_t_1 = 0;
21315
21316 /* "rbd.pyx":1977
21317 * """
21318 * key = cstr(key, 'key')
21319 * value = cstr(value, 'value') # <<<<<<<<<<<<<<
21320 * cdef:
21321 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21322 */
21323 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__21323; goto __pyx_L1_error;}
21324 __Pyx_GOTREF(__pyx_t_2);
21325 __pyx_t_5 = NULL((void*)0);
21326 __pyx_t_4 = 0;
21327 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
21328 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
21329 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
21330 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
21331 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
21332 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
21333 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
21334 __pyx_t_4 = 1;
21335 }
21336 }
21337 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__21337; goto __pyx_L1_error;}
21338 __Pyx_GOTREF(__pyx_t_3);
21339 if (__pyx_t_5) {
21340 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
21341 }
21342 __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++);
21343 __Pyx_GIVEREF(__pyx_v_value);
21344 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_value)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_value
)
;
21345 __Pyx_INCREF(__pyx_n_s_value)( ((PyObject*)(__pyx_n_s_value))->ob_refcnt++);
21346 __Pyx_GIVEREF(__pyx_n_s_value);
21347 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_value)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_value
)
;
21348 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__21348; goto __pyx_L1_error;}
21349 __Pyx_GOTREF(__pyx_t_1);
21350 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
21351 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21352 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_value; __pyx_v_value
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
21353 __pyx_t_1 = 0;
21354
21355 /* "rbd.pyx":1979
21356 * value = cstr(value, 'value')
21357 * cdef:
21358 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
21359 * char *_key = key
21360 * char *_value = value
21361 */
21362 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__21362; goto __pyx_L1_error;}
21363 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__21363; goto __pyx_L1_error;}
21364 __pyx_v__ioctx = __pyx_t_6;
21365
21366 /* "rbd.pyx":1980
21367 * cdef:
21368 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21369 * char *_key = key # <<<<<<<<<<<<<<
21370 * char *_value = value
21371 * with nogil:
21372 */
21373 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__21373; goto __pyx_L1_error;}
21374 __pyx_v__key = __pyx_t_7;
21375
21376 /* "rbd.pyx":1981
21377 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21378 * char *_key = key
21379 * char *_value = value # <<<<<<<<<<<<<<
21380 * with nogil:
21381 * ret = rbd_pool_metadata_set(_ioctx, _key, _value)
21382 */
21383 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__21383; goto __pyx_L1_error;}
21384 __pyx_v__value = __pyx_t_7;
21385
21386 /* "rbd.pyx":1982
21387 * char *_key = key
21388 * char *_value = value
21389 * with nogil: # <<<<<<<<<<<<<<
21390 * ret = rbd_pool_metadata_set(_ioctx, _key, _value)
21391 *
21392 */
21393 {
21394 #ifdef WITH_THREAD1
21395 PyThreadState *_save;
21396 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
21397 #endif
21398 /*try:*/ {
21399
21400 /* "rbd.pyx":1983
21401 * char *_value = value
21402 * with nogil:
21403 * ret = rbd_pool_metadata_set(_ioctx, _key, _value) # <<<<<<<<<<<<<<
21404 *
21405 * if ret != 0:
21406 */
21407 __pyx_v_ret = rbd_pool_metadata_set(__pyx_v__ioctx, __pyx_v__key, __pyx_v__value);
21408 }
21409
21410 /* "rbd.pyx":1982
21411 * char *_key = key
21412 * char *_value = value
21413 * with nogil: # <<<<<<<<<<<<<<
21414 * ret = rbd_pool_metadata_set(_ioctx, _key, _value)
21415 *
21416 */
21417 /*finally:*/ {
21418 /*normal exit:*/{
21419 #ifdef WITH_THREAD1
21420 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
21421 #endif
21422 goto __pyx_L5;
21423 }
21424 __pyx_L5:;
21425 }
21426 }
21427
21428 /* "rbd.pyx":1985
21429 * ret = rbd_pool_metadata_set(_ioctx, _key, _value)
21430 *
21431 * if ret != 0: # <<<<<<<<<<<<<<
21432 * raise make_ex(ret, 'error setting metadata %s' % (key))
21433 *
21434 */
21435 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
21436 if (__pyx_t_8) {
21437
21438 /* "rbd.pyx":1986
21439 *
21440 * if ret != 0:
21441 * raise make_ex(ret, 'error setting metadata %s' % (key)) # <<<<<<<<<<<<<<
21442 *
21443 * def pool_metadata_remove(self, ioctx, key):
21444 */
21445 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__21445; goto __pyx_L1_error;}
21446 __Pyx_GOTREF(__pyx_t_1);
21447 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_setting_metadata_s, __pyx_v_key)PyString_Format(__pyx_kp_s_error_setting_metadata_s, __pyx_v_key
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__21447; goto __pyx_L1_error;}
21448 __Pyx_GOTREF(__pyx_t_2);
21449 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__21449; goto __pyx_L1_error;}
21450 __Pyx_GOTREF(__pyx_t_3);
21451 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
21452 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21453 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
21454 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
21455 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__21455; goto __pyx_L1_error;}
21456
21457 /* "rbd.pyx":1985
21458 * ret = rbd_pool_metadata_set(_ioctx, _key, _value)
21459 *
21460 * if ret != 0: # <<<<<<<<<<<<<<
21461 * raise make_ex(ret, 'error setting metadata %s' % (key))
21462 *
21463 */
21464 }
21465
21466 /* "rbd.pyx":1965
21467 * free(value)
21468 *
21469 * def pool_metadata_set(self, ioctx, key, value): # <<<<<<<<<<<<<<
21470 * """
21471 * Set pool metadata for the given key.
21472 */
21473
21474 /* function exit code */
21475 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
21476 goto __pyx_L0;
21477 __pyx_L1_error:;
21478 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
21479 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
21480 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
21481 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
21482 __Pyx_AddTraceback("rbd.RBD.pool_metadata_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
21483 __pyx_r = NULL((void*)0);
21484 __pyx_L0:;
21485 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
21486 __Pyx_XDECREF(__pyx_v_value)do { if ((__pyx_v_value) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_value))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_value)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_value)))); } while (0); }
while (0)
;
21487 __Pyx_XGIVEREF(__pyx_r);
21488 __Pyx_RefNannyFinishContext();
21489 return __pyx_r;
21490}
21491
21492/* "rbd.pyx":1988
21493 * raise make_ex(ret, 'error setting metadata %s' % (key))
21494 *
21495 * def pool_metadata_remove(self, ioctx, key): # <<<<<<<<<<<<<<
21496 * """
21497 * Remove pool metadata for the given key.
21498 */
21499
21500/* Python wrapper */
21501static PyObject *__pyx_pw_3rbd_3RBD_65pool_metadata_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21502static char __pyx_doc_3rbd_3RBD_64pool_metadata_remove[] = "RBD.pool_metadata_remove(self, ioctx, key)\n\n Remove pool metadata for the given key.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :param key: metadata key\n :type key: str\n :returns: str - metadata value\n ";
21503static PyMethodDef __pyx_mdef_3rbd_3RBD_65pool_metadata_remove = {"pool_metadata_remove", (PyCFunction)__pyx_pw_3rbd_3RBD_65pool_metadata_remove, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_64pool_metadata_remove};
21504static PyObject *__pyx_pw_3rbd_3RBD_65pool_metadata_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21505 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
21506 PyObject *__pyx_v_ioctx = 0;
21507 PyObject *__pyx_v_key = 0;
21508 int __pyx_lineno = 0;
21509 const char *__pyx_filename = NULL((void*)0);
21510 int __pyx_clineno = 0;
21511 PyObject *__pyx_r = 0;
21512 __Pyx_RefNannyDeclarations
21513 __Pyx_RefNannySetupContext("pool_metadata_remove (wrapper)", 0);
21514 {
21515 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_key,0};
21516 PyObject* values[3] = {0,0,0};
21517 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
21518 Py_ssize_t kw_args;
21519 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
21520 switch (pos_args) {
21521 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
21522 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21523 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21524 case 0: break;
21525 default: goto __pyx_L5_argtuple_error;
21526 }
21527 kw_args = PyDict_Size(__pyx_kwds);
21528 switch (pos_args) {
21529 case 0:
21530 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
21531 else goto __pyx_L5_argtuple_error;
21532 case 1:
21533 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
21534 else {
21535 __Pyx_RaiseArgtupleInvalid("pool_metadata_remove", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__21535; goto __pyx_L3_error;}
21536 }
21537 case 2:
21538 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key
)) != 0), 1)
) kw_args--;
21539 else {
21540 __Pyx_RaiseArgtupleInvalid("pool_metadata_remove", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__21540; goto __pyx_L3_error;}
21541 }
21542 }
21543 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
21544 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pool_metadata_remove") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "pool_metadata_remove") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__21544; goto __pyx_L3_error;}
21545 }
21546 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
21547 goto __pyx_L5_argtuple_error;
21548 } else {
21549 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21550 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21551 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
21552 }
21553 __pyx_v_self = values[0];
21554 __pyx_v_ioctx = values[1];
21555 __pyx_v_key = values[2];
21556 }
21557 goto __pyx_L4_argument_unpacking_done;
21558 __pyx_L5_argtuple_error:;
21559 __Pyx_RaiseArgtupleInvalid("pool_metadata_remove", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__21559; goto __pyx_L3_error;}
21560 __pyx_L3_error:;
21561 __Pyx_AddTraceback("rbd.RBD.pool_metadata_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
21562 __Pyx_RefNannyFinishContext();
21563 return NULL((void*)0);
21564 __pyx_L4_argument_unpacking_done:;
21565 __pyx_r = __pyx_pf_3rbd_3RBD_64pool_metadata_remove(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_key);
21566
21567 /* function exit code */
21568 __Pyx_RefNannyFinishContext();
21569 return __pyx_r;
21570}
21571
21572static PyObject *__pyx_pf_3rbd_3RBD_64pool_metadata_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_key) {
21573 rados_ioctx_t __pyx_v__ioctx;
21574 char *__pyx_v__key;
21575 int __pyx_v_ret;
21576 PyObject *__pyx_r = NULL((void*)0);
21577 __Pyx_RefNannyDeclarations
21578 PyObject *__pyx_t_1 = NULL((void*)0);
21579 PyObject *__pyx_t_2 = NULL((void*)0);
21580 PyObject *__pyx_t_3 = NULL((void*)0);
21581 Py_ssize_t __pyx_t_4;
21582 PyObject *__pyx_t_5 = NULL((void*)0);
21583 rados_ioctx_t __pyx_t_6;
21584 char *__pyx_t_7;
21585 int __pyx_t_8;
21586 int __pyx_lineno = 0;
21587 const char *__pyx_filename = NULL((void*)0);
21588 int __pyx_clineno = 0;
21589 __Pyx_RefNannySetupContext("pool_metadata_remove", 0);
21590 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
21591
21592 /* "rbd.pyx":1998
21593 * :returns: str - metadata value
21594 * """
21595 * key = cstr(key, 'key') # <<<<<<<<<<<<<<
21596 * cdef:
21597 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21598 */
21599 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1998; __pyx_clineno = __LINE__21599; goto __pyx_L1_error;}
21600 __Pyx_GOTREF(__pyx_t_2);
21601 __pyx_t_3 = NULL((void*)0);
21602 __pyx_t_4 = 0;
21603 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
21604 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
21605 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
21606 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
21607 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
21608 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
21609 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
21610 __pyx_t_4 = 1;
21611 }
21612 }
21613 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1998; __pyx_clineno = __LINE__21613; goto __pyx_L1_error;}
21614 __Pyx_GOTREF(__pyx_t_5);
21615 if (__pyx_t_3) {
21616 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
21617 }
21618 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
21619 __Pyx_GIVEREF(__pyx_v_key);
21620 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_key
)
;
21621 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
21622 __Pyx_GIVEREF(__pyx_n_s_key);
21623 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_key
)
;
21624 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1998; __pyx_clineno = __LINE__21624; goto __pyx_L1_error;}
21625 __Pyx_GOTREF(__pyx_t_1);
21626 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
21627 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21628 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
21629 __pyx_t_1 = 0;
21630
21631 /* "rbd.pyx":2000
21632 * key = cstr(key, 'key')
21633 * cdef:
21634 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
21635 * char *_key = key
21636 * with nogil:
21637 */
21638 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__21638; goto __pyx_L1_error;}
21639 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__21639; goto __pyx_L1_error;}
21640 __pyx_v__ioctx = __pyx_t_6;
21641
21642 /* "rbd.pyx":2001
21643 * cdef:
21644 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21645 * char *_key = key # <<<<<<<<<<<<<<
21646 * with nogil:
21647 * ret = rbd_pool_metadata_remove(_ioctx, _key)
21648 */
21649 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__21649; goto __pyx_L1_error;}
21650 __pyx_v__key = __pyx_t_7;
21651
21652 /* "rbd.pyx":2002
21653 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21654 * char *_key = key
21655 * with nogil: # <<<<<<<<<<<<<<
21656 * ret = rbd_pool_metadata_remove(_ioctx, _key)
21657 *
21658 */
21659 {
21660 #ifdef WITH_THREAD1
21661 PyThreadState *_save;
21662 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
21663 #endif
21664 /*try:*/ {
21665
21666 /* "rbd.pyx":2003
21667 * char *_key = key
21668 * with nogil:
21669 * ret = rbd_pool_metadata_remove(_ioctx, _key) # <<<<<<<<<<<<<<
21670 *
21671 * if ret == -errno.ENOENT:
21672 */
21673 __pyx_v_ret = rbd_pool_metadata_remove(__pyx_v__ioctx, __pyx_v__key);
21674 }
21675
21676 /* "rbd.pyx":2002
21677 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
21678 * char *_key = key
21679 * with nogil: # <<<<<<<<<<<<<<
21680 * ret = rbd_pool_metadata_remove(_ioctx, _key)
21681 *
21682 */
21683 /*finally:*/ {
21684 /*normal exit:*/{
21685 #ifdef WITH_THREAD1
21686 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
21687 #endif
21688 goto __pyx_L5;
21689 }
21690 __pyx_L5:;
21691 }
21692 }
21693
21694 /* "rbd.pyx":2005
21695 * ret = rbd_pool_metadata_remove(_ioctx, _key)
21696 *
21697 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
21698 * raise KeyError('no metadata %s' % (key))
21699 * if ret != 0:
21700 */
21701 __pyx_t_8 = ((__pyx_v_ret == (-ENOENT2)) != 0);
21702 if (__pyx_t_8) {
21703
21704 /* "rbd.pyx":2006
21705 *
21706 * if ret == -errno.ENOENT:
21707 * raise KeyError('no metadata %s' % (key)) # <<<<<<<<<<<<<<
21708 * if ret != 0:
21709 * raise make_ex(ret, 'error removing metadata %s' % (key))
21710 */
21711 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_no_metadata_s, __pyx_v_key)PyString_Format(__pyx_kp_s_no_metadata_s, __pyx_v_key); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__21711; goto __pyx_L1_error;}
21712 __Pyx_GOTREF(__pyx_t_1);
21713 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__21713; goto __pyx_L1_error;}
21714 __Pyx_GOTREF(__pyx_t_2);
21715 __Pyx_GIVEREF(__pyx_t_1);
21716 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_1);
21717 __pyx_t_1 = 0;
21718 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__21718; goto __pyx_L1_error;}
21719 __Pyx_GOTREF(__pyx_t_1);
21720 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21721 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21722 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
21723 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__21723; goto __pyx_L1_error;}
21724
21725 /* "rbd.pyx":2005
21726 * ret = rbd_pool_metadata_remove(_ioctx, _key)
21727 *
21728 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
21729 * raise KeyError('no metadata %s' % (key))
21730 * if ret != 0:
21731 */
21732 }
21733
21734 /* "rbd.pyx":2007
21735 * if ret == -errno.ENOENT:
21736 * raise KeyError('no metadata %s' % (key))
21737 * if ret != 0: # <<<<<<<<<<<<<<
21738 * raise make_ex(ret, 'error removing metadata %s' % (key))
21739 *
21740 */
21741 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
21742 if (__pyx_t_8) {
21743
21744 /* "rbd.pyx":2008
21745 * raise KeyError('no metadata %s' % (key))
21746 * if ret != 0:
21747 * raise make_ex(ret, 'error removing metadata %s' % (key)) # <<<<<<<<<<<<<<
21748 *
21749 * def pool_metadata_list(self, ioctx):
21750 */
21751 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__21751; goto __pyx_L1_error;}
21752 __Pyx_GOTREF(__pyx_t_1);
21753 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_removing_metadata_s, __pyx_v_key)PyString_Format(__pyx_kp_s_error_removing_metadata_s, __pyx_v_key
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__21753; goto __pyx_L1_error;}
21754 __Pyx_GOTREF(__pyx_t_2);
21755 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__21755; goto __pyx_L1_error;}
21756 __Pyx_GOTREF(__pyx_t_5);
21757 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
21758 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
21759 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
21760 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
21761 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__21761; goto __pyx_L1_error;}
21762
21763 /* "rbd.pyx":2007
21764 * if ret == -errno.ENOENT:
21765 * raise KeyError('no metadata %s' % (key))
21766 * if ret != 0: # <<<<<<<<<<<<<<
21767 * raise make_ex(ret, 'error removing metadata %s' % (key))
21768 *
21769 */
21770 }
21771
21772 /* "rbd.pyx":1988
21773 * raise make_ex(ret, 'error setting metadata %s' % (key))
21774 *
21775 * def pool_metadata_remove(self, ioctx, key): # <<<<<<<<<<<<<<
21776 * """
21777 * Remove pool metadata for the given key.
21778 */
21779
21780 /* function exit code */
21781 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
21782 goto __pyx_L0;
21783 __pyx_L1_error:;
21784 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
21785 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
21786 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
21787 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
21788 __Pyx_AddTraceback("rbd.RBD.pool_metadata_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
21789 __pyx_r = NULL((void*)0);
21790 __pyx_L0:;
21791 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
21792 __Pyx_XGIVEREF(__pyx_r);
21793 __Pyx_RefNannyFinishContext();
21794 return __pyx_r;
21795}
21796
21797/* "rbd.pyx":2010
21798 * raise make_ex(ret, 'error removing metadata %s' % (key))
21799 *
21800 * def pool_metadata_list(self, ioctx): # <<<<<<<<<<<<<<
21801 * """
21802 * List pool metadata.
21803 */
21804
21805/* Python wrapper */
21806static PyObject *__pyx_pw_3rbd_3RBD_67pool_metadata_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21807static char __pyx_doc_3rbd_3RBD_66pool_metadata_list[] = "RBD.pool_metadata_list(self, ioctx)\n\n List pool metadata.\n\n :returns: :class:`PoolMetadataIterator`\n ";
21808static PyMethodDef __pyx_mdef_3rbd_3RBD_67pool_metadata_list = {"pool_metadata_list", (PyCFunction)__pyx_pw_3rbd_3RBD_67pool_metadata_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_66pool_metadata_list};
21809static PyObject *__pyx_pw_3rbd_3RBD_67pool_metadata_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21810 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
21811 PyObject *__pyx_v_ioctx = 0;
21812 int __pyx_lineno = 0;
21813 const char *__pyx_filename = NULL((void*)0);
21814 int __pyx_clineno = 0;
21815 PyObject *__pyx_r = 0;
21816 __Pyx_RefNannyDeclarations
21817 __Pyx_RefNannySetupContext("pool_metadata_list (wrapper)", 0);
21818 {
21819 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
21820 PyObject* values[2] = {0,0};
21821 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
21822 Py_ssize_t kw_args;
21823 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
21824 switch (pos_args) {
21825 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21826 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21827 case 0: break;
21828 default: goto __pyx_L5_argtuple_error;
21829 }
21830 kw_args = PyDict_Size(__pyx_kwds);
21831 switch (pos_args) {
21832 case 0:
21833 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
21834 else goto __pyx_L5_argtuple_error;
21835 case 1:
21836 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
21837 else {
21838 __Pyx_RaiseArgtupleInvalid("pool_metadata_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__21838; goto __pyx_L3_error;}
21839 }
21840 }
21841 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
21842 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pool_metadata_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "pool_metadata_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__21842; goto __pyx_L3_error;}
21843 }
21844 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
21845 goto __pyx_L5_argtuple_error;
21846 } else {
21847 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21848 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21849 }
21850 __pyx_v_self = values[0];
21851 __pyx_v_ioctx = values[1];
21852 }
21853 goto __pyx_L4_argument_unpacking_done;
21854 __pyx_L5_argtuple_error:;
21855 __Pyx_RaiseArgtupleInvalid("pool_metadata_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__21855; goto __pyx_L3_error;}
21856 __pyx_L3_error:;
21857 __Pyx_AddTraceback("rbd.RBD.pool_metadata_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
21858 __Pyx_RefNannyFinishContext();
21859 return NULL((void*)0);
21860 __pyx_L4_argument_unpacking_done:;
21861 __pyx_r = __pyx_pf_3rbd_3RBD_66pool_metadata_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
21862
21863 /* function exit code */
21864 __Pyx_RefNannyFinishContext();
21865 return __pyx_r;
21866}
21867
21868static PyObject *__pyx_pf_3rbd_3RBD_66pool_metadata_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
21869 PyObject *__pyx_r = NULL((void*)0);
21870 __Pyx_RefNannyDeclarations
21871 PyObject *__pyx_t_1 = NULL((void*)0);
21872 PyObject *__pyx_t_2 = NULL((void*)0);
21873 int __pyx_lineno = 0;
21874 const char *__pyx_filename = NULL((void*)0);
21875 int __pyx_clineno = 0;
21876 __Pyx_RefNannySetupContext("pool_metadata_list", 0);
21877
21878 /* "rbd.pyx":2016
21879 * :returns: :class:`PoolMetadataIterator`
21880 * """
21881 * return PoolMetadataIterator(ioctx) # <<<<<<<<<<<<<<
21882 *
21883 * def config_list(self, ioctx):
21884 */
21885 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
21886 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2016; __pyx_clineno = __LINE__21886; goto __pyx_L1_error;}
21887 __Pyx_GOTREF(__pyx_t_1);
21888 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
21889 __Pyx_GIVEREF(__pyx_v_ioctx);
21890 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
21891 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_PoolMetadataIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2016; __pyx_clineno = __LINE__21891; goto __pyx_L1_error;}
21892 __Pyx_GOTREF(__pyx_t_2);
21893 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
21894 __pyx_r = __pyx_t_2;
21895 __pyx_t_2 = 0;
21896 goto __pyx_L0;
21897
21898 /* "rbd.pyx":2010
21899 * raise make_ex(ret, 'error removing metadata %s' % (key))
21900 *
21901 * def pool_metadata_list(self, ioctx): # <<<<<<<<<<<<<<
21902 * """
21903 * List pool metadata.
21904 */
21905
21906 /* function exit code */
21907 __pyx_L1_error:;
21908 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
21909 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
21910 __Pyx_AddTraceback("rbd.RBD.pool_metadata_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
21911 __pyx_r = NULL((void*)0);
21912 __pyx_L0:;
21913 __Pyx_XGIVEREF(__pyx_r);
21914 __Pyx_RefNannyFinishContext();
21915 return __pyx_r;
21916}
21917
21918/* "rbd.pyx":2018
21919 * return PoolMetadataIterator(ioctx)
21920 *
21921 * def config_list(self, ioctx): # <<<<<<<<<<<<<<
21922 * """
21923 * List pool-level config overrides.
21924 */
21925
21926/* Python wrapper */
21927static PyObject *__pyx_pw_3rbd_3RBD_69config_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21928static char __pyx_doc_3rbd_3RBD_68config_list[] = "RBD.config_list(self, ioctx)\n\n List pool-level config overrides.\n\n :returns: :class:`ConfigPoolIterator`\n ";
21929static PyMethodDef __pyx_mdef_3rbd_3RBD_69config_list = {"config_list", (PyCFunction)__pyx_pw_3rbd_3RBD_69config_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_68config_list};
21930static PyObject *__pyx_pw_3rbd_3RBD_69config_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21931 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
21932 PyObject *__pyx_v_ioctx = 0;
21933 int __pyx_lineno = 0;
21934 const char *__pyx_filename = NULL((void*)0);
21935 int __pyx_clineno = 0;
21936 PyObject *__pyx_r = 0;
21937 __Pyx_RefNannyDeclarations
21938 __Pyx_RefNannySetupContext("config_list (wrapper)", 0);
21939 {
21940 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
21941 PyObject* values[2] = {0,0};
21942 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
21943 Py_ssize_t kw_args;
21944 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
21945 switch (pos_args) {
21946 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21947 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21948 case 0: break;
21949 default: goto __pyx_L5_argtuple_error;
21950 }
21951 kw_args = PyDict_Size(__pyx_kwds);
21952 switch (pos_args) {
21953 case 0:
21954 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
21955 else goto __pyx_L5_argtuple_error;
21956 case 1:
21957 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
21958 else {
21959 __Pyx_RaiseArgtupleInvalid("config_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__21959; goto __pyx_L3_error;}
21960 }
21961 }
21962 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
21963 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "config_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "config_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__21963; goto __pyx_L3_error;}
21964 }
21965 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
21966 goto __pyx_L5_argtuple_error;
21967 } else {
21968 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
21969 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
21970 }
21971 __pyx_v_self = values[0];
21972 __pyx_v_ioctx = values[1];
21973 }
21974 goto __pyx_L4_argument_unpacking_done;
21975 __pyx_L5_argtuple_error:;
21976 __Pyx_RaiseArgtupleInvalid("config_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__21976; goto __pyx_L3_error;}
21977 __pyx_L3_error:;
21978 __Pyx_AddTraceback("rbd.RBD.config_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
21979 __Pyx_RefNannyFinishContext();
21980 return NULL((void*)0);
21981 __pyx_L4_argument_unpacking_done:;
21982 __pyx_r = __pyx_pf_3rbd_3RBD_68config_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
21983
21984 /* function exit code */
21985 __Pyx_RefNannyFinishContext();
21986 return __pyx_r;
21987}
21988
21989static PyObject *__pyx_pf_3rbd_3RBD_68config_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
21990 PyObject *__pyx_r = NULL((void*)0);
21991 __Pyx_RefNannyDeclarations
21992 PyObject *__pyx_t_1 = NULL((void*)0);
21993 PyObject *__pyx_t_2 = NULL((void*)0);
21994 int __pyx_lineno = 0;
21995 const char *__pyx_filename = NULL((void*)0);
21996 int __pyx_clineno = 0;
21997 __Pyx_RefNannySetupContext("config_list", 0);
21998
21999 /* "rbd.pyx":2024
22000 * :returns: :class:`ConfigPoolIterator`
22001 * """
22002 * return ConfigPoolIterator(ioctx) # <<<<<<<<<<<<<<
22003 *
22004 * def group_create(self, ioctx, name):
22005 */
22006 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
22007 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__22007; goto __pyx_L1_error;}
22008 __Pyx_GOTREF(__pyx_t_1);
22009 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
22010 __Pyx_GIVEREF(__pyx_v_ioctx);
22011 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ioctx)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_ioctx
)
;
22012 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_ConfigPoolIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__22012; goto __pyx_L1_error;}
22013 __Pyx_GOTREF(__pyx_t_2);
22014 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
22015 __pyx_r = __pyx_t_2;
22016 __pyx_t_2 = 0;
22017 goto __pyx_L0;
22018
22019 /* "rbd.pyx":2018
22020 * return PoolMetadataIterator(ioctx)
22021 *
22022 * def config_list(self, ioctx): # <<<<<<<<<<<<<<
22023 * """
22024 * List pool-level config overrides.
22025 */
22026
22027 /* function exit code */
22028 __pyx_L1_error:;
22029 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
22030 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
22031 __Pyx_AddTraceback("rbd.RBD.config_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
22032 __pyx_r = NULL((void*)0);
22033 __pyx_L0:;
22034 __Pyx_XGIVEREF(__pyx_r);
22035 __Pyx_RefNannyFinishContext();
22036 return __pyx_r;
22037}
22038
22039/* "rbd.pyx":2026
22040 * return ConfigPoolIterator(ioctx)
22041 *
22042 * def group_create(self, ioctx, name): # <<<<<<<<<<<<<<
22043 * """
22044 * Create a group.
22045 */
22046
22047/* Python wrapper */
22048static PyObject *__pyx_pw_3rbd_3RBD_71group_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22049static char __pyx_doc_3rbd_3RBD_70group_create[] = "RBD.group_create(self, ioctx, name)\n\n Create a group.\n\n :param ioctx: determines which RADOS pool is used\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the group\n :type name: str\n :raises: :class:`ObjectExists`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
22050static PyMethodDef __pyx_mdef_3rbd_3RBD_71group_create = {"group_create", (PyCFunction)__pyx_pw_3rbd_3RBD_71group_create, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_70group_create};
22051static PyObject *__pyx_pw_3rbd_3RBD_71group_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22052 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
22053 PyObject *__pyx_v_ioctx = 0;
22054 PyObject *__pyx_v_name = 0;
22055 int __pyx_lineno = 0;
22056 const char *__pyx_filename = NULL((void*)0);
22057 int __pyx_clineno = 0;
22058 PyObject *__pyx_r = 0;
22059 __Pyx_RefNannyDeclarations
22060 __Pyx_RefNannySetupContext("group_create (wrapper)", 0);
22061 {
22062 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,0};
22063 PyObject* values[3] = {0,0,0};
22064 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
22065 Py_ssize_t kw_args;
22066 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
22067 switch (pos_args) {
22068 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
22069 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
22070 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
22071 case 0: break;
22072 default: goto __pyx_L5_argtuple_error;
22073 }
22074 kw_args = PyDict_Size(__pyx_kwds);
22075 switch (pos_args) {
22076 case 0:
22077 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
22078 else goto __pyx_L5_argtuple_error;
22079 case 1:
22080 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
22081 else {
22082 __Pyx_RaiseArgtupleInvalid("group_create", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__22082; goto __pyx_L3_error;}
22083 }
22084 case 2:
22085 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
22086 else {
22087 __Pyx_RaiseArgtupleInvalid("group_create", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__22087; goto __pyx_L3_error;}
22088 }
22089 }
22090 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
22091 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_create") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "group_create") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__22091; goto __pyx_L3_error;}
22092 }
22093 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
22094 goto __pyx_L5_argtuple_error;
22095 } else {
22096 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
22097 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
22098 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
22099 }
22100 __pyx_v_self = values[0];
22101 __pyx_v_ioctx = values[1];
22102 __pyx_v_name = values[2];
22103 }
22104 goto __pyx_L4_argument_unpacking_done;
22105 __pyx_L5_argtuple_error:;
22106 __Pyx_RaiseArgtupleInvalid("group_create", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__22106; goto __pyx_L3_error;}
22107 __pyx_L3_error:;
22108 __Pyx_AddTraceback("rbd.RBD.group_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
22109 __Pyx_RefNannyFinishContext();
22110 return NULL((void*)0);
22111 __pyx_L4_argument_unpacking_done:;
22112 __pyx_r = __pyx_pf_3rbd_3RBD_70group_create(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name);
22113
22114 /* function exit code */
22115 __Pyx_RefNannyFinishContext();
22116 return __pyx_r;
22117}
22118
22119static PyObject *__pyx_pf_3rbd_3RBD_70group_create(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name) {
22120 char *__pyx_v__name;
22121 rados_ioctx_t __pyx_v__ioctx;
22122 int __pyx_v_ret;
22123 PyObject *__pyx_r = NULL((void*)0);
22124 __Pyx_RefNannyDeclarations
22125 PyObject *__pyx_t_1 = NULL((void*)0);
22126 PyObject *__pyx_t_2 = NULL((void*)0);
22127 PyObject *__pyx_t_3 = NULL((void*)0);
22128 Py_ssize_t __pyx_t_4;
22129 PyObject *__pyx_t_5 = NULL((void*)0);
22130 char *__pyx_t_6;
22131 rados_ioctx_t __pyx_t_7;
22132 int __pyx_t_8;
22133 struct __pyx_opt_args_3rbd_make_ex __pyx_t_9;
22134 int __pyx_lineno = 0;
22135 const char *__pyx_filename = NULL((void*)0);
22136 int __pyx_clineno = 0;
22137 __Pyx_RefNannySetupContext("group_create", 0);
22138 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
22139
22140 /* "rbd.pyx":2038
22141 * :raises: :class:`FunctionNotSupported`
22142 * """
22143 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
22144 * cdef:
22145 * char *_name = name
22146 */
22147 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__22147; goto __pyx_L1_error;}
22148 __Pyx_GOTREF(__pyx_t_2);
22149 __pyx_t_3 = NULL((void*)0);
22150 __pyx_t_4 = 0;
22151 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
22152 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
22153 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
22154 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
22155 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
22156 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
22157 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
22158 __pyx_t_4 = 1;
22159 }
22160 }
22161 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__22161; goto __pyx_L1_error;}
22162 __Pyx_GOTREF(__pyx_t_5);
22163 if (__pyx_t_3) {
22164 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
22165 }
22166 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
22167 __Pyx_GIVEREF(__pyx_v_name);
22168 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
22169 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
22170 __Pyx_GIVEREF(__pyx_n_s_name);
22171 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
22172 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__22172; goto __pyx_L1_error;}
22173 __Pyx_GOTREF(__pyx_t_1);
22174 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22175 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
22176 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
22177 __pyx_t_1 = 0;
22178
22179 /* "rbd.pyx":2040
22180 * name = cstr(name, 'name')
22181 * cdef:
22182 * char *_name = name # <<<<<<<<<<<<<<
22183 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22184 * with nogil:
22185 */
22186 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__22186; goto __pyx_L1_error;}
22187 __pyx_v__name = __pyx_t_6;
22188
22189 /* "rbd.pyx":2041
22190 * cdef:
22191 * char *_name = name
22192 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
22193 * with nogil:
22194 * ret = rbd_group_create(_ioctx, _name)
22195 */
22196 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__22196; goto __pyx_L1_error;}
22197 __pyx_t_7 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_7 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_7 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__22197; goto __pyx_L1_error;}
22198 __pyx_v__ioctx = __pyx_t_7;
22199
22200 /* "rbd.pyx":2042
22201 * char *_name = name
22202 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22203 * with nogil: # <<<<<<<<<<<<<<
22204 * ret = rbd_group_create(_ioctx, _name)
22205 * if ret != 0:
22206 */
22207 {
22208 #ifdef WITH_THREAD1
22209 PyThreadState *_save;
22210 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
22211 #endif
22212 /*try:*/ {
22213
22214 /* "rbd.pyx":2043
22215 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22216 * with nogil:
22217 * ret = rbd_group_create(_ioctx, _name) # <<<<<<<<<<<<<<
22218 * if ret != 0:
22219 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
22220 */
22221 __pyx_v_ret = rbd_group_create(__pyx_v__ioctx, __pyx_v__name);
22222 }
22223
22224 /* "rbd.pyx":2042
22225 * char *_name = name
22226 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22227 * with nogil: # <<<<<<<<<<<<<<
22228 * ret = rbd_group_create(_ioctx, _name)
22229 * if ret != 0:
22230 */
22231 /*finally:*/ {
22232 /*normal exit:*/{
22233 #ifdef WITH_THREAD1
22234 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
22235 #endif
22236 goto __pyx_L5;
22237 }
22238 __pyx_L5:;
22239 }
22240 }
22241
22242 /* "rbd.pyx":2044
22243 * with nogil:
22244 * ret = rbd_group_create(_ioctx, _name)
22245 * if ret != 0: # <<<<<<<<<<<<<<
22246 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
22247 *
22248 */
22249 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
22250 if (__pyx_t_8) {
22251
22252 /* "rbd.pyx":2045
22253 * ret = rbd_group_create(_ioctx, _name)
22254 * if ret != 0:
22255 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception) # <<<<<<<<<<<<<<
22256 *
22257 * def group_remove(self, ioctx, name):
22258 */
22259 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__22259; goto __pyx_L1_error;}
22260 __Pyx_GOTREF(__pyx_t_1);
22261 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_creating_group_s, __pyx_v_name)PyString_Format(__pyx_kp_s_error_creating_group_s, __pyx_v_name
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__22261; goto __pyx_L1_error;}
22262 __Pyx_GOTREF(__pyx_t_2);
22263 __pyx_t_5 = __pyx_v_3rbd_group_errno_to_exception;
22264 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
22265 __pyx_t_9.__pyx_n = 1;
22266 __pyx_t_9.exception_map = __pyx_t_5;
22267 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_2, &__pyx_t_9); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__22267; goto __pyx_L1_error;}
22268 __Pyx_GOTREF(__pyx_t_3);
22269 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
22270 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
22271 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22272 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
22273 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
22274 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__22274; goto __pyx_L1_error;}
22275
22276 /* "rbd.pyx":2044
22277 * with nogil:
22278 * ret = rbd_group_create(_ioctx, _name)
22279 * if ret != 0: # <<<<<<<<<<<<<<
22280 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
22281 *
22282 */
22283 }
22284
22285 /* "rbd.pyx":2026
22286 * return ConfigPoolIterator(ioctx)
22287 *
22288 * def group_create(self, ioctx, name): # <<<<<<<<<<<<<<
22289 * """
22290 * Create a group.
22291 */
22292
22293 /* function exit code */
22294 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
22295 goto __pyx_L0;
22296 __pyx_L1_error:;
22297 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
22298 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
22299 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
22300 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
22301 __Pyx_AddTraceback("rbd.RBD.group_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
22302 __pyx_r = NULL((void*)0);
22303 __pyx_L0:;
22304 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
22305 __Pyx_XGIVEREF(__pyx_r);
22306 __Pyx_RefNannyFinishContext();
22307 return __pyx_r;
22308}
22309
22310/* "rbd.pyx":2047
22311 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
22312 *
22313 * def group_remove(self, ioctx, name): # <<<<<<<<<<<<<<
22314 * """
22315 * Delete an RBD group. This may take a long time, since it does
22316 */
22317
22318/* Python wrapper */
22319static PyObject *__pyx_pw_3rbd_3RBD_73group_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22320static char __pyx_doc_3rbd_3RBD_72group_remove[] = "RBD.group_remove(self, ioctx, name)\n\n Delete an RBD group. This may take a long time, since it does\n not return until every image in the group has been removed\n from the group.\n\n :param ioctx: determines which RADOS pool the group is in\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the group to remove\n :type name: str\n :raises: :class:`ObjectNotFound`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
22321static PyMethodDef __pyx_mdef_3rbd_3RBD_73group_remove = {"group_remove", (PyCFunction)__pyx_pw_3rbd_3RBD_73group_remove, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_72group_remove};
22322static PyObject *__pyx_pw_3rbd_3RBD_73group_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22323 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
22324 PyObject *__pyx_v_ioctx = 0;
22325 PyObject *__pyx_v_name = 0;
22326 int __pyx_lineno = 0;
22327 const char *__pyx_filename = NULL((void*)0);
22328 int __pyx_clineno = 0;
22329 PyObject *__pyx_r = 0;
22330 __Pyx_RefNannyDeclarations
22331 __Pyx_RefNannySetupContext("group_remove (wrapper)", 0);
22332 {
22333 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,0};
22334 PyObject* values[3] = {0,0,0};
22335 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
22336 Py_ssize_t kw_args;
22337 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
22338 switch (pos_args) {
22339 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
22340 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
22341 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
22342 case 0: break;
22343 default: goto __pyx_L5_argtuple_error;
22344 }
22345 kw_args = PyDict_Size(__pyx_kwds);
22346 switch (pos_args) {
22347 case 0:
22348 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
22349 else goto __pyx_L5_argtuple_error;
22350 case 1:
22351 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
22352 else {
22353 __Pyx_RaiseArgtupleInvalid("group_remove", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__22353; goto __pyx_L3_error;}
22354 }
22355 case 2:
22356 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
22357 else {
22358 __Pyx_RaiseArgtupleInvalid("group_remove", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__22358; goto __pyx_L3_error;}
22359 }
22360 }
22361 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
22362 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_remove") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "group_remove") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__22362; goto __pyx_L3_error;}
22363 }
22364 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
22365 goto __pyx_L5_argtuple_error;
22366 } else {
22367 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
22368 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
22369 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
22370 }
22371 __pyx_v_self = values[0];
22372 __pyx_v_ioctx = values[1];
22373 __pyx_v_name = values[2];
22374 }
22375 goto __pyx_L4_argument_unpacking_done;
22376 __pyx_L5_argtuple_error:;
22377 __Pyx_RaiseArgtupleInvalid("group_remove", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__22377; goto __pyx_L3_error;}
22378 __pyx_L3_error:;
22379 __Pyx_AddTraceback("rbd.RBD.group_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
22380 __Pyx_RefNannyFinishContext();
22381 return NULL((void*)0);
22382 __pyx_L4_argument_unpacking_done:;
22383 __pyx_r = __pyx_pf_3rbd_3RBD_72group_remove(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name);
22384
22385 /* function exit code */
22386 __Pyx_RefNannyFinishContext();
22387 return __pyx_r;
22388}
22389
22390static PyObject *__pyx_pf_3rbd_3RBD_72group_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name) {
22391 rados_ioctx_t __pyx_v__ioctx;
22392 char *__pyx_v__name;
22393 int __pyx_v_ret;
22394 PyObject *__pyx_r = NULL((void*)0);
22395 __Pyx_RefNannyDeclarations
22396 PyObject *__pyx_t_1 = NULL((void*)0);
22397 PyObject *__pyx_t_2 = NULL((void*)0);
22398 PyObject *__pyx_t_3 = NULL((void*)0);
22399 Py_ssize_t __pyx_t_4;
22400 PyObject *__pyx_t_5 = NULL((void*)0);
22401 rados_ioctx_t __pyx_t_6;
22402 char *__pyx_t_7;
22403 int __pyx_t_8;
22404 struct __pyx_opt_args_3rbd_make_ex __pyx_t_9;
22405 int __pyx_lineno = 0;
22406 const char *__pyx_filename = NULL((void*)0);
22407 int __pyx_clineno = 0;
22408 __Pyx_RefNannySetupContext("group_remove", 0);
22409 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
22410
22411 /* "rbd.pyx":2061
22412 * :raises: :class:`FunctionNotSupported`
22413 * """
22414 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
22415 * cdef:
22416 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22417 */
22418 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__22418; goto __pyx_L1_error;}
22419 __Pyx_GOTREF(__pyx_t_2);
22420 __pyx_t_3 = NULL((void*)0);
22421 __pyx_t_4 = 0;
22422 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
22423 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
22424 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
22425 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
22426 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
22427 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
22428 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
22429 __pyx_t_4 = 1;
22430 }
22431 }
22432 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__22432; goto __pyx_L1_error;}
22433 __Pyx_GOTREF(__pyx_t_5);
22434 if (__pyx_t_3) {
22435 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
22436 }
22437 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
22438 __Pyx_GIVEREF(__pyx_v_name);
22439 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
22440 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
22441 __Pyx_GIVEREF(__pyx_n_s_name);
22442 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
22443 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__22443; goto __pyx_L1_error;}
22444 __Pyx_GOTREF(__pyx_t_1);
22445 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22446 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
22447 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
22448 __pyx_t_1 = 0;
22449
22450 /* "rbd.pyx":2063
22451 * name = cstr(name, 'name')
22452 * cdef:
22453 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
22454 * char *_name = name
22455 * with nogil:
22456 */
22457 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; __pyx_clineno = __LINE__22457; goto __pyx_L1_error;}
22458 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; __pyx_clineno = __LINE__22458; goto __pyx_L1_error;}
22459 __pyx_v__ioctx = __pyx_t_6;
22460
22461 /* "rbd.pyx":2064
22462 * cdef:
22463 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22464 * char *_name = name # <<<<<<<<<<<<<<
22465 * with nogil:
22466 * ret = rbd_group_remove(_ioctx, _name)
22467 */
22468 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__22468; goto __pyx_L1_error;}
22469 __pyx_v__name = __pyx_t_7;
22470
22471 /* "rbd.pyx":2065
22472 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22473 * char *_name = name
22474 * with nogil: # <<<<<<<<<<<<<<
22475 * ret = rbd_group_remove(_ioctx, _name)
22476 * if ret != 0:
22477 */
22478 {
22479 #ifdef WITH_THREAD1
22480 PyThreadState *_save;
22481 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
22482 #endif
22483 /*try:*/ {
22484
22485 /* "rbd.pyx":2066
22486 * char *_name = name
22487 * with nogil:
22488 * ret = rbd_group_remove(_ioctx, _name) # <<<<<<<<<<<<<<
22489 * if ret != 0:
22490 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
22491 */
22492 __pyx_v_ret = rbd_group_remove(__pyx_v__ioctx, __pyx_v__name);
22493 }
22494
22495 /* "rbd.pyx":2065
22496 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22497 * char *_name = name
22498 * with nogil: # <<<<<<<<<<<<<<
22499 * ret = rbd_group_remove(_ioctx, _name)
22500 * if ret != 0:
22501 */
22502 /*finally:*/ {
22503 /*normal exit:*/{
22504 #ifdef WITH_THREAD1
22505 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
22506 #endif
22507 goto __pyx_L5;
22508 }
22509 __pyx_L5:;
22510 }
22511 }
22512
22513 /* "rbd.pyx":2067
22514 * with nogil:
22515 * ret = rbd_group_remove(_ioctx, _name)
22516 * if ret != 0: # <<<<<<<<<<<<<<
22517 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
22518 *
22519 */
22520 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
22521 if (__pyx_t_8) {
22522
22523 /* "rbd.pyx":2068
22524 * ret = rbd_group_remove(_ioctx, _name)
22525 * if ret != 0:
22526 * raise make_ex(ret, 'error removing group', group_errno_to_exception) # <<<<<<<<<<<<<<
22527 *
22528 * def group_list(self, ioctx):
22529 */
22530 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2068; __pyx_clineno = __LINE__22530; goto __pyx_L1_error;}
22531 __Pyx_GOTREF(__pyx_t_1);
22532 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
22533 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
22534 __pyx_t_9.__pyx_n = 1;
22535 __pyx_t_9.exception_map = __pyx_t_2;
22536 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_removing_group, &__pyx_t_9); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2068; __pyx_clineno = __LINE__22536; goto __pyx_L1_error;}
22537 __Pyx_GOTREF(__pyx_t_5);
22538 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
22539 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
22540 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
22541 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22542 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2068; __pyx_clineno = __LINE__22542; goto __pyx_L1_error;}
22543
22544 /* "rbd.pyx":2067
22545 * with nogil:
22546 * ret = rbd_group_remove(_ioctx, _name)
22547 * if ret != 0: # <<<<<<<<<<<<<<
22548 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
22549 *
22550 */
22551 }
22552
22553 /* "rbd.pyx":2047
22554 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
22555 *
22556 * def group_remove(self, ioctx, name): # <<<<<<<<<<<<<<
22557 * """
22558 * Delete an RBD group. This may take a long time, since it does
22559 */
22560
22561 /* function exit code */
22562 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
22563 goto __pyx_L0;
22564 __pyx_L1_error:;
22565 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
22566 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
22567 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
22568 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
22569 __Pyx_AddTraceback("rbd.RBD.group_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
22570 __pyx_r = NULL((void*)0);
22571 __pyx_L0:;
22572 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
22573 __Pyx_XGIVEREF(__pyx_r);
22574 __Pyx_RefNannyFinishContext();
22575 return __pyx_r;
22576}
22577
22578/* "rbd.pyx":2070
22579 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
22580 *
22581 * def group_list(self, ioctx): # <<<<<<<<<<<<<<
22582 * """
22583 * List groups.
22584 */
22585
22586/* Python wrapper */
22587static PyObject *__pyx_pw_3rbd_3RBD_75group_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22588static char __pyx_doc_3rbd_3RBD_74group_list[] = "RBD.group_list(self, ioctx)\n\n List groups.\n\n :param ioctx: determines which RADOS pool is read\n :type ioctx: :class:`rados.Ioctx`\n :returns: list -- a list of groups names\n :raises: :class:`FunctionNotSupported`\n ";
22589static PyMethodDef __pyx_mdef_3rbd_3RBD_75group_list = {"group_list", (PyCFunction)__pyx_pw_3rbd_3RBD_75group_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_74group_list};
22590static PyObject *__pyx_pw_3rbd_3RBD_75group_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22591 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
22592 PyObject *__pyx_v_ioctx = 0;
22593 int __pyx_lineno = 0;
22594 const char *__pyx_filename = NULL((void*)0);
22595 int __pyx_clineno = 0;
22596 PyObject *__pyx_r = 0;
22597 __Pyx_RefNannyDeclarations
22598 __Pyx_RefNannySetupContext("group_list (wrapper)", 0);
22599 {
22600 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
22601 PyObject* values[2] = {0,0};
22602 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
22603 Py_ssize_t kw_args;
22604 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
22605 switch (pos_args) {
22606 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
22607 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
22608 case 0: break;
22609 default: goto __pyx_L5_argtuple_error;
22610 }
22611 kw_args = PyDict_Size(__pyx_kwds);
22612 switch (pos_args) {
22613 case 0:
22614 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
22615 else goto __pyx_L5_argtuple_error;
22616 case 1:
22617 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
22618 else {
22619 __Pyx_RaiseArgtupleInvalid("group_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__22619; goto __pyx_L3_error;}
22620 }
22621 }
22622 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
22623 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "group_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__22623; goto __pyx_L3_error;}
22624 }
22625 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
22626 goto __pyx_L5_argtuple_error;
22627 } else {
22628 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
22629 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
22630 }
22631 __pyx_v_self = values[0];
22632 __pyx_v_ioctx = values[1];
22633 }
22634 goto __pyx_L4_argument_unpacking_done;
22635 __pyx_L5_argtuple_error:;
22636 __Pyx_RaiseArgtupleInvalid("group_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__22636; goto __pyx_L3_error;}
22637 __pyx_L3_error:;
22638 __Pyx_AddTraceback("rbd.RBD.group_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
22639 __Pyx_RefNannyFinishContext();
22640 return NULL((void*)0);
22641 __pyx_L4_argument_unpacking_done:;
22642 __pyx_r = __pyx_pf_3rbd_3RBD_74group_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
22643
22644 /* function exit code */
22645 __Pyx_RefNannyFinishContext();
22646 return __pyx_r;
22647}
22648
22649static PyObject *__pyx_pf_3rbd_3RBD_74group_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
22650 rados_ioctx_t __pyx_v__ioctx;
22651 size_t __pyx_v_size;
22652 char *__pyx_v_c_names;
22653 int __pyx_v_ret;
22654 PyObject *__pyx_v_name = NULL((void*)0);
22655 PyObject *__pyx_r = NULL((void*)0);
22656 __Pyx_RefNannyDeclarations
22657 rados_ioctx_t __pyx_t_1;
22658 void *__pyx_t_2;
22659 int __pyx_t_3;
22660 PyObject *__pyx_t_4 = NULL((void*)0);
22661 PyObject *__pyx_t_5 = NULL((void*)0);
22662 PyObject *__pyx_t_6 = NULL((void*)0);
22663 struct __pyx_opt_args_3rbd_make_ex __pyx_t_7;
22664 Py_ssize_t __pyx_t_8;
22665 PyObject *(*__pyx_t_9)(PyObject *);
22666 PyObject *__pyx_t_10 = NULL((void*)0);
22667 PyObject *__pyx_t_11 = NULL((void*)0);
22668 PyObject *__pyx_t_12 = NULL((void*)0);
22669 int __pyx_t_13;
22670 int __pyx_t_14;
22671 char const *__pyx_t_15;
22672 PyObject *__pyx_t_16 = NULL((void*)0);
22673 PyObject *__pyx_t_17 = NULL((void*)0);
22674 PyObject *__pyx_t_18 = NULL((void*)0);
22675 PyObject *__pyx_t_19 = NULL((void*)0);
22676 PyObject *__pyx_t_20 = NULL((void*)0);
22677 PyObject *__pyx_t_21 = NULL((void*)0);
22678 int __pyx_lineno = 0;
22679 const char *__pyx_filename = NULL((void*)0);
22680 int __pyx_clineno = 0;
22681 __Pyx_RefNannySetupContext("group_list", 0);
22682
22683 /* "rbd.pyx":2080
22684 * """
22685 * cdef:
22686 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
22687 * size_t size = 512
22688 * char *c_names = NULL
22689 */
22690 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2080; __pyx_clineno = __LINE__22690; goto __pyx_L1_error;}
22691 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2080; __pyx_clineno = __LINE__22691; goto __pyx_L1_error;}
22692 __pyx_v__ioctx = __pyx_t_1;
22693
22694 /* "rbd.pyx":2081
22695 * cdef:
22696 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22697 * size_t size = 512 # <<<<<<<<<<<<<<
22698 * char *c_names = NULL
22699 * try:
22700 */
22701 __pyx_v_size = 0x200;
22702
22703 /* "rbd.pyx":2082
22704 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
22705 * size_t size = 512
22706 * char *c_names = NULL # <<<<<<<<<<<<<<
22707 * try:
22708 * while True:
22709 */
22710 __pyx_v_c_names = NULL((void*)0);
22711
22712 /* "rbd.pyx":2083
22713 * size_t size = 512
22714 * char *c_names = NULL
22715 * try: # <<<<<<<<<<<<<<
22716 * while True:
22717 * c_names = <char *>realloc_chk(c_names, size)
22718 */
22719 /*try:*/ {
22720
22721 /* "rbd.pyx":2084
22722 * char *c_names = NULL
22723 * try:
22724 * while True: # <<<<<<<<<<<<<<
22725 * c_names = <char *>realloc_chk(c_names, size)
22726 * with nogil:
22727 */
22728 while (1) {
22729
22730 /* "rbd.pyx":2085
22731 * try:
22732 * while True:
22733 * c_names = <char *>realloc_chk(c_names, size) # <<<<<<<<<<<<<<
22734 * with nogil:
22735 * ret = rbd_group_list(_ioctx, c_names, &size)
22736 */
22737 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_names, __pyx_v_size); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2085; __pyx_clineno = __LINE__22737; goto __pyx_L4_error;}
22738 __pyx_v_c_names = ((char *)__pyx_t_2);
22739
22740 /* "rbd.pyx":2086
22741 * while True:
22742 * c_names = <char *>realloc_chk(c_names, size)
22743 * with nogil: # <<<<<<<<<<<<<<
22744 * ret = rbd_group_list(_ioctx, c_names, &size)
22745 * if ret >= 0:
22746 */
22747 {
22748 #ifdef WITH_THREAD1
22749 PyThreadState *_save;
22750 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
22751 #endif
22752 /*try:*/ {
22753
22754 /* "rbd.pyx":2087
22755 * c_names = <char *>realloc_chk(c_names, size)
22756 * with nogil:
22757 * ret = rbd_group_list(_ioctx, c_names, &size) # <<<<<<<<<<<<<<
22758 * if ret >= 0:
22759 * break
22760 */
22761 __pyx_v_ret = rbd_group_list(__pyx_v__ioctx, __pyx_v_c_names, (&__pyx_v_size));
22762 }
22763
22764 /* "rbd.pyx":2086
22765 * while True:
22766 * c_names = <char *>realloc_chk(c_names, size)
22767 * with nogil: # <<<<<<<<<<<<<<
22768 * ret = rbd_group_list(_ioctx, c_names, &size)
22769 * if ret >= 0:
22770 */
22771 /*finally:*/ {
22772 /*normal exit:*/{
22773 #ifdef WITH_THREAD1
22774 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
22775 #endif
22776 goto __pyx_L12;
22777 }
22778 __pyx_L12:;
22779 }
22780 }
22781
22782 /* "rbd.pyx":2088
22783 * with nogil:
22784 * ret = rbd_group_list(_ioctx, c_names, &size)
22785 * if ret >= 0: # <<<<<<<<<<<<<<
22786 * break
22787 * elif ret != -errno.ERANGE:
22788 */
22789 __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
22790 if (__pyx_t_3) {
22791
22792 /* "rbd.pyx":2089
22793 * ret = rbd_group_list(_ioctx, c_names, &size)
22794 * if ret >= 0:
22795 * break # <<<<<<<<<<<<<<
22796 * elif ret != -errno.ERANGE:
22797 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22798 */
22799 goto __pyx_L7_break;
22800
22801 /* "rbd.pyx":2088
22802 * with nogil:
22803 * ret = rbd_group_list(_ioctx, c_names, &size)
22804 * if ret >= 0: # <<<<<<<<<<<<<<
22805 * break
22806 * elif ret != -errno.ERANGE:
22807 */
22808 }
22809
22810 /* "rbd.pyx":2090
22811 * if ret >= 0:
22812 * break
22813 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
22814 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22815 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
22816 */
22817 __pyx_t_3 = ((__pyx_v_ret != (-ERANGE34)) != 0);
22818 if (__pyx_t_3) {
22819
22820 /* "rbd.pyx":2091
22821 * break
22822 * elif ret != -errno.ERANGE:
22823 * raise make_ex(ret, 'error listing groups', group_errno_to_exception) # <<<<<<<<<<<<<<
22824 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
22825 * if name]
22826 */
22827 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2091; __pyx_clineno = __LINE__22827; goto __pyx_L4_error;}
22828 __Pyx_GOTREF(__pyx_t_4);
22829 __pyx_t_5 = __pyx_v_3rbd_group_errno_to_exception;
22830 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
22831 __pyx_t_7.__pyx_n = 1;
22832 __pyx_t_7.exception_map = __pyx_t_5;
22833 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_groups, &__pyx_t_7); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2091; __pyx_clineno = __LINE__22833; goto __pyx_L4_error;}
22834 __Pyx_GOTREF(__pyx_t_6);
22835 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
22836 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22837 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
22838 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
22839 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2091; __pyx_clineno = __LINE__22839; goto __pyx_L4_error;}
22840
22841 /* "rbd.pyx":2090
22842 * if ret >= 0:
22843 * break
22844 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
22845 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22846 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
22847 */
22848 }
22849 }
22850 __pyx_L7_break:;
22851
22852 /* "rbd.pyx":2092
22853 * elif ret != -errno.ERANGE:
22854 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22855 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
22856 * if name]
22857 * finally:
22858 */
22859 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
22860 __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22860; goto __pyx_L4_error;}
22861 __Pyx_GOTREF(__pyx_t_6);
22862 __pyx_t_5 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_names + 0, __pyx_v_ret - 0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22862; goto __pyx_L4_error;}
22863 __Pyx_GOTREF(__pyx_t_5);
22864 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22864; goto __pyx_L4_error;}
22865 __Pyx_GOTREF(__pyx_t_4);
22866 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22867 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22867; goto __pyx_L4_error;}
22868 __Pyx_GOTREF(__pyx_t_5);
22869 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
22870 if (likely(PyList_CheckExact(__pyx_t_5))__builtin_expect(!!(((((PyObject*)(__pyx_t_5))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_5)((((PyObject*)(__pyx_t_5))->ob_type) == &PyTuple_Type)) {
22871 __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_8 = 0;
22872 __pyx_t_9 = NULL((void*)0);
22873 } else {
22874 __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22874; goto __pyx_L4_error;}
22875 __Pyx_GOTREF(__pyx_t_4);
22876 __pyx_t_9 = Py_TYPE(__pyx_t_4)(((PyObject*)(__pyx_t_4))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22876; goto __pyx_L4_error;}
22877 }
22878 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22879 for (;;) {
22880 if (likely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 1)) {
22881 if (likely(PyList_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) ==
&PyList_Type)), 1)
) {
22882 if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)(((PyVarObject*)(__pyx_t_4))->ob_size)) break;
22883 #if CYTHON_COMPILING_IN_CPYTHON1
22884 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8)(((PyListObject *)(__pyx_t_4))->ob_item[__pyx_t_8]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_8++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22884; goto __pyx_L4_error;}
22885 #else
22886 __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8)( (((PyObject*)(__pyx_t_4))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_4, __pyx_t_8) )
; __pyx_t_8++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22886; goto __pyx_L4_error;}
22887 __Pyx_GOTREF(__pyx_t_5);
22888 #endif
22889 } else {
22890 if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)(((PyVarObject*)(__pyx_t_4))->ob_size)) break;
22891 #if CYTHON_COMPILING_IN_CPYTHON1
22892 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8)(((PyTupleObject *)(__pyx_t_4))->ob_item[__pyx_t_8]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_8++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22892; goto __pyx_L4_error;}
22893 #else
22894 __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_8)( (((PyObject*)(__pyx_t_4))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_4, __pyx_t_8) )
; __pyx_t_8++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22894; goto __pyx_L4_error;}
22895 __Pyx_GOTREF(__pyx_t_5);
22896 #endif
22897 }
22898 } else {
22899 __pyx_t_5 = __pyx_t_9(__pyx_t_4);
22900 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
22901 PyObject* exc_type = PyErr_Occurred();
22902 if (exc_type) {
22903 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
22904 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22904; goto __pyx_L4_error;}
22905 }
22906 break;
22907 }
22908 __Pyx_GOTREF(__pyx_t_5);
22909 }
22910 __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_5; do { if ((tmp) == ((void*)0)) ; else do { if ( --
((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0); } while (0); } while (
0)
;
22911 __pyx_t_5 = 0;
22912
22913 /* "rbd.pyx":2093
22914 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22915 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
22916 * if name] # <<<<<<<<<<<<<<
22917 * finally:
22918 * free(c_names)
22919 */
22920 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; __pyx_clineno = __LINE__22920; goto __pyx_L4_error;}
22921 if (__pyx_t_3) {
22922
22923 /* "rbd.pyx":2092
22924 * elif ret != -errno.ERANGE:
22925 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22926 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
22927 * if name]
22928 * finally:
22929 */
22930 __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22930; goto __pyx_L4_error;}
22931 __Pyx_GOTREF(__pyx_t_10);
22932 __pyx_t_11 = NULL((void*)0);
22933 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_10))__builtin_expect(!!(((__pyx_t_10)->ob_type == &PyMethod_Type
)), 0)
) {
22934 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_self);
22935 if (likely(__pyx_t_11)__builtin_expect(!!(__pyx_t_11), 1)) {
22936 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10)(((PyMethodObject *)__pyx_t_10) -> im_func);
22937 __Pyx_INCREF(__pyx_t_11)( ((PyObject*)(__pyx_t_11))->ob_refcnt++);
22938 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
22939 __Pyx_DECREF_SET(__pyx_t_10, function)do { PyObject *tmp = (PyObject *) __pyx_t_10; __pyx_t_10 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
22940 }
22941 }
22942 if (!__pyx_t_11) {
22943 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_name); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22943; goto __pyx_L4_error;}
22944 __Pyx_GOTREF(__pyx_t_5);
22945 } else {
22946 __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)__builtin_expect(!!(!__pyx_t_12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22946; goto __pyx_L4_error;}
22947 __Pyx_GOTREF(__pyx_t_12);
22948 __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11)(((PyTupleObject *)(__pyx_t_12))->ob_item[0] = __pyx_t_11); __pyx_t_11 = NULL((void*)0);
22949 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
22950 __Pyx_GIVEREF(__pyx_v_name);
22951 PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_12))->ob_item[0+1] = __pyx_v_name
)
;
22952 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22952; goto __pyx_L4_error;}
22953 __Pyx_GOTREF(__pyx_t_5);
22954 __Pyx_DECREF(__pyx_t_12)do { if ( --((PyObject*)(__pyx_t_12))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_12)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_12)))); } while
(0)
; __pyx_t_12 = 0;
22955 }
22956 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
22957 if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_6, (PyObject
*)__pyx_t_5)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__22957; goto __pyx_L4_error;}
22958 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
22959
22960 /* "rbd.pyx":2093
22961 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22962 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0')
22963 * if name] # <<<<<<<<<<<<<<
22964 * finally:
22965 * free(c_names)
22966 */
22967 }
22968
22969 /* "rbd.pyx":2092
22970 * elif ret != -errno.ERANGE:
22971 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
22972 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
22973 * if name]
22974 * finally:
22975 */
22976 }
22977 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
22978 __pyx_r = __pyx_t_6;
22979 __pyx_t_6 = 0;
22980 goto __pyx_L3_return;
22981 }
22982
22983 /* "rbd.pyx":2095
22984 * if name]
22985 * finally:
22986 * free(c_names) # <<<<<<<<<<<<<<
22987 *
22988 * def group_rename(self, ioctx, src, dest):
22989 */
22990 /*finally:*/ {
22991 /*exception exit:*/{
22992 __pyx_L4_error:;
22993 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
22994 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
22995 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
; __pyx_t_12 = 0;
22996 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
22997 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
22998 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
22999 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
23000 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
23001 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_16, &
__pyx_t_17, &__pyx_t_18) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
23002 __Pyx_XGOTREF(__pyx_t_16);
23003 __Pyx_XGOTREF(__pyx_t_17);
23004 __Pyx_XGOTREF(__pyx_t_18);
23005 __Pyx_XGOTREF(__pyx_t_19);
23006 __Pyx_XGOTREF(__pyx_t_20);
23007 __Pyx_XGOTREF(__pyx_t_21);
23008 __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
23009 {
23010 free(__pyx_v_c_names);
23011 }
23012 if (PY_MAJOR_VERSION2 >= 3) {
23013 __Pyx_XGIVEREF(__pyx_t_19);
23014 __Pyx_XGIVEREF(__pyx_t_20);
23015 __Pyx_XGIVEREF(__pyx_t_21);
23016 __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
23017 }
23018 __Pyx_XGIVEREF(__pyx_t_16);
23019 __Pyx_XGIVEREF(__pyx_t_17);
23020 __Pyx_XGIVEREF(__pyx_t_18);
23021 __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
23022 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
23023 __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
23024 goto __pyx_L1_error;
23025 }
23026 __pyx_L3_return: {
23027 __pyx_t_21 = __pyx_r;
23028 __pyx_r = 0;
23029 free(__pyx_v_c_names);
23030 __pyx_r = __pyx_t_21;
23031 __pyx_t_21 = 0;
23032 goto __pyx_L0;
23033 }
23034 }
23035
23036 /* "rbd.pyx":2070
23037 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
23038 *
23039 * def group_list(self, ioctx): # <<<<<<<<<<<<<<
23040 * """
23041 * List groups.
23042 */
23043
23044 /* function exit code */
23045 __pyx_L1_error:;
23046 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
23047 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
23048 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
23049 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
23050 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
23051 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
;
23052 __Pyx_AddTraceback("rbd.RBD.group_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
23053 __pyx_r = NULL((void*)0);
23054 __pyx_L0:;
23055 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
23056 __Pyx_XGIVEREF(__pyx_r);
23057 __Pyx_RefNannyFinishContext();
23058 return __pyx_r;
23059}
23060
23061/* "rbd.pyx":2097
23062 * free(c_names)
23063 *
23064 * def group_rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
23065 * """
23066 * Rename an RBD group.
23067 */
23068
23069/* Python wrapper */
23070static PyObject *__pyx_pw_3rbd_3RBD_77group_rename(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23071static char __pyx_doc_3rbd_3RBD_76group_rename[] = "RBD.group_rename(self, ioctx, src, dest)\n\n Rename an RBD group.\n\n :param ioctx: determines which RADOS pool the group is in\n :type ioctx: :class:`rados.Ioctx`\n :param src: the current name of the group\n :type src: str\n :param dest: the new name of the group\n :type dest: str\n :raises: :class:`ObjectExists`\n :raises: :class:`ObjectNotFound`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
23072static PyMethodDef __pyx_mdef_3rbd_3RBD_77group_rename = {"group_rename", (PyCFunction)__pyx_pw_3rbd_3RBD_77group_rename, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_76group_rename};
23073static PyObject *__pyx_pw_3rbd_3RBD_77group_rename(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23074 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
23075 PyObject *__pyx_v_ioctx = 0;
23076 PyObject *__pyx_v_src = 0;
23077 PyObject *__pyx_v_dest = 0;
23078 int __pyx_lineno = 0;
23079 const char *__pyx_filename = NULL((void*)0);
23080 int __pyx_clineno = 0;
23081 PyObject *__pyx_r = 0;
23082 __Pyx_RefNannyDeclarations
23083 __Pyx_RefNannySetupContext("group_rename (wrapper)", 0);
23084 {
23085 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_src,&__pyx_n_s_dest,0};
23086 PyObject* values[4] = {0,0,0,0};
23087 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
23088 Py_ssize_t kw_args;
23089 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
23090 switch (pos_args) {
23091 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
23092 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23093 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23094 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23095 case 0: break;
23096 default: goto __pyx_L5_argtuple_error;
23097 }
23098 kw_args = PyDict_Size(__pyx_kwds);
23099 switch (pos_args) {
23100 case 0:
23101 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
23102 else goto __pyx_L5_argtuple_error;
23103 case 1:
23104 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
23105 else {
23106 __Pyx_RaiseArgtupleInvalid("group_rename", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__23106; goto __pyx_L3_error;}
23107 }
23108 case 2:
23109 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_src
)) != 0), 1)
) kw_args--;
23110 else {
23111 __Pyx_RaiseArgtupleInvalid("group_rename", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__23111; goto __pyx_L3_error;}
23112 }
23113 case 3:
23114 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest
)) != 0), 1)
) kw_args--;
23115 else {
23116 __Pyx_RaiseArgtupleInvalid("group_rename", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__23116; goto __pyx_L3_error;}
23117 }
23118 }
23119 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
23120 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_rename") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "group_rename") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__23120; goto __pyx_L3_error;}
23121 }
23122 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 4) {
23123 goto __pyx_L5_argtuple_error;
23124 } else {
23125 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23126 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23127 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23128 values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
23129 }
23130 __pyx_v_self = values[0];
23131 __pyx_v_ioctx = values[1];
23132 __pyx_v_src = values[2];
23133 __pyx_v_dest = values[3];
23134 }
23135 goto __pyx_L4_argument_unpacking_done;
23136 __pyx_L5_argtuple_error:;
23137 __Pyx_RaiseArgtupleInvalid("group_rename", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__23137; goto __pyx_L3_error;}
23138 __pyx_L3_error:;
23139 __Pyx_AddTraceback("rbd.RBD.group_rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
23140 __Pyx_RefNannyFinishContext();
23141 return NULL((void*)0);
23142 __pyx_L4_argument_unpacking_done:;
23143 __pyx_r = __pyx_pf_3rbd_3RBD_76group_rename(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_src, __pyx_v_dest);
23144
23145 /* function exit code */
23146 __Pyx_RefNannyFinishContext();
23147 return __pyx_r;
23148}
23149
23150static PyObject *__pyx_pf_3rbd_3RBD_76group_rename(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_src, PyObject *__pyx_v_dest) {
23151 rados_ioctx_t __pyx_v__ioctx;
23152 char *__pyx_v__src;
23153 char *__pyx_v__dest;
23154 int __pyx_v_ret;
23155 PyObject *__pyx_r = NULL((void*)0);
23156 __Pyx_RefNannyDeclarations
23157 PyObject *__pyx_t_1 = NULL((void*)0);
23158 PyObject *__pyx_t_2 = NULL((void*)0);
23159 PyObject *__pyx_t_3 = NULL((void*)0);
23160 Py_ssize_t __pyx_t_4;
23161 PyObject *__pyx_t_5 = NULL((void*)0);
23162 rados_ioctx_t __pyx_t_6;
23163 char *__pyx_t_7;
23164 int __pyx_t_8;
23165 int __pyx_lineno = 0;
23166 const char *__pyx_filename = NULL((void*)0);
23167 int __pyx_clineno = 0;
23168 __Pyx_RefNannySetupContext("group_rename", 0);
23169 __Pyx_INCREF(__pyx_v_src)( ((PyObject*)(__pyx_v_src))->ob_refcnt++);
23170 __Pyx_INCREF(__pyx_v_dest)( ((PyObject*)(__pyx_v_dest))->ob_refcnt++);
23171
23172 /* "rbd.pyx":2112
23173 * :raises: :class:`FunctionNotSupported`
23174 * """
23175 * src = cstr(src, 'src') # <<<<<<<<<<<<<<
23176 * dest = cstr(dest, 'dest')
23177 * cdef:
23178 */
23179 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2112; __pyx_clineno = __LINE__23179; goto __pyx_L1_error;}
23180 __Pyx_GOTREF(__pyx_t_2);
23181 __pyx_t_3 = NULL((void*)0);
23182 __pyx_t_4 = 0;
23183 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
23184 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
23185 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
23186 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
23187 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
23188 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
23189 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
23190 __pyx_t_4 = 1;
23191 }
23192 }
23193 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2112; __pyx_clineno = __LINE__23193; goto __pyx_L1_error;}
23194 __Pyx_GOTREF(__pyx_t_5);
23195 if (__pyx_t_3) {
23196 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
23197 }
23198 __Pyx_INCREF(__pyx_v_src)( ((PyObject*)(__pyx_v_src))->ob_refcnt++);
23199 __Pyx_GIVEREF(__pyx_v_src);
23200 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_src)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_src
)
;
23201 __Pyx_INCREF(__pyx_n_s_src)( ((PyObject*)(__pyx_n_s_src))->ob_refcnt++);
23202 __Pyx_GIVEREF(__pyx_n_s_src);
23203 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_src)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_src
)
;
23204 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2112; __pyx_clineno = __LINE__23204; goto __pyx_L1_error;}
23205 __Pyx_GOTREF(__pyx_t_1);
23206 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
23207 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23208 __Pyx_DECREF_SET(__pyx_v_src, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_src; __pyx_v_src = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
23209 __pyx_t_1 = 0;
23210
23211 /* "rbd.pyx":2113
23212 * """
23213 * src = cstr(src, 'src')
23214 * dest = cstr(dest, 'dest') # <<<<<<<<<<<<<<
23215 * cdef:
23216 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23217 */
23218 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__23218; goto __pyx_L1_error;}
23219 __Pyx_GOTREF(__pyx_t_2);
23220 __pyx_t_5 = NULL((void*)0);
23221 __pyx_t_4 = 0;
23222 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
23223 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
23224 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
23225 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
23226 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
23227 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
23228 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
23229 __pyx_t_4 = 1;
23230 }
23231 }
23232 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__23232; goto __pyx_L1_error;}
23233 __Pyx_GOTREF(__pyx_t_3);
23234 if (__pyx_t_5) {
23235 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
23236 }
23237 __Pyx_INCREF(__pyx_v_dest)( ((PyObject*)(__pyx_v_dest))->ob_refcnt++);
23238 __Pyx_GIVEREF(__pyx_v_dest);
23239 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dest)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_dest
)
;
23240 __Pyx_INCREF(__pyx_n_s_dest)( ((PyObject*)(__pyx_n_s_dest))->ob_refcnt++);
23241 __Pyx_GIVEREF(__pyx_n_s_dest);
23242 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_dest)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_dest
)
;
23243 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__23243; goto __pyx_L1_error;}
23244 __Pyx_GOTREF(__pyx_t_1);
23245 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
23246 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23247 __Pyx_DECREF_SET(__pyx_v_dest, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_dest; __pyx_v_dest =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
23248 __pyx_t_1 = 0;
23249
23250 /* "rbd.pyx":2115
23251 * dest = cstr(dest, 'dest')
23252 * cdef:
23253 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
23254 * char *_src = src
23255 * char *_dest = dest
23256 */
23257 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__23257; goto __pyx_L1_error;}
23258 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__23258; goto __pyx_L1_error;}
23259 __pyx_v__ioctx = __pyx_t_6;
23260
23261 /* "rbd.pyx":2116
23262 * cdef:
23263 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23264 * char *_src = src # <<<<<<<<<<<<<<
23265 * char *_dest = dest
23266 * with nogil:
23267 */
23268 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_src); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2116; __pyx_clineno = __LINE__23268; goto __pyx_L1_error;}
23269 __pyx_v__src = __pyx_t_7;
23270
23271 /* "rbd.pyx":2117
23272 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23273 * char *_src = src
23274 * char *_dest = dest # <<<<<<<<<<<<<<
23275 * with nogil:
23276 * ret = rbd_group_rename(_ioctx, _src, _dest)
23277 */
23278 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_dest); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2117; __pyx_clineno = __LINE__23278; goto __pyx_L1_error;}
23279 __pyx_v__dest = __pyx_t_7;
23280
23281 /* "rbd.pyx":2118
23282 * char *_src = src
23283 * char *_dest = dest
23284 * with nogil: # <<<<<<<<<<<<<<
23285 * ret = rbd_group_rename(_ioctx, _src, _dest)
23286 * if ret != 0:
23287 */
23288 {
23289 #ifdef WITH_THREAD1
23290 PyThreadState *_save;
23291 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
23292 #endif
23293 /*try:*/ {
23294
23295 /* "rbd.pyx":2119
23296 * char *_dest = dest
23297 * with nogil:
23298 * ret = rbd_group_rename(_ioctx, _src, _dest) # <<<<<<<<<<<<<<
23299 * if ret != 0:
23300 * raise make_ex(ret, 'error renaming group')
23301 */
23302 __pyx_v_ret = rbd_group_rename(__pyx_v__ioctx, __pyx_v__src, __pyx_v__dest);
23303 }
23304
23305 /* "rbd.pyx":2118
23306 * char *_src = src
23307 * char *_dest = dest
23308 * with nogil: # <<<<<<<<<<<<<<
23309 * ret = rbd_group_rename(_ioctx, _src, _dest)
23310 * if ret != 0:
23311 */
23312 /*finally:*/ {
23313 /*normal exit:*/{
23314 #ifdef WITH_THREAD1
23315 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
23316 #endif
23317 goto __pyx_L5;
23318 }
23319 __pyx_L5:;
23320 }
23321 }
23322
23323 /* "rbd.pyx":2120
23324 * with nogil:
23325 * ret = rbd_group_rename(_ioctx, _src, _dest)
23326 * if ret != 0: # <<<<<<<<<<<<<<
23327 * raise make_ex(ret, 'error renaming group')
23328 *
23329 */
23330 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
23331 if (__pyx_t_8) {
23332
23333 /* "rbd.pyx":2121
23334 * ret = rbd_group_rename(_ioctx, _src, _dest)
23335 * if ret != 0:
23336 * raise make_ex(ret, 'error renaming group') # <<<<<<<<<<<<<<
23337 *
23338 * def namespace_create(self, ioctx, name):
23339 */
23340 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__23340; goto __pyx_L1_error;}
23341 __Pyx_GOTREF(__pyx_t_1);
23342 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_renaming_group, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__23342; goto __pyx_L1_error;}
23343 __Pyx_GOTREF(__pyx_t_2);
23344 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
23345 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23346 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23347 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__23347; goto __pyx_L1_error;}
23348
23349 /* "rbd.pyx":2120
23350 * with nogil:
23351 * ret = rbd_group_rename(_ioctx, _src, _dest)
23352 * if ret != 0: # <<<<<<<<<<<<<<
23353 * raise make_ex(ret, 'error renaming group')
23354 *
23355 */
23356 }
23357
23358 /* "rbd.pyx":2097
23359 * free(c_names)
23360 *
23361 * def group_rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
23362 * """
23363 * Rename an RBD group.
23364 */
23365
23366 /* function exit code */
23367 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
23368 goto __pyx_L0;
23369 __pyx_L1_error:;
23370 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
23371 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
23372 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
23373 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
23374 __Pyx_AddTraceback("rbd.RBD.group_rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
23375 __pyx_r = NULL((void*)0);
23376 __pyx_L0:;
23377 __Pyx_XDECREF(__pyx_v_src)do { if ((__pyx_v_src) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_src))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_src)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_src)))); } while (0); } while (0)
;
23378 __Pyx_XDECREF(__pyx_v_dest)do { if ((__pyx_v_dest) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_dest))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_dest)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_dest)))); } while (0); } while
(0)
;
23379 __Pyx_XGIVEREF(__pyx_r);
23380 __Pyx_RefNannyFinishContext();
23381 return __pyx_r;
23382}
23383
23384/* "rbd.pyx":2123
23385 * raise make_ex(ret, 'error renaming group')
23386 *
23387 * def namespace_create(self, ioctx, name): # <<<<<<<<<<<<<<
23388 * """
23389 * Create an RBD namespace within a pool
23390 */
23391
23392/* Python wrapper */
23393static PyObject *__pyx_pw_3rbd_3RBD_79namespace_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23394static char __pyx_doc_3rbd_3RBD_78namespace_create[] = "RBD.namespace_create(self, ioctx, name)\n\n Create an RBD namespace within a pool\n\n :param ioctx: determines which RADOS pool\n :type ioctx: :class:`rados.Ioctx`\n :param name: namespace name\n :type name: str\n ";
23395static PyMethodDef __pyx_mdef_3rbd_3RBD_79namespace_create = {"namespace_create", (PyCFunction)__pyx_pw_3rbd_3RBD_79namespace_create, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_78namespace_create};
23396static PyObject *__pyx_pw_3rbd_3RBD_79namespace_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23397 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
23398 PyObject *__pyx_v_ioctx = 0;
23399 PyObject *__pyx_v_name = 0;
23400 int __pyx_lineno = 0;
23401 const char *__pyx_filename = NULL((void*)0);
23402 int __pyx_clineno = 0;
23403 PyObject *__pyx_r = 0;
23404 __Pyx_RefNannyDeclarations
23405 __Pyx_RefNannySetupContext("namespace_create (wrapper)", 0);
23406 {
23407 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,0};
23408 PyObject* values[3] = {0,0,0};
23409 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
23410 Py_ssize_t kw_args;
23411 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
23412 switch (pos_args) {
23413 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23414 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23415 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23416 case 0: break;
23417 default: goto __pyx_L5_argtuple_error;
23418 }
23419 kw_args = PyDict_Size(__pyx_kwds);
23420 switch (pos_args) {
23421 case 0:
23422 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
23423 else goto __pyx_L5_argtuple_error;
23424 case 1:
23425 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
23426 else {
23427 __Pyx_RaiseArgtupleInvalid("namespace_create", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__23427; goto __pyx_L3_error;}
23428 }
23429 case 2:
23430 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
23431 else {
23432 __Pyx_RaiseArgtupleInvalid("namespace_create", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__23432; goto __pyx_L3_error;}
23433 }
23434 }
23435 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
23436 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "namespace_create") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "namespace_create") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__23436; goto __pyx_L3_error;}
23437 }
23438 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
23439 goto __pyx_L5_argtuple_error;
23440 } else {
23441 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23442 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23443 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23444 }
23445 __pyx_v_self = values[0];
23446 __pyx_v_ioctx = values[1];
23447 __pyx_v_name = values[2];
23448 }
23449 goto __pyx_L4_argument_unpacking_done;
23450 __pyx_L5_argtuple_error:;
23451 __Pyx_RaiseArgtupleInvalid("namespace_create", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__23451; goto __pyx_L3_error;}
23452 __pyx_L3_error:;
23453 __Pyx_AddTraceback("rbd.RBD.namespace_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
23454 __Pyx_RefNannyFinishContext();
23455 return NULL((void*)0);
23456 __pyx_L4_argument_unpacking_done:;
23457 __pyx_r = __pyx_pf_3rbd_3RBD_78namespace_create(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name);
23458
23459 /* function exit code */
23460 __Pyx_RefNannyFinishContext();
23461 return __pyx_r;
23462}
23463
23464static PyObject *__pyx_pf_3rbd_3RBD_78namespace_create(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name) {
23465 rados_ioctx_t __pyx_v__ioctx;
23466 char const *__pyx_v__name;
23467 int __pyx_v_ret;
23468 PyObject *__pyx_r = NULL((void*)0);
23469 __Pyx_RefNannyDeclarations
23470 PyObject *__pyx_t_1 = NULL((void*)0);
23471 PyObject *__pyx_t_2 = NULL((void*)0);
23472 PyObject *__pyx_t_3 = NULL((void*)0);
23473 Py_ssize_t __pyx_t_4;
23474 PyObject *__pyx_t_5 = NULL((void*)0);
23475 rados_ioctx_t __pyx_t_6;
23476 char const *__pyx_t_7;
23477 int __pyx_t_8;
23478 int __pyx_lineno = 0;
23479 const char *__pyx_filename = NULL((void*)0);
23480 int __pyx_clineno = 0;
23481 __Pyx_RefNannySetupContext("namespace_create", 0);
23482 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
23483
23484 /* "rbd.pyx":2132
23485 * :type name: str
23486 * """
23487 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
23488 * cdef:
23489 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23490 */
23491 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__23491; goto __pyx_L1_error;}
23492 __Pyx_GOTREF(__pyx_t_2);
23493 __pyx_t_3 = NULL((void*)0);
23494 __pyx_t_4 = 0;
23495 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
23496 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
23497 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
23498 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
23499 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
23500 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
23501 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
23502 __pyx_t_4 = 1;
23503 }
23504 }
23505 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__23505; goto __pyx_L1_error;}
23506 __Pyx_GOTREF(__pyx_t_5);
23507 if (__pyx_t_3) {
23508 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
23509 }
23510 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
23511 __Pyx_GIVEREF(__pyx_v_name);
23512 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
23513 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
23514 __Pyx_GIVEREF(__pyx_n_s_name);
23515 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
23516 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__23516; goto __pyx_L1_error;}
23517 __Pyx_GOTREF(__pyx_t_1);
23518 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
23519 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23520 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
23521 __pyx_t_1 = 0;
23522
23523 /* "rbd.pyx":2134
23524 * name = cstr(name, 'name')
23525 * cdef:
23526 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
23527 * const char *_name = name
23528 * with nogil:
23529 */
23530 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2134; __pyx_clineno = __LINE__23530; goto __pyx_L1_error;}
23531 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2134; __pyx_clineno = __LINE__23531; goto __pyx_L1_error;}
23532 __pyx_v__ioctx = __pyx_t_6;
23533
23534 /* "rbd.pyx":2135
23535 * cdef:
23536 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23537 * const char *_name = name # <<<<<<<<<<<<<<
23538 * with nogil:
23539 * ret = rbd_namespace_create(_ioctx, _name)
23540 */
23541 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__23541; goto __pyx_L1_error;}
23542 __pyx_v__name = __pyx_t_7;
23543
23544 /* "rbd.pyx":2136
23545 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23546 * const char *_name = name
23547 * with nogil: # <<<<<<<<<<<<<<
23548 * ret = rbd_namespace_create(_ioctx, _name)
23549 * if ret != 0:
23550 */
23551 {
23552 #ifdef WITH_THREAD1
23553 PyThreadState *_save;
23554 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
23555 #endif
23556 /*try:*/ {
23557
23558 /* "rbd.pyx":2137
23559 * const char *_name = name
23560 * with nogil:
23561 * ret = rbd_namespace_create(_ioctx, _name) # <<<<<<<<<<<<<<
23562 * if ret != 0:
23563 * raise make_ex(ret, 'error creating namespace')
23564 */
23565 __pyx_v_ret = rbd_namespace_create(__pyx_v__ioctx, __pyx_v__name);
23566 }
23567
23568 /* "rbd.pyx":2136
23569 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23570 * const char *_name = name
23571 * with nogil: # <<<<<<<<<<<<<<
23572 * ret = rbd_namespace_create(_ioctx, _name)
23573 * if ret != 0:
23574 */
23575 /*finally:*/ {
23576 /*normal exit:*/{
23577 #ifdef WITH_THREAD1
23578 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
23579 #endif
23580 goto __pyx_L5;
23581 }
23582 __pyx_L5:;
23583 }
23584 }
23585
23586 /* "rbd.pyx":2138
23587 * with nogil:
23588 * ret = rbd_namespace_create(_ioctx, _name)
23589 * if ret != 0: # <<<<<<<<<<<<<<
23590 * raise make_ex(ret, 'error creating namespace')
23591 *
23592 */
23593 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
23594 if (__pyx_t_8) {
23595
23596 /* "rbd.pyx":2139
23597 * ret = rbd_namespace_create(_ioctx, _name)
23598 * if ret != 0:
23599 * raise make_ex(ret, 'error creating namespace') # <<<<<<<<<<<<<<
23600 *
23601 * def namespace_remove(self, ioctx, name):
23602 */
23603 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__23603; goto __pyx_L1_error;}
23604 __Pyx_GOTREF(__pyx_t_1);
23605 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_creating_namespace, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__23605; goto __pyx_L1_error;}
23606 __Pyx_GOTREF(__pyx_t_2);
23607 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
23608 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23609 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23610 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__23610; goto __pyx_L1_error;}
23611
23612 /* "rbd.pyx":2138
23613 * with nogil:
23614 * ret = rbd_namespace_create(_ioctx, _name)
23615 * if ret != 0: # <<<<<<<<<<<<<<
23616 * raise make_ex(ret, 'error creating namespace')
23617 *
23618 */
23619 }
23620
23621 /* "rbd.pyx":2123
23622 * raise make_ex(ret, 'error renaming group')
23623 *
23624 * def namespace_create(self, ioctx, name): # <<<<<<<<<<<<<<
23625 * """
23626 * Create an RBD namespace within a pool
23627 */
23628
23629 /* function exit code */
23630 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
23631 goto __pyx_L0;
23632 __pyx_L1_error:;
23633 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
23634 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
23635 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
23636 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
23637 __Pyx_AddTraceback("rbd.RBD.namespace_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
23638 __pyx_r = NULL((void*)0);
23639 __pyx_L0:;
23640 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
23641 __Pyx_XGIVEREF(__pyx_r);
23642 __Pyx_RefNannyFinishContext();
23643 return __pyx_r;
23644}
23645
23646/* "rbd.pyx":2141
23647 * raise make_ex(ret, 'error creating namespace')
23648 *
23649 * def namespace_remove(self, ioctx, name): # <<<<<<<<<<<<<<
23650 * """
23651 * Remove an RBD namespace from a pool
23652 */
23653
23654/* Python wrapper */
23655static PyObject *__pyx_pw_3rbd_3RBD_81namespace_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23656static char __pyx_doc_3rbd_3RBD_80namespace_remove[] = "RBD.namespace_remove(self, ioctx, name)\n\n Remove an RBD namespace from a pool\n\n :param ioctx: determines which RADOS pool\n :type ioctx: :class:`rados.Ioctx`\n :param name: namespace name\n :type name: str\n ";
23657static PyMethodDef __pyx_mdef_3rbd_3RBD_81namespace_remove = {"namespace_remove", (PyCFunction)__pyx_pw_3rbd_3RBD_81namespace_remove, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_80namespace_remove};
23658static PyObject *__pyx_pw_3rbd_3RBD_81namespace_remove(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23659 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
23660 PyObject *__pyx_v_ioctx = 0;
23661 PyObject *__pyx_v_name = 0;
23662 int __pyx_lineno = 0;
23663 const char *__pyx_filename = NULL((void*)0);
23664 int __pyx_clineno = 0;
23665 PyObject *__pyx_r = 0;
23666 __Pyx_RefNannyDeclarations
23667 __Pyx_RefNannySetupContext("namespace_remove (wrapper)", 0);
23668 {
23669 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,0};
23670 PyObject* values[3] = {0,0,0};
23671 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
23672 Py_ssize_t kw_args;
23673 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
23674 switch (pos_args) {
23675 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23676 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23677 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23678 case 0: break;
23679 default: goto __pyx_L5_argtuple_error;
23680 }
23681 kw_args = PyDict_Size(__pyx_kwds);
23682 switch (pos_args) {
23683 case 0:
23684 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
23685 else goto __pyx_L5_argtuple_error;
23686 case 1:
23687 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
23688 else {
23689 __Pyx_RaiseArgtupleInvalid("namespace_remove", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__23689; goto __pyx_L3_error;}
23690 }
23691 case 2:
23692 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
23693 else {
23694 __Pyx_RaiseArgtupleInvalid("namespace_remove", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__23694; goto __pyx_L3_error;}
23695 }
23696 }
23697 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
23698 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "namespace_remove") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "namespace_remove") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__23698; goto __pyx_L3_error;}
23699 }
23700 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
23701 goto __pyx_L5_argtuple_error;
23702 } else {
23703 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23704 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23705 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23706 }
23707 __pyx_v_self = values[0];
23708 __pyx_v_ioctx = values[1];
23709 __pyx_v_name = values[2];
23710 }
23711 goto __pyx_L4_argument_unpacking_done;
23712 __pyx_L5_argtuple_error:;
23713 __Pyx_RaiseArgtupleInvalid("namespace_remove", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__23713; goto __pyx_L3_error;}
23714 __pyx_L3_error:;
23715 __Pyx_AddTraceback("rbd.RBD.namespace_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
23716 __Pyx_RefNannyFinishContext();
23717 return NULL((void*)0);
23718 __pyx_L4_argument_unpacking_done:;
23719 __pyx_r = __pyx_pf_3rbd_3RBD_80namespace_remove(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name);
23720
23721 /* function exit code */
23722 __Pyx_RefNannyFinishContext();
23723 return __pyx_r;
23724}
23725
23726static PyObject *__pyx_pf_3rbd_3RBD_80namespace_remove(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name) {
23727 rados_ioctx_t __pyx_v__ioctx;
23728 char const *__pyx_v__name;
23729 int __pyx_v_ret;
23730 PyObject *__pyx_r = NULL((void*)0);
23731 __Pyx_RefNannyDeclarations
23732 PyObject *__pyx_t_1 = NULL((void*)0);
23733 PyObject *__pyx_t_2 = NULL((void*)0);
23734 PyObject *__pyx_t_3 = NULL((void*)0);
23735 Py_ssize_t __pyx_t_4;
23736 PyObject *__pyx_t_5 = NULL((void*)0);
23737 rados_ioctx_t __pyx_t_6;
23738 char const *__pyx_t_7;
23739 int __pyx_t_8;
23740 int __pyx_lineno = 0;
23741 const char *__pyx_filename = NULL((void*)0);
23742 int __pyx_clineno = 0;
23743 __Pyx_RefNannySetupContext("namespace_remove", 0);
23744 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
23745
23746 /* "rbd.pyx":2150
23747 * :type name: str
23748 * """
23749 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
23750 * cdef:
23751 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23752 */
23753 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2150; __pyx_clineno = __LINE__23753; goto __pyx_L1_error;}
23754 __Pyx_GOTREF(__pyx_t_2);
23755 __pyx_t_3 = NULL((void*)0);
23756 __pyx_t_4 = 0;
23757 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
23758 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
23759 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
23760 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
23761 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
23762 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
23763 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
23764 __pyx_t_4 = 1;
23765 }
23766 }
23767 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2150; __pyx_clineno = __LINE__23767; goto __pyx_L1_error;}
23768 __Pyx_GOTREF(__pyx_t_5);
23769 if (__pyx_t_3) {
23770 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
23771 }
23772 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
23773 __Pyx_GIVEREF(__pyx_v_name);
23774 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
23775 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
23776 __Pyx_GIVEREF(__pyx_n_s_name);
23777 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
23778 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2150; __pyx_clineno = __LINE__23778; goto __pyx_L1_error;}
23779 __Pyx_GOTREF(__pyx_t_1);
23780 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
23781 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23782 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
23783 __pyx_t_1 = 0;
23784
23785 /* "rbd.pyx":2152
23786 * name = cstr(name, 'name')
23787 * cdef:
23788 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
23789 * const char *_name = name
23790 * with nogil:
23791 */
23792 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__23792; goto __pyx_L1_error;}
23793 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__23793; goto __pyx_L1_error;}
23794 __pyx_v__ioctx = __pyx_t_6;
23795
23796 /* "rbd.pyx":2153
23797 * cdef:
23798 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23799 * const char *_name = name # <<<<<<<<<<<<<<
23800 * with nogil:
23801 * ret = rbd_namespace_remove(_ioctx, _name)
23802 */
23803 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__23803; goto __pyx_L1_error;}
23804 __pyx_v__name = __pyx_t_7;
23805
23806 /* "rbd.pyx":2154
23807 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23808 * const char *_name = name
23809 * with nogil: # <<<<<<<<<<<<<<
23810 * ret = rbd_namespace_remove(_ioctx, _name)
23811 * if ret != 0:
23812 */
23813 {
23814 #ifdef WITH_THREAD1
23815 PyThreadState *_save;
23816 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
23817 #endif
23818 /*try:*/ {
23819
23820 /* "rbd.pyx":2155
23821 * const char *_name = name
23822 * with nogil:
23823 * ret = rbd_namespace_remove(_ioctx, _name) # <<<<<<<<<<<<<<
23824 * if ret != 0:
23825 * raise make_ex(ret, 'error removing namespace')
23826 */
23827 __pyx_v_ret = rbd_namespace_remove(__pyx_v__ioctx, __pyx_v__name);
23828 }
23829
23830 /* "rbd.pyx":2154
23831 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
23832 * const char *_name = name
23833 * with nogil: # <<<<<<<<<<<<<<
23834 * ret = rbd_namespace_remove(_ioctx, _name)
23835 * if ret != 0:
23836 */
23837 /*finally:*/ {
23838 /*normal exit:*/{
23839 #ifdef WITH_THREAD1
23840 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
23841 #endif
23842 goto __pyx_L5;
23843 }
23844 __pyx_L5:;
23845 }
23846 }
23847
23848 /* "rbd.pyx":2156
23849 * with nogil:
23850 * ret = rbd_namespace_remove(_ioctx, _name)
23851 * if ret != 0: # <<<<<<<<<<<<<<
23852 * raise make_ex(ret, 'error removing namespace')
23853 *
23854 */
23855 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
23856 if (__pyx_t_8) {
23857
23858 /* "rbd.pyx":2157
23859 * ret = rbd_namespace_remove(_ioctx, _name)
23860 * if ret != 0:
23861 * raise make_ex(ret, 'error removing namespace') # <<<<<<<<<<<<<<
23862 *
23863 * def namespace_exists(self, ioctx, name):
23864 */
23865 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__23865; goto __pyx_L1_error;}
23866 __Pyx_GOTREF(__pyx_t_1);
23867 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_removing_namespace, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__23867; goto __pyx_L1_error;}
23868 __Pyx_GOTREF(__pyx_t_2);
23869 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
23870 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
23871 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
23872 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__23872; goto __pyx_L1_error;}
23873
23874 /* "rbd.pyx":2156
23875 * with nogil:
23876 * ret = rbd_namespace_remove(_ioctx, _name)
23877 * if ret != 0: # <<<<<<<<<<<<<<
23878 * raise make_ex(ret, 'error removing namespace')
23879 *
23880 */
23881 }
23882
23883 /* "rbd.pyx":2141
23884 * raise make_ex(ret, 'error creating namespace')
23885 *
23886 * def namespace_remove(self, ioctx, name): # <<<<<<<<<<<<<<
23887 * """
23888 * Remove an RBD namespace from a pool
23889 */
23890
23891 /* function exit code */
23892 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
23893 goto __pyx_L0;
23894 __pyx_L1_error:;
23895 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
23896 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
23897 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
23898 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
23899 __Pyx_AddTraceback("rbd.RBD.namespace_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
23900 __pyx_r = NULL((void*)0);
23901 __pyx_L0:;
23902 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
23903 __Pyx_XGIVEREF(__pyx_r);
23904 __Pyx_RefNannyFinishContext();
23905 return __pyx_r;
23906}
23907
23908/* "rbd.pyx":2159
23909 * raise make_ex(ret, 'error removing namespace')
23910 *
23911 * def namespace_exists(self, ioctx, name): # <<<<<<<<<<<<<<
23912 * """
23913 * Verifies if a namespace exists within a pool
23914 */
23915
23916/* Python wrapper */
23917static PyObject *__pyx_pw_3rbd_3RBD_83namespace_exists(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23918static char __pyx_doc_3rbd_3RBD_82namespace_exists[] = "RBD.namespace_exists(self, ioctx, name)\n\n Verifies if a namespace exists within a pool\n\n :param ioctx: determines which RADOS pool\n :type ioctx: :class:`rados.Ioctx`\n :param name: namespace name\n :type name: str\n :returns: bool - true if namespace exists\n ";
23919static PyMethodDef __pyx_mdef_3rbd_3RBD_83namespace_exists = {"namespace_exists", (PyCFunction)__pyx_pw_3rbd_3RBD_83namespace_exists, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_82namespace_exists};
23920static PyObject *__pyx_pw_3rbd_3RBD_83namespace_exists(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23921 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
23922 PyObject *__pyx_v_ioctx = 0;
23923 PyObject *__pyx_v_name = 0;
23924 int __pyx_lineno = 0;
23925 const char *__pyx_filename = NULL((void*)0);
23926 int __pyx_clineno = 0;
23927 PyObject *__pyx_r = 0;
23928 __Pyx_RefNannyDeclarations
23929 __Pyx_RefNannySetupContext("namespace_exists (wrapper)", 0);
23930 {
23931 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_name,0};
23932 PyObject* values[3] = {0,0,0};
23933 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
23934 Py_ssize_t kw_args;
23935 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
23936 switch (pos_args) {
23937 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23938 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23939 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23940 case 0: break;
23941 default: goto __pyx_L5_argtuple_error;
23942 }
23943 kw_args = PyDict_Size(__pyx_kwds);
23944 switch (pos_args) {
23945 case 0:
23946 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
23947 else goto __pyx_L5_argtuple_error;
23948 case 1:
23949 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
23950 else {
23951 __Pyx_RaiseArgtupleInvalid("namespace_exists", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__23951; goto __pyx_L3_error;}
23952 }
23953 case 2:
23954 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
23955 else {
23956 __Pyx_RaiseArgtupleInvalid("namespace_exists", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__23956; goto __pyx_L3_error;}
23957 }
23958 }
23959 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
23960 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "namespace_exists") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "namespace_exists") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__23960; goto __pyx_L3_error;}
23961 }
23962 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
23963 goto __pyx_L5_argtuple_error;
23964 } else {
23965 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
23966 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
23967 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
23968 }
23969 __pyx_v_self = values[0];
23970 __pyx_v_ioctx = values[1];
23971 __pyx_v_name = values[2];
23972 }
23973 goto __pyx_L4_argument_unpacking_done;
23974 __pyx_L5_argtuple_error:;
23975 __Pyx_RaiseArgtupleInvalid("namespace_exists", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__23975; goto __pyx_L3_error;}
23976 __pyx_L3_error:;
23977 __Pyx_AddTraceback("rbd.RBD.namespace_exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
23978 __Pyx_RefNannyFinishContext();
23979 return NULL((void*)0);
23980 __pyx_L4_argument_unpacking_done:;
23981 __pyx_r = __pyx_pf_3rbd_3RBD_82namespace_exists(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_name);
23982
23983 /* function exit code */
23984 __Pyx_RefNannyFinishContext();
23985 return __pyx_r;
23986}
23987
23988static PyObject *__pyx_pf_3rbd_3RBD_82namespace_exists(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name) {
23989 rados_ioctx_t __pyx_v__ioctx;
23990 char const *__pyx_v__name;
23991 int __pyx_v__exists;
23992 int __pyx_v_ret;
23993 PyObject *__pyx_r = NULL((void*)0);
23994 __Pyx_RefNannyDeclarations
23995 PyObject *__pyx_t_1 = NULL((void*)0);
23996 PyObject *__pyx_t_2 = NULL((void*)0);
23997 PyObject *__pyx_t_3 = NULL((void*)0);
23998 Py_ssize_t __pyx_t_4;
23999 PyObject *__pyx_t_5 = NULL((void*)0);
24000 rados_ioctx_t __pyx_t_6;
24001 char const *__pyx_t_7;
24002 int __pyx_t_8;
24003 int __pyx_lineno = 0;
24004 const char *__pyx_filename = NULL((void*)0);
24005 int __pyx_clineno = 0;
24006 __Pyx_RefNannySetupContext("namespace_exists", 0);
24007 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
24008
24009 /* "rbd.pyx":2169
24010 * :returns: bool - true if namespace exists
24011 * """
24012 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
24013 * cdef:
24014 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24015 */
24016 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; __pyx_clineno = __LINE__24016; goto __pyx_L1_error;}
24017 __Pyx_GOTREF(__pyx_t_2);
24018 __pyx_t_3 = NULL((void*)0);
24019 __pyx_t_4 = 0;
24020 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
24021 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
24022 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
24023 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
24024 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
24025 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
24026 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
24027 __pyx_t_4 = 1;
24028 }
24029 }
24030 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; __pyx_clineno = __LINE__24030; goto __pyx_L1_error;}
24031 __Pyx_GOTREF(__pyx_t_5);
24032 if (__pyx_t_3) {
24033 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
24034 }
24035 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
24036 __Pyx_GIVEREF(__pyx_v_name);
24037 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
24038 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
24039 __Pyx_GIVEREF(__pyx_n_s_name);
24040 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
24041 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; __pyx_clineno = __LINE__24041; goto __pyx_L1_error;}
24042 __Pyx_GOTREF(__pyx_t_1);
24043 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
24044 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
24045 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
24046 __pyx_t_1 = 0;
24047
24048 /* "rbd.pyx":2171
24049 * name = cstr(name, 'name')
24050 * cdef:
24051 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
24052 * const char *_name = name
24053 * bint _exists = False
24054 */
24055 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; __pyx_clineno = __LINE__24055; goto __pyx_L1_error;}
24056 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; __pyx_clineno = __LINE__24056; goto __pyx_L1_error;}
24057 __pyx_v__ioctx = __pyx_t_6;
24058
24059 /* "rbd.pyx":2172
24060 * cdef:
24061 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24062 * const char *_name = name # <<<<<<<<<<<<<<
24063 * bint _exists = False
24064 * with nogil:
24065 */
24066 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2172; __pyx_clineno = __LINE__24066; goto __pyx_L1_error;}
24067 __pyx_v__name = __pyx_t_7;
24068
24069 /* "rbd.pyx":2173
24070 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24071 * const char *_name = name
24072 * bint _exists = False # <<<<<<<<<<<<<<
24073 * with nogil:
24074 * ret = rbd_namespace_exists(_ioctx, _name, &_exists)
24075 */
24076 __pyx_v__exists = 0;
24077
24078 /* "rbd.pyx":2174
24079 * const char *_name = name
24080 * bint _exists = False
24081 * with nogil: # <<<<<<<<<<<<<<
24082 * ret = rbd_namespace_exists(_ioctx, _name, &_exists)
24083 * if ret != 0:
24084 */
24085 {
24086 #ifdef WITH_THREAD1
24087 PyThreadState *_save;
24088 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
24089 #endif
24090 /*try:*/ {
24091
24092 /* "rbd.pyx":2175
24093 * bint _exists = False
24094 * with nogil:
24095 * ret = rbd_namespace_exists(_ioctx, _name, &_exists) # <<<<<<<<<<<<<<
24096 * if ret != 0:
24097 * raise make_ex(ret, 'error verifying namespace')
24098 */
24099 __pyx_v_ret = rbd_namespace_exists(__pyx_v__ioctx, __pyx_v__name, (&__pyx_v__exists));
24100 }
24101
24102 /* "rbd.pyx":2174
24103 * const char *_name = name
24104 * bint _exists = False
24105 * with nogil: # <<<<<<<<<<<<<<
24106 * ret = rbd_namespace_exists(_ioctx, _name, &_exists)
24107 * if ret != 0:
24108 */
24109 /*finally:*/ {
24110 /*normal exit:*/{
24111 #ifdef WITH_THREAD1
24112 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
24113 #endif
24114 goto __pyx_L5;
24115 }
24116 __pyx_L5:;
24117 }
24118 }
24119
24120 /* "rbd.pyx":2176
24121 * with nogil:
24122 * ret = rbd_namespace_exists(_ioctx, _name, &_exists)
24123 * if ret != 0: # <<<<<<<<<<<<<<
24124 * raise make_ex(ret, 'error verifying namespace')
24125 * return bool(_exists != 0)
24126 */
24127 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
24128 if (__pyx_t_8) {
24129
24130 /* "rbd.pyx":2177
24131 * ret = rbd_namespace_exists(_ioctx, _name, &_exists)
24132 * if ret != 0:
24133 * raise make_ex(ret, 'error verifying namespace') # <<<<<<<<<<<<<<
24134 * return bool(_exists != 0)
24135 *
24136 */
24137 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __pyx_clineno = __LINE__24137; goto __pyx_L1_error;}
24138 __Pyx_GOTREF(__pyx_t_1);
24139 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_verifying_namespace, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __pyx_clineno = __LINE__24139; goto __pyx_L1_error;}
24140 __Pyx_GOTREF(__pyx_t_2);
24141 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
24142 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
24143 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
24144 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2177; __pyx_clineno = __LINE__24144; goto __pyx_L1_error;}
24145
24146 /* "rbd.pyx":2176
24147 * with nogil:
24148 * ret = rbd_namespace_exists(_ioctx, _name, &_exists)
24149 * if ret != 0: # <<<<<<<<<<<<<<
24150 * raise make_ex(ret, 'error verifying namespace')
24151 * return bool(_exists != 0)
24152 */
24153 }
24154
24155 /* "rbd.pyx":2178
24156 * if ret != 0:
24157 * raise make_ex(ret, 'error verifying namespace')
24158 * return bool(_exists != 0) # <<<<<<<<<<<<<<
24159 *
24160 * def namespace_list(self, ioctx):
24161 */
24162 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
24163 __pyx_t_8 = (__pyx_v__exists != 0);
24164 __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_8)))(((!(!__pyx_t_8))) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct
)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (
( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; __pyx_clineno = __LINE__24164; goto __pyx_L1_error;}
24165 __Pyx_GOTREF(__pyx_t_2);
24166 __pyx_r = __pyx_t_2;
24167 __pyx_t_2 = 0;
24168 goto __pyx_L0;
24169
24170 /* "rbd.pyx":2159
24171 * raise make_ex(ret, 'error removing namespace')
24172 *
24173 * def namespace_exists(self, ioctx, name): # <<<<<<<<<<<<<<
24174 * """
24175 * Verifies if a namespace exists within a pool
24176 */
24177
24178 /* function exit code */
24179 __pyx_L1_error:;
24180 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
24181 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
24182 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
24183 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
24184 __Pyx_AddTraceback("rbd.RBD.namespace_exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
24185 __pyx_r = NULL((void*)0);
24186 __pyx_L0:;
24187 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
24188 __Pyx_XGIVEREF(__pyx_r);
24189 __Pyx_RefNannyFinishContext();
24190 return __pyx_r;
24191}
24192
24193/* "rbd.pyx":2180
24194 * return bool(_exists != 0)
24195 *
24196 * def namespace_list(self, ioctx): # <<<<<<<<<<<<<<
24197 * """
24198 * List all namespaces within a pool
24199 */
24200
24201/* Python wrapper */
24202static PyObject *__pyx_pw_3rbd_3RBD_85namespace_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24203static char __pyx_doc_3rbd_3RBD_84namespace_list[] = "RBD.namespace_list(self, ioctx)\n\n List all namespaces within a pool\n\n :param ioctx: determines which RADOS pool\n :type ioctx: :class:`rados.Ioctx`\n :returns: list - collection of namespace names\n ";
24204static PyMethodDef __pyx_mdef_3rbd_3RBD_85namespace_list = {"namespace_list", (PyCFunction)__pyx_pw_3rbd_3RBD_85namespace_list, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_84namespace_list};
24205static PyObject *__pyx_pw_3rbd_3RBD_85namespace_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24206 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
24207 PyObject *__pyx_v_ioctx = 0;
24208 int __pyx_lineno = 0;
24209 const char *__pyx_filename = NULL((void*)0);
24210 int __pyx_clineno = 0;
24211 PyObject *__pyx_r = 0;
24212 __Pyx_RefNannyDeclarations
24213 __Pyx_RefNannySetupContext("namespace_list (wrapper)", 0);
24214 {
24215 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
24216 PyObject* values[2] = {0,0};
24217 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
24218 Py_ssize_t kw_args;
24219 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
24220 switch (pos_args) {
24221 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
24222 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
24223 case 0: break;
24224 default: goto __pyx_L5_argtuple_error;
24225 }
24226 kw_args = PyDict_Size(__pyx_kwds);
24227 switch (pos_args) {
24228 case 0:
24229 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
24230 else goto __pyx_L5_argtuple_error;
24231 case 1:
24232 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
24233 else {
24234 __Pyx_RaiseArgtupleInvalid("namespace_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__24234; goto __pyx_L3_error;}
24235 }
24236 }
24237 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
24238 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "namespace_list") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "namespace_list") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__24238; goto __pyx_L3_error;}
24239 }
24240 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
24241 goto __pyx_L5_argtuple_error;
24242 } else {
24243 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
24244 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
24245 }
24246 __pyx_v_self = values[0];
24247 __pyx_v_ioctx = values[1];
24248 }
24249 goto __pyx_L4_argument_unpacking_done;
24250 __pyx_L5_argtuple_error:;
24251 __Pyx_RaiseArgtupleInvalid("namespace_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__24251; goto __pyx_L3_error;}
24252 __pyx_L3_error:;
24253 __Pyx_AddTraceback("rbd.RBD.namespace_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
24254 __Pyx_RefNannyFinishContext();
24255 return NULL((void*)0);
24256 __pyx_L4_argument_unpacking_done:;
24257 __pyx_r = __pyx_pf_3rbd_3RBD_84namespace_list(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
24258
24259 /* function exit code */
24260 __Pyx_RefNannyFinishContext();
24261 return __pyx_r;
24262}
24263
24264static PyObject *__pyx_pf_3rbd_3RBD_84namespace_list(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
24265 rados_ioctx_t __pyx_v__ioctx;
24266 char *__pyx_v__names;
24267 size_t __pyx_v__size;
24268 int __pyx_v_ret;
24269 PyObject *__pyx_v_name = NULL((void*)0);
24270 PyObject *__pyx_r = NULL((void*)0);
24271 __Pyx_RefNannyDeclarations
24272 rados_ioctx_t __pyx_t_1;
24273 void *__pyx_t_2;
24274 int __pyx_t_3;
24275 PyObject *__pyx_t_4 = NULL((void*)0);
24276 PyObject *__pyx_t_5 = NULL((void*)0);
24277 PyObject *__pyx_t_6 = NULL((void*)0);
24278 Py_ssize_t __pyx_t_7;
24279 PyObject *(*__pyx_t_8)(PyObject *);
24280 PyObject *__pyx_t_9 = NULL((void*)0);
24281 PyObject *__pyx_t_10 = NULL((void*)0);
24282 PyObject *__pyx_t_11 = NULL((void*)0);
24283 int __pyx_t_12;
24284 int __pyx_t_13;
24285 char const *__pyx_t_14;
24286 PyObject *__pyx_t_15 = NULL((void*)0);
24287 PyObject *__pyx_t_16 = NULL((void*)0);
24288 PyObject *__pyx_t_17 = NULL((void*)0);
24289 PyObject *__pyx_t_18 = NULL((void*)0);
24290 PyObject *__pyx_t_19 = NULL((void*)0);
24291 PyObject *__pyx_t_20 = NULL((void*)0);
24292 int __pyx_lineno = 0;
24293 const char *__pyx_filename = NULL((void*)0);
24294 int __pyx_clineno = 0;
24295 __Pyx_RefNannySetupContext("namespace_list", 0);
24296
24297 /* "rbd.pyx":2189
24298 * """
24299 * cdef:
24300 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
24301 * char *_names = NULL
24302 * size_t _size = 512
24303 */
24304 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__24304; goto __pyx_L1_error;}
24305 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__24305; goto __pyx_L1_error;}
24306 __pyx_v__ioctx = __pyx_t_1;
24307
24308 /* "rbd.pyx":2190
24309 * cdef:
24310 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24311 * char *_names = NULL # <<<<<<<<<<<<<<
24312 * size_t _size = 512
24313 * try:
24314 */
24315 __pyx_v__names = NULL((void*)0);
24316
24317 /* "rbd.pyx":2191
24318 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24319 * char *_names = NULL
24320 * size_t _size = 512 # <<<<<<<<<<<<<<
24321 * try:
24322 * while True:
24323 */
24324 __pyx_v__size = 0x200;
24325
24326 /* "rbd.pyx":2192
24327 * char *_names = NULL
24328 * size_t _size = 512
24329 * try: # <<<<<<<<<<<<<<
24330 * while True:
24331 * _names = <char *>realloc_chk(_names, _size)
24332 */
24333 /*try:*/ {
24334
24335 /* "rbd.pyx":2193
24336 * size_t _size = 512
24337 * try:
24338 * while True: # <<<<<<<<<<<<<<
24339 * _names = <char *>realloc_chk(_names, _size)
24340 * with nogil:
24341 */
24342 while (1) {
24343
24344 /* "rbd.pyx":2194
24345 * try:
24346 * while True:
24347 * _names = <char *>realloc_chk(_names, _size) # <<<<<<<<<<<<<<
24348 * with nogil:
24349 * ret = rbd_namespace_list(_ioctx, _names, &_size)
24350 */
24351 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v__names, __pyx_v__size); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__24351; goto __pyx_L4_error;}
24352 __pyx_v__names = ((char *)__pyx_t_2);
24353
24354 /* "rbd.pyx":2195
24355 * while True:
24356 * _names = <char *>realloc_chk(_names, _size)
24357 * with nogil: # <<<<<<<<<<<<<<
24358 * ret = rbd_namespace_list(_ioctx, _names, &_size)
24359 * if ret >= 0:
24360 */
24361 {
24362 #ifdef WITH_THREAD1
24363 PyThreadState *_save;
24364 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
24365 #endif
24366 /*try:*/ {
24367
24368 /* "rbd.pyx":2196
24369 * _names = <char *>realloc_chk(_names, _size)
24370 * with nogil:
24371 * ret = rbd_namespace_list(_ioctx, _names, &_size) # <<<<<<<<<<<<<<
24372 * if ret >= 0:
24373 * break
24374 */
24375 __pyx_v_ret = rbd_namespace_list(__pyx_v__ioctx, __pyx_v__names, (&__pyx_v__size));
24376 }
24377
24378 /* "rbd.pyx":2195
24379 * while True:
24380 * _names = <char *>realloc_chk(_names, _size)
24381 * with nogil: # <<<<<<<<<<<<<<
24382 * ret = rbd_namespace_list(_ioctx, _names, &_size)
24383 * if ret >= 0:
24384 */
24385 /*finally:*/ {
24386 /*normal exit:*/{
24387 #ifdef WITH_THREAD1
24388 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
24389 #endif
24390 goto __pyx_L12;
24391 }
24392 __pyx_L12:;
24393 }
24394 }
24395
24396 /* "rbd.pyx":2197
24397 * with nogil:
24398 * ret = rbd_namespace_list(_ioctx, _names, &_size)
24399 * if ret >= 0: # <<<<<<<<<<<<<<
24400 * break
24401 * elif ret != -errno.ERANGE:
24402 */
24403 __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
24404 if (__pyx_t_3) {
24405
24406 /* "rbd.pyx":2198
24407 * ret = rbd_namespace_list(_ioctx, _names, &_size)
24408 * if ret >= 0:
24409 * break # <<<<<<<<<<<<<<
24410 * elif ret != -errno.ERANGE:
24411 * raise make_ex(ret, 'error listing namespaces')
24412 */
24413 goto __pyx_L7_break;
24414
24415 /* "rbd.pyx":2197
24416 * with nogil:
24417 * ret = rbd_namespace_list(_ioctx, _names, &_size)
24418 * if ret >= 0: # <<<<<<<<<<<<<<
24419 * break
24420 * elif ret != -errno.ERANGE:
24421 */
24422 }
24423
24424 /* "rbd.pyx":2199
24425 * if ret >= 0:
24426 * break
24427 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
24428 * raise make_ex(ret, 'error listing namespaces')
24429 * return [decode_cstr(name) for name in _names[:_size].split(b'\0')
24430 */
24431 __pyx_t_3 = ((__pyx_v_ret != (-ERANGE34)) != 0);
24432 if (__pyx_t_3) {
24433
24434 /* "rbd.pyx":2200
24435 * break
24436 * elif ret != -errno.ERANGE:
24437 * raise make_ex(ret, 'error listing namespaces') # <<<<<<<<<<<<<<
24438 * return [decode_cstr(name) for name in _names[:_size].split(b'\0')
24439 * if name]
24440 */
24441 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2200; __pyx_clineno = __LINE__24441; goto __pyx_L4_error;}
24442 __Pyx_GOTREF(__pyx_t_4);
24443 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_namespaces, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2200; __pyx_clineno = __LINE__24443; goto __pyx_L4_error;}
24444 __Pyx_GOTREF(__pyx_t_5);
24445 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
24446 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
24447 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
24448 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2200; __pyx_clineno = __LINE__24448; goto __pyx_L4_error;}
24449
24450 /* "rbd.pyx":2199
24451 * if ret >= 0:
24452 * break
24453 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
24454 * raise make_ex(ret, 'error listing namespaces')
24455 * return [decode_cstr(name) for name in _names[:_size].split(b'\0')
24456 */
24457 }
24458 }
24459 __pyx_L7_break:;
24460
24461 /* "rbd.pyx":2201
24462 * elif ret != -errno.ERANGE:
24463 * raise make_ex(ret, 'error listing namespaces')
24464 * return [decode_cstr(name) for name in _names[:_size].split(b'\0') # <<<<<<<<<<<<<<
24465 * if name]
24466 * finally:
24467 */
24468 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
24469 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24469; goto __pyx_L4_error;}
24470 __Pyx_GOTREF(__pyx_t_5);
24471 __pyx_t_4 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v__names + 0, __pyx_v__size - 0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24471; goto __pyx_L4_error;}
24472 __Pyx_GOTREF(__pyx_t_4);
24473 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24473; goto __pyx_L4_error;}
24474 __Pyx_GOTREF(__pyx_t_6);
24475 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
24476 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__12, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24476; goto __pyx_L4_error;}
24477 __Pyx_GOTREF(__pyx_t_4);
24478 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
24479 if (likely(PyList_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_4)((((PyObject*)(__pyx_t_4))->ob_type) == &PyTuple_Type)) {
24480 __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++); __pyx_t_7 = 0;
24481 __pyx_t_8 = NULL((void*)0);
24482 } else {
24483 __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24483; goto __pyx_L4_error;}
24484 __Pyx_GOTREF(__pyx_t_6);
24485 __pyx_t_8 = Py_TYPE(__pyx_t_6)(((PyObject*)(__pyx_t_6))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24485; goto __pyx_L4_error;}
24486 }
24487 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
24488 for (;;) {
24489 if (likely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 1)) {
24490 if (likely(PyList_CheckExact(__pyx_t_6))__builtin_expect(!!(((((PyObject*)(__pyx_t_6))->ob_type) ==
&PyList_Type)), 1)
) {
24491 if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)(((PyVarObject*)(__pyx_t_6))->ob_size)) break;
24492 #if CYTHON_COMPILING_IN_CPYTHON1
24493 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7)(((PyListObject *)(__pyx_t_6))->ob_item[__pyx_t_7]); __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_7++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24493; goto __pyx_L4_error;}
24494 #else
24495 __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7)( (((PyObject*)(__pyx_t_6))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_6, __pyx_t_7) )
; __pyx_t_7++; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24495; goto __pyx_L4_error;}
24496 __Pyx_GOTREF(__pyx_t_4);
24497 #endif
24498 } else {
24499 if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)(((PyVarObject*)(__pyx_t_6))->ob_size)) break;
24500 #if CYTHON_COMPILING_IN_CPYTHON1
24501 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7)(((PyTupleObject *)(__pyx_t_6))->ob_item[__pyx_t_7]); __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_7++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24501; goto __pyx_L4_error;}
24502 #else
24503 __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_7)( (((PyObject*)(__pyx_t_6))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_6, __pyx_t_7) )
; __pyx_t_7++; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24503; goto __pyx_L4_error;}
24504 __Pyx_GOTREF(__pyx_t_4);
24505 #endif
24506 }
24507 } else {
24508 __pyx_t_4 = __pyx_t_8(__pyx_t_6);
24509 if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {
24510 PyObject* exc_type = PyErr_Occurred();
24511 if (exc_type) {
24512 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
24513 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24513; goto __pyx_L4_error;}
24514 }
24515 break;
24516 }
24517 __Pyx_GOTREF(__pyx_t_4);
24518 }
24519 __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_4; do { if ((tmp) == ((void*)0)) ; else do { if ( --
((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0); } while (0); } while (
0)
;
24520 __pyx_t_4 = 0;
24521
24522 /* "rbd.pyx":2202
24523 * raise make_ex(ret, 'error listing namespaces')
24524 * return [decode_cstr(name) for name in _names[:_size].split(b'\0')
24525 * if name] # <<<<<<<<<<<<<<
24526 * finally:
24527 * free(_names)
24528 */
24529 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely(__pyx_t_3 < 0)__builtin_expect(!!(__pyx_t_3 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __pyx_clineno = __LINE__24529; goto __pyx_L4_error;}
24530 if (__pyx_t_3) {
24531
24532 /* "rbd.pyx":2201
24533 * elif ret != -errno.ERANGE:
24534 * raise make_ex(ret, 'error listing namespaces')
24535 * return [decode_cstr(name) for name in _names[:_size].split(b'\0') # <<<<<<<<<<<<<<
24536 * if name]
24537 * finally:
24538 */
24539 __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24539; goto __pyx_L4_error;}
24540 __Pyx_GOTREF(__pyx_t_9);
24541 __pyx_t_10 = NULL((void*)0);
24542 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_9))__builtin_expect(!!(((__pyx_t_9)->ob_type == &PyMethod_Type
)), 0)
) {
24543 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_self);
24544 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
24545 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_func);
24546 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
24547 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
24548 __Pyx_DECREF_SET(__pyx_t_9, function)do { PyObject *tmp = (PyObject *) __pyx_t_9; __pyx_t_9 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
24549 }
24550 }
24551 if (!__pyx_t_10) {
24552 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_name); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24552; goto __pyx_L4_error;}
24553 __Pyx_GOTREF(__pyx_t_4);
24554 } else {
24555 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24555; goto __pyx_L4_error;}
24556 __Pyx_GOTREF(__pyx_t_11);
24557 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
24558 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
24559 __Pyx_GIVEREF(__pyx_v_name);
24560 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_v_name
)
;
24561 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24561; goto __pyx_L4_error;}
24562 __Pyx_GOTREF(__pyx_t_4);
24563 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
24564 }
24565 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
24566 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_5, (PyObject
*)__pyx_t_4)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__24566; goto __pyx_L4_error;}
24567 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
24568
24569 /* "rbd.pyx":2202
24570 * raise make_ex(ret, 'error listing namespaces')
24571 * return [decode_cstr(name) for name in _names[:_size].split(b'\0')
24572 * if name] # <<<<<<<<<<<<<<
24573 * finally:
24574 * free(_names)
24575 */
24576 }
24577
24578 /* "rbd.pyx":2201
24579 * elif ret != -errno.ERANGE:
24580 * raise make_ex(ret, 'error listing namespaces')
24581 * return [decode_cstr(name) for name in _names[:_size].split(b'\0') # <<<<<<<<<<<<<<
24582 * if name]
24583 * finally:
24584 */
24585 }
24586 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
24587 __pyx_r = __pyx_t_5;
24588 __pyx_t_5 = 0;
24589 goto __pyx_L3_return;
24590 }
24591
24592 /* "rbd.pyx":2204
24593 * if name]
24594 * finally:
24595 * free(_names) # <<<<<<<<<<<<<<
24596 *
24597 * def pool_init(self, ioctx, force):
24598 */
24599 /*finally:*/ {
24600 /*exception exit:*/{
24601 __pyx_L4_error:;
24602 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
24603 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
24604 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
24605 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
24606 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
24607 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
24608 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
24609 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
24610 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
24611 __Pyx_XGOTREF(__pyx_t_15);
24612 __Pyx_XGOTREF(__pyx_t_16);
24613 __Pyx_XGOTREF(__pyx_t_17);
24614 __Pyx_XGOTREF(__pyx_t_18);
24615 __Pyx_XGOTREF(__pyx_t_19);
24616 __Pyx_XGOTREF(__pyx_t_20);
24617 __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
24618 {
24619 free(__pyx_v__names);
24620 }
24621 if (PY_MAJOR_VERSION2 >= 3) {
24622 __Pyx_XGIVEREF(__pyx_t_18);
24623 __Pyx_XGIVEREF(__pyx_t_19);
24624 __Pyx_XGIVEREF(__pyx_t_20);
24625 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
24626 }
24627 __Pyx_XGIVEREF(__pyx_t_15);
24628 __Pyx_XGIVEREF(__pyx_t_16);
24629 __Pyx_XGIVEREF(__pyx_t_17);
24630 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
24631 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
24632 __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
24633 goto __pyx_L1_error;
24634 }
24635 __pyx_L3_return: {
24636 __pyx_t_20 = __pyx_r;
24637 __pyx_r = 0;
24638 free(__pyx_v__names);
24639 __pyx_r = __pyx_t_20;
24640 __pyx_t_20 = 0;
24641 goto __pyx_L0;
24642 }
24643 }
24644
24645 /* "rbd.pyx":2180
24646 * return bool(_exists != 0)
24647 *
24648 * def namespace_list(self, ioctx): # <<<<<<<<<<<<<<
24649 * """
24650 * List all namespaces within a pool
24651 */
24652
24653 /* function exit code */
24654 __pyx_L1_error:;
24655 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
24656 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
24657 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
24658 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
24659 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
24660 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
24661 __Pyx_AddTraceback("rbd.RBD.namespace_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
24662 __pyx_r = NULL((void*)0);
24663 __pyx_L0:;
24664 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
24665 __Pyx_XGIVEREF(__pyx_r);
24666 __Pyx_RefNannyFinishContext();
24667 return __pyx_r;
24668}
24669
24670/* "rbd.pyx":2206
24671 * free(_names)
24672 *
24673 * def pool_init(self, ioctx, force): # <<<<<<<<<<<<<<
24674 * """
24675 * Initialize an RBD pool
24676 */
24677
24678/* Python wrapper */
24679static PyObject *__pyx_pw_3rbd_3RBD_87pool_init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24680static char __pyx_doc_3rbd_3RBD_86pool_init[] = "RBD.pool_init(self, ioctx, force)\n\n Initialize an RBD pool\n :param ioctx: determines which RADOS pool\n :type ioctx: :class:`rados.Ioctx`\n :param force: force init\n :type force: bool\n ";
24681static PyMethodDef __pyx_mdef_3rbd_3RBD_87pool_init = {"pool_init", (PyCFunction)__pyx_pw_3rbd_3RBD_87pool_init, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_86pool_init};
24682static PyObject *__pyx_pw_3rbd_3RBD_87pool_init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24683 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
24684 PyObject *__pyx_v_ioctx = 0;
24685 PyObject *__pyx_v_force = 0;
24686 int __pyx_lineno = 0;
24687 const char *__pyx_filename = NULL((void*)0);
24688 int __pyx_clineno = 0;
24689 PyObject *__pyx_r = 0;
24690 __Pyx_RefNannyDeclarations
24691 __Pyx_RefNannySetupContext("pool_init (wrapper)", 0);
24692 {
24693 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,&__pyx_n_s_force,0};
24694 PyObject* values[3] = {0,0,0};
24695 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
24696 Py_ssize_t kw_args;
24697 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
24698 switch (pos_args) {
24699 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
24700 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
24701 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
24702 case 0: break;
24703 default: goto __pyx_L5_argtuple_error;
24704 }
24705 kw_args = PyDict_Size(__pyx_kwds);
24706 switch (pos_args) {
24707 case 0:
24708 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
24709 else goto __pyx_L5_argtuple_error;
24710 case 1:
24711 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
24712 else {
24713 __Pyx_RaiseArgtupleInvalid("pool_init", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__24713; goto __pyx_L3_error;}
24714 }
24715 case 2:
24716 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force
)) != 0), 1)
) kw_args--;
24717 else {
24718 __Pyx_RaiseArgtupleInvalid("pool_init", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__24718; goto __pyx_L3_error;}
24719 }
24720 }
24721 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
24722 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pool_init") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "pool_init") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__24722; goto __pyx_L3_error;}
24723 }
24724 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
24725 goto __pyx_L5_argtuple_error;
24726 } else {
24727 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
24728 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
24729 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
24730 }
24731 __pyx_v_self = values[0];
24732 __pyx_v_ioctx = values[1];
24733 __pyx_v_force = values[2];
24734 }
24735 goto __pyx_L4_argument_unpacking_done;
24736 __pyx_L5_argtuple_error:;
24737 __Pyx_RaiseArgtupleInvalid("pool_init", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__24737; goto __pyx_L3_error;}
24738 __pyx_L3_error:;
24739 __Pyx_AddTraceback("rbd.RBD.pool_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
24740 __Pyx_RefNannyFinishContext();
24741 return NULL((void*)0);
24742 __pyx_L4_argument_unpacking_done:;
24743 __pyx_r = __pyx_pf_3rbd_3RBD_86pool_init(__pyx_self, __pyx_v_self, __pyx_v_ioctx, __pyx_v_force);
24744
24745 /* function exit code */
24746 __Pyx_RefNannyFinishContext();
24747 return __pyx_r;
24748}
24749
24750static PyObject *__pyx_pf_3rbd_3RBD_86pool_init(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_force) {
24751 rados_ioctx_t __pyx_v__ioctx;
24752 int __pyx_v__force;
24753 int __pyx_v_ret;
24754 PyObject *__pyx_r = NULL((void*)0);
24755 __Pyx_RefNannyDeclarations
24756 rados_ioctx_t __pyx_t_1;
24757 int __pyx_t_2;
24758 PyObject *__pyx_t_3 = NULL((void*)0);
24759 PyObject *__pyx_t_4 = NULL((void*)0);
24760 int __pyx_lineno = 0;
24761 const char *__pyx_filename = NULL((void*)0);
24762 int __pyx_clineno = 0;
24763 __Pyx_RefNannySetupContext("pool_init", 0);
24764
24765 /* "rbd.pyx":2215
24766 * """
24767 * cdef:
24768 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
24769 * bint _force = force
24770 * with nogil:
24771 */
24772 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__24772; goto __pyx_L1_error;}
24773 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__24773; goto __pyx_L1_error;}
24774 __pyx_v__ioctx = __pyx_t_1;
24775
24776 /* "rbd.pyx":2216
24777 * cdef:
24778 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24779 * bint _force = force # <<<<<<<<<<<<<<
24780 * with nogil:
24781 * ret = rbd_pool_init(_ioctx, _force)
24782 */
24783 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_2 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2216; __pyx_clineno = __LINE__24783; goto __pyx_L1_error;}
24784 __pyx_v__force = __pyx_t_2;
24785
24786 /* "rbd.pyx":2217
24787 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24788 * bint _force = force
24789 * with nogil: # <<<<<<<<<<<<<<
24790 * ret = rbd_pool_init(_ioctx, _force)
24791 * if ret != 0:
24792 */
24793 {
24794 #ifdef WITH_THREAD1
24795 PyThreadState *_save;
24796 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
24797 #endif
24798 /*try:*/ {
24799
24800 /* "rbd.pyx":2218
24801 * bint _force = force
24802 * with nogil:
24803 * ret = rbd_pool_init(_ioctx, _force) # <<<<<<<<<<<<<<
24804 * if ret != 0:
24805 * raise make_ex(ret, 'error initializing pool')
24806 */
24807 __pyx_v_ret = rbd_pool_init(__pyx_v__ioctx, __pyx_v__force);
24808 }
24809
24810 /* "rbd.pyx":2217
24811 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
24812 * bint _force = force
24813 * with nogil: # <<<<<<<<<<<<<<
24814 * ret = rbd_pool_init(_ioctx, _force)
24815 * if ret != 0:
24816 */
24817 /*finally:*/ {
24818 /*normal exit:*/{
24819 #ifdef WITH_THREAD1
24820 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
24821 #endif
24822 goto __pyx_L5;
24823 }
24824 __pyx_L5:;
24825 }
24826 }
24827
24828 /* "rbd.pyx":2219
24829 * with nogil:
24830 * ret = rbd_pool_init(_ioctx, _force)
24831 * if ret != 0: # <<<<<<<<<<<<<<
24832 * raise make_ex(ret, 'error initializing pool')
24833 *
24834 */
24835 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
24836 if (__pyx_t_2) {
24837
24838 /* "rbd.pyx":2220
24839 * ret = rbd_pool_init(_ioctx, _force)
24840 * if ret != 0:
24841 * raise make_ex(ret, 'error initializing pool') # <<<<<<<<<<<<<<
24842 *
24843 * def pool_stats_get(self, ioctx):
24844 */
24845 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__24845; goto __pyx_L1_error;}
24846 __Pyx_GOTREF(__pyx_t_3);
24847 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_initializing_pool, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__24847; goto __pyx_L1_error;}
24848 __Pyx_GOTREF(__pyx_t_4);
24849 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
24850 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
24851 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
24852 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2220; __pyx_clineno = __LINE__24852; goto __pyx_L1_error;}
24853
24854 /* "rbd.pyx":2219
24855 * with nogil:
24856 * ret = rbd_pool_init(_ioctx, _force)
24857 * if ret != 0: # <<<<<<<<<<<<<<
24858 * raise make_ex(ret, 'error initializing pool')
24859 *
24860 */
24861 }
24862
24863 /* "rbd.pyx":2206
24864 * free(_names)
24865 *
24866 * def pool_init(self, ioctx, force): # <<<<<<<<<<<<<<
24867 * """
24868 * Initialize an RBD pool
24869 */
24870
24871 /* function exit code */
24872 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
24873 goto __pyx_L0;
24874 __pyx_L1_error:;
24875 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
24876 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
24877 __Pyx_AddTraceback("rbd.RBD.pool_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
24878 __pyx_r = NULL((void*)0);
24879 __pyx_L0:;
24880 __Pyx_XGIVEREF(__pyx_r);
24881 __Pyx_RefNannyFinishContext();
24882 return __pyx_r;
24883}
24884
24885/* "rbd.pyx":2222
24886 * raise make_ex(ret, 'error initializing pool')
24887 *
24888 * def pool_stats_get(self, ioctx): # <<<<<<<<<<<<<<
24889 * """
24890 * Return RBD pool stats
24891 */
24892
24893/* Python wrapper */
24894static PyObject *__pyx_pw_3rbd_3RBD_89pool_stats_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
24895static char __pyx_doc_3rbd_3RBD_88pool_stats_get[] = "RBD.pool_stats_get(self, ioctx)\n\n Return RBD pool stats\n\n :param ioctx: determines which RADOS pool\n :type ioctx: :class:`rados.Ioctx`\n :returns: dict - contains the following keys:\n\n * ``image_count`` (int) - image count\n\n * ``image_provisioned_bytes`` (int) - image total HEAD provisioned bytes\n\n * ``image_max_provisioned_bytes`` (int) - image total max provisioned bytes\n\n * ``image_snap_count`` (int) - image snap count\n\n * ``trash_count`` (int) - trash image count\n\n * ``trash_provisioned_bytes`` (int) - trash total HEAD provisioned bytes\n\n * ``trash_max_provisioned_bytes`` (int) - trash total max provisioned bytes\n\n * ``trash_snap_count`` (int) - trash snap count\n\n ";
24896static PyMethodDef __pyx_mdef_3rbd_3RBD_89pool_stats_get = {"pool_stats_get", (PyCFunction)__pyx_pw_3rbd_3RBD_89pool_stats_get, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_3RBD_88pool_stats_get};
24897static PyObject *__pyx_pw_3rbd_3RBD_89pool_stats_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
24898 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self = 0;
24899 PyObject *__pyx_v_ioctx = 0;
24900 int __pyx_lineno = 0;
24901 const char *__pyx_filename = NULL((void*)0);
24902 int __pyx_clineno = 0;
24903 PyObject *__pyx_r = 0;
24904 __Pyx_RefNannyDeclarations
24905 __Pyx_RefNannySetupContext("pool_stats_get (wrapper)", 0);
24906 {
24907 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ioctx,0};
24908 PyObject* values[2] = {0,0};
24909 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
24910 Py_ssize_t kw_args;
24911 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
24912 switch (pos_args) {
24913 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
24914 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
24915 case 0: break;
24916 default: goto __pyx_L5_argtuple_error;
24917 }
24918 kw_args = PyDict_Size(__pyx_kwds);
24919 switch (pos_args) {
24920 case 0:
24921 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self
)) != 0), 1)
) kw_args--;
24922 else goto __pyx_L5_argtuple_error;
24923 case 1:
24924 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
24925 else {
24926 __Pyx_RaiseArgtupleInvalid("pool_stats_get", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__24926; goto __pyx_L3_error;}
24927 }
24928 }
24929 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
24930 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pool_stats_get") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "pool_stats_get") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__24930; goto __pyx_L3_error;}
24931 }
24932 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
24933 goto __pyx_L5_argtuple_error;
24934 } else {
24935 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
24936 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
24937 }
24938 __pyx_v_self = values[0];
24939 __pyx_v_ioctx = values[1];
24940 }
24941 goto __pyx_L4_argument_unpacking_done;
24942 __pyx_L5_argtuple_error:;
24943 __Pyx_RaiseArgtupleInvalid("pool_stats_get", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__24943; goto __pyx_L3_error;}
24944 __pyx_L3_error:;
24945 __Pyx_AddTraceback("rbd.RBD.pool_stats_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
24946 __Pyx_RefNannyFinishContext();
24947 return NULL((void*)0);
24948 __pyx_L4_argument_unpacking_done:;
24949 __pyx_r = __pyx_pf_3rbd_3RBD_88pool_stats_get(__pyx_self, __pyx_v_self, __pyx_v_ioctx);
24950
24951 /* function exit code */
24952 __Pyx_RefNannyFinishContext();
24953 return __pyx_r;
24954}
24955
24956static PyObject *__pyx_pf_3rbd_3RBD_88pool_stats_get(CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_self, PyObject *__pyx_v_ioctx) {
24957 rados_ioctx_t __pyx_v__ioctx;
24958 uint64_t __pyx_v__image_count;
24959 uint64_t __pyx_v__image_provisioned_bytes;
24960 uint64_t __pyx_v__image_max_provisioned_bytes;
24961 uint64_t __pyx_v__image_snap_count;
24962 uint64_t __pyx_v__trash_count;
24963 uint64_t __pyx_v__trash_provisioned_bytes;
24964 uint64_t __pyx_v__trash_max_provisioned_bytes;
24965 uint64_t __pyx_v__trash_snap_count;
24966 rbd_pool_stats_t __pyx_v__stats;
24967 int __pyx_v_ret;
24968 PyObject *__pyx_r = NULL((void*)0);
24969 __Pyx_RefNannyDeclarations
24970 rados_ioctx_t __pyx_t_1;
24971 PyObject *__pyx_t_2 = NULL((void*)0);
24972 int __pyx_t_3;
24973 PyObject *__pyx_t_4 = NULL((void*)0);
24974 PyObject *__pyx_t_5 = NULL((void*)0);
24975 PyObject *__pyx_t_6 = NULL((void*)0);
24976 int __pyx_t_7;
24977 PyObject *__pyx_t_8 = NULL((void*)0);
24978 int __pyx_t_9;
24979 char const *__pyx_t_10;
24980 PyObject *__pyx_t_11 = NULL((void*)0);
24981 PyObject *__pyx_t_12 = NULL((void*)0);
24982 PyObject *__pyx_t_13 = NULL((void*)0);
24983 int __pyx_lineno = 0;
24984 const char *__pyx_filename = NULL((void*)0);
24985 int __pyx_clineno = 0;
24986 __Pyx_RefNannySetupContext("pool_stats_get", 0);
24987
24988 /* "rbd.pyx":2248
24989 * """
24990 * cdef:
24991 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
24992 * uint64_t _image_count = 0
24993 * uint64_t _image_provisioned_bytes = 0
24994 */
24995 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__24995; goto __pyx_L1_error;}
24996 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__24996; goto __pyx_L1_error;}
24997 __pyx_v__ioctx = __pyx_t_1;
24998
24999 /* "rbd.pyx":2249
25000 * cdef:
25001 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
25002 * uint64_t _image_count = 0 # <<<<<<<<<<<<<<
25003 * uint64_t _image_provisioned_bytes = 0
25004 * uint64_t _image_max_provisioned_bytes = 0
25005 */
25006 __pyx_v__image_count = 0;
25007
25008 /* "rbd.pyx":2250
25009 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
25010 * uint64_t _image_count = 0
25011 * uint64_t _image_provisioned_bytes = 0 # <<<<<<<<<<<<<<
25012 * uint64_t _image_max_provisioned_bytes = 0
25013 * uint64_t _image_snap_count = 0
25014 */
25015 __pyx_v__image_provisioned_bytes = 0;
25016
25017 /* "rbd.pyx":2251
25018 * uint64_t _image_count = 0
25019 * uint64_t _image_provisioned_bytes = 0
25020 * uint64_t _image_max_provisioned_bytes = 0 # <<<<<<<<<<<<<<
25021 * uint64_t _image_snap_count = 0
25022 * uint64_t _trash_count = 0
25023 */
25024 __pyx_v__image_max_provisioned_bytes = 0;
25025
25026 /* "rbd.pyx":2252
25027 * uint64_t _image_provisioned_bytes = 0
25028 * uint64_t _image_max_provisioned_bytes = 0
25029 * uint64_t _image_snap_count = 0 # <<<<<<<<<<<<<<
25030 * uint64_t _trash_count = 0
25031 * uint64_t _trash_provisioned_bytes = 0
25032 */
25033 __pyx_v__image_snap_count = 0;
25034
25035 /* "rbd.pyx":2253
25036 * uint64_t _image_max_provisioned_bytes = 0
25037 * uint64_t _image_snap_count = 0
25038 * uint64_t _trash_count = 0 # <<<<<<<<<<<<<<
25039 * uint64_t _trash_provisioned_bytes = 0
25040 * uint64_t _trash_max_provisioned_bytes = 0
25041 */
25042 __pyx_v__trash_count = 0;
25043
25044 /* "rbd.pyx":2254
25045 * uint64_t _image_snap_count = 0
25046 * uint64_t _trash_count = 0
25047 * uint64_t _trash_provisioned_bytes = 0 # <<<<<<<<<<<<<<
25048 * uint64_t _trash_max_provisioned_bytes = 0
25049 * uint64_t _trash_snap_count = 0
25050 */
25051 __pyx_v__trash_provisioned_bytes = 0;
25052
25053 /* "rbd.pyx":2255
25054 * uint64_t _trash_count = 0
25055 * uint64_t _trash_provisioned_bytes = 0
25056 * uint64_t _trash_max_provisioned_bytes = 0 # <<<<<<<<<<<<<<
25057 * uint64_t _trash_snap_count = 0
25058 * rbd_pool_stats_t _stats
25059 */
25060 __pyx_v__trash_max_provisioned_bytes = 0;
25061
25062 /* "rbd.pyx":2256
25063 * uint64_t _trash_provisioned_bytes = 0
25064 * uint64_t _trash_max_provisioned_bytes = 0
25065 * uint64_t _trash_snap_count = 0 # <<<<<<<<<<<<<<
25066 * rbd_pool_stats_t _stats
25067 *
25068 */
25069 __pyx_v__trash_snap_count = 0;
25070
25071 /* "rbd.pyx":2259
25072 * rbd_pool_stats_t _stats
25073 *
25074 * rbd_pool_stats_create(&_stats) # <<<<<<<<<<<<<<
25075 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGES,
25076 * &_image_count)
25077 */
25078 rbd_pool_stats_create((&__pyx_v__stats));
25079
25080 /* "rbd.pyx":2260
25081 *
25082 * rbd_pool_stats_create(&_stats)
25083 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGES, # <<<<<<<<<<<<<<
25084 * &_image_count)
25085 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES,
25086 */
25087 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGES); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2260; __pyx_clineno = __LINE__25087; goto __pyx_L1_error;}
25088 __Pyx_GOTREF(__pyx_t_2);
25089 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2260; __pyx_clineno = __LINE__25089; goto __pyx_L1_error;}
25090 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25091
25092 /* "rbd.pyx":2261
25093 * rbd_pool_stats_create(&_stats)
25094 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGES,
25095 * &_image_count) # <<<<<<<<<<<<<<
25096 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES,
25097 * &_image_provisioned_bytes)
25098 */
25099 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__image_count));
25100
25101 /* "rbd.pyx":2262
25102 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGES,
25103 * &_image_count)
25104 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES, # <<<<<<<<<<<<<<
25105 * &_image_provisioned_bytes)
25106 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES,
25107 */
25108 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_PROVI); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2262; __pyx_clineno = __LINE__25108; goto __pyx_L1_error;}
25109 __Pyx_GOTREF(__pyx_t_2);
25110 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2262; __pyx_clineno = __LINE__25110; goto __pyx_L1_error;}
25111 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25112
25113 /* "rbd.pyx":2263
25114 * &_image_count)
25115 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES,
25116 * &_image_provisioned_bytes) # <<<<<<<<<<<<<<
25117 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES,
25118 * &_image_max_provisioned_bytes)
25119 */
25120 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__image_provisioned_bytes));
25121
25122 /* "rbd.pyx":2264
25123 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES,
25124 * &_image_provisioned_bytes)
25125 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES, # <<<<<<<<<<<<<<
25126 * &_image_max_provisioned_bytes)
25127 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS,
25128 */
25129 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_MAX_P); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__25129; goto __pyx_L1_error;}
25130 __Pyx_GOTREF(__pyx_t_2);
25131 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2264; __pyx_clineno = __LINE__25131; goto __pyx_L1_error;}
25132 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25133
25134 /* "rbd.pyx":2265
25135 * &_image_provisioned_bytes)
25136 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES,
25137 * &_image_max_provisioned_bytes) # <<<<<<<<<<<<<<
25138 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS,
25139 * &_image_snap_count)
25140 */
25141 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__image_max_provisioned_bytes));
25142
25143 /* "rbd.pyx":2266
25144 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES,
25145 * &_image_max_provisioned_bytes)
25146 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS, # <<<<<<<<<<<<<<
25147 * &_image_snap_count)
25148 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_IMAGES,
25149 */
25150 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_SNAPS); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2266; __pyx_clineno = __LINE__25150; goto __pyx_L1_error;}
25151 __Pyx_GOTREF(__pyx_t_2);
25152 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2266; __pyx_clineno = __LINE__25152; goto __pyx_L1_error;}
25153 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25154
25155 /* "rbd.pyx":2267
25156 * &_image_max_provisioned_bytes)
25157 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS,
25158 * &_image_snap_count) # <<<<<<<<<<<<<<
25159 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_IMAGES,
25160 * &_trash_count)
25161 */
25162 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__image_snap_count));
25163
25164 /* "rbd.pyx":2268
25165 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS,
25166 * &_image_snap_count)
25167 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_IMAGES, # <<<<<<<<<<<<<<
25168 * &_trash_count)
25169 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES,
25170 */
25171 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_IMAGE); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2268; __pyx_clineno = __LINE__25171; goto __pyx_L1_error;}
25172 __Pyx_GOTREF(__pyx_t_2);
25173 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2268; __pyx_clineno = __LINE__25173; goto __pyx_L1_error;}
25174 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25175
25176 /* "rbd.pyx":2269
25177 * &_image_snap_count)
25178 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_IMAGES,
25179 * &_trash_count) # <<<<<<<<<<<<<<
25180 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES,
25181 * &_trash_provisioned_bytes)
25182 */
25183 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__trash_count));
25184
25185 /* "rbd.pyx":2270
25186 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_IMAGES,
25187 * &_trash_count)
25188 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES, # <<<<<<<<<<<<<<
25189 * &_trash_provisioned_bytes)
25190 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES,
25191 */
25192 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_PROVI); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2270; __pyx_clineno = __LINE__25192; goto __pyx_L1_error;}
25193 __Pyx_GOTREF(__pyx_t_2);
25194 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2270; __pyx_clineno = __LINE__25194; goto __pyx_L1_error;}
25195 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25196
25197 /* "rbd.pyx":2271
25198 * &_trash_count)
25199 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES,
25200 * &_trash_provisioned_bytes) # <<<<<<<<<<<<<<
25201 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES,
25202 * &_trash_max_provisioned_bytes)
25203 */
25204 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__trash_provisioned_bytes));
25205
25206 /* "rbd.pyx":2272
25207 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES,
25208 * &_trash_provisioned_bytes)
25209 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES, # <<<<<<<<<<<<<<
25210 * &_trash_max_provisioned_bytes)
25211 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS,
25212 */
25213 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_MAX_P); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2272; __pyx_clineno = __LINE__25213; goto __pyx_L1_error;}
25214 __Pyx_GOTREF(__pyx_t_2);
25215 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2272; __pyx_clineno = __LINE__25215; goto __pyx_L1_error;}
25216 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25217
25218 /* "rbd.pyx":2273
25219 * &_trash_provisioned_bytes)
25220 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES,
25221 * &_trash_max_provisioned_bytes) # <<<<<<<<<<<<<<
25222 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS,
25223 * &_trash_snap_count)
25224 */
25225 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__trash_max_provisioned_bytes));
25226
25227 /* "rbd.pyx":2274
25228 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES,
25229 * &_trash_max_provisioned_bytes)
25230 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS, # <<<<<<<<<<<<<<
25231 * &_trash_snap_count)
25232 * try:
25233 */
25234 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_SNAPS); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__25234; goto __pyx_L1_error;}
25235 __Pyx_GOTREF(__pyx_t_2);
25236 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__25236; goto __pyx_L1_error;}
25237 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25238
25239 /* "rbd.pyx":2275
25240 * &_trash_max_provisioned_bytes)
25241 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS,
25242 * &_trash_snap_count) # <<<<<<<<<<<<<<
25243 * try:
25244 * with nogil:
25245 */
25246 rbd_pool_stats_option_add_uint64(__pyx_v__stats, __pyx_t_3, (&__pyx_v__trash_snap_count));
25247
25248 /* "rbd.pyx":2276
25249 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS,
25250 * &_trash_snap_count)
25251 * try: # <<<<<<<<<<<<<<
25252 * with nogil:
25253 * ret = rbd_pool_stats_get(_ioctx, _stats)
25254 */
25255 /*try:*/ {
25256 {
25257 __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
25258 __Pyx_XGOTREF(__pyx_t_4);
25259 __Pyx_XGOTREF(__pyx_t_5);
25260 __Pyx_XGOTREF(__pyx_t_6);
25261 /*try:*/ {
25262
25263 /* "rbd.pyx":2277
25264 * &_trash_snap_count)
25265 * try:
25266 * with nogil: # <<<<<<<<<<<<<<
25267 * ret = rbd_pool_stats_get(_ioctx, _stats)
25268 * if ret != 0:
25269 */
25270 {
25271 #ifdef WITH_THREAD1
25272 PyThreadState *_save;
25273 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
25274 #endif
25275 /*try:*/ {
25276
25277 /* "rbd.pyx":2278
25278 * try:
25279 * with nogil:
25280 * ret = rbd_pool_stats_get(_ioctx, _stats) # <<<<<<<<<<<<<<
25281 * if ret != 0:
25282 * raise make_ex(ret, 'error retrieving pool stats')
25283 */
25284 __pyx_v_ret = rbd_pool_stats_get(__pyx_v__ioctx, __pyx_v__stats);
25285 }
25286
25287 /* "rbd.pyx":2277
25288 * &_trash_snap_count)
25289 * try:
25290 * with nogil: # <<<<<<<<<<<<<<
25291 * ret = rbd_pool_stats_get(_ioctx, _stats)
25292 * if ret != 0:
25293 */
25294 /*finally:*/ {
25295 /*normal exit:*/{
25296 #ifdef WITH_THREAD1
25297 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
25298 #endif
25299 goto __pyx_L18;
25300 }
25301 __pyx_L18:;
25302 }
25303 }
25304
25305 /* "rbd.pyx":2279
25306 * with nogil:
25307 * ret = rbd_pool_stats_get(_ioctx, _stats)
25308 * if ret != 0: # <<<<<<<<<<<<<<
25309 * raise make_ex(ret, 'error retrieving pool stats')
25310 * else:
25311 */
25312 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
25313 if (__pyx_t_7) {
25314
25315 /* "rbd.pyx":2280
25316 * ret = rbd_pool_stats_get(_ioctx, _stats)
25317 * if ret != 0:
25318 * raise make_ex(ret, 'error retrieving pool stats') # <<<<<<<<<<<<<<
25319 * else:
25320 * return {'image_count': _image_count,
25321 */
25322 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__25322; goto __pyx_L6_error;}
25323 __Pyx_GOTREF(__pyx_t_2);
25324 __pyx_t_8 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_retrieving_pool_stats, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__25324; goto __pyx_L6_error;}
25325 __Pyx_GOTREF(__pyx_t_8);
25326 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25327 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
25328 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
25329 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__25329; goto __pyx_L6_error;}
25330
25331 /* "rbd.pyx":2279
25332 * with nogil:
25333 * ret = rbd_pool_stats_get(_ioctx, _stats)
25334 * if ret != 0: # <<<<<<<<<<<<<<
25335 * raise make_ex(ret, 'error retrieving pool stats')
25336 * else:
25337 */
25338 }
25339
25340 /* "rbd.pyx":2276
25341 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS,
25342 * &_trash_snap_count)
25343 * try: # <<<<<<<<<<<<<<
25344 * with nogil:
25345 * ret = rbd_pool_stats_get(_ioctx, _stats)
25346 */
25347 }
25348
25349 /* "rbd.pyx":2282
25350 * raise make_ex(ret, 'error retrieving pool stats')
25351 * else:
25352 * return {'image_count': _image_count, # <<<<<<<<<<<<<<
25353 * 'image_provisioned_bytes': _image_provisioned_bytes,
25354 * 'image_max_provisioned_bytes': _image_max_provisioned_bytes,
25355 */
25356 /*else:*/ {
25357 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
25358 __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25358; goto __pyx_L8_except_error;}
25359 __Pyx_GOTREF(__pyx_t_8);
25360 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__image_count); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25360; goto __pyx_L8_except_error;}
25361 __Pyx_GOTREF(__pyx_t_2);
25362 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_image_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25362; goto __pyx_L8_except_error;}
25363 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25364
25365 /* "rbd.pyx":2283
25366 * else:
25367 * return {'image_count': _image_count,
25368 * 'image_provisioned_bytes': _image_provisioned_bytes, # <<<<<<<<<<<<<<
25369 * 'image_max_provisioned_bytes': _image_max_provisioned_bytes,
25370 * 'image_snap_count': _image_snap_count,
25371 */
25372 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__image_provisioned_bytes); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__25372; goto __pyx_L8_except_error;}
25373 __Pyx_GOTREF(__pyx_t_2);
25374 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_image_provisioned_bytes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25374; goto __pyx_L8_except_error;}
25375 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25376
25377 /* "rbd.pyx":2284
25378 * return {'image_count': _image_count,
25379 * 'image_provisioned_bytes': _image_provisioned_bytes,
25380 * 'image_max_provisioned_bytes': _image_max_provisioned_bytes, # <<<<<<<<<<<<<<
25381 * 'image_snap_count': _image_snap_count,
25382 * 'trash_count': _trash_count,
25383 */
25384 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__image_max_provisioned_bytes); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__25384; goto __pyx_L8_except_error;}
25385 __Pyx_GOTREF(__pyx_t_2);
25386 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_image_max_provisioned_bytes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25386; goto __pyx_L8_except_error;}
25387 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25388
25389 /* "rbd.pyx":2285
25390 * 'image_provisioned_bytes': _image_provisioned_bytes,
25391 * 'image_max_provisioned_bytes': _image_max_provisioned_bytes,
25392 * 'image_snap_count': _image_snap_count, # <<<<<<<<<<<<<<
25393 * 'trash_count': _trash_count,
25394 * 'trash_provisioned_bytes': _trash_provisioned_bytes,
25395 */
25396 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__image_snap_count); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2285; __pyx_clineno = __LINE__25396; goto __pyx_L8_except_error;}
25397 __Pyx_GOTREF(__pyx_t_2);
25398 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_image_snap_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25398; goto __pyx_L8_except_error;}
25399 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25400
25401 /* "rbd.pyx":2286
25402 * 'image_max_provisioned_bytes': _image_max_provisioned_bytes,
25403 * 'image_snap_count': _image_snap_count,
25404 * 'trash_count': _trash_count, # <<<<<<<<<<<<<<
25405 * 'trash_provisioned_bytes': _trash_provisioned_bytes,
25406 * 'trash_max_provisioned_bytes': _trash_max_provisioned_bytes,
25407 */
25408 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__trash_count); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2286; __pyx_clineno = __LINE__25408; goto __pyx_L8_except_error;}
25409 __Pyx_GOTREF(__pyx_t_2);
25410 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_trash_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25410; goto __pyx_L8_except_error;}
25411 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25412
25413 /* "rbd.pyx":2287
25414 * 'image_snap_count': _image_snap_count,
25415 * 'trash_count': _trash_count,
25416 * 'trash_provisioned_bytes': _trash_provisioned_bytes, # <<<<<<<<<<<<<<
25417 * 'trash_max_provisioned_bytes': _trash_max_provisioned_bytes,
25418 * 'trash_snap_count': _trash_snap_count}
25419 */
25420 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__trash_provisioned_bytes); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2287; __pyx_clineno = __LINE__25420; goto __pyx_L8_except_error;}
25421 __Pyx_GOTREF(__pyx_t_2);
25422 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_trash_provisioned_bytes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25422; goto __pyx_L8_except_error;}
25423 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25424
25425 /* "rbd.pyx":2288
25426 * 'trash_count': _trash_count,
25427 * 'trash_provisioned_bytes': _trash_provisioned_bytes,
25428 * 'trash_max_provisioned_bytes': _trash_max_provisioned_bytes, # <<<<<<<<<<<<<<
25429 * 'trash_snap_count': _trash_snap_count}
25430 * finally:
25431 */
25432 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__trash_max_provisioned_bytes); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2288; __pyx_clineno = __LINE__25432; goto __pyx_L8_except_error;}
25433 __Pyx_GOTREF(__pyx_t_2);
25434 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_trash_max_provisioned_bytes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25434; goto __pyx_L8_except_error;}
25435 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25436
25437 /* "rbd.pyx":2289
25438 * 'trash_provisioned_bytes': _trash_provisioned_bytes,
25439 * 'trash_max_provisioned_bytes': _trash_max_provisioned_bytes,
25440 * 'trash_snap_count': _trash_snap_count} # <<<<<<<<<<<<<<
25441 * finally:
25442 * rbd_pool_stats_destroy(_stats)
25443 */
25444 __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v__trash_snap_count); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2289; __pyx_clineno = __LINE__25444; goto __pyx_L8_except_error;}
25445 __Pyx_GOTREF(__pyx_t_2);
25446 if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_trash_snap_count, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__25446; goto __pyx_L8_except_error;}
25447 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
25448 __pyx_r = __pyx_t_8;
25449 __pyx_t_8 = 0;
25450 goto __pyx_L9_except_return;
25451 }
25452 __pyx_L6_error:;
25453 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
25454 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
25455 goto __pyx_L8_except_error;
25456 __pyx_L8_except_error:;
25457
25458 /* "rbd.pyx":2276
25459 * rbd_pool_stats_option_add_uint64(_stats, RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS,
25460 * &_trash_snap_count)
25461 * try: # <<<<<<<<<<<<<<
25462 * with nogil:
25463 * ret = rbd_pool_stats_get(_ioctx, _stats)
25464 */
25465 __Pyx_XGIVEREF(__pyx_t_4);
25466 __Pyx_XGIVEREF(__pyx_t_5);
25467 __Pyx_XGIVEREF(__pyx_t_6);
25468 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
25469 goto __pyx_L4_error;
25470 __pyx_L9_except_return:;
25471 __Pyx_XGIVEREF(__pyx_t_4);
25472 __Pyx_XGIVEREF(__pyx_t_5);
25473 __Pyx_XGIVEREF(__pyx_t_6);
25474 __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
25475 goto __pyx_L3_return;
25476 }
25477 }
25478
25479 /* "rbd.pyx":2291
25480 * 'trash_snap_count': _trash_snap_count}
25481 * finally:
25482 * rbd_pool_stats_destroy(_stats) # <<<<<<<<<<<<<<
25483 *
25484 *
25485 */
25486 /*finally:*/ {
25487 /*exception exit:*/{
25488 __pyx_L4_error:;
25489 __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
25490 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
25491 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
25492 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
25493 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5
, &__pyx_t_4) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
25494 __Pyx_XGOTREF(__pyx_t_6);
25495 __Pyx_XGOTREF(__pyx_t_5);
25496 __Pyx_XGOTREF(__pyx_t_4);
25497 __Pyx_XGOTREF(__pyx_t_11);
25498 __Pyx_XGOTREF(__pyx_t_12);
25499 __Pyx_XGOTREF(__pyx_t_13);
25500 __pyx_t_3 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
25501 {
25502 rbd_pool_stats_destroy(__pyx_v__stats);
25503 }
25504 if (PY_MAJOR_VERSION2 >= 3) {
25505 __Pyx_XGIVEREF(__pyx_t_11);
25506 __Pyx_XGIVEREF(__pyx_t_12);
25507 __Pyx_XGIVEREF(__pyx_t_13);
25508 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
25509 }
25510 __Pyx_XGIVEREF(__pyx_t_6);
25511 __Pyx_XGIVEREF(__pyx_t_5);
25512 __Pyx_XGIVEREF(__pyx_t_4);
25513 __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
25514 __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
25515 __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
25516 goto __pyx_L1_error;
25517 }
25518 __pyx_L3_return: {
25519 __pyx_t_13 = __pyx_r;
25520 __pyx_r = 0;
25521 rbd_pool_stats_destroy(__pyx_v__stats);
25522 __pyx_r = __pyx_t_13;
25523 __pyx_t_13 = 0;
25524 goto __pyx_L0;
25525 }
25526 }
25527
25528 /* "rbd.pyx":2222
25529 * raise make_ex(ret, 'error initializing pool')
25530 *
25531 * def pool_stats_get(self, ioctx): # <<<<<<<<<<<<<<
25532 * """
25533 * Return RBD pool stats
25534 */
25535
25536 /* function exit code */
25537 __pyx_L1_error:;
25538 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
25539 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
25540 __Pyx_AddTraceback("rbd.RBD.pool_stats_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
25541 __pyx_r = NULL((void*)0);
25542 __pyx_L0:;
25543 __Pyx_XGIVEREF(__pyx_r);
25544 __Pyx_RefNannyFinishContext();
25545 return __pyx_r;
25546}
25547
25548/* "rbd.pyx":2313
25549 * int num_peers
25550 *
25551 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
25552 * cdef:
25553 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
25554 */
25555
25556/* Python wrapper */
25557static int __pyx_pw_3rbd_18MirrorPeerIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25558static int __pyx_pw_3rbd_18MirrorPeerIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25559 PyObject *__pyx_v_ioctx = 0;
25560 int __pyx_lineno = 0;
25561 const char *__pyx_filename = NULL((void*)0);
25562 int __pyx_clineno = 0;
25563 int __pyx_r;
25564 __Pyx_RefNannyDeclarations
25565 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
25566 {
25567 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
25568 PyObject* values[1] = {0};
25569 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
25570 Py_ssize_t kw_args;
25571 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
25572 switch (pos_args) {
25573 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
25574 case 0: break;
25575 default: goto __pyx_L5_argtuple_error;
25576 }
25577 kw_args = PyDict_Size(__pyx_kwds);
25578 switch (pos_args) {
25579 case 0:
25580 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
25581 else goto __pyx_L5_argtuple_error;
25582 }
25583 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
25584 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__25584; goto __pyx_L3_error;}
25585 }
25586 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
25587 goto __pyx_L5_argtuple_error;
25588 } else {
25589 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
25590 }
25591 __pyx_v_ioctx = values[0];
25592 }
25593 goto __pyx_L4_argument_unpacking_done;
25594 __pyx_L5_argtuple_error:;
25595 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2313; __pyx_clineno = __LINE__25595; goto __pyx_L3_error;}
25596 __pyx_L3_error:;
25597 __Pyx_AddTraceback("rbd.MirrorPeerIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25598 __Pyx_RefNannyFinishContext();
25599 return -1;
25600 __pyx_L4_argument_unpacking_done:;
25601 __pyx_r = __pyx_pf_3rbd_18MirrorPeerIterator___init__(((struct __pyx_obj_3rbd_MirrorPeerIterator *)__pyx_v_self), __pyx_v_ioctx);
25602
25603 /* function exit code */
25604 __Pyx_RefNannyFinishContext();
25605 return __pyx_r;
25606}
25607
25608static int __pyx_pf_3rbd_18MirrorPeerIterator___init__(struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
25609 rados_ioctx_t __pyx_v__ioctx;
25610 int __pyx_v_ret;
25611 int __pyx_r;
25612 __Pyx_RefNannyDeclarations
25613 rados_ioctx_t __pyx_t_1;
25614 void *__pyx_t_2;
25615 int __pyx_t_3;
25616 PyObject *__pyx_t_4 = NULL((void*)0);
25617 PyObject *__pyx_t_5 = NULL((void*)0);
25618 int __pyx_lineno = 0;
25619 const char *__pyx_filename = NULL((void*)0);
25620 int __pyx_clineno = 0;
25621 __Pyx_RefNannySetupContext("__init__", 0);
25622
25623 /* "rbd.pyx":2315
25624 * def __init__(self, ioctx):
25625 * cdef:
25626 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
25627 * self.peers = NULL
25628 * self.num_peers = 10
25629 */
25630 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2315; __pyx_clineno = __LINE__25630; goto __pyx_L1_error;}
25631 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2315; __pyx_clineno = __LINE__25631; goto __pyx_L1_error;}
25632 __pyx_v__ioctx = __pyx_t_1;
25633
25634 /* "rbd.pyx":2316
25635 * cdef:
25636 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
25637 * self.peers = NULL # <<<<<<<<<<<<<<
25638 * self.num_peers = 10
25639 * while True:
25640 */
25641 __pyx_v_self->peers = NULL((void*)0);
25642
25643 /* "rbd.pyx":2317
25644 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
25645 * self.peers = NULL
25646 * self.num_peers = 10 # <<<<<<<<<<<<<<
25647 * while True:
25648 * self.peers = <rbd_mirror_peer_t *>realloc_chk(
25649 */
25650 __pyx_v_self->num_peers = 10;
25651
25652 /* "rbd.pyx":2318
25653 * self.peers = NULL
25654 * self.num_peers = 10
25655 * while True: # <<<<<<<<<<<<<<
25656 * self.peers = <rbd_mirror_peer_t *>realloc_chk(
25657 * self.peers, self.num_peers * sizeof(rbd_mirror_peer_t))
25658 */
25659 while (1) {
25660
25661 /* "rbd.pyx":2319
25662 * self.num_peers = 10
25663 * while True:
25664 * self.peers = <rbd_mirror_peer_t *>realloc_chk( # <<<<<<<<<<<<<<
25665 * self.peers, self.num_peers * sizeof(rbd_mirror_peer_t))
25666 * with nogil:
25667 */
25668 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->peers, (__pyx_v_self->num_peers * (sizeof(rbd_mirror_peer_t)))); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2319; __pyx_clineno = __LINE__25668; goto __pyx_L1_error;}
25669 __pyx_v_self->peers = ((rbd_mirror_peer_t *)__pyx_t_2);
25670
25671 /* "rbd.pyx":2321
25672 * self.peers = <rbd_mirror_peer_t *>realloc_chk(
25673 * self.peers, self.num_peers * sizeof(rbd_mirror_peer_t))
25674 * with nogil: # <<<<<<<<<<<<<<
25675 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers)
25676 * if ret < 0:
25677 */
25678 {
25679 #ifdef WITH_THREAD1
25680 PyThreadState *_save;
25681 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
25682 #endif
25683 /*try:*/ {
25684
25685 /* "rbd.pyx":2322
25686 * self.peers, self.num_peers * sizeof(rbd_mirror_peer_t))
25687 * with nogil:
25688 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers) # <<<<<<<<<<<<<<
25689 * if ret < 0:
25690 * if ret == -errno.ERANGE:
25691 */
25692 __pyx_v_ret = rbd_mirror_peer_list(__pyx_v__ioctx, __pyx_v_self->peers, (&__pyx_v_self->num_peers));
25693 }
25694
25695 /* "rbd.pyx":2321
25696 * self.peers = <rbd_mirror_peer_t *>realloc_chk(
25697 * self.peers, self.num_peers * sizeof(rbd_mirror_peer_t))
25698 * with nogil: # <<<<<<<<<<<<<<
25699 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers)
25700 * if ret < 0:
25701 */
25702 /*finally:*/ {
25703 /*normal exit:*/{
25704 #ifdef WITH_THREAD1
25705 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
25706 #endif
25707 goto __pyx_L9;
25708 }
25709 __pyx_L9:;
25710 }
25711 }
25712
25713 /* "rbd.pyx":2323
25714 * with nogil:
25715 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers)
25716 * if ret < 0: # <<<<<<<<<<<<<<
25717 * if ret == -errno.ERANGE:
25718 * continue
25719 */
25720 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
25721 if (__pyx_t_3) {
25722
25723 /* "rbd.pyx":2324
25724 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers)
25725 * if ret < 0:
25726 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
25727 * continue
25728 * self.num_peers = 0
25729 */
25730 __pyx_t_3 = ((__pyx_v_ret == (-ERANGE34)) != 0);
25731 if (__pyx_t_3) {
25732
25733 /* "rbd.pyx":2325
25734 * if ret < 0:
25735 * if ret == -errno.ERANGE:
25736 * continue # <<<<<<<<<<<<<<
25737 * self.num_peers = 0
25738 * raise make_ex(ret, 'error listing peers')
25739 */
25740 goto __pyx_L3_continue;
25741
25742 /* "rbd.pyx":2324
25743 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers)
25744 * if ret < 0:
25745 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
25746 * continue
25747 * self.num_peers = 0
25748 */
25749 }
25750
25751 /* "rbd.pyx":2326
25752 * if ret == -errno.ERANGE:
25753 * continue
25754 * self.num_peers = 0 # <<<<<<<<<<<<<<
25755 * raise make_ex(ret, 'error listing peers')
25756 * break
25757 */
25758 __pyx_v_self->num_peers = 0;
25759
25760 /* "rbd.pyx":2327
25761 * continue
25762 * self.num_peers = 0
25763 * raise make_ex(ret, 'error listing peers') # <<<<<<<<<<<<<<
25764 * break
25765 *
25766 */
25767 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; __pyx_clineno = __LINE__25767; goto __pyx_L1_error;}
25768 __Pyx_GOTREF(__pyx_t_4);
25769 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_peers, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; __pyx_clineno = __LINE__25769; goto __pyx_L1_error;}
25770 __Pyx_GOTREF(__pyx_t_5);
25771 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
25772 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
25773 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
25774 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; __pyx_clineno = __LINE__25774; goto __pyx_L1_error;}
25775
25776 /* "rbd.pyx":2323
25777 * with nogil:
25778 * ret = rbd_mirror_peer_list(_ioctx, self.peers, &self.num_peers)
25779 * if ret < 0: # <<<<<<<<<<<<<<
25780 * if ret == -errno.ERANGE:
25781 * continue
25782 */
25783 }
25784
25785 /* "rbd.pyx":2328
25786 * self.num_peers = 0
25787 * raise make_ex(ret, 'error listing peers')
25788 * break # <<<<<<<<<<<<<<
25789 *
25790 * def __iter__(self):
25791 */
25792 goto __pyx_L4_break;
25793 __pyx_L3_continue:;
25794 }
25795 __pyx_L4_break:;
25796
25797 /* "rbd.pyx":2313
25798 * int num_peers
25799 *
25800 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
25801 * cdef:
25802 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
25803 */
25804
25805 /* function exit code */
25806 __pyx_r = 0;
25807 goto __pyx_L0;
25808 __pyx_L1_error:;
25809 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
25810 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
25811 __Pyx_AddTraceback("rbd.MirrorPeerIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25812 __pyx_r = -1;
25813 __pyx_L0:;
25814 __Pyx_RefNannyFinishContext();
25815 return __pyx_r;
25816}
25817static PyObject *__pyx_gb_3rbd_18MirrorPeerIterator_4generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
25818
25819/* "rbd.pyx":2330
25820 * break
25821 *
25822 * def __iter__(self): # <<<<<<<<<<<<<<
25823 * for i in range(self.num_peers):
25824 * yield {
25825 */
25826
25827/* Python wrapper */
25828static PyObject *__pyx_pw_3rbd_18MirrorPeerIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
25829static PyObject *__pyx_pw_3rbd_18MirrorPeerIterator_3__iter__(PyObject *__pyx_v_self) {
25830 PyObject *__pyx_r = 0;
25831 __Pyx_RefNannyDeclarations
25832 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
25833 __pyx_r = __pyx_pf_3rbd_18MirrorPeerIterator_2__iter__(((struct __pyx_obj_3rbd_MirrorPeerIterator *)__pyx_v_self));
25834
25835 /* function exit code */
25836 __Pyx_RefNannyFinishContext();
25837 return __pyx_r;
25838}
25839
25840static PyObject *__pyx_pf_3rbd_18MirrorPeerIterator_2__iter__(struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self) {
25841 struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *__pyx_cur_scope;
25842 PyObject *__pyx_r = NULL((void*)0);
25843 __Pyx_RefNannyDeclarations
25844 int __pyx_lineno = 0;
25845 const char *__pyx_filename = NULL((void*)0);
25846 int __pyx_clineno = 0;
25847 __Pyx_RefNannySetupContext("__iter__", 0);
25848 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct____iter__(__pyx_ptype_3rbd___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL((void*)0));
25849 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
25850 __Pyx_RefNannyFinishContext();
25851 return NULL((void*)0);
25852 }
25853 __Pyx_GOTREF(__pyx_cur_scope);
25854 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
25855 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
25856 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
25857 {
25858 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_18MirrorPeerIterator_4generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MirrorPeerIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_18MirrorPeerIterator_4generator, (PyObject *)
__pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MirrorPeerIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2330; __pyx_clineno = __LINE__25858; goto __pyx_L1_error;}
25859 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
25860 __Pyx_RefNannyFinishContext();
25861 return (PyObject *) gen;
25862 }
25863
25864 /* function exit code */
25865 __pyx_L1_error:;
25866 __Pyx_AddTraceback("rbd.MirrorPeerIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25867 __pyx_r = NULL((void*)0);
25868 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
25869 __Pyx_XGIVEREF(__pyx_r);
25870 __Pyx_RefNannyFinishContext();
25871 return __pyx_r;
25872}
25873
25874static PyObject *__pyx_gb_3rbd_18MirrorPeerIterator_4generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
25875{
25876 struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *)__pyx_generator->closure);
25877 PyObject *__pyx_r = NULL((void*)0);
25878 int __pyx_t_1;
25879 int __pyx_t_2;
25880 PyObject *__pyx_t_3 = NULL((void*)0);
25881 PyObject *__pyx_t_4 = NULL((void*)0);
25882 PyObject *__pyx_t_5 = NULL((void*)0);
25883 PyObject *__pyx_t_6 = NULL((void*)0);
25884 PyObject *__pyx_t_7 = NULL((void*)0);
25885 PyObject *__pyx_t_8 = NULL((void*)0);
25886 int __pyx_lineno = 0;
25887 const char *__pyx_filename = NULL((void*)0);
25888 int __pyx_clineno = 0;
25889 __Pyx_RefNannyDeclarations
25890 __Pyx_RefNannySetupContext("None", 0);
25891 switch (__pyx_generator->resume_label) {
25892 case 0: goto __pyx_L3_first_run;
25893 case 1: goto __pyx_L6_resume_from_yield;
25894 default: /* CPython raises the right error here */
25895 __Pyx_RefNannyFinishContext();
25896 return NULL((void*)0);
25897 }
25898 __pyx_L3_first_run:;
25899 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2330; __pyx_clineno = __LINE__25899; goto __pyx_L1_error;}
25900
25901 /* "rbd.pyx":2331
25902 *
25903 * def __iter__(self):
25904 * for i in range(self.num_peers): # <<<<<<<<<<<<<<
25905 * yield {
25906 * 'uuid' : decode_cstr(self.peers[i].uuid),
25907 */
25908 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_peers;
25909 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
25910 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
25911
25912 /* "rbd.pyx":2333
25913 * for i in range(self.num_peers):
25914 * yield {
25915 * 'uuid' : decode_cstr(self.peers[i].uuid), # <<<<<<<<<<<<<<
25916 * 'cluster_name' : decode_cstr(self.peers[i].cluster_name),
25917 * 'client_name' : decode_cstr(self.peers[i].client_name),
25918 */
25919 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25919; goto __pyx_L1_error;}
25920 __Pyx_GOTREF(__pyx_t_3);
25921 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25921; goto __pyx_L1_error;}
25922 __Pyx_GOTREF(__pyx_t_5);
25923 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->peers[__pyx_cur_scope->__pyx_v_i]).uuid); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25923; goto __pyx_L1_error;}
25924 __Pyx_GOTREF(__pyx_t_6);
25925 __pyx_t_7 = NULL((void*)0);
25926 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
25927 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
25928 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
25929 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
25930 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
25931 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
25932 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
25933 }
25934 }
25935 if (!__pyx_t_7) {
25936 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25936; goto __pyx_L1_error;}
25937 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
25938 __Pyx_GOTREF(__pyx_t_4);
25939 } else {
25940 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25940; goto __pyx_L1_error;}
25941 __Pyx_GOTREF(__pyx_t_8);
25942 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
25943 __Pyx_GIVEREF(__pyx_t_6);
25944 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
25945 __pyx_t_6 = 0;
25946 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25946; goto __pyx_L1_error;}
25947 __Pyx_GOTREF(__pyx_t_4);
25948 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
25949 }
25950 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
25951 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_uuid, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25951; goto __pyx_L1_error;}
25952 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
25953
25954 /* "rbd.pyx":2334
25955 * yield {
25956 * 'uuid' : decode_cstr(self.peers[i].uuid),
25957 * 'cluster_name' : decode_cstr(self.peers[i].cluster_name), # <<<<<<<<<<<<<<
25958 * 'client_name' : decode_cstr(self.peers[i].client_name),
25959 * }
25960 */
25961 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__25961; goto __pyx_L1_error;}
25962 __Pyx_GOTREF(__pyx_t_5);
25963 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->peers[__pyx_cur_scope->__pyx_v_i]).cluster_name); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__25963; goto __pyx_L1_error;}
25964 __Pyx_GOTREF(__pyx_t_8);
25965 __pyx_t_6 = NULL((void*)0);
25966 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
25967 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
25968 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
25969 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
25970 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
25971 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
25972 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
25973 }
25974 }
25975 if (!__pyx_t_6) {
25976 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__25976; goto __pyx_L1_error;}
25977 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
25978 __Pyx_GOTREF(__pyx_t_4);
25979 } else {
25980 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__25980; goto __pyx_L1_error;}
25981 __Pyx_GOTREF(__pyx_t_7);
25982 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
25983 __Pyx_GIVEREF(__pyx_t_8);
25984 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
25985 __pyx_t_8 = 0;
25986 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__25986; goto __pyx_L1_error;}
25987 __Pyx_GOTREF(__pyx_t_4);
25988 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
25989 }
25990 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
25991 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cluster_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__25991; goto __pyx_L1_error;}
25992 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
25993
25994 /* "rbd.pyx":2335
25995 * 'uuid' : decode_cstr(self.peers[i].uuid),
25996 * 'cluster_name' : decode_cstr(self.peers[i].cluster_name),
25997 * 'client_name' : decode_cstr(self.peers[i].client_name), # <<<<<<<<<<<<<<
25998 * }
25999 *
26000 */
26001 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__26001; goto __pyx_L1_error;}
26002 __Pyx_GOTREF(__pyx_t_5);
26003 __pyx_t_7 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->peers[__pyx_cur_scope->__pyx_v_i]).client_name); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__26003; goto __pyx_L1_error;}
26004 __Pyx_GOTREF(__pyx_t_7);
26005 __pyx_t_8 = NULL((void*)0);
26006 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
26007 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
26008 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
26009 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
26010 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
26011 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26012 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26013 }
26014 }
26015 if (!__pyx_t_8) {
26016 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__26016; goto __pyx_L1_error;}
26017 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
26018 __Pyx_GOTREF(__pyx_t_4);
26019 } else {
26020 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__26020; goto __pyx_L1_error;}
26021 __Pyx_GOTREF(__pyx_t_6);
26022 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
26023 __Pyx_GIVEREF(__pyx_t_7);
26024 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_7);
26025 __pyx_t_7 = 0;
26026 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__26026; goto __pyx_L1_error;}
26027 __Pyx_GOTREF(__pyx_t_4);
26028 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26029 }
26030 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26031 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_client_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2333; __pyx_clineno = __LINE__26031; goto __pyx_L1_error;}
26032 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
26033 __pyx_r = __pyx_t_3;
26034 __pyx_t_3 = 0;
26035 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
26036 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
26037 __Pyx_XGIVEREF(__pyx_r);
26038 __Pyx_RefNannyFinishContext();
26039 /* return from generator, yielding value */
26040 __pyx_generator->resume_label = 1;
26041 return __pyx_r;
26042 __pyx_L6_resume_from_yield:;
26043 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
26044 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
26045 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2332; __pyx_clineno = __LINE__26045; goto __pyx_L1_error;}
26046 }
26047
26048 /* "rbd.pyx":2330
26049 * break
26050 *
26051 * def __iter__(self): # <<<<<<<<<<<<<<
26052 * for i in range(self.num_peers):
26053 * yield {
26054 */
26055
26056 /* function exit code */
26057 PyErr_SetNone(PyExc_StopIteration);
26058 goto __pyx_L0;
26059 __pyx_L1_error:;
26060 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
26061 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
26062 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
26063 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
26064 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
26065 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
26066 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26067 __pyx_L0:;
26068 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
26069 __pyx_generator->resume_label = -1;
26070 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
26071 __Pyx_RefNannyFinishContext();
26072 return __pyx_r;
26073}
26074
26075/* "rbd.pyx":2338
26076 * }
26077 *
26078 * def __dealloc__(self): # <<<<<<<<<<<<<<
26079 * if self.peers:
26080 * rbd_mirror_peer_list_cleanup(self.peers, self.num_peers)
26081 */
26082
26083/* Python wrapper */
26084static void __pyx_pw_3rbd_18MirrorPeerIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
26085static void __pyx_pw_3rbd_18MirrorPeerIterator_6__dealloc__(PyObject *__pyx_v_self) {
26086 __Pyx_RefNannyDeclarations
26087 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
26088 __pyx_pf_3rbd_18MirrorPeerIterator_5__dealloc__(((struct __pyx_obj_3rbd_MirrorPeerIterator *)__pyx_v_self));
26089
26090 /* function exit code */
26091 __Pyx_RefNannyFinishContext();
26092}
26093
26094static void __pyx_pf_3rbd_18MirrorPeerIterator_5__dealloc__(struct __pyx_obj_3rbd_MirrorPeerIterator *__pyx_v_self) {
26095 __Pyx_RefNannyDeclarations
26096 int __pyx_t_1;
26097 __Pyx_RefNannySetupContext("__dealloc__", 0);
26098
26099 /* "rbd.pyx":2339
26100 *
26101 * def __dealloc__(self):
26102 * if self.peers: # <<<<<<<<<<<<<<
26103 * rbd_mirror_peer_list_cleanup(self.peers, self.num_peers)
26104 * free(self.peers)
26105 */
26106 __pyx_t_1 = (__pyx_v_self->peers != 0);
26107 if (__pyx_t_1) {
26108
26109 /* "rbd.pyx":2340
26110 * def __dealloc__(self):
26111 * if self.peers:
26112 * rbd_mirror_peer_list_cleanup(self.peers, self.num_peers) # <<<<<<<<<<<<<<
26113 * free(self.peers)
26114 *
26115 */
26116 rbd_mirror_peer_list_cleanup(__pyx_v_self->peers, __pyx_v_self->num_peers);
26117
26118 /* "rbd.pyx":2341
26119 * if self.peers:
26120 * rbd_mirror_peer_list_cleanup(self.peers, self.num_peers)
26121 * free(self.peers) # <<<<<<<<<<<<<<
26122 *
26123 * cdef class MirrorImageStatusIterator(object):
26124 */
26125 free(__pyx_v_self->peers);
26126
26127 /* "rbd.pyx":2339
26128 *
26129 * def __dealloc__(self):
26130 * if self.peers: # <<<<<<<<<<<<<<
26131 * rbd_mirror_peer_list_cleanup(self.peers, self.num_peers)
26132 * free(self.peers)
26133 */
26134 }
26135
26136 /* "rbd.pyx":2338
26137 * }
26138 *
26139 * def __dealloc__(self): # <<<<<<<<<<<<<<
26140 * if self.peers:
26141 * rbd_mirror_peer_list_cleanup(self.peers, self.num_peers)
26142 */
26143
26144 /* function exit code */
26145 __Pyx_RefNannyFinishContext();
26146}
26147
26148/* "rbd.pyx":2374
26149 * size_t size
26150 *
26151 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
26152 * self.ioctx = convert_ioctx(ioctx)
26153 * self.max_read = 1024
26154 */
26155
26156/* Python wrapper */
26157static int __pyx_pw_3rbd_25MirrorImageStatusIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26158static int __pyx_pw_3rbd_25MirrorImageStatusIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26159 PyObject *__pyx_v_ioctx = 0;
26160 int __pyx_lineno = 0;
26161 const char *__pyx_filename = NULL((void*)0);
26162 int __pyx_clineno = 0;
26163 int __pyx_r;
26164 __Pyx_RefNannyDeclarations
26165 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
26166 {
26167 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
26168 PyObject* values[1] = {0};
26169 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
26170 Py_ssize_t kw_args;
26171 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
26172 switch (pos_args) {
26173 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
26174 case 0: break;
26175 default: goto __pyx_L5_argtuple_error;
26176 }
26177 kw_args = PyDict_Size(__pyx_kwds);
26178 switch (pos_args) {
26179 case 0:
26180 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
26181 else goto __pyx_L5_argtuple_error;
26182 }
26183 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
26184 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__26184; goto __pyx_L3_error;}
26185 }
26186 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
26187 goto __pyx_L5_argtuple_error;
26188 } else {
26189 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
26190 }
26191 __pyx_v_ioctx = values[0];
26192 }
26193 goto __pyx_L4_argument_unpacking_done;
26194 __pyx_L5_argtuple_error:;
26195 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2374; __pyx_clineno = __LINE__26195; goto __pyx_L3_error;}
26196 __pyx_L3_error:;
26197 __Pyx_AddTraceback("rbd.MirrorImageStatusIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26198 __Pyx_RefNannyFinishContext();
26199 return -1;
26200 __pyx_L4_argument_unpacking_done:;
26201 __pyx_r = __pyx_pf_3rbd_25MirrorImageStatusIterator___init__(((struct __pyx_obj_3rbd_MirrorImageStatusIterator *)__pyx_v_self), __pyx_v_ioctx);
26202
26203 /* function exit code */
26204 __Pyx_RefNannyFinishContext();
26205 return __pyx_r;
26206}
26207
26208static int __pyx_pf_3rbd_25MirrorImageStatusIterator___init__(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
26209 int __pyx_r;
26210 __Pyx_RefNannyDeclarations
26211 rados_ioctx_t __pyx_t_1;
26212 void *__pyx_t_2;
26213 PyObject *__pyx_t_3 = NULL((void*)0);
26214 PyObject *__pyx_t_4 = NULL((void*)0);
26215 PyObject *__pyx_t_5 = NULL((void*)0);
26216 int __pyx_lineno = 0;
26217 const char *__pyx_filename = NULL((void*)0);
26218 int __pyx_clineno = 0;
26219 __Pyx_RefNannySetupContext("__init__", 0);
26220
26221 /* "rbd.pyx":2375
26222 *
26223 * def __init__(self, ioctx):
26224 * self.ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
26225 * self.max_read = 1024
26226 * self.last_read = strdup("")
26227 */
26228 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__26228; goto __pyx_L1_error;}
26229 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; __pyx_clineno = __LINE__26229; goto __pyx_L1_error;}
26230 __pyx_v_self->ioctx = __pyx_t_1;
26231
26232 /* "rbd.pyx":2376
26233 * def __init__(self, ioctx):
26234 * self.ioctx = convert_ioctx(ioctx)
26235 * self.max_read = 1024 # <<<<<<<<<<<<<<
26236 * self.last_read = strdup("")
26237 * self.image_ids = <char **>realloc_chk(NULL,
26238 */
26239 __pyx_v_self->max_read = 0x400;
26240
26241 /* "rbd.pyx":2377
26242 * self.ioctx = convert_ioctx(ioctx)
26243 * self.max_read = 1024
26244 * self.last_read = strdup("") # <<<<<<<<<<<<<<
26245 * self.image_ids = <char **>realloc_chk(NULL,
26246 * sizeof(char *) * self.max_read)
26247 */
26248 __pyx_v_self->last_read = strdup(__pyx_k__13)(__extension__ (__builtin_constant_p (__pyx_k__13) &&
((size_t)(const void *)((__pyx_k__13) + 1) - (size_t)(const void
*)(__pyx_k__13) == 1) ? (((const char *) (__pyx_k__13))[0] ==
'\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_k__13) + 1; char *__retval = (char *) malloc
(__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_k__13, __len); __retval; })) : __strdup (__pyx_k__13
)))
;
26249
26250 /* "rbd.pyx":2378
26251 * self.max_read = 1024
26252 * self.last_read = strdup("")
26253 * self.image_ids = <char **>realloc_chk(NULL, # <<<<<<<<<<<<<<
26254 * sizeof(char *) * self.max_read)
26255 * self.images = <rbd_mirror_image_status_t *>realloc_chk(NULL,
26256 */
26257 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(NULL((void*)0), ((sizeof(char *)) * __pyx_v_self->max_read)); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2378; __pyx_clineno = __LINE__26257; goto __pyx_L1_error;}
26258 __pyx_v_self->image_ids = ((char **)__pyx_t_2);
26259
26260 /* "rbd.pyx":2380
26261 * self.image_ids = <char **>realloc_chk(NULL,
26262 * sizeof(char *) * self.max_read)
26263 * self.images = <rbd_mirror_image_status_t *>realloc_chk(NULL, # <<<<<<<<<<<<<<
26264 * sizeof(rbd_mirror_image_status_t) * self.max_read)
26265 * self.size = 0
26266 */
26267 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(NULL((void*)0), ((sizeof(rbd_mirror_image_status_t)) * __pyx_v_self->max_read)); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2380; __pyx_clineno = __LINE__26267; goto __pyx_L1_error;}
26268 __pyx_v_self->images = ((rbd_mirror_image_status_t *)__pyx_t_2);
26269
26270 /* "rbd.pyx":2382
26271 * self.images = <rbd_mirror_image_status_t *>realloc_chk(NULL,
26272 * sizeof(rbd_mirror_image_status_t) * self.max_read)
26273 * self.size = 0 # <<<<<<<<<<<<<<
26274 * self.get_next_chunk()
26275 *
26276 */
26277 __pyx_v_self->size = 0;
26278
26279 /* "rbd.pyx":2383
26280 * sizeof(rbd_mirror_image_status_t) * self.max_read)
26281 * self.size = 0
26282 * self.get_next_chunk() # <<<<<<<<<<<<<<
26283 *
26284 * def __iter__(self):
26285 */
26286 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2383; __pyx_clineno = __LINE__26286; goto __pyx_L1_error;}
26287 __Pyx_GOTREF(__pyx_t_4);
26288 __pyx_t_5 = NULL((void*)0);
26289 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
26290 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
26291 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
26292 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
26293 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
26294 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26295 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26296 }
26297 }
26298 if (__pyx_t_5) {
26299 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2383; __pyx_clineno = __LINE__26299; goto __pyx_L1_error;}
26300 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26301 } else {
26302 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2383; __pyx_clineno = __LINE__26302; goto __pyx_L1_error;}
26303 }
26304 __Pyx_GOTREF(__pyx_t_3);
26305 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
26306 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
26307
26308 /* "rbd.pyx":2374
26309 * size_t size
26310 *
26311 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
26312 * self.ioctx = convert_ioctx(ioctx)
26313 * self.max_read = 1024
26314 */
26315
26316 /* function exit code */
26317 __pyx_r = 0;
26318 goto __pyx_L0;
26319 __pyx_L1_error:;
26320 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
26321 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
26322 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
26323 __Pyx_AddTraceback("rbd.MirrorImageStatusIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26324 __pyx_r = -1;
26325 __pyx_L0:;
26326 __Pyx_RefNannyFinishContext();
26327 return __pyx_r;
26328}
26329static PyObject *__pyx_gb_3rbd_25MirrorImageStatusIterator_4generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
26330
26331/* "rbd.pyx":2385
26332 * self.get_next_chunk()
26333 *
26334 * def __iter__(self): # <<<<<<<<<<<<<<
26335 * while self.size > 0:
26336 * for i in range(self.size):
26337 */
26338
26339/* Python wrapper */
26340static PyObject *__pyx_pw_3rbd_25MirrorImageStatusIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
26341static PyObject *__pyx_pw_3rbd_25MirrorImageStatusIterator_3__iter__(PyObject *__pyx_v_self) {
26342 PyObject *__pyx_r = 0;
26343 __Pyx_RefNannyDeclarations
26344 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
26345 __pyx_r = __pyx_pf_3rbd_25MirrorImageStatusIterator_2__iter__(((struct __pyx_obj_3rbd_MirrorImageStatusIterator *)__pyx_v_self));
26346
26347 /* function exit code */
26348 __Pyx_RefNannyFinishContext();
26349 return __pyx_r;
26350}
26351
26352static PyObject *__pyx_pf_3rbd_25MirrorImageStatusIterator_2__iter__(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self) {
26353 struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *__pyx_cur_scope;
26354 PyObject *__pyx_r = NULL((void*)0);
26355 __Pyx_RefNannyDeclarations
26356 int __pyx_lineno = 0;
26357 const char *__pyx_filename = NULL((void*)0);
26358 int __pyx_clineno = 0;
26359 __Pyx_RefNannySetupContext("__iter__", 0);
26360 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_1___iter__(__pyx_ptype_3rbd___pyx_scope_struct_1___iter__, __pyx_empty_tuple, NULL((void*)0));
26361 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
26362 __Pyx_RefNannyFinishContext();
26363 return NULL((void*)0);
26364 }
26365 __Pyx_GOTREF(__pyx_cur_scope);
26366 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
26367 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
26368 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
26369 {
26370 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_25MirrorImageStatusIterator_4generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MirrorImageStatusIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_25MirrorImageStatusIterator_4generator1, (PyObject
*) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MirrorImageStatusIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__26370; goto __pyx_L1_error;}
26371 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
26372 __Pyx_RefNannyFinishContext();
26373 return (PyObject *) gen;
26374 }
26375
26376 /* function exit code */
26377 __pyx_L1_error:;
26378 __Pyx_AddTraceback("rbd.MirrorImageStatusIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26379 __pyx_r = NULL((void*)0);
26380 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
26381 __Pyx_XGIVEREF(__pyx_r);
26382 __Pyx_RefNannyFinishContext();
26383 return __pyx_r;
26384}
26385
26386static PyObject *__pyx_gb_3rbd_25MirrorImageStatusIterator_4generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
26387{
26388 struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *)__pyx_generator->closure);
26389 PyObject *__pyx_r = NULL((void*)0);
26390 int __pyx_t_1;
26391 size_t __pyx_t_2;
26392 size_t __pyx_t_3;
26393 PyObject *__pyx_t_4 = NULL((void*)0);
26394 PyObject *__pyx_t_5 = NULL((void*)0);
26395 PyObject *__pyx_t_6 = NULL((void*)0);
26396 PyObject *__pyx_t_7 = NULL((void*)0);
26397 PyObject *__pyx_t_8 = NULL((void*)0);
26398 PyObject *__pyx_t_9 = NULL((void*)0);
26399 PyObject *__pyx_t_10 = NULL((void*)0);
26400 int __pyx_lineno = 0;
26401 const char *__pyx_filename = NULL((void*)0);
26402 int __pyx_clineno = 0;
26403 __Pyx_RefNannyDeclarations
26404 __Pyx_RefNannySetupContext("None", 0);
26405 switch (__pyx_generator->resume_label) {
26406 case 0: goto __pyx_L3_first_run;
26407 case 1: goto __pyx_L8_resume_from_yield;
26408 default: /* CPython raises the right error here */
26409 __Pyx_RefNannyFinishContext();
26410 return NULL((void*)0);
26411 }
26412 __pyx_L3_first_run:;
26413 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__26413; goto __pyx_L1_error;}
26414
26415 /* "rbd.pyx":2386
26416 *
26417 * def __iter__(self):
26418 * while self.size > 0: # <<<<<<<<<<<<<<
26419 * for i in range(self.size):
26420 * yield {
26421 */
26422 while (1) {
26423 __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->size > 0) != 0);
26424 if (!__pyx_t_1) break;
26425
26426 /* "rbd.pyx":2387
26427 * def __iter__(self):
26428 * while self.size > 0:
26429 * for i in range(self.size): # <<<<<<<<<<<<<<
26430 * yield {
26431 * 'name' : decode_cstr(self.images[i].name),
26432 */
26433 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->size;
26434 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
26435 __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
26436
26437 /* "rbd.pyx":2389
26438 * for i in range(self.size):
26439 * yield {
26440 * 'name' : decode_cstr(self.images[i].name), # <<<<<<<<<<<<<<
26441 * 'id' : decode_cstr(self.image_ids[i]),
26442 * 'info' : {
26443 */
26444 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26444; goto __pyx_L1_error;}
26445 __Pyx_GOTREF(__pyx_t_4);
26446 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26446; goto __pyx_L1_error;}
26447 __Pyx_GOTREF(__pyx_t_6);
26448 __pyx_t_7 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26448; goto __pyx_L1_error;}
26449 __Pyx_GOTREF(__pyx_t_7);
26450 __pyx_t_8 = NULL((void*)0);
26451 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
26452 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
26453 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
26454 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
26455 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
26456 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26457 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26458 }
26459 }
26460 if (!__pyx_t_8) {
26461 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26461; goto __pyx_L1_error;}
26462 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
26463 __Pyx_GOTREF(__pyx_t_5);
26464 } else {
26465 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26465; goto __pyx_L1_error;}
26466 __Pyx_GOTREF(__pyx_t_9);
26467 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
26468 __Pyx_GIVEREF(__pyx_t_7);
26469 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_7);
26470 __pyx_t_7 = 0;
26471 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26471; goto __pyx_L1_error;}
26472 __Pyx_GOTREF(__pyx_t_5);
26473 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
26474 }
26475 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26476 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26476; goto __pyx_L1_error;}
26477 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26478
26479 /* "rbd.pyx":2390
26480 * yield {
26481 * 'name' : decode_cstr(self.images[i].name),
26482 * 'id' : decode_cstr(self.image_ids[i]), # <<<<<<<<<<<<<<
26483 * 'info' : {
26484 * 'global_id' : decode_cstr(self.images[i].info.global_id),
26485 */
26486 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__26486; goto __pyx_L1_error;}
26487 __Pyx_GOTREF(__pyx_t_6);
26488 __pyx_t_9 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->image_ids[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__26488; goto __pyx_L1_error;}
26489 __Pyx_GOTREF(__pyx_t_9);
26490 __pyx_t_7 = NULL((void*)0);
26491 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
26492 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
26493 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
26494 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
26495 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
26496 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26497 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26498 }
26499 }
26500 if (!__pyx_t_7) {
26501 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__26501; goto __pyx_L1_error;}
26502 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
26503 __Pyx_GOTREF(__pyx_t_5);
26504 } else {
26505 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__26505; goto __pyx_L1_error;}
26506 __Pyx_GOTREF(__pyx_t_8);
26507 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
26508 __Pyx_GIVEREF(__pyx_t_9);
26509 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_9);
26510 __pyx_t_9 = 0;
26511 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; __pyx_clineno = __LINE__26511; goto __pyx_L1_error;}
26512 __Pyx_GOTREF(__pyx_t_5);
26513 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
26514 }
26515 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26516 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_id, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26516; goto __pyx_L1_error;}
26517 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26518
26519 /* "rbd.pyx":2392
26520 * 'id' : decode_cstr(self.image_ids[i]),
26521 * 'info' : {
26522 * 'global_id' : decode_cstr(self.images[i].info.global_id), # <<<<<<<<<<<<<<
26523 * 'state' : self.images[i].info.state,
26524 * },
26525 */
26526 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26526; goto __pyx_L1_error;}
26527 __Pyx_GOTREF(__pyx_t_5);
26528 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26528; goto __pyx_L1_error;}
26529 __Pyx_GOTREF(__pyx_t_8);
26530 __pyx_t_9 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).info.global_id); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26530; goto __pyx_L1_error;}
26531 __Pyx_GOTREF(__pyx_t_9);
26532 __pyx_t_7 = NULL((void*)0);
26533 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
26534 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
26535 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
26536 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
26537 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
26538 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26539 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26540 }
26541 }
26542 if (!__pyx_t_7) {
26543 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26543; goto __pyx_L1_error;}
26544 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
26545 __Pyx_GOTREF(__pyx_t_6);
26546 } else {
26547 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26547; goto __pyx_L1_error;}
26548 __Pyx_GOTREF(__pyx_t_10);
26549 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
26550 __Pyx_GIVEREF(__pyx_t_9);
26551 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_9
)
;
26552 __pyx_t_9 = 0;
26553 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26553; goto __pyx_L1_error;}
26554 __Pyx_GOTREF(__pyx_t_6);
26555 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
26556 }
26557 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
26558 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_global_id, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26558; goto __pyx_L1_error;}
26559 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26560
26561 /* "rbd.pyx":2393
26562 * 'info' : {
26563 * 'global_id' : decode_cstr(self.images[i].info.global_id),
26564 * 'state' : self.images[i].info.state, # <<<<<<<<<<<<<<
26565 * },
26566 * 'state' : self.images[i].state,
26567 */
26568 __pyx_t_6 = __Pyx_PyInt_From_rbd_mirror_image_state_t((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).info.state); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2393; __pyx_clineno = __LINE__26568; goto __pyx_L1_error;}
26569 __Pyx_GOTREF(__pyx_t_6);
26570 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_state, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; __pyx_clineno = __LINE__26570; goto __pyx_L1_error;}
26571 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26572 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_info, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26572; goto __pyx_L1_error;}
26573 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26574
26575 /* "rbd.pyx":2395
26576 * 'state' : self.images[i].info.state,
26577 * },
26578 * 'state' : self.images[i].state, # <<<<<<<<<<<<<<
26579 * 'description' : decode_cstr(self.images[i].description),
26580 * 'last_update' : datetime.utcfromtimestamp(self.images[i].last_update),
26581 */
26582 __pyx_t_5 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).state); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2395; __pyx_clineno = __LINE__26582; goto __pyx_L1_error;}
26583 __Pyx_GOTREF(__pyx_t_5);
26584 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_state, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26584; goto __pyx_L1_error;}
26585 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26586
26587 /* "rbd.pyx":2396
26588 * },
26589 * 'state' : self.images[i].state,
26590 * 'description' : decode_cstr(self.images[i].description), # <<<<<<<<<<<<<<
26591 * 'last_update' : datetime.utcfromtimestamp(self.images[i].last_update),
26592 * 'up' : self.images[i].up,
26593 */
26594 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__26594; goto __pyx_L1_error;}
26595 __Pyx_GOTREF(__pyx_t_6);
26596 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).description); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__26596; goto __pyx_L1_error;}
26597 __Pyx_GOTREF(__pyx_t_8);
26598 __pyx_t_10 = NULL((void*)0);
26599 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
26600 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
26601 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
26602 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
26603 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
26604 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26605 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26606 }
26607 }
26608 if (!__pyx_t_10) {
26609 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__26609; goto __pyx_L1_error;}
26610 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
26611 __Pyx_GOTREF(__pyx_t_5);
26612 } else {
26613 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__26613; goto __pyx_L1_error;}
26614 __Pyx_GOTREF(__pyx_t_9);
26615 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
26616 __Pyx_GIVEREF(__pyx_t_8);
26617 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_8);
26618 __pyx_t_8 = 0;
26619 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2396; __pyx_clineno = __LINE__26619; goto __pyx_L1_error;}
26620 __Pyx_GOTREF(__pyx_t_5);
26621 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
26622 }
26623 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26624 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_description, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26624; goto __pyx_L1_error;}
26625 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26626
26627 /* "rbd.pyx":2397
26628 * 'state' : self.images[i].state,
26629 * 'description' : decode_cstr(self.images[i].description),
26630 * 'last_update' : datetime.utcfromtimestamp(self.images[i].last_update), # <<<<<<<<<<<<<<
26631 * 'up' : self.images[i].up,
26632 * }
26633 */
26634 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; __pyx_clineno = __LINE__26634; goto __pyx_L1_error;}
26635 __Pyx_GOTREF(__pyx_t_6);
26636 __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; __pyx_clineno = __LINE__26636; goto __pyx_L1_error;}
26637 __Pyx_GOTREF(__pyx_t_9);
26638 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26639 __pyx_t_6 = __Pyx_PyInt_From_time_t((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).last_update); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; __pyx_clineno = __LINE__26639; goto __pyx_L1_error;}
26640 __Pyx_GOTREF(__pyx_t_6);
26641 __pyx_t_8 = NULL((void*)0);
26642 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_9))__builtin_expect(!!(((__pyx_t_9)->ob_type == &PyMethod_Type
)), 0)
) {
26643 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_self);
26644 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
26645 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9)(((PyMethodObject *)__pyx_t_9) -> im_func);
26646 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
26647 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26648 __Pyx_DECREF_SET(__pyx_t_9, function)do { PyObject *tmp = (PyObject *) __pyx_t_9; __pyx_t_9 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26649 }
26650 }
26651 if (!__pyx_t_8) {
26652 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; __pyx_clineno = __LINE__26652; goto __pyx_L1_error;}
26653 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
26654 __Pyx_GOTREF(__pyx_t_5);
26655 } else {
26656 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; __pyx_clineno = __LINE__26656; goto __pyx_L1_error;}
26657 __Pyx_GOTREF(__pyx_t_10);
26658 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
26659 __Pyx_GIVEREF(__pyx_t_6);
26660 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_t_6
)
;
26661 __pyx_t_6 = 0;
26662 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; __pyx_clineno = __LINE__26662; goto __pyx_L1_error;}
26663 __Pyx_GOTREF(__pyx_t_5);
26664 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
26665 }
26666 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
26667 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_last_update, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26667; goto __pyx_L1_error;}
26668 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26669
26670 /* "rbd.pyx":2398
26671 * 'description' : decode_cstr(self.images[i].description),
26672 * 'last_update' : datetime.utcfromtimestamp(self.images[i].last_update),
26673 * 'up' : self.images[i].up, # <<<<<<<<<<<<<<
26674 * }
26675 * if self.size < self.max_read:
26676 */
26677 __pyx_t_5 = __Pyx_PyBool_FromLong((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).up)(((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope
->__pyx_v_i]).up) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct
)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (
( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2398; __pyx_clineno = __LINE__26677; goto __pyx_L1_error;}
26678 __Pyx_GOTREF(__pyx_t_5);
26679 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_up, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__26679; goto __pyx_L1_error;}
26680 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26681 __pyx_r = __pyx_t_4;
26682 __pyx_t_4 = 0;
26683 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
26684 __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
26685 __Pyx_XGIVEREF(__pyx_r);
26686 __Pyx_RefNannyFinishContext();
26687 /* return from generator, yielding value */
26688 __pyx_generator->resume_label = 1;
26689 return __pyx_r;
26690 __pyx_L8_resume_from_yield:;
26691 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
26692 __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
26693 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2388; __pyx_clineno = __LINE__26693; goto __pyx_L1_error;}
26694 }
26695
26696 /* "rbd.pyx":2400
26697 * 'up' : self.images[i].up,
26698 * }
26699 * if self.size < self.max_read: # <<<<<<<<<<<<<<
26700 * break
26701 * self.get_next_chunk()
26702 */
26703 __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->size < __pyx_cur_scope->__pyx_v_self->max_read) != 0);
26704 if (__pyx_t_1) {
26705
26706 /* "rbd.pyx":2401
26707 * }
26708 * if self.size < self.max_read:
26709 * break # <<<<<<<<<<<<<<
26710 * self.get_next_chunk()
26711 *
26712 */
26713 goto __pyx_L5_break;
26714
26715 /* "rbd.pyx":2400
26716 * 'up' : self.images[i].up,
26717 * }
26718 * if self.size < self.max_read: # <<<<<<<<<<<<<<
26719 * break
26720 * self.get_next_chunk()
26721 */
26722 }
26723
26724 /* "rbd.pyx":2402
26725 * if self.size < self.max_read:
26726 * break
26727 * self.get_next_chunk() # <<<<<<<<<<<<<<
26728 *
26729 * def __dealloc__(self):
26730 */
26731 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2402; __pyx_clineno = __LINE__26731; goto __pyx_L1_error;}
26732 __Pyx_GOTREF(__pyx_t_5);
26733 __pyx_t_9 = NULL((void*)0);
26734 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
26735 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
26736 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
26737 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
26738 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
26739 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
26740 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
26741 }
26742 }
26743 if (__pyx_t_9) {
26744 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2402; __pyx_clineno = __LINE__26744; goto __pyx_L1_error;}
26745 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
26746 } else {
26747 __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2402; __pyx_clineno = __LINE__26747; goto __pyx_L1_error;}
26748 }
26749 __Pyx_GOTREF(__pyx_t_4);
26750 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
26751 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
26752 }
26753 __pyx_L5_break:;
26754
26755 /* "rbd.pyx":2385
26756 * self.get_next_chunk()
26757 *
26758 * def __iter__(self): # <<<<<<<<<<<<<<
26759 * while self.size > 0:
26760 * for i in range(self.size):
26761 */
26762
26763 /* function exit code */
26764 PyErr_SetNone(PyExc_StopIteration);
26765 goto __pyx_L0;
26766 __pyx_L1_error:;
26767 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
26768 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
26769 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
26770 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
26771 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
26772 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
26773 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
26774 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26775 __pyx_L0:;
26776 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
26777 __pyx_generator->resume_label = -1;
26778 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
26779 __Pyx_RefNannyFinishContext();
26780 return __pyx_r;
26781}
26782
26783/* "rbd.pyx":2404
26784 * self.get_next_chunk()
26785 *
26786 * def __dealloc__(self): # <<<<<<<<<<<<<<
26787 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26788 * self.size)
26789 */
26790
26791/* Python wrapper */
26792static void __pyx_pw_3rbd_25MirrorImageStatusIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
26793static void __pyx_pw_3rbd_25MirrorImageStatusIterator_6__dealloc__(PyObject *__pyx_v_self) {
26794 __Pyx_RefNannyDeclarations
26795 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
26796 __pyx_pf_3rbd_25MirrorImageStatusIterator_5__dealloc__(((struct __pyx_obj_3rbd_MirrorImageStatusIterator *)__pyx_v_self));
26797
26798 /* function exit code */
26799 __Pyx_RefNannyFinishContext();
26800}
26801
26802static void __pyx_pf_3rbd_25MirrorImageStatusIterator_5__dealloc__(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self) {
26803 __Pyx_RefNannyDeclarations
26804 int __pyx_t_1;
26805 __Pyx_RefNannySetupContext("__dealloc__", 0);
26806
26807 /* "rbd.pyx":2405
26808 *
26809 * def __dealloc__(self):
26810 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images, # <<<<<<<<<<<<<<
26811 * self.size)
26812 * if self.last_read:
26813 */
26814 rbd_mirror_image_status_list_cleanup(__pyx_v_self->image_ids, __pyx_v_self->images, __pyx_v_self->size);
26815
26816 /* "rbd.pyx":2407
26817 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26818 * self.size)
26819 * if self.last_read: # <<<<<<<<<<<<<<
26820 * free(self.last_read)
26821 * if self.image_ids:
26822 */
26823 __pyx_t_1 = (__pyx_v_self->last_read != 0);
26824 if (__pyx_t_1) {
26825
26826 /* "rbd.pyx":2408
26827 * self.size)
26828 * if self.last_read:
26829 * free(self.last_read) # <<<<<<<<<<<<<<
26830 * if self.image_ids:
26831 * free(self.image_ids)
26832 */
26833 free(__pyx_v_self->last_read);
26834
26835 /* "rbd.pyx":2407
26836 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26837 * self.size)
26838 * if self.last_read: # <<<<<<<<<<<<<<
26839 * free(self.last_read)
26840 * if self.image_ids:
26841 */
26842 }
26843
26844 /* "rbd.pyx":2409
26845 * if self.last_read:
26846 * free(self.last_read)
26847 * if self.image_ids: # <<<<<<<<<<<<<<
26848 * free(self.image_ids)
26849 * if self.images:
26850 */
26851 __pyx_t_1 = (__pyx_v_self->image_ids != 0);
26852 if (__pyx_t_1) {
26853
26854 /* "rbd.pyx":2410
26855 * free(self.last_read)
26856 * if self.image_ids:
26857 * free(self.image_ids) # <<<<<<<<<<<<<<
26858 * if self.images:
26859 * free(self.images)
26860 */
26861 free(__pyx_v_self->image_ids);
26862
26863 /* "rbd.pyx":2409
26864 * if self.last_read:
26865 * free(self.last_read)
26866 * if self.image_ids: # <<<<<<<<<<<<<<
26867 * free(self.image_ids)
26868 * if self.images:
26869 */
26870 }
26871
26872 /* "rbd.pyx":2411
26873 * if self.image_ids:
26874 * free(self.image_ids)
26875 * if self.images: # <<<<<<<<<<<<<<
26876 * free(self.images)
26877 *
26878 */
26879 __pyx_t_1 = (__pyx_v_self->images != 0);
26880 if (__pyx_t_1) {
26881
26882 /* "rbd.pyx":2412
26883 * free(self.image_ids)
26884 * if self.images:
26885 * free(self.images) # <<<<<<<<<<<<<<
26886 *
26887 * def get_next_chunk(self):
26888 */
26889 free(__pyx_v_self->images);
26890
26891 /* "rbd.pyx":2411
26892 * if self.image_ids:
26893 * free(self.image_ids)
26894 * if self.images: # <<<<<<<<<<<<<<
26895 * free(self.images)
26896 *
26897 */
26898 }
26899
26900 /* "rbd.pyx":2404
26901 * self.get_next_chunk()
26902 *
26903 * def __dealloc__(self): # <<<<<<<<<<<<<<
26904 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26905 * self.size)
26906 */
26907
26908 /* function exit code */
26909 __Pyx_RefNannyFinishContext();
26910}
26911
26912/* "rbd.pyx":2414
26913 * free(self.images)
26914 *
26915 * def get_next_chunk(self): # <<<<<<<<<<<<<<
26916 * if self.size > 0:
26917 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26918 */
26919
26920/* Python wrapper */
26921static PyObject *__pyx_pw_3rbd_25MirrorImageStatusIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
26922static char __pyx_doc_3rbd_25MirrorImageStatusIterator_7get_next_chunk[] = "MirrorImageStatusIterator.get_next_chunk(self)";
26923static PyObject *__pyx_pw_3rbd_25MirrorImageStatusIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
26924 PyObject *__pyx_r = 0;
26925 __Pyx_RefNannyDeclarations
26926 __Pyx_RefNannySetupContext("get_next_chunk (wrapper)", 0);
26927 __pyx_r = __pyx_pf_3rbd_25MirrorImageStatusIterator_7get_next_chunk(((struct __pyx_obj_3rbd_MirrorImageStatusIterator *)__pyx_v_self));
26928
26929 /* function exit code */
26930 __Pyx_RefNannyFinishContext();
26931 return __pyx_r;
26932}
26933
26934static PyObject *__pyx_pf_3rbd_25MirrorImageStatusIterator_7get_next_chunk(struct __pyx_obj_3rbd_MirrorImageStatusIterator *__pyx_v_self) {
26935 int __pyx_v_ret;
26936 PyObject *__pyx_v_last_read = NULL((void*)0);
26937 PyObject *__pyx_r = NULL((void*)0);
26938 __Pyx_RefNannyDeclarations
26939 int __pyx_t_1;
26940 PyObject *__pyx_t_2 = NULL((void*)0);
26941 PyObject *__pyx_t_3 = NULL((void*)0);
26942 PyObject *__pyx_t_4 = NULL((void*)0);
26943 PyObject *__pyx_t_5 = NULL((void*)0);
26944 Py_ssize_t __pyx_t_6;
26945 PyObject *__pyx_t_7 = NULL((void*)0);
26946 char const *__pyx_t_8;
26947 int __pyx_lineno = 0;
26948 const char *__pyx_filename = NULL((void*)0);
26949 int __pyx_clineno = 0;
26950 __Pyx_RefNannySetupContext("get_next_chunk", 0);
26951
26952 /* "rbd.pyx":2415
26953 *
26954 * def get_next_chunk(self):
26955 * if self.size > 0: # <<<<<<<<<<<<<<
26956 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26957 * self.size)
26958 */
26959 __pyx_t_1 = ((__pyx_v_self->size > 0) != 0);
26960 if (__pyx_t_1) {
26961
26962 /* "rbd.pyx":2416
26963 * def get_next_chunk(self):
26964 * if self.size > 0:
26965 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images, # <<<<<<<<<<<<<<
26966 * self.size)
26967 * self.size = 0
26968 */
26969 rbd_mirror_image_status_list_cleanup(__pyx_v_self->image_ids, __pyx_v_self->images, __pyx_v_self->size);
26970
26971 /* "rbd.pyx":2418
26972 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26973 * self.size)
26974 * self.size = 0 # <<<<<<<<<<<<<<
26975 * with nogil:
26976 * ret = rbd_mirror_image_status_list(self.ioctx, self.last_read,
26977 */
26978 __pyx_v_self->size = 0;
26979
26980 /* "rbd.pyx":2415
26981 *
26982 * def get_next_chunk(self):
26983 * if self.size > 0: # <<<<<<<<<<<<<<
26984 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
26985 * self.size)
26986 */
26987 }
26988
26989 /* "rbd.pyx":2419
26990 * self.size)
26991 * self.size = 0
26992 * with nogil: # <<<<<<<<<<<<<<
26993 * ret = rbd_mirror_image_status_list(self.ioctx, self.last_read,
26994 * self.max_read, self.image_ids,
26995 */
26996 {
26997 #ifdef WITH_THREAD1
26998 PyThreadState *_save;
26999 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
27000 #endif
27001 /*try:*/ {
27002
27003 /* "rbd.pyx":2420
27004 * self.size = 0
27005 * with nogil:
27006 * ret = rbd_mirror_image_status_list(self.ioctx, self.last_read, # <<<<<<<<<<<<<<
27007 * self.max_read, self.image_ids,
27008 * self.images, &self.size)
27009 */
27010 __pyx_v_ret = rbd_mirror_image_status_list(__pyx_v_self->ioctx, __pyx_v_self->last_read, __pyx_v_self->max_read, __pyx_v_self->image_ids, __pyx_v_self->images, (&__pyx_v_self->size));
27011 }
27012
27013 /* "rbd.pyx":2419
27014 * self.size)
27015 * self.size = 0
27016 * with nogil: # <<<<<<<<<<<<<<
27017 * ret = rbd_mirror_image_status_list(self.ioctx, self.last_read,
27018 * self.max_read, self.image_ids,
27019 */
27020 /*finally:*/ {
27021 /*normal exit:*/{
27022 #ifdef WITH_THREAD1
27023 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
27024 #endif
27025 goto __pyx_L6;
27026 }
27027 __pyx_L6:;
27028 }
27029 }
27030
27031 /* "rbd.pyx":2423
27032 * self.max_read, self.image_ids,
27033 * self.images, &self.size)
27034 * if ret < 0: # <<<<<<<<<<<<<<
27035 * raise make_ex(ret, 'error listing mirror images status')
27036 * if self.size > 0:
27037 */
27038 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
27039 if (__pyx_t_1) {
27040
27041 /* "rbd.pyx":2424
27042 * self.images, &self.size)
27043 * if ret < 0:
27044 * raise make_ex(ret, 'error listing mirror images status') # <<<<<<<<<<<<<<
27045 * if self.size > 0:
27046 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27047 */
27048 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__27048; goto __pyx_L1_error;}
27049 __Pyx_GOTREF(__pyx_t_2);
27050 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_listing_mirror_images_stat, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__27050; goto __pyx_L1_error;}
27051 __Pyx_GOTREF(__pyx_t_3);
27052 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
27053 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27054 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
27055 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__27055; goto __pyx_L1_error;}
27056
27057 /* "rbd.pyx":2423
27058 * self.max_read, self.image_ids,
27059 * self.images, &self.size)
27060 * if ret < 0: # <<<<<<<<<<<<<<
27061 * raise make_ex(ret, 'error listing mirror images status')
27062 * if self.size > 0:
27063 */
27064 }
27065
27066 /* "rbd.pyx":2425
27067 * if ret < 0:
27068 * raise make_ex(ret, 'error listing mirror images status')
27069 * if self.size > 0: # <<<<<<<<<<<<<<
27070 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27071 * free(self.last_read)
27072 */
27073 __pyx_t_1 = ((__pyx_v_self->size > 0) != 0);
27074 if (__pyx_t_1) {
27075
27076 /* "rbd.pyx":2426
27077 * raise make_ex(ret, 'error listing mirror images status')
27078 * if self.size > 0:
27079 * last_read = cstr(self.image_ids[self.size - 1], 'last_read') # <<<<<<<<<<<<<<
27080 * free(self.last_read)
27081 * self.last_read = strdup(last_read)
27082 */
27083 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2426; __pyx_clineno = __LINE__27083; goto __pyx_L1_error;}
27084 __Pyx_GOTREF(__pyx_t_2);
27085 __pyx_t_4 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_v_self->image_ids[(__pyx_v_self->size - 1)])); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2426; __pyx_clineno = __LINE__27085; goto __pyx_L1_error;}
27086 __Pyx_GOTREF(__pyx_t_4);
27087 __pyx_t_5 = NULL((void*)0);
27088 __pyx_t_6 = 0;
27089 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
27090 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
27091 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
27092 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
27093 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
27094 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
27095 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
27096 __pyx_t_6 = 1;
27097 }
27098 }
27099 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2426; __pyx_clineno = __LINE__27099; goto __pyx_L1_error;}
27100 __Pyx_GOTREF(__pyx_t_7);
27101 if (__pyx_t_5) {
27102 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
27103 }
27104 __Pyx_GIVEREF(__pyx_t_4);
27105 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_t_4
)
;
27106 __Pyx_INCREF(__pyx_n_s_last_read)( ((PyObject*)(__pyx_n_s_last_read))->ob_refcnt++);
27107 __Pyx_GIVEREF(__pyx_n_s_last_read);
27108 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_s_last_read)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_n_s_last_read
)
;
27109 __pyx_t_4 = 0;
27110 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2426; __pyx_clineno = __LINE__27110; goto __pyx_L1_error;}
27111 __Pyx_GOTREF(__pyx_t_3);
27112 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
27113 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
27114 __pyx_v_last_read = __pyx_t_3;
27115 __pyx_t_3 = 0;
27116
27117 /* "rbd.pyx":2427
27118 * if self.size > 0:
27119 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27120 * free(self.last_read) # <<<<<<<<<<<<<<
27121 * self.last_read = strdup(last_read)
27122 * else:
27123 */
27124 free(__pyx_v_self->last_read);
27125
27126 /* "rbd.pyx":2428
27127 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27128 * free(self.last_read)
27129 * self.last_read = strdup(last_read) # <<<<<<<<<<<<<<
27130 * else:
27131 * free(self.last_read)
27132 */
27133 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_last_read); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__27133; goto __pyx_L1_error;}
27134 __pyx_v_self->last_read = strdup(__pyx_t_8)(__extension__ (__builtin_constant_p (__pyx_t_8) && (
(size_t)(const void *)((__pyx_t_8) + 1) - (size_t)(const void
*)(__pyx_t_8) == 1) ? (((const char *) (__pyx_t_8))[0] == '\0'
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_t_8) + 1; char *__retval = (char *) malloc (
__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_t_8, __len); __retval; })) : __strdup (__pyx_t_8
)))
;
27135
27136 /* "rbd.pyx":2425
27137 * if ret < 0:
27138 * raise make_ex(ret, 'error listing mirror images status')
27139 * if self.size > 0: # <<<<<<<<<<<<<<
27140 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27141 * free(self.last_read)
27142 */
27143 goto __pyx_L8;
27144 }
27145
27146 /* "rbd.pyx":2430
27147 * self.last_read = strdup(last_read)
27148 * else:
27149 * free(self.last_read) # <<<<<<<<<<<<<<
27150 * self.last_read = strdup("")
27151 *
27152 */
27153 /*else*/ {
27154 free(__pyx_v_self->last_read);
27155
27156 /* "rbd.pyx":2431
27157 * else:
27158 * free(self.last_read)
27159 * self.last_read = strdup("") # <<<<<<<<<<<<<<
27160 *
27161 * cdef class MirrorImageInstanceIdIterator(object):
27162 */
27163 __pyx_v_self->last_read = strdup(__pyx_k__13)(__extension__ (__builtin_constant_p (__pyx_k__13) &&
((size_t)(const void *)((__pyx_k__13) + 1) - (size_t)(const void
*)(__pyx_k__13) == 1) ? (((const char *) (__pyx_k__13))[0] ==
'\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_k__13) + 1; char *__retval = (char *) malloc
(__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_k__13, __len); __retval; })) : __strdup (__pyx_k__13
)))
;
27164 }
27165 __pyx_L8:;
27166
27167 /* "rbd.pyx":2414
27168 * free(self.images)
27169 *
27170 * def get_next_chunk(self): # <<<<<<<<<<<<<<
27171 * if self.size > 0:
27172 * rbd_mirror_image_status_list_cleanup(self.image_ids, self.images,
27173 */
27174
27175 /* function exit code */
27176 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
27177 goto __pyx_L0;
27178 __pyx_L1_error:;
27179 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
27180 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
27181 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
27182 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
27183 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
27184 __Pyx_AddTraceback("rbd.MirrorImageStatusIterator.get_next_chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
27185 __pyx_r = NULL((void*)0);
27186 __pyx_L0:;
27187 __Pyx_XDECREF(__pyx_v_last_read)do { if ((__pyx_v_last_read) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_last_read))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_last_read)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_last_read
)))); } while (0); } while (0)
;
27188 __Pyx_XGIVEREF(__pyx_r);
27189 __Pyx_RefNannyFinishContext();
27190 return __pyx_r;
27191}
27192
27193/* "rbd.pyx":2448
27194 * size_t size
27195 *
27196 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
27197 * self.ioctx = convert_ioctx(ioctx)
27198 * self.max_read = 1024
27199 */
27200
27201/* Python wrapper */
27202static int __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
27203static int __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27204 PyObject *__pyx_v_ioctx = 0;
27205 int __pyx_lineno = 0;
27206 const char *__pyx_filename = NULL((void*)0);
27207 int __pyx_clineno = 0;
27208 int __pyx_r;
27209 __Pyx_RefNannyDeclarations
27210 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
27211 {
27212 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
27213 PyObject* values[1] = {0};
27214 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
27215 Py_ssize_t kw_args;
27216 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
27217 switch (pos_args) {
27218 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
27219 case 0: break;
27220 default: goto __pyx_L5_argtuple_error;
27221 }
27222 kw_args = PyDict_Size(__pyx_kwds);
27223 switch (pos_args) {
27224 case 0:
27225 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
27226 else goto __pyx_L5_argtuple_error;
27227 }
27228 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
27229 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__27229; goto __pyx_L3_error;}
27230 }
27231 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
27232 goto __pyx_L5_argtuple_error;
27233 } else {
27234 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
27235 }
27236 __pyx_v_ioctx = values[0];
27237 }
27238 goto __pyx_L4_argument_unpacking_done;
27239 __pyx_L5_argtuple_error:;
27240 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__27240; goto __pyx_L3_error;}
27241 __pyx_L3_error:;
27242 __Pyx_AddTraceback("rbd.MirrorImageInstanceIdIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27243 __Pyx_RefNannyFinishContext();
27244 return -1;
27245 __pyx_L4_argument_unpacking_done:;
27246 __pyx_r = __pyx_pf_3rbd_29MirrorImageInstanceIdIterator___init__(((struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *)__pyx_v_self), __pyx_v_ioctx);
27247
27248 /* function exit code */
27249 __Pyx_RefNannyFinishContext();
27250 return __pyx_r;
27251}
27252
27253static int __pyx_pf_3rbd_29MirrorImageInstanceIdIterator___init__(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
27254 int __pyx_r;
27255 __Pyx_RefNannyDeclarations
27256 rados_ioctx_t __pyx_t_1;
27257 void *__pyx_t_2;
27258 PyObject *__pyx_t_3 = NULL((void*)0);
27259 PyObject *__pyx_t_4 = NULL((void*)0);
27260 PyObject *__pyx_t_5 = NULL((void*)0);
27261 int __pyx_lineno = 0;
27262 const char *__pyx_filename = NULL((void*)0);
27263 int __pyx_clineno = 0;
27264 __Pyx_RefNannySetupContext("__init__", 0);
27265
27266 /* "rbd.pyx":2449
27267 *
27268 * def __init__(self, ioctx):
27269 * self.ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
27270 * self.max_read = 1024
27271 * self.last_read = strdup("")
27272 */
27273 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2449; __pyx_clineno = __LINE__27273; goto __pyx_L1_error;}
27274 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2449; __pyx_clineno = __LINE__27274; goto __pyx_L1_error;}
27275 __pyx_v_self->ioctx = __pyx_t_1;
27276
27277 /* "rbd.pyx":2450
27278 * def __init__(self, ioctx):
27279 * self.ioctx = convert_ioctx(ioctx)
27280 * self.max_read = 1024 # <<<<<<<<<<<<<<
27281 * self.last_read = strdup("")
27282 * self.image_ids = <char **>realloc_chk(NULL,
27283 */
27284 __pyx_v_self->max_read = 0x400;
27285
27286 /* "rbd.pyx":2451
27287 * self.ioctx = convert_ioctx(ioctx)
27288 * self.max_read = 1024
27289 * self.last_read = strdup("") # <<<<<<<<<<<<<<
27290 * self.image_ids = <char **>realloc_chk(NULL,
27291 * sizeof(char *) * self.max_read)
27292 */
27293 __pyx_v_self->last_read = strdup(__pyx_k__13)(__extension__ (__builtin_constant_p (__pyx_k__13) &&
((size_t)(const void *)((__pyx_k__13) + 1) - (size_t)(const void
*)(__pyx_k__13) == 1) ? (((const char *) (__pyx_k__13))[0] ==
'\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_k__13) + 1; char *__retval = (char *) malloc
(__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_k__13, __len); __retval; })) : __strdup (__pyx_k__13
)))
;
27294
27295 /* "rbd.pyx":2452
27296 * self.max_read = 1024
27297 * self.last_read = strdup("")
27298 * self.image_ids = <char **>realloc_chk(NULL, # <<<<<<<<<<<<<<
27299 * sizeof(char *) * self.max_read)
27300 * self.instance_ids = <char **>realloc_chk(NULL,
27301 */
27302 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(NULL((void*)0), ((sizeof(char *)) * __pyx_v_self->max_read)); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; __pyx_clineno = __LINE__27302; goto __pyx_L1_error;}
27303 __pyx_v_self->image_ids = ((char **)__pyx_t_2);
27304
27305 /* "rbd.pyx":2454
27306 * self.image_ids = <char **>realloc_chk(NULL,
27307 * sizeof(char *) * self.max_read)
27308 * self.instance_ids = <char **>realloc_chk(NULL, # <<<<<<<<<<<<<<
27309 * sizeof(char *) * self.max_read)
27310 * self.size = 0
27311 */
27312 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(NULL((void*)0), ((sizeof(char *)) * __pyx_v_self->max_read)); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__27312; goto __pyx_L1_error;}
27313 __pyx_v_self->instance_ids = ((char **)__pyx_t_2);
27314
27315 /* "rbd.pyx":2456
27316 * self.instance_ids = <char **>realloc_chk(NULL,
27317 * sizeof(char *) * self.max_read)
27318 * self.size = 0 # <<<<<<<<<<<<<<
27319 * self.get_next_chunk()
27320 *
27321 */
27322 __pyx_v_self->size = 0;
27323
27324 /* "rbd.pyx":2457
27325 * sizeof(char *) * self.max_read)
27326 * self.size = 0
27327 * self.get_next_chunk() # <<<<<<<<<<<<<<
27328 *
27329 * def __iter__(self):
27330 */
27331 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __pyx_clineno = __LINE__27331; goto __pyx_L1_error;}
27332 __Pyx_GOTREF(__pyx_t_4);
27333 __pyx_t_5 = NULL((void*)0);
27334 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
27335 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
27336 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
27337 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
27338 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
27339 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
27340 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
27341 }
27342 }
27343 if (__pyx_t_5) {
27344 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __pyx_clineno = __LINE__27344; goto __pyx_L1_error;}
27345 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
27346 } else {
27347 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __pyx_clineno = __LINE__27347; goto __pyx_L1_error;}
27348 }
27349 __Pyx_GOTREF(__pyx_t_3);
27350 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
27351 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
27352
27353 /* "rbd.pyx":2448
27354 * size_t size
27355 *
27356 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
27357 * self.ioctx = convert_ioctx(ioctx)
27358 * self.max_read = 1024
27359 */
27360
27361 /* function exit code */
27362 __pyx_r = 0;
27363 goto __pyx_L0;
27364 __pyx_L1_error:;
27365 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
27366 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
27367 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
27368 __Pyx_AddTraceback("rbd.MirrorImageInstanceIdIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27369 __pyx_r = -1;
27370 __pyx_L0:;
27371 __Pyx_RefNannyFinishContext();
27372 return __pyx_r;
27373}
27374static PyObject *__pyx_gb_3rbd_29MirrorImageInstanceIdIterator_4generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
27375
27376/* "rbd.pyx":2459
27377 * self.get_next_chunk()
27378 *
27379 * def __iter__(self): # <<<<<<<<<<<<<<
27380 * while self.size > 0:
27381 * for i in range(self.size):
27382 */
27383
27384/* Python wrapper */
27385static PyObject *__pyx_pw_3rbd_29MirrorImageInstanceIdIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
27386static PyObject *__pyx_pw_3rbd_29MirrorImageInstanceIdIterator_3__iter__(PyObject *__pyx_v_self) {
27387 PyObject *__pyx_r = 0;
27388 __Pyx_RefNannyDeclarations
27389 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
27390 __pyx_r = __pyx_pf_3rbd_29MirrorImageInstanceIdIterator_2__iter__(((struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *)__pyx_v_self));
27391
27392 /* function exit code */
27393 __Pyx_RefNannyFinishContext();
27394 return __pyx_r;
27395}
27396
27397static PyObject *__pyx_pf_3rbd_29MirrorImageInstanceIdIterator_2__iter__(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self) {
27398 struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *__pyx_cur_scope;
27399 PyObject *__pyx_r = NULL((void*)0);
27400 __Pyx_RefNannyDeclarations
27401 int __pyx_lineno = 0;
27402 const char *__pyx_filename = NULL((void*)0);
27403 int __pyx_clineno = 0;
27404 __Pyx_RefNannySetupContext("__iter__", 0);
27405 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_2___iter__(__pyx_ptype_3rbd___pyx_scope_struct_2___iter__, __pyx_empty_tuple, NULL((void*)0));
27406 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
27407 __Pyx_RefNannyFinishContext();
27408 return NULL((void*)0);
27409 }
27410 __Pyx_GOTREF(__pyx_cur_scope);
27411 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
27412 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
27413 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
27414 {
27415 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_29MirrorImageInstanceIdIterator_4generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MirrorImageInstanceIdIterator)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_29MirrorImageInstanceIdIterator_4generator2, (
PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MirrorImageInstanceIdIterator
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2459; __pyx_clineno = __LINE__27415; goto __pyx_L1_error;}
27416 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
27417 __Pyx_RefNannyFinishContext();
27418 return (PyObject *) gen;
27419 }
27420
27421 /* function exit code */
27422 __pyx_L1_error:;
27423 __Pyx_AddTraceback("rbd.MirrorImageInstanceIdIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27424 __pyx_r = NULL((void*)0);
27425 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
27426 __Pyx_XGIVEREF(__pyx_r);
27427 __Pyx_RefNannyFinishContext();
27428 return __pyx_r;
27429}
27430
27431static PyObject *__pyx_gb_3rbd_29MirrorImageInstanceIdIterator_4generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
27432{
27433 struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *)__pyx_generator->closure);
27434 PyObject *__pyx_r = NULL((void*)0);
27435 int __pyx_t_1;
27436 size_t __pyx_t_2;
27437 size_t __pyx_t_3;
27438 PyObject *__pyx_t_4 = NULL((void*)0);
27439 PyObject *__pyx_t_5 = NULL((void*)0);
27440 PyObject *__pyx_t_6 = NULL((void*)0);
27441 PyObject *__pyx_t_7 = NULL((void*)0);
27442 PyObject *__pyx_t_8 = NULL((void*)0);
27443 PyObject *__pyx_t_9 = NULL((void*)0);
27444 int __pyx_lineno = 0;
27445 const char *__pyx_filename = NULL((void*)0);
27446 int __pyx_clineno = 0;
27447 __Pyx_RefNannyDeclarations
27448 __Pyx_RefNannySetupContext("None", 0);
27449 switch (__pyx_generator->resume_label) {
27450 case 0: goto __pyx_L3_first_run;
27451 case 1: goto __pyx_L8_resume_from_yield;
27452 default: /* CPython raises the right error here */
27453 __Pyx_RefNannyFinishContext();
27454 return NULL((void*)0);
27455 }
27456 __pyx_L3_first_run:;
27457 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2459; __pyx_clineno = __LINE__27457; goto __pyx_L1_error;}
27458
27459 /* "rbd.pyx":2460
27460 *
27461 * def __iter__(self):
27462 * while self.size > 0: # <<<<<<<<<<<<<<
27463 * for i in range(self.size):
27464 * yield (decode_cstr(self.image_ids[i]),
27465 */
27466 while (1) {
27467 __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->size > 0) != 0);
27468 if (!__pyx_t_1) break;
27469
27470 /* "rbd.pyx":2461
27471 * def __iter__(self):
27472 * while self.size > 0:
27473 * for i in range(self.size): # <<<<<<<<<<<<<<
27474 * yield (decode_cstr(self.image_ids[i]),
27475 * decode_cstr(self.instance_ids[i]))
27476 */
27477 __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->size;
27478 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
27479 __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
27480
27481 /* "rbd.pyx":2462
27482 * while self.size > 0:
27483 * for i in range(self.size):
27484 * yield (decode_cstr(self.image_ids[i]), # <<<<<<<<<<<<<<
27485 * decode_cstr(self.instance_ids[i]))
27486 * if self.size < self.max_read:
27487 */
27488 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27488; goto __pyx_L1_error;}
27489 __Pyx_GOTREF(__pyx_t_5);
27490 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->image_ids[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27490; goto __pyx_L1_error;}
27491 __Pyx_GOTREF(__pyx_t_6);
27492 __pyx_t_7 = NULL((void*)0);
27493 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
27494 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
27495 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
27496 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
27497 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
27498 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
27499 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
27500 }
27501 }
27502 if (!__pyx_t_7) {
27503 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27503; goto __pyx_L1_error;}
27504 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
27505 __Pyx_GOTREF(__pyx_t_4);
27506 } else {
27507 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27507; goto __pyx_L1_error;}
27508 __Pyx_GOTREF(__pyx_t_8);
27509 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
27510 __Pyx_GIVEREF(__pyx_t_6);
27511 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
27512 __pyx_t_6 = 0;
27513 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27513; goto __pyx_L1_error;}
27514 __Pyx_GOTREF(__pyx_t_4);
27515 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
27516 }
27517 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
27518
27519 /* "rbd.pyx":2463
27520 * for i in range(self.size):
27521 * yield (decode_cstr(self.image_ids[i]),
27522 * decode_cstr(self.instance_ids[i])) # <<<<<<<<<<<<<<
27523 * if self.size < self.max_read:
27524 * break
27525 */
27526 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__27526; goto __pyx_L1_error;}
27527 __Pyx_GOTREF(__pyx_t_8);
27528 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->instance_ids[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__27528; goto __pyx_L1_error;}
27529 __Pyx_GOTREF(__pyx_t_6);
27530 __pyx_t_7 = NULL((void*)0);
27531 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
27532 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
27533 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
27534 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
27535 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
27536 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
27537 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
27538 }
27539 }
27540 if (!__pyx_t_7) {
27541 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__27541; goto __pyx_L1_error;}
27542 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
27543 __Pyx_GOTREF(__pyx_t_5);
27544 } else {
27545 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__27545; goto __pyx_L1_error;}
27546 __Pyx_GOTREF(__pyx_t_9);
27547 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
27548 __Pyx_GIVEREF(__pyx_t_6);
27549 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_6);
27550 __pyx_t_6 = 0;
27551 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2463; __pyx_clineno = __LINE__27551; goto __pyx_L1_error;}
27552 __Pyx_GOTREF(__pyx_t_5);
27553 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
27554 }
27555 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
27556
27557 /* "rbd.pyx":2462
27558 * while self.size > 0:
27559 * for i in range(self.size):
27560 * yield (decode_cstr(self.image_ids[i]), # <<<<<<<<<<<<<<
27561 * decode_cstr(self.instance_ids[i]))
27562 * if self.size < self.max_read:
27563 */
27564 __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27564; goto __pyx_L1_error;}
27565 __Pyx_GOTREF(__pyx_t_8);
27566 __Pyx_GIVEREF(__pyx_t_4);
27567 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_4);
27568 __Pyx_GIVEREF(__pyx_t_5);
27569 PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[1] = __pyx_t_5);
27570 __pyx_t_4 = 0;
27571 __pyx_t_5 = 0;
27572 __pyx_r = __pyx_t_8;
27573 __pyx_t_8 = 0;
27574 __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
27575 __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
27576 __Pyx_XGIVEREF(__pyx_r);
27577 __Pyx_RefNannyFinishContext();
27578 /* return from generator, yielding value */
27579 __pyx_generator->resume_label = 1;
27580 return __pyx_r;
27581 __pyx_L8_resume_from_yield:;
27582 __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
27583 __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
27584 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__27584; goto __pyx_L1_error;}
27585 }
27586
27587 /* "rbd.pyx":2464
27588 * yield (decode_cstr(self.image_ids[i]),
27589 * decode_cstr(self.instance_ids[i]))
27590 * if self.size < self.max_read: # <<<<<<<<<<<<<<
27591 * break
27592 * self.get_next_chunk()
27593 */
27594 __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_self->size < __pyx_cur_scope->__pyx_v_self->max_read) != 0);
27595 if (__pyx_t_1) {
27596
27597 /* "rbd.pyx":2465
27598 * decode_cstr(self.instance_ids[i]))
27599 * if self.size < self.max_read:
27600 * break # <<<<<<<<<<<<<<
27601 * self.get_next_chunk()
27602 *
27603 */
27604 goto __pyx_L5_break;
27605
27606 /* "rbd.pyx":2464
27607 * yield (decode_cstr(self.image_ids[i]),
27608 * decode_cstr(self.instance_ids[i]))
27609 * if self.size < self.max_read: # <<<<<<<<<<<<<<
27610 * break
27611 * self.get_next_chunk()
27612 */
27613 }
27614
27615 /* "rbd.pyx":2466
27616 * if self.size < self.max_read:
27617 * break
27618 * self.get_next_chunk() # <<<<<<<<<<<<<<
27619 *
27620 * def __dealloc__(self):
27621 */
27622 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__27622; goto __pyx_L1_error;}
27623 __Pyx_GOTREF(__pyx_t_5);
27624 __pyx_t_4 = NULL((void*)0);
27625 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
27626 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
27627 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
27628 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
27629 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
27630 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
27631 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
27632 }
27633 }
27634 if (__pyx_t_4) {
27635 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__27635; goto __pyx_L1_error;}
27636 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
27637 } else {
27638 __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__27638; goto __pyx_L1_error;}
27639 }
27640 __Pyx_GOTREF(__pyx_t_8);
27641 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
27642 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
27643 }
27644 __pyx_L5_break:;
27645
27646 /* "rbd.pyx":2459
27647 * self.get_next_chunk()
27648 *
27649 * def __iter__(self): # <<<<<<<<<<<<<<
27650 * while self.size > 0:
27651 * for i in range(self.size):
27652 */
27653
27654 /* function exit code */
27655 PyErr_SetNone(PyExc_StopIteration);
27656 goto __pyx_L0;
27657 __pyx_L1_error:;
27658 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
27659 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
27660 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
27661 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
27662 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
27663 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
27664 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27665 __pyx_L0:;
27666 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
27667 __pyx_generator->resume_label = -1;
27668 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
27669 __Pyx_RefNannyFinishContext();
27670 return __pyx_r;
27671}
27672
27673/* "rbd.pyx":2468
27674 * self.get_next_chunk()
27675 *
27676 * def __dealloc__(self): # <<<<<<<<<<<<<<
27677 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27678 * self.instance_ids, self.size)
27679 */
27680
27681/* Python wrapper */
27682static void __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
27683static void __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_6__dealloc__(PyObject *__pyx_v_self) {
27684 __Pyx_RefNannyDeclarations
27685 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
27686 __pyx_pf_3rbd_29MirrorImageInstanceIdIterator_5__dealloc__(((struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *)__pyx_v_self));
27687
27688 /* function exit code */
27689 __Pyx_RefNannyFinishContext();
27690}
27691
27692static void __pyx_pf_3rbd_29MirrorImageInstanceIdIterator_5__dealloc__(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self) {
27693 __Pyx_RefNannyDeclarations
27694 int __pyx_t_1;
27695 __Pyx_RefNannySetupContext("__dealloc__", 0);
27696
27697 /* "rbd.pyx":2469
27698 *
27699 * def __dealloc__(self):
27700 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids, # <<<<<<<<<<<<<<
27701 * self.instance_ids, self.size)
27702 * if self.last_read:
27703 */
27704 rbd_mirror_image_instance_id_list_cleanup(__pyx_v_self->image_ids, __pyx_v_self->instance_ids, __pyx_v_self->size);
27705
27706 /* "rbd.pyx":2471
27707 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27708 * self.instance_ids, self.size)
27709 * if self.last_read: # <<<<<<<<<<<<<<
27710 * free(self.last_read)
27711 * if self.image_ids:
27712 */
27713 __pyx_t_1 = (__pyx_v_self->last_read != 0);
27714 if (__pyx_t_1) {
27715
27716 /* "rbd.pyx":2472
27717 * self.instance_ids, self.size)
27718 * if self.last_read:
27719 * free(self.last_read) # <<<<<<<<<<<<<<
27720 * if self.image_ids:
27721 * free(self.image_ids)
27722 */
27723 free(__pyx_v_self->last_read);
27724
27725 /* "rbd.pyx":2471
27726 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27727 * self.instance_ids, self.size)
27728 * if self.last_read: # <<<<<<<<<<<<<<
27729 * free(self.last_read)
27730 * if self.image_ids:
27731 */
27732 }
27733
27734 /* "rbd.pyx":2473
27735 * if self.last_read:
27736 * free(self.last_read)
27737 * if self.image_ids: # <<<<<<<<<<<<<<
27738 * free(self.image_ids)
27739 * if self.instance_ids:
27740 */
27741 __pyx_t_1 = (__pyx_v_self->image_ids != 0);
27742 if (__pyx_t_1) {
27743
27744 /* "rbd.pyx":2474
27745 * free(self.last_read)
27746 * if self.image_ids:
27747 * free(self.image_ids) # <<<<<<<<<<<<<<
27748 * if self.instance_ids:
27749 * free(self.instance_ids)
27750 */
27751 free(__pyx_v_self->image_ids);
27752
27753 /* "rbd.pyx":2473
27754 * if self.last_read:
27755 * free(self.last_read)
27756 * if self.image_ids: # <<<<<<<<<<<<<<
27757 * free(self.image_ids)
27758 * if self.instance_ids:
27759 */
27760 }
27761
27762 /* "rbd.pyx":2475
27763 * if self.image_ids:
27764 * free(self.image_ids)
27765 * if self.instance_ids: # <<<<<<<<<<<<<<
27766 * free(self.instance_ids)
27767 *
27768 */
27769 __pyx_t_1 = (__pyx_v_self->instance_ids != 0);
27770 if (__pyx_t_1) {
27771
27772 /* "rbd.pyx":2476
27773 * free(self.image_ids)
27774 * if self.instance_ids:
27775 * free(self.instance_ids) # <<<<<<<<<<<<<<
27776 *
27777 * def get_next_chunk(self):
27778 */
27779 free(__pyx_v_self->instance_ids);
27780
27781 /* "rbd.pyx":2475
27782 * if self.image_ids:
27783 * free(self.image_ids)
27784 * if self.instance_ids: # <<<<<<<<<<<<<<
27785 * free(self.instance_ids)
27786 *
27787 */
27788 }
27789
27790 /* "rbd.pyx":2468
27791 * self.get_next_chunk()
27792 *
27793 * def __dealloc__(self): # <<<<<<<<<<<<<<
27794 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27795 * self.instance_ids, self.size)
27796 */
27797
27798 /* function exit code */
27799 __Pyx_RefNannyFinishContext();
27800}
27801
27802/* "rbd.pyx":2478
27803 * free(self.instance_ids)
27804 *
27805 * def get_next_chunk(self): # <<<<<<<<<<<<<<
27806 * if self.size > 0:
27807 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27808 */
27809
27810/* Python wrapper */
27811static PyObject *__pyx_pw_3rbd_29MirrorImageInstanceIdIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
27812static char __pyx_doc_3rbd_29MirrorImageInstanceIdIterator_7get_next_chunk[] = "MirrorImageInstanceIdIterator.get_next_chunk(self)";
27813static PyObject *__pyx_pw_3rbd_29MirrorImageInstanceIdIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
27814 PyObject *__pyx_r = 0;
27815 __Pyx_RefNannyDeclarations
27816 __Pyx_RefNannySetupContext("get_next_chunk (wrapper)", 0);
27817 __pyx_r = __pyx_pf_3rbd_29MirrorImageInstanceIdIterator_7get_next_chunk(((struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *)__pyx_v_self));
27818
27819 /* function exit code */
27820 __Pyx_RefNannyFinishContext();
27821 return __pyx_r;
27822}
27823
27824static PyObject *__pyx_pf_3rbd_29MirrorImageInstanceIdIterator_7get_next_chunk(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *__pyx_v_self) {
27825 int __pyx_v_ret;
27826 PyObject *__pyx_v_last_read = NULL((void*)0);
27827 PyObject *__pyx_r = NULL((void*)0);
27828 __Pyx_RefNannyDeclarations
27829 int __pyx_t_1;
27830 PyObject *__pyx_t_2 = NULL((void*)0);
27831 PyObject *__pyx_t_3 = NULL((void*)0);
27832 PyObject *__pyx_t_4 = NULL((void*)0);
27833 PyObject *__pyx_t_5 = NULL((void*)0);
27834 Py_ssize_t __pyx_t_6;
27835 PyObject *__pyx_t_7 = NULL((void*)0);
27836 char const *__pyx_t_8;
27837 int __pyx_lineno = 0;
27838 const char *__pyx_filename = NULL((void*)0);
27839 int __pyx_clineno = 0;
27840 __Pyx_RefNannySetupContext("get_next_chunk", 0);
27841
27842 /* "rbd.pyx":2479
27843 *
27844 * def get_next_chunk(self):
27845 * if self.size > 0: # <<<<<<<<<<<<<<
27846 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27847 * self.instance_ids,
27848 */
27849 __pyx_t_1 = ((__pyx_v_self->size > 0) != 0);
27850 if (__pyx_t_1) {
27851
27852 /* "rbd.pyx":2480
27853 * def get_next_chunk(self):
27854 * if self.size > 0:
27855 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids, # <<<<<<<<<<<<<<
27856 * self.instance_ids,
27857 * self.size)
27858 */
27859 rbd_mirror_image_instance_id_list_cleanup(__pyx_v_self->image_ids, __pyx_v_self->instance_ids, __pyx_v_self->size);
27860
27861 /* "rbd.pyx":2483
27862 * self.instance_ids,
27863 * self.size)
27864 * self.size = 0 # <<<<<<<<<<<<<<
27865 * with nogil:
27866 * ret = rbd_mirror_image_instance_id_list(self.ioctx, self.last_read,
27867 */
27868 __pyx_v_self->size = 0;
27869
27870 /* "rbd.pyx":2479
27871 *
27872 * def get_next_chunk(self):
27873 * if self.size > 0: # <<<<<<<<<<<<<<
27874 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
27875 * self.instance_ids,
27876 */
27877 }
27878
27879 /* "rbd.pyx":2484
27880 * self.size)
27881 * self.size = 0
27882 * with nogil: # <<<<<<<<<<<<<<
27883 * ret = rbd_mirror_image_instance_id_list(self.ioctx, self.last_read,
27884 * self.max_read,
27885 */
27886 {
27887 #ifdef WITH_THREAD1
27888 PyThreadState *_save;
27889 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
27890 #endif
27891 /*try:*/ {
27892
27893 /* "rbd.pyx":2485
27894 * self.size = 0
27895 * with nogil:
27896 * ret = rbd_mirror_image_instance_id_list(self.ioctx, self.last_read, # <<<<<<<<<<<<<<
27897 * self.max_read,
27898 * self.image_ids,
27899 */
27900 __pyx_v_ret = rbd_mirror_image_instance_id_list(__pyx_v_self->ioctx, __pyx_v_self->last_read, __pyx_v_self->max_read, __pyx_v_self->image_ids, __pyx_v_self->instance_ids, (&__pyx_v_self->size));
27901 }
27902
27903 /* "rbd.pyx":2484
27904 * self.size)
27905 * self.size = 0
27906 * with nogil: # <<<<<<<<<<<<<<
27907 * ret = rbd_mirror_image_instance_id_list(self.ioctx, self.last_read,
27908 * self.max_read,
27909 */
27910 /*finally:*/ {
27911 /*normal exit:*/{
27912 #ifdef WITH_THREAD1
27913 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
27914 #endif
27915 goto __pyx_L6;
27916 }
27917 __pyx_L6:;
27918 }
27919 }
27920
27921 /* "rbd.pyx":2490
27922 * self.instance_ids,
27923 * &self.size)
27924 * if ret < 0: # <<<<<<<<<<<<<<
27925 * raise make_ex(ret, 'error listing mirror images instance ids')
27926 * if self.size > 0:
27927 */
27928 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
27929 if (__pyx_t_1) {
27930
27931 /* "rbd.pyx":2491
27932 * &self.size)
27933 * if ret < 0:
27934 * raise make_ex(ret, 'error listing mirror images instance ids') # <<<<<<<<<<<<<<
27935 * if self.size > 0:
27936 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27937 */
27938 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__27938; goto __pyx_L1_error;}
27939 __Pyx_GOTREF(__pyx_t_2);
27940 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_listing_mirror_images_inst, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__27940; goto __pyx_L1_error;}
27941 __Pyx_GOTREF(__pyx_t_3);
27942 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
27943 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27944 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
27945 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __pyx_clineno = __LINE__27945; goto __pyx_L1_error;}
27946
27947 /* "rbd.pyx":2490
27948 * self.instance_ids,
27949 * &self.size)
27950 * if ret < 0: # <<<<<<<<<<<<<<
27951 * raise make_ex(ret, 'error listing mirror images instance ids')
27952 * if self.size > 0:
27953 */
27954 }
27955
27956 /* "rbd.pyx":2492
27957 * if ret < 0:
27958 * raise make_ex(ret, 'error listing mirror images instance ids')
27959 * if self.size > 0: # <<<<<<<<<<<<<<
27960 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
27961 * free(self.last_read)
27962 */
27963 __pyx_t_1 = ((__pyx_v_self->size > 0) != 0);
27964 if (__pyx_t_1) {
27965
27966 /* "rbd.pyx":2493
27967 * raise make_ex(ret, 'error listing mirror images instance ids')
27968 * if self.size > 0:
27969 * last_read = cstr(self.image_ids[self.size - 1], 'last_read') # <<<<<<<<<<<<<<
27970 * free(self.last_read)
27971 * self.last_read = strdup(last_read)
27972 */
27973 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__27973; goto __pyx_L1_error;}
27974 __Pyx_GOTREF(__pyx_t_2);
27975 __pyx_t_4 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_v_self->image_ids[(__pyx_v_self->size - 1)])); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__27975; goto __pyx_L1_error;}
27976 __Pyx_GOTREF(__pyx_t_4);
27977 __pyx_t_5 = NULL((void*)0);
27978 __pyx_t_6 = 0;
27979 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
27980 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
27981 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
27982 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
27983 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
27984 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
27985 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
27986 __pyx_t_6 = 1;
27987 }
27988 }
27989 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__27989; goto __pyx_L1_error;}
27990 __Pyx_GOTREF(__pyx_t_7);
27991 if (__pyx_t_5) {
27992 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
27993 }
27994 __Pyx_GIVEREF(__pyx_t_4);
27995 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+__pyx_t_6] = __pyx_t_4
)
;
27996 __Pyx_INCREF(__pyx_n_s_last_read)( ((PyObject*)(__pyx_n_s_last_read))->ob_refcnt++);
27997 __Pyx_GIVEREF(__pyx_n_s_last_read);
27998 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_s_last_read)(((PyTupleObject *)(__pyx_t_7))->ob_item[1+__pyx_t_6] = __pyx_n_s_last_read
)
;
27999 __pyx_t_4 = 0;
28000 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__28000; goto __pyx_L1_error;}
28001 __Pyx_GOTREF(__pyx_t_3);
28002 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
28003 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
28004 __pyx_v_last_read = __pyx_t_3;
28005 __pyx_t_3 = 0;
28006
28007 /* "rbd.pyx":2494
28008 * if self.size > 0:
28009 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
28010 * free(self.last_read) # <<<<<<<<<<<<<<
28011 * self.last_read = strdup(last_read)
28012 * else:
28013 */
28014 free(__pyx_v_self->last_read);
28015
28016 /* "rbd.pyx":2495
28017 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
28018 * free(self.last_read)
28019 * self.last_read = strdup(last_read) # <<<<<<<<<<<<<<
28020 * else:
28021 * free(self.last_read)
28022 */
28023 __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_last_read); if (unlikely((!__pyx_t_8) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_8) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__28023; goto __pyx_L1_error;}
28024 __pyx_v_self->last_read = strdup(__pyx_t_8)(__extension__ (__builtin_constant_p (__pyx_t_8) && (
(size_t)(const void *)((__pyx_t_8) + 1) - (size_t)(const void
*)(__pyx_t_8) == 1) ? (((const char *) (__pyx_t_8))[0] == '\0'
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_t_8) + 1; char *__retval = (char *) malloc (
__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_t_8, __len); __retval; })) : __strdup (__pyx_t_8
)))
;
28025
28026 /* "rbd.pyx":2492
28027 * if ret < 0:
28028 * raise make_ex(ret, 'error listing mirror images instance ids')
28029 * if self.size > 0: # <<<<<<<<<<<<<<
28030 * last_read = cstr(self.image_ids[self.size - 1], 'last_read')
28031 * free(self.last_read)
28032 */
28033 goto __pyx_L8;
28034 }
28035
28036 /* "rbd.pyx":2497
28037 * self.last_read = strdup(last_read)
28038 * else:
28039 * free(self.last_read) # <<<<<<<<<<<<<<
28040 * self.last_read = strdup("")
28041 *
28042 */
28043 /*else*/ {
28044 free(__pyx_v_self->last_read);
28045
28046 /* "rbd.pyx":2498
28047 * else:
28048 * free(self.last_read)
28049 * self.last_read = strdup("") # <<<<<<<<<<<<<<
28050 *
28051 * cdef class PoolMetadataIterator(object):
28052 */
28053 __pyx_v_self->last_read = strdup(__pyx_k__13)(__extension__ (__builtin_constant_p (__pyx_k__13) &&
((size_t)(const void *)((__pyx_k__13) + 1) - (size_t)(const void
*)(__pyx_k__13) == 1) ? (((const char *) (__pyx_k__13))[0] ==
'\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_k__13) + 1; char *__retval = (char *) malloc
(__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_k__13, __len); __retval; })) : __strdup (__pyx_k__13
)))
;
28054 }
28055 __pyx_L8:;
28056
28057 /* "rbd.pyx":2478
28058 * free(self.instance_ids)
28059 *
28060 * def get_next_chunk(self): # <<<<<<<<<<<<<<
28061 * if self.size > 0:
28062 * rbd_mirror_image_instance_id_list_cleanup(self.image_ids,
28063 */
28064
28065 /* function exit code */
28066 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
28067 goto __pyx_L0;
28068 __pyx_L1_error:;
28069 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
28070 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
28071 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
28072 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
28073 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
28074 __Pyx_AddTraceback("rbd.MirrorImageInstanceIdIterator.get_next_chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
28075 __pyx_r = NULL((void*)0);
28076 __pyx_L0:;
28077 __Pyx_XDECREF(__pyx_v_last_read)do { if ((__pyx_v_last_read) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_last_read))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_last_read)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_last_read
)))); } while (0); } while (0)
;
28078 __Pyx_XGIVEREF(__pyx_r);
28079 __Pyx_RefNannyFinishContext();
28080 return __pyx_r;
28081}
28082
28083/* "rbd.pyx":2516
28084 * object next_chunk
28085 *
28086 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
28087 * self.ioctx = convert_ioctx(ioctx)
28088 * self.last_read = strdup("")
28089 */
28090
28091/* Python wrapper */
28092static int __pyx_pw_3rbd_20PoolMetadataIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28093static int __pyx_pw_3rbd_20PoolMetadataIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28094 PyObject *__pyx_v_ioctx = 0;
28095 int __pyx_lineno = 0;
28096 const char *__pyx_filename = NULL((void*)0);
28097 int __pyx_clineno = 0;
28098 int __pyx_r;
28099 __Pyx_RefNannyDeclarations
28100 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
28101 {
28102 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
28103 PyObject* values[1] = {0};
28104 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
28105 Py_ssize_t kw_args;
28106 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
28107 switch (pos_args) {
28108 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
28109 case 0: break;
28110 default: goto __pyx_L5_argtuple_error;
28111 }
28112 kw_args = PyDict_Size(__pyx_kwds);
28113 switch (pos_args) {
28114 case 0:
28115 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
28116 else goto __pyx_L5_argtuple_error;
28117 }
28118 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
28119 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2516; __pyx_clineno = __LINE__28119; goto __pyx_L3_error;}
28120 }
28121 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
28122 goto __pyx_L5_argtuple_error;
28123 } else {
28124 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
28125 }
28126 __pyx_v_ioctx = values[0];
28127 }
28128 goto __pyx_L4_argument_unpacking_done;
28129 __pyx_L5_argtuple_error:;
28130 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2516; __pyx_clineno = __LINE__28130; goto __pyx_L3_error;}
28131 __pyx_L3_error:;
28132 __Pyx_AddTraceback("rbd.PoolMetadataIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28133 __Pyx_RefNannyFinishContext();
28134 return -1;
28135 __pyx_L4_argument_unpacking_done:;
28136 __pyx_r = __pyx_pf_3rbd_20PoolMetadataIterator___init__(((struct __pyx_obj_3rbd_PoolMetadataIterator *)__pyx_v_self), __pyx_v_ioctx);
28137
28138 /* function exit code */
28139 __Pyx_RefNannyFinishContext();
28140 return __pyx_r;
28141}
28142
28143static int __pyx_pf_3rbd_20PoolMetadataIterator___init__(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
28144 int __pyx_r;
28145 __Pyx_RefNannyDeclarations
28146 rados_ioctx_t __pyx_t_1;
28147 PyObject *__pyx_t_2 = NULL((void*)0);
28148 PyObject *__pyx_t_3 = NULL((void*)0);
28149 PyObject *__pyx_t_4 = NULL((void*)0);
28150 int __pyx_lineno = 0;
28151 const char *__pyx_filename = NULL((void*)0);
28152 int __pyx_clineno = 0;
28153 __Pyx_RefNannySetupContext("__init__", 0);
28154
28155 /* "rbd.pyx":2517
28156 *
28157 * def __init__(self, ioctx):
28158 * self.ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
28159 * self.last_read = strdup("")
28160 * self.max_read = 32
28161 */
28162 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2517; __pyx_clineno = __LINE__28162; goto __pyx_L1_error;}
28163 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2517; __pyx_clineno = __LINE__28163; goto __pyx_L1_error;}
28164 __pyx_v_self->ioctx = __pyx_t_1;
28165
28166 /* "rbd.pyx":2518
28167 * def __init__(self, ioctx):
28168 * self.ioctx = convert_ioctx(ioctx)
28169 * self.last_read = strdup("") # <<<<<<<<<<<<<<
28170 * self.max_read = 32
28171 * self.get_next_chunk()
28172 */
28173 __pyx_v_self->last_read = strdup(__pyx_k__13)(__extension__ (__builtin_constant_p (__pyx_k__13) &&
((size_t)(const void *)((__pyx_k__13) + 1) - (size_t)(const void
*)(__pyx_k__13) == 1) ? (((const char *) (__pyx_k__13))[0] ==
'\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_k__13) + 1; char *__retval = (char *) malloc
(__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_k__13, __len); __retval; })) : __strdup (__pyx_k__13
)))
;
28174
28175 /* "rbd.pyx":2519
28176 * self.ioctx = convert_ioctx(ioctx)
28177 * self.last_read = strdup("")
28178 * self.max_read = 32 # <<<<<<<<<<<<<<
28179 * self.get_next_chunk()
28180 *
28181 */
28182 __pyx_v_self->max_read = 32;
28183
28184 /* "rbd.pyx":2520
28185 * self.last_read = strdup("")
28186 * self.max_read = 32
28187 * self.get_next_chunk() # <<<<<<<<<<<<<<
28188 *
28189 * def __iter__(self):
28190 */
28191 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__28191; goto __pyx_L1_error;}
28192 __Pyx_GOTREF(__pyx_t_3);
28193 __pyx_t_4 = NULL((void*)0);
28194 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
28195 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
28196 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
28197 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
28198 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
28199 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
28200 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
28201 }
28202 }
28203 if (__pyx_t_4) {
28204 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__28204; goto __pyx_L1_error;}
28205 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
28206 } else {
28207 __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__28207; goto __pyx_L1_error;}
28208 }
28209 __Pyx_GOTREF(__pyx_t_2);
28210 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
28211 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
28212
28213 /* "rbd.pyx":2516
28214 * object next_chunk
28215 *
28216 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
28217 * self.ioctx = convert_ioctx(ioctx)
28218 * self.last_read = strdup("")
28219 */
28220
28221 /* function exit code */
28222 __pyx_r = 0;
28223 goto __pyx_L0;
28224 __pyx_L1_error:;
28225 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
28226 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
28227 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
28228 __Pyx_AddTraceback("rbd.PoolMetadataIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28229 __pyx_r = -1;
28230 __pyx_L0:;
28231 __Pyx_RefNannyFinishContext();
28232 return __pyx_r;
28233}
28234static PyObject *__pyx_gb_3rbd_20PoolMetadataIterator_4generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
28235
28236/* "rbd.pyx":2522
28237 * self.get_next_chunk()
28238 *
28239 * def __iter__(self): # <<<<<<<<<<<<<<
28240 * while len(self.next_chunk) > 0:
28241 * for pair in self.next_chunk:
28242 */
28243
28244/* Python wrapper */
28245static PyObject *__pyx_pw_3rbd_20PoolMetadataIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
28246static PyObject *__pyx_pw_3rbd_20PoolMetadataIterator_3__iter__(PyObject *__pyx_v_self) {
28247 PyObject *__pyx_r = 0;
28248 __Pyx_RefNannyDeclarations
28249 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
28250 __pyx_r = __pyx_pf_3rbd_20PoolMetadataIterator_2__iter__(((struct __pyx_obj_3rbd_PoolMetadataIterator *)__pyx_v_self));
28251
28252 /* function exit code */
28253 __Pyx_RefNannyFinishContext();
28254 return __pyx_r;
28255}
28256
28257static PyObject *__pyx_pf_3rbd_20PoolMetadataIterator_2__iter__(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self) {
28258 struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *__pyx_cur_scope;
28259 PyObject *__pyx_r = NULL((void*)0);
28260 __Pyx_RefNannyDeclarations
28261 int __pyx_lineno = 0;
28262 const char *__pyx_filename = NULL((void*)0);
28263 int __pyx_clineno = 0;
28264 __Pyx_RefNannySetupContext("__iter__", 0);
28265 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_3___iter__(__pyx_ptype_3rbd___pyx_scope_struct_3___iter__, __pyx_empty_tuple, NULL((void*)0));
28266 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
28267 __Pyx_RefNannyFinishContext();
28268 return NULL((void*)0);
28269 }
28270 __Pyx_GOTREF(__pyx_cur_scope);
28271 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
28272 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
28273 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
28274 {
28275 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_20PoolMetadataIterator_4generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_PoolMetadataIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_20PoolMetadataIterator_4generator3, (PyObject
*) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_PoolMetadataIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; __pyx_clineno = __LINE__28275; goto __pyx_L1_error;}
28276 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
28277 __Pyx_RefNannyFinishContext();
28278 return (PyObject *) gen;
28279 }
28280
28281 /* function exit code */
28282 __pyx_L1_error:;
28283 __Pyx_AddTraceback("rbd.PoolMetadataIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28284 __pyx_r = NULL((void*)0);
28285 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
28286 __Pyx_XGIVEREF(__pyx_r);
28287 __Pyx_RefNannyFinishContext();
28288 return __pyx_r;
28289}
28290
28291static PyObject *__pyx_gb_3rbd_20PoolMetadataIterator_4generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
28292{
28293 struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *)__pyx_generator->closure);
28294 PyObject *__pyx_r = NULL((void*)0);
28295 PyObject *__pyx_t_1 = NULL((void*)0);
28296 Py_ssize_t __pyx_t_2;
28297 int __pyx_t_3;
28298 PyObject *(*__pyx_t_4)(PyObject *);
28299 PyObject *__pyx_t_5 = NULL((void*)0);
28300 PyObject *__pyx_t_6 = NULL((void*)0);
28301 int __pyx_lineno = 0;
28302 const char *__pyx_filename = NULL((void*)0);
28303 int __pyx_clineno = 0;
28304 __Pyx_RefNannyDeclarations
28305 __Pyx_RefNannySetupContext("None", 0);
28306 switch (__pyx_generator->resume_label) {
28307 case 0: goto __pyx_L3_first_run;
28308 case 1: goto __pyx_L8_resume_from_yield;
28309 default: /* CPython raises the right error here */
28310 __Pyx_RefNannyFinishContext();
28311 return NULL((void*)0);
28312 }
28313 __pyx_L3_first_run:;
28314 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; __pyx_clineno = __LINE__28314; goto __pyx_L1_error;}
28315
28316 /* "rbd.pyx":2523
28317 *
28318 * def __iter__(self):
28319 * while len(self.next_chunk) > 0: # <<<<<<<<<<<<<<
28320 * for pair in self.next_chunk:
28321 * yield pair
28322 */
28323 while (1) {
28324 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->next_chunk;
28325 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
28326 __pyx_t_2 = PyObject_LengthPyObject_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)__builtin_expect(!!(__pyx_t_2 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2523; __pyx_clineno = __LINE__28326; goto __pyx_L1_error;}
28327 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
28328 __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
28329 if (!__pyx_t_3) break;
28330
28331 /* "rbd.pyx":2524
28332 * def __iter__(self):
28333 * while len(self.next_chunk) > 0:
28334 * for pair in self.next_chunk: # <<<<<<<<<<<<<<
28335 * yield pair
28336 * if len(self.next_chunk) < self.max_read:
28337 */
28338 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_self->next_chunk))__builtin_expect(!!(((((PyObject*)(__pyx_cur_scope->__pyx_v_self
->next_chunk))->ob_type) == &PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_self->next_chunk)((((PyObject*)(__pyx_cur_scope->__pyx_v_self->next_chunk
))->ob_type) == &PyTuple_Type)
) {
28339 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->next_chunk; __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_2 = 0;
28340 __pyx_t_4 = NULL((void*)0);
28341 } else {
28342 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_self->next_chunk); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28342; goto __pyx_L1_error;}
28343 __Pyx_GOTREF(__pyx_t_1);
28344 __pyx_t_4 = Py_TYPE(__pyx_t_1)(((PyObject*)(__pyx_t_1))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28344; goto __pyx_L1_error;}
28345 }
28346 for (;;) {
28347 if (likely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 1)) {
28348 if (likely(PyList_CheckExact(__pyx_t_1))__builtin_expect(!!(((((PyObject*)(__pyx_t_1))->ob_type) ==
&PyList_Type)), 1)
) {
28349 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
28350 #if CYTHON_COMPILING_IN_CPYTHON1
28351 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2)(((PyListObject *)(__pyx_t_1))->ob_item[__pyx_t_2]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_2++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28351; goto __pyx_L1_error;}
28352 #else
28353 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_2) )
; __pyx_t_2++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28353; goto __pyx_L1_error;}
28354 __Pyx_GOTREF(__pyx_t_5);
28355 #endif
28356 } else {
28357 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
28358 #if CYTHON_COMPILING_IN_CPYTHON1
28359 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[__pyx_t_2]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_2++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28359; goto __pyx_L1_error;}
28360 #else
28361 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_2) )
; __pyx_t_2++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28361; goto __pyx_L1_error;}
28362 __Pyx_GOTREF(__pyx_t_5);
28363 #endif
28364 }
28365 } else {
28366 __pyx_t_5 = __pyx_t_4(__pyx_t_1);
28367 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
28368 PyObject* exc_type = PyErr_Occurred();
28369 if (exc_type) {
28370 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
28371 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__28371; goto __pyx_L1_error;}
28372 }
28373 break;
28374 }
28375 __Pyx_GOTREF(__pyx_t_5);
28376 }
28377 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_pair);
28378 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pair, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_pair
; __pyx_cur_scope->__pyx_v_pair = __pyx_t_5; do { if ((tmp
) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0); } while (0)
;
28379 __Pyx_GIVEREF(__pyx_t_5);
28380 __pyx_t_5 = 0;
28381
28382 /* "rbd.pyx":2525
28383 * while len(self.next_chunk) > 0:
28384 * for pair in self.next_chunk:
28385 * yield pair # <<<<<<<<<<<<<<
28386 * if len(self.next_chunk) < self.max_read:
28387 * break
28388 */
28389 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pair)( ((PyObject*)(__pyx_cur_scope->__pyx_v_pair))->ob_refcnt
++)
;
28390 __pyx_r = __pyx_cur_scope->__pyx_v_pair;
28391 __Pyx_XGIVEREF(__pyx_t_1);
28392 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
28393 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
28394 __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
28395 __Pyx_XGIVEREF(__pyx_r);
28396 __Pyx_RefNannyFinishContext();
28397 /* return from generator, yielding value */
28398 __pyx_generator->resume_label = 1;
28399 return __pyx_r;
28400 __pyx_L8_resume_from_yield:;
28401 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
28402 __pyx_cur_scope->__pyx_t_0 = 0;
28403 __Pyx_XGOTREF(__pyx_t_1);
28404 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
28405 __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
28406 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; __pyx_clineno = __LINE__28406; goto __pyx_L1_error;}
28407
28408 /* "rbd.pyx":2524
28409 * def __iter__(self):
28410 * while len(self.next_chunk) > 0:
28411 * for pair in self.next_chunk: # <<<<<<<<<<<<<<
28412 * yield pair
28413 * if len(self.next_chunk) < self.max_read:
28414 */
28415 }
28416 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
28417
28418 /* "rbd.pyx":2526
28419 * for pair in self.next_chunk:
28420 * yield pair
28421 * if len(self.next_chunk) < self.max_read: # <<<<<<<<<<<<<<
28422 * break
28423 * self.get_next_chunk()
28424 */
28425 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->next_chunk;
28426 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
28427 __pyx_t_2 = PyObject_LengthPyObject_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)__builtin_expect(!!(__pyx_t_2 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__28427; goto __pyx_L1_error;}
28428 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
28429 __pyx_t_3 = ((__pyx_t_2 < __pyx_cur_scope->__pyx_v_self->max_read) != 0);
28430 if (__pyx_t_3) {
28431
28432 /* "rbd.pyx":2527
28433 * yield pair
28434 * if len(self.next_chunk) < self.max_read:
28435 * break # <<<<<<<<<<<<<<
28436 * self.get_next_chunk()
28437 *
28438 */
28439 goto __pyx_L5_break;
28440
28441 /* "rbd.pyx":2526
28442 * for pair in self.next_chunk:
28443 * yield pair
28444 * if len(self.next_chunk) < self.max_read: # <<<<<<<<<<<<<<
28445 * break
28446 * self.get_next_chunk()
28447 */
28448 }
28449
28450 /* "rbd.pyx":2528
28451 * if len(self.next_chunk) < self.max_read:
28452 * break
28453 * self.get_next_chunk() # <<<<<<<<<<<<<<
28454 *
28455 * def __dealloc__(self):
28456 */
28457 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__28457; goto __pyx_L1_error;}
28458 __Pyx_GOTREF(__pyx_t_5);
28459 __pyx_t_6 = NULL((void*)0);
28460 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
28461 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
28462 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
28463 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
28464 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
28465 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
28466 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
28467 }
28468 }
28469 if (__pyx_t_6) {
28470 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__28470; goto __pyx_L1_error;}
28471 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
28472 } else {
28473 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__28473; goto __pyx_L1_error;}
28474 }
28475 __Pyx_GOTREF(__pyx_t_1);
28476 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
28477 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
28478 }
28479 __pyx_L5_break:;
28480
28481 /* "rbd.pyx":2522
28482 * self.get_next_chunk()
28483 *
28484 * def __iter__(self): # <<<<<<<<<<<<<<
28485 * while len(self.next_chunk) > 0:
28486 * for pair in self.next_chunk:
28487 */
28488
28489 /* function exit code */
28490 PyErr_SetNone(PyExc_StopIteration);
28491 goto __pyx_L0;
28492 __pyx_L1_error:;
28493 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
28494 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
28495 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
28496 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28497 __pyx_L0:;
28498 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
28499 __pyx_generator->resume_label = -1;
28500 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
28501 __Pyx_RefNannyFinishContext();
28502 return __pyx_r;
28503}
28504
28505/* "rbd.pyx":2530
28506 * self.get_next_chunk()
28507 *
28508 * def __dealloc__(self): # <<<<<<<<<<<<<<
28509 * if self.last_read:
28510 * free(self.last_read)
28511 */
28512
28513/* Python wrapper */
28514static void __pyx_pw_3rbd_20PoolMetadataIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
28515static void __pyx_pw_3rbd_20PoolMetadataIterator_6__dealloc__(PyObject *__pyx_v_self) {
28516 __Pyx_RefNannyDeclarations
28517 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
28518 __pyx_pf_3rbd_20PoolMetadataIterator_5__dealloc__(((struct __pyx_obj_3rbd_PoolMetadataIterator *)__pyx_v_self));
28519
28520 /* function exit code */
28521 __Pyx_RefNannyFinishContext();
28522}
28523
28524static void __pyx_pf_3rbd_20PoolMetadataIterator_5__dealloc__(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self) {
28525 __Pyx_RefNannyDeclarations
28526 int __pyx_t_1;
28527 __Pyx_RefNannySetupContext("__dealloc__", 0);
28528
28529 /* "rbd.pyx":2531
28530 *
28531 * def __dealloc__(self):
28532 * if self.last_read: # <<<<<<<<<<<<<<
28533 * free(self.last_read)
28534 *
28535 */
28536 __pyx_t_1 = (__pyx_v_self->last_read != 0);
28537 if (__pyx_t_1) {
28538
28539 /* "rbd.pyx":2532
28540 * def __dealloc__(self):
28541 * if self.last_read:
28542 * free(self.last_read) # <<<<<<<<<<<<<<
28543 *
28544 * def get_next_chunk(self):
28545 */
28546 free(__pyx_v_self->last_read);
28547
28548 /* "rbd.pyx":2531
28549 *
28550 * def __dealloc__(self):
28551 * if self.last_read: # <<<<<<<<<<<<<<
28552 * free(self.last_read)
28553 *
28554 */
28555 }
28556
28557 /* "rbd.pyx":2530
28558 * self.get_next_chunk()
28559 *
28560 * def __dealloc__(self): # <<<<<<<<<<<<<<
28561 * if self.last_read:
28562 * free(self.last_read)
28563 */
28564
28565 /* function exit code */
28566 __Pyx_RefNannyFinishContext();
28567}
28568
28569/* "rbd.pyx":2534
28570 * free(self.last_read)
28571 *
28572 * def get_next_chunk(self): # <<<<<<<<<<<<<<
28573 * cdef:
28574 * char *c_keys = NULL
28575 */
28576
28577/* Python wrapper */
28578static PyObject *__pyx_pw_3rbd_20PoolMetadataIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
28579static char __pyx_doc_3rbd_20PoolMetadataIterator_7get_next_chunk[] = "PoolMetadataIterator.get_next_chunk(self)";
28580static PyObject *__pyx_pw_3rbd_20PoolMetadataIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
28581 PyObject *__pyx_r = 0;
28582 __Pyx_RefNannyDeclarations
28583 __Pyx_RefNannySetupContext("get_next_chunk (wrapper)", 0);
28584 __pyx_r = __pyx_pf_3rbd_20PoolMetadataIterator_7get_next_chunk(((struct __pyx_obj_3rbd_PoolMetadataIterator *)__pyx_v_self));
28585
28586 /* function exit code */
28587 __Pyx_RefNannyFinishContext();
28588 return __pyx_r;
28589}
28590
28591static PyObject *__pyx_pf_3rbd_20PoolMetadataIterator_7get_next_chunk(struct __pyx_obj_3rbd_PoolMetadataIterator *__pyx_v_self) {
28592 char *__pyx_v_c_keys;
28593 size_t __pyx_v_keys_size;
28594 char *__pyx_v_c_vals;
28595 size_t __pyx_v_vals_size;
28596 int __pyx_v_ret;
28597 PyObject *__pyx_v_keys = NULL((void*)0);
28598 PyObject *__pyx_v_vals = NULL((void*)0);
28599 PyObject *__pyx_v_last_read = NULL((void*)0);
28600 PyObject *__pyx_v_key = NULL((void*)0);
28601 PyObject *__pyx_v_val = NULL((void*)0);
28602 PyObject *__pyx_r = NULL((void*)0);
28603 __Pyx_RefNannyDeclarations
28604 void *__pyx_t_1;
28605 int __pyx_t_2;
28606 PyObject *__pyx_t_3 = NULL((void*)0);
28607 PyObject *__pyx_t_4 = NULL((void*)0);
28608 PyObject *__pyx_t_5 = NULL((void*)0);
28609 Py_ssize_t __pyx_t_6;
28610 PyObject *(*__pyx_t_7)(PyObject *);
28611 PyObject *__pyx_t_8 = NULL((void*)0);
28612 PyObject *__pyx_t_9 = NULL((void*)0);
28613 PyObject *__pyx_t_10 = NULL((void*)0);
28614 char const *__pyx_t_11;
28615 int __pyx_t_12;
28616 int __pyx_t_13;
28617 char const *__pyx_t_14;
28618 PyObject *__pyx_t_15 = NULL((void*)0);
28619 PyObject *__pyx_t_16 = NULL((void*)0);
28620 PyObject *__pyx_t_17 = NULL((void*)0);
28621 PyObject *__pyx_t_18 = NULL((void*)0);
28622 PyObject *__pyx_t_19 = NULL((void*)0);
28623 PyObject *__pyx_t_20 = NULL((void*)0);
28624 int __pyx_lineno = 0;
28625 const char *__pyx_filename = NULL((void*)0);
28626 int __pyx_clineno = 0;
28627 __Pyx_RefNannySetupContext("get_next_chunk", 0);
28628
28629 /* "rbd.pyx":2536
28630 * def get_next_chunk(self):
28631 * cdef:
28632 * char *c_keys = NULL # <<<<<<<<<<<<<<
28633 * size_t keys_size = 4096
28634 * char *c_vals = NULL
28635 */
28636 __pyx_v_c_keys = NULL((void*)0);
28637
28638 /* "rbd.pyx":2537
28639 * cdef:
28640 * char *c_keys = NULL
28641 * size_t keys_size = 4096 # <<<<<<<<<<<<<<
28642 * char *c_vals = NULL
28643 * size_t vals_size = 4096
28644 */
28645 __pyx_v_keys_size = 0x1000;
28646
28647 /* "rbd.pyx":2538
28648 * char *c_keys = NULL
28649 * size_t keys_size = 4096
28650 * char *c_vals = NULL # <<<<<<<<<<<<<<
28651 * size_t vals_size = 4096
28652 * try:
28653 */
28654 __pyx_v_c_vals = NULL((void*)0);
28655
28656 /* "rbd.pyx":2539
28657 * size_t keys_size = 4096
28658 * char *c_vals = NULL
28659 * size_t vals_size = 4096 # <<<<<<<<<<<<<<
28660 * try:
28661 * while True:
28662 */
28663 __pyx_v_vals_size = 0x1000;
28664
28665 /* "rbd.pyx":2540
28666 * char *c_vals = NULL
28667 * size_t vals_size = 4096
28668 * try: # <<<<<<<<<<<<<<
28669 * while True:
28670 * c_keys = <char *>realloc_chk(c_keys, keys_size)
28671 */
28672 /*try:*/ {
28673
28674 /* "rbd.pyx":2541
28675 * size_t vals_size = 4096
28676 * try:
28677 * while True: # <<<<<<<<<<<<<<
28678 * c_keys = <char *>realloc_chk(c_keys, keys_size)
28679 * c_vals = <char *>realloc_chk(c_vals, vals_size)
28680 */
28681 while (1) {
28682
28683 /* "rbd.pyx":2542
28684 * try:
28685 * while True:
28686 * c_keys = <char *>realloc_chk(c_keys, keys_size) # <<<<<<<<<<<<<<
28687 * c_vals = <char *>realloc_chk(c_vals, vals_size)
28688 * with nogil:
28689 */
28690 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_keys, __pyx_v_keys_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__28690; goto __pyx_L4_error;}
28691 __pyx_v_c_keys = ((char *)__pyx_t_1);
28692
28693 /* "rbd.pyx":2543
28694 * while True:
28695 * c_keys = <char *>realloc_chk(c_keys, keys_size)
28696 * c_vals = <char *>realloc_chk(c_vals, vals_size) # <<<<<<<<<<<<<<
28697 * with nogil:
28698 * ret = rbd_pool_metadata_list(self.ioctx, self.last_read,
28699 */
28700 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_vals, __pyx_v_vals_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2543; __pyx_clineno = __LINE__28700; goto __pyx_L4_error;}
28701 __pyx_v_c_vals = ((char *)__pyx_t_1);
28702
28703 /* "rbd.pyx":2544
28704 * c_keys = <char *>realloc_chk(c_keys, keys_size)
28705 * c_vals = <char *>realloc_chk(c_vals, vals_size)
28706 * with nogil: # <<<<<<<<<<<<<<
28707 * ret = rbd_pool_metadata_list(self.ioctx, self.last_read,
28708 * self.max_read, c_keys,
28709 */
28710 {
28711 #ifdef WITH_THREAD1
28712 PyThreadState *_save;
28713 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
28714 #endif
28715 /*try:*/ {
28716
28717 /* "rbd.pyx":2545
28718 * c_vals = <char *>realloc_chk(c_vals, vals_size)
28719 * with nogil:
28720 * ret = rbd_pool_metadata_list(self.ioctx, self.last_read, # <<<<<<<<<<<<<<
28721 * self.max_read, c_keys,
28722 * &keys_size, c_vals, &vals_size)
28723 */
28724 __pyx_v_ret = rbd_pool_metadata_list(__pyx_v_self->ioctx, __pyx_v_self->last_read, __pyx_v_self->max_read, __pyx_v_c_keys, (&__pyx_v_keys_size), __pyx_v_c_vals, (&__pyx_v_vals_size));
28725 }
28726
28727 /* "rbd.pyx":2544
28728 * c_keys = <char *>realloc_chk(c_keys, keys_size)
28729 * c_vals = <char *>realloc_chk(c_vals, vals_size)
28730 * with nogil: # <<<<<<<<<<<<<<
28731 * ret = rbd_pool_metadata_list(self.ioctx, self.last_read,
28732 * self.max_read, c_keys,
28733 */
28734 /*finally:*/ {
28735 /*normal exit:*/{
28736 #ifdef WITH_THREAD1
28737 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
28738 #endif
28739 goto __pyx_L12;
28740 }
28741 __pyx_L12:;
28742 }
28743 }
28744
28745 /* "rbd.pyx":2548
28746 * self.max_read, c_keys,
28747 * &keys_size, c_vals, &vals_size)
28748 * if ret >= 0: # <<<<<<<<<<<<<<
28749 * break
28750 * elif ret != -errno.ERANGE:
28751 */
28752 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
28753 if (__pyx_t_2) {
28754
28755 /* "rbd.pyx":2549
28756 * &keys_size, c_vals, &vals_size)
28757 * if ret >= 0:
28758 * break # <<<<<<<<<<<<<<
28759 * elif ret != -errno.ERANGE:
28760 * raise make_ex(ret, 'error listing metadata')
28761 */
28762 goto __pyx_L7_break;
28763
28764 /* "rbd.pyx":2548
28765 * self.max_read, c_keys,
28766 * &keys_size, c_vals, &vals_size)
28767 * if ret >= 0: # <<<<<<<<<<<<<<
28768 * break
28769 * elif ret != -errno.ERANGE:
28770 */
28771 }
28772
28773 /* "rbd.pyx":2550
28774 * if ret >= 0:
28775 * break
28776 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
28777 * raise make_ex(ret, 'error listing metadata')
28778 * keys = [decode_cstr(key) for key in
28779 */
28780 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
28781 if (__pyx_t_2) {
28782
28783 /* "rbd.pyx":2551
28784 * break
28785 * elif ret != -errno.ERANGE:
28786 * raise make_ex(ret, 'error listing metadata') # <<<<<<<<<<<<<<
28787 * keys = [decode_cstr(key) for key in
28788 * c_keys[:keys_size].split(b'\0') if key]
28789 */
28790 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__28790; goto __pyx_L4_error;}
28791 __Pyx_GOTREF(__pyx_t_3);
28792 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_listing_metadata, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__28792; goto __pyx_L4_error;}
28793 __Pyx_GOTREF(__pyx_t_4);
28794 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
28795 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
28796 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
28797 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__28797; goto __pyx_L4_error;}
28798
28799 /* "rbd.pyx":2550
28800 * if ret >= 0:
28801 * break
28802 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
28803 * raise make_ex(ret, 'error listing metadata')
28804 * keys = [decode_cstr(key) for key in
28805 */
28806 }
28807 }
28808 __pyx_L7_break:;
28809
28810 /* "rbd.pyx":2552
28811 * elif ret != -errno.ERANGE:
28812 * raise make_ex(ret, 'error listing metadata')
28813 * keys = [decode_cstr(key) for key in # <<<<<<<<<<<<<<
28814 * c_keys[:keys_size].split(b'\0') if key]
28815 * vals = [decode_cstr(val) for val in
28816 */
28817 __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__28817; goto __pyx_L4_error;}
28818 __Pyx_GOTREF(__pyx_t_4);
28819
28820 /* "rbd.pyx":2553
28821 * raise make_ex(ret, 'error listing metadata')
28822 * keys = [decode_cstr(key) for key in
28823 * c_keys[:keys_size].split(b'\0') if key] # <<<<<<<<<<<<<<
28824 * vals = [decode_cstr(val) for val in
28825 * c_vals[:vals_size].split(b'\0') if val]
28826 */
28827 __pyx_t_3 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_keys + 0, __pyx_v_keys_size - 0); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28827; goto __pyx_L4_error;}
28828 __Pyx_GOTREF(__pyx_t_3);
28829 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28829; goto __pyx_L4_error;}
28830 __Pyx_GOTREF(__pyx_t_5);
28831 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
28832 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__14, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28832; goto __pyx_L4_error;}
28833 __Pyx_GOTREF(__pyx_t_3);
28834 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
28835 if (likely(PyList_CheckExact(__pyx_t_3))__builtin_expect(!!(((((PyObject*)(__pyx_t_3))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_3)((((PyObject*)(__pyx_t_3))->ob_type) == &PyTuple_Type)) {
28836 __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_6 = 0;
28837 __pyx_t_7 = NULL((void*)0);
28838 } else {
28839 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28839; goto __pyx_L4_error;}
28840 __Pyx_GOTREF(__pyx_t_5);
28841 __pyx_t_7 = Py_TYPE(__pyx_t_5)(((PyObject*)(__pyx_t_5))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28841; goto __pyx_L4_error;}
28842 }
28843 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
28844 for (;;) {
28845 if (likely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 1)) {
28846 if (likely(PyList_CheckExact(__pyx_t_5))__builtin_expect(!!(((((PyObject*)(__pyx_t_5))->ob_type) ==
&PyList_Type)), 1)
) {
28847 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)(((PyVarObject*)(__pyx_t_5))->ob_size)) break;
28848 #if CYTHON_COMPILING_IN_CPYTHON1
28849 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6)(((PyListObject *)(__pyx_t_5))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28849; goto __pyx_L4_error;}
28850 #else
28851 __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6)( (((PyObject*)(__pyx_t_5))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_5, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28851; goto __pyx_L4_error;}
28852 __Pyx_GOTREF(__pyx_t_3);
28853 #endif
28854 } else {
28855 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)(((PyVarObject*)(__pyx_t_5))->ob_size)) break;
28856 #if CYTHON_COMPILING_IN_CPYTHON1
28857 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6)(((PyTupleObject *)(__pyx_t_5))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28857; goto __pyx_L4_error;}
28858 #else
28859 __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6)( (((PyObject*)(__pyx_t_5))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_5, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28859; goto __pyx_L4_error;}
28860 __Pyx_GOTREF(__pyx_t_3);
28861 #endif
28862 }
28863 } else {
28864 __pyx_t_3 = __pyx_t_7(__pyx_t_5);
28865 if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {
28866 PyObject* exc_type = PyErr_Occurred();
28867 if (exc_type) {
28868 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
28869 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28869; goto __pyx_L4_error;}
28870 }
28871 break;
28872 }
28873 __Pyx_GOTREF(__pyx_t_3);
28874 }
28875 __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_3
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
28876 __pyx_t_3 = 0;
28877 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__28877; goto __pyx_L4_error;}
28878 if (__pyx_t_2) {
28879
28880 /* "rbd.pyx":2552
28881 * elif ret != -errno.ERANGE:
28882 * raise make_ex(ret, 'error listing metadata')
28883 * keys = [decode_cstr(key) for key in # <<<<<<<<<<<<<<
28884 * c_keys[:keys_size].split(b'\0') if key]
28885 * vals = [decode_cstr(val) for val in
28886 */
28887 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__28887; goto __pyx_L4_error;}
28888 __Pyx_GOTREF(__pyx_t_8);
28889 __pyx_t_9 = NULL((void*)0);
28890 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
28891 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
28892 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
28893 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
28894 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
28895 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
28896 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
28897 }
28898 }
28899 if (!__pyx_t_9) {
28900 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_key); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__28900; goto __pyx_L4_error;}
28901 __Pyx_GOTREF(__pyx_t_3);
28902 } else {
28903 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__28903; goto __pyx_L4_error;}
28904 __Pyx_GOTREF(__pyx_t_10);
28905 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
28906 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
28907 __Pyx_GIVEREF(__pyx_v_key);
28908 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_key)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_v_key
)
;
28909 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__28909; goto __pyx_L4_error;}
28910 __Pyx_GOTREF(__pyx_t_3);
28911 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
28912 }
28913 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
28914 if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_4, (PyObject
*)__pyx_t_3)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__28914; goto __pyx_L4_error;}
28915 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
28916
28917 /* "rbd.pyx":2553
28918 * raise make_ex(ret, 'error listing metadata')
28919 * keys = [decode_cstr(key) for key in
28920 * c_keys[:keys_size].split(b'\0') if key] # <<<<<<<<<<<<<<
28921 * vals = [decode_cstr(val) for val in
28922 * c_vals[:vals_size].split(b'\0') if val]
28923 */
28924 }
28925
28926 /* "rbd.pyx":2552
28927 * elif ret != -errno.ERANGE:
28928 * raise make_ex(ret, 'error listing metadata')
28929 * keys = [decode_cstr(key) for key in # <<<<<<<<<<<<<<
28930 * c_keys[:keys_size].split(b'\0') if key]
28931 * vals = [decode_cstr(val) for val in
28932 */
28933 }
28934 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
28935 __pyx_v_keys = ((PyObject*)__pyx_t_4);
28936 __pyx_t_4 = 0;
28937
28938 /* "rbd.pyx":2554
28939 * keys = [decode_cstr(key) for key in
28940 * c_keys[:keys_size].split(b'\0') if key]
28941 * vals = [decode_cstr(val) for val in # <<<<<<<<<<<<<<
28942 * c_vals[:vals_size].split(b'\0') if val]
28943 * if len(keys) > 0:
28944 */
28945 __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__28945; goto __pyx_L4_error;}
28946 __Pyx_GOTREF(__pyx_t_4);
28947
28948 /* "rbd.pyx":2555
28949 * c_keys[:keys_size].split(b'\0') if key]
28950 * vals = [decode_cstr(val) for val in
28951 * c_vals[:vals_size].split(b'\0') if val] # <<<<<<<<<<<<<<
28952 * if len(keys) > 0:
28953 * last_read = cstr(keys[-1], 'last_read')
28954 */
28955 __pyx_t_5 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_vals + 0, __pyx_v_vals_size - 0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28955; goto __pyx_L4_error;}
28956 __Pyx_GOTREF(__pyx_t_5);
28957 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28957; goto __pyx_L4_error;}
28958 __Pyx_GOTREF(__pyx_t_3);
28959 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
28960 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__15, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28960; goto __pyx_L4_error;}
28961 __Pyx_GOTREF(__pyx_t_5);
28962 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
28963 if (likely(PyList_CheckExact(__pyx_t_5))__builtin_expect(!!(((((PyObject*)(__pyx_t_5))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_5)((((PyObject*)(__pyx_t_5))->ob_type) == &PyTuple_Type)) {
28964 __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_6 = 0;
28965 __pyx_t_7 = NULL((void*)0);
28966 } else {
28967 __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28967; goto __pyx_L4_error;}
28968 __Pyx_GOTREF(__pyx_t_3);
28969 __pyx_t_7 = Py_TYPE(__pyx_t_3)(((PyObject*)(__pyx_t_3))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28969; goto __pyx_L4_error;}
28970 }
28971 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
28972 for (;;) {
28973 if (likely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 1)) {
28974 if (likely(PyList_CheckExact(__pyx_t_3))__builtin_expect(!!(((((PyObject*)(__pyx_t_3))->ob_type) ==
&PyList_Type)), 1)
) {
28975 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)(((PyVarObject*)(__pyx_t_3))->ob_size)) break;
28976 #if CYTHON_COMPILING_IN_CPYTHON1
28977 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6)(((PyListObject *)(__pyx_t_3))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28977; goto __pyx_L4_error;}
28978 #else
28979 __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6)( (((PyObject*)(__pyx_t_3))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_3, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28979; goto __pyx_L4_error;}
28980 __Pyx_GOTREF(__pyx_t_5);
28981 #endif
28982 } else {
28983 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)(((PyVarObject*)(__pyx_t_3))->ob_size)) break;
28984 #if CYTHON_COMPILING_IN_CPYTHON1
28985 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)(((PyTupleObject *)(__pyx_t_3))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28985; goto __pyx_L4_error;}
28986 #else
28987 __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6)( (((PyObject*)(__pyx_t_3))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_3, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28987; goto __pyx_L4_error;}
28988 __Pyx_GOTREF(__pyx_t_5);
28989 #endif
28990 }
28991 } else {
28992 __pyx_t_5 = __pyx_t_7(__pyx_t_3);
28993 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
28994 PyObject* exc_type = PyErr_Occurred();
28995 if (exc_type) {
28996 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
28997 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__28997; goto __pyx_L4_error;}
28998 }
28999 break;
29000 }
29001 __Pyx_GOTREF(__pyx_t_5);
29002 }
29003 __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_v_val; __pyx_v_val = __pyx_t_5
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
29004 __pyx_t_5 = 0;
29005 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__29005; goto __pyx_L4_error;}
29006 if (__pyx_t_2) {
29007
29008 /* "rbd.pyx":2554
29009 * keys = [decode_cstr(key) for key in
29010 * c_keys[:keys_size].split(b'\0') if key]
29011 * vals = [decode_cstr(val) for val in # <<<<<<<<<<<<<<
29012 * c_vals[:vals_size].split(b'\0') if val]
29013 * if len(keys) > 0:
29014 */
29015 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__29015; goto __pyx_L4_error;}
29016 __Pyx_GOTREF(__pyx_t_8);
29017 __pyx_t_10 = NULL((void*)0);
29018 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
29019 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
29020 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
29021 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
29022 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
29023 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
29024 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
29025 }
29026 }
29027 if (!__pyx_t_10) {
29028 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_val); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__29028; goto __pyx_L4_error;}
29029 __Pyx_GOTREF(__pyx_t_5);
29030 } else {
29031 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__29031; goto __pyx_L4_error;}
29032 __Pyx_GOTREF(__pyx_t_9);
29033 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
29034 __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++);
29035 __Pyx_GIVEREF(__pyx_v_val);
29036 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_val)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_v_val
)
;
29037 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__29037; goto __pyx_L4_error;}
29038 __Pyx_GOTREF(__pyx_t_5);
29039 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
29040 }
29041 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
29042 if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_4, (PyObject
*)__pyx_t_5)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; __pyx_clineno = __LINE__29042; goto __pyx_L4_error;}
29043 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
29044
29045 /* "rbd.pyx":2555
29046 * c_keys[:keys_size].split(b'\0') if key]
29047 * vals = [decode_cstr(val) for val in
29048 * c_vals[:vals_size].split(b'\0') if val] # <<<<<<<<<<<<<<
29049 * if len(keys) > 0:
29050 * last_read = cstr(keys[-1], 'last_read')
29051 */
29052 }
29053
29054 /* "rbd.pyx":2554
29055 * keys = [decode_cstr(key) for key in
29056 * c_keys[:keys_size].split(b'\0') if key]
29057 * vals = [decode_cstr(val) for val in # <<<<<<<<<<<<<<
29058 * c_vals[:vals_size].split(b'\0') if val]
29059 * if len(keys) > 0:
29060 */
29061 }
29062 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
29063 __pyx_v_vals = ((PyObject*)__pyx_t_4);
29064 __pyx_t_4 = 0;
29065
29066 /* "rbd.pyx":2556
29067 * vals = [decode_cstr(val) for val in
29068 * c_vals[:vals_size].split(b'\0') if val]
29069 * if len(keys) > 0: # <<<<<<<<<<<<<<
29070 * last_read = cstr(keys[-1], 'last_read')
29071 * free(self.last_read)
29072 */
29073 __pyx_t_6 = PyList_GET_SIZE(__pyx_v_keys)(((PyVarObject*)(__pyx_v_keys))->ob_size); if (unlikely(__pyx_t_6 == -1)__builtin_expect(!!(__pyx_t_6 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2556; __pyx_clineno = __LINE__29073; goto __pyx_L4_error;}
29074 __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
29075 if (__pyx_t_2) {
29076
29077 /* "rbd.pyx":2557
29078 * c_vals[:vals_size].split(b'\0') if val]
29079 * if len(keys) > 0:
29080 * last_read = cstr(keys[-1], 'last_read') # <<<<<<<<<<<<<<
29081 * free(self.last_read)
29082 * self.last_read = strdup(last_read)
29083 */
29084 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__29084; goto __pyx_L4_error;}
29085 __Pyx_GOTREF(__pyx_t_3);
29086 __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_keys, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(-1L < (
long)((Py_ssize_t)(((size_t)-1)>>1)) || -1L == (long)((
Py_ssize_t)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(-1L > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)
|| -1L == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)),
1))) || (sizeof(long) == sizeof(Py_ssize_t) && (1 ||
__builtin_expect(!!(-1L < (long)((Py_ssize_t)(((size_t)-1
)>>1)) || -1L == (long)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_List_Fast(__pyx_v_keys, (Py_ssize_t
)-1L, 1, 1) : (PyErr_SetString(PyExc_IndexError, "list index out of range"
), (PyObject*)((void*)0)))
; if (unlikely(__pyx_t_5 == NULL)__builtin_expect(!!(__pyx_t_5 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__29086; goto __pyx_L4_error;};
29087 __Pyx_GOTREF(__pyx_t_5);
29088 __pyx_t_8 = NULL((void*)0);
29089 __pyx_t_6 = 0;
29090 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
29091 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
29092 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
29093 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
29094 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
29095 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
29096 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
29097 __pyx_t_6 = 1;
29098 }
29099 }
29100 __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__29100; goto __pyx_L4_error;}
29101 __Pyx_GOTREF(__pyx_t_9);
29102 if (__pyx_t_8) {
29103 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
29104 }
29105 __Pyx_GIVEREF(__pyx_t_5);
29106 PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_5)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_6] = __pyx_t_5
)
;
29107 __Pyx_INCREF(__pyx_n_s_last_read)( ((PyObject*)(__pyx_n_s_last_read))->ob_refcnt++);
29108 __Pyx_GIVEREF(__pyx_n_s_last_read);
29109 PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_n_s_last_read)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_6] = __pyx_n_s_last_read
)
;
29110 __pyx_t_5 = 0;
29111 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__29111; goto __pyx_L4_error;}
29112 __Pyx_GOTREF(__pyx_t_4);
29113 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
29114 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
29115 __pyx_v_last_read = __pyx_t_4;
29116 __pyx_t_4 = 0;
29117
29118 /* "rbd.pyx":2558
29119 * if len(keys) > 0:
29120 * last_read = cstr(keys[-1], 'last_read')
29121 * free(self.last_read) # <<<<<<<<<<<<<<
29122 * self.last_read = strdup(last_read)
29123 * self.next_chunk = list(zip(keys, vals))
29124 */
29125 free(__pyx_v_self->last_read);
29126
29127 /* "rbd.pyx":2559
29128 * last_read = cstr(keys[-1], 'last_read')
29129 * free(self.last_read)
29130 * self.last_read = strdup(last_read) # <<<<<<<<<<<<<<
29131 * self.next_chunk = list(zip(keys, vals))
29132 * finally:
29133 */
29134 __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_last_read); if (unlikely((!__pyx_t_11) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_11) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; __pyx_clineno = __LINE__29134; goto __pyx_L4_error;}
29135 __pyx_v_self->last_read = strdup(__pyx_t_11)(__extension__ (__builtin_constant_p (__pyx_t_11) && (
(size_t)(const void *)((__pyx_t_11) + 1) - (size_t)(const void
*)(__pyx_t_11) == 1) ? (((const char *) (__pyx_t_11))[0] == '\0'
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_t_11) + 1; char *__retval = (char *) malloc (
__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_t_11, __len); __retval; })) : __strdup (__pyx_t_11
)))
;
29136
29137 /* "rbd.pyx":2556
29138 * vals = [decode_cstr(val) for val in
29139 * c_vals[:vals_size].split(b'\0') if val]
29140 * if len(keys) > 0: # <<<<<<<<<<<<<<
29141 * last_read = cstr(keys[-1], 'last_read')
29142 * free(self.last_read)
29143 */
29144 }
29145
29146 /* "rbd.pyx":2560
29147 * free(self.last_read)
29148 * self.last_read = strdup(last_read)
29149 * self.next_chunk = list(zip(keys, vals)) # <<<<<<<<<<<<<<
29150 * finally:
29151 * free(c_keys)
29152 */
29153 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2560; __pyx_clineno = __LINE__29153; goto __pyx_L4_error;}
29154 __Pyx_GOTREF(__pyx_t_4);
29155 __Pyx_INCREF(__pyx_v_keys)( ((PyObject*)(__pyx_v_keys))->ob_refcnt++);
29156 __Pyx_GIVEREF(__pyx_v_keys);
29157 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_keys)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_v_keys
)
;
29158 __Pyx_INCREF(__pyx_v_vals)( ((PyObject*)(__pyx_v_vals))->ob_refcnt++);
29159 __Pyx_GIVEREF(__pyx_v_vals);
29160 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_vals)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_v_vals
)
;
29161 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2560; __pyx_clineno = __LINE__29161; goto __pyx_L4_error;}
29162 __Pyx_GOTREF(__pyx_t_3);
29163 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
29164 __pyx_t_4 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2560; __pyx_clineno = __LINE__29164; goto __pyx_L4_error;}
29165 __Pyx_GOTREF(__pyx_t_4);
29166 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
29167 __Pyx_GIVEREF(__pyx_t_4);
29168 __Pyx_GOTREF(__pyx_v_self->next_chunk);
29169 __Pyx_DECREF(__pyx_v_self->next_chunk)do { if ( --((PyObject*)(__pyx_v_self->next_chunk))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
next_chunk)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_v_self->next_chunk)))); } while (0)
;
29170 __pyx_v_self->next_chunk = __pyx_t_4;
29171 __pyx_t_4 = 0;
29172 }
29173
29174 /* "rbd.pyx":2562
29175 * self.next_chunk = list(zip(keys, vals))
29176 * finally:
29177 * free(c_keys) # <<<<<<<<<<<<<<
29178 * free(c_vals)
29179 *
29180 */
29181 /*finally:*/ {
29182 /*normal exit:*/{
29183 free(__pyx_v_c_keys);
29184
29185 /* "rbd.pyx":2563
29186 * finally:
29187 * free(c_keys)
29188 * free(c_vals) # <<<<<<<<<<<<<<
29189 *
29190 * cdef class ConfigPoolIterator(object):
29191 */
29192 free(__pyx_v_c_vals);
29193 goto __pyx_L5;
29194 }
29195 /*exception exit:*/{
29196 __pyx_L4_error:;
29197 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
29198 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
29199 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
29200 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
29201 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
29202 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
29203 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
29204 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
29205 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
29206 __Pyx_XGOTREF(__pyx_t_15);
29207 __Pyx_XGOTREF(__pyx_t_16);
29208 __Pyx_XGOTREF(__pyx_t_17);
29209 __Pyx_XGOTREF(__pyx_t_18);
29210 __Pyx_XGOTREF(__pyx_t_19);
29211 __Pyx_XGOTREF(__pyx_t_20);
29212 __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
29213 {
29214
29215 /* "rbd.pyx":2562
29216 * self.next_chunk = list(zip(keys, vals))
29217 * finally:
29218 * free(c_keys) # <<<<<<<<<<<<<<
29219 * free(c_vals)
29220 *
29221 */
29222 free(__pyx_v_c_keys);
29223
29224 /* "rbd.pyx":2563
29225 * finally:
29226 * free(c_keys)
29227 * free(c_vals) # <<<<<<<<<<<<<<
29228 *
29229 * cdef class ConfigPoolIterator(object):
29230 */
29231 free(__pyx_v_c_vals);
29232 }
29233 if (PY_MAJOR_VERSION2 >= 3) {
29234 __Pyx_XGIVEREF(__pyx_t_18);
29235 __Pyx_XGIVEREF(__pyx_t_19);
29236 __Pyx_XGIVEREF(__pyx_t_20);
29237 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
29238 }
29239 __Pyx_XGIVEREF(__pyx_t_15);
29240 __Pyx_XGIVEREF(__pyx_t_16);
29241 __Pyx_XGIVEREF(__pyx_t_17);
29242 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
29243 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
29244 __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
29245 goto __pyx_L1_error;
29246 }
29247 __pyx_L5:;
29248 }
29249
29250 /* "rbd.pyx":2534
29251 * free(self.last_read)
29252 *
29253 * def get_next_chunk(self): # <<<<<<<<<<<<<<
29254 * cdef:
29255 * char *c_keys = NULL
29256 */
29257
29258 /* function exit code */
29259 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
29260 goto __pyx_L0;
29261 __pyx_L1_error:;
29262 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
29263 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
29264 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
29265 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
29266 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
29267 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
29268 __Pyx_AddTraceback("rbd.PoolMetadataIterator.get_next_chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
29269 __pyx_r = NULL((void*)0);
29270 __pyx_L0:;
29271 __Pyx_XDECREF(__pyx_v_keys)do { if ((__pyx_v_keys) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_keys))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_keys)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_keys)))); } while (0); } while
(0)
;
29272 __Pyx_XDECREF(__pyx_v_vals)do { if ((__pyx_v_vals) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_vals))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_vals)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_vals)))); } while (0); } while
(0)
;
29273 __Pyx_XDECREF(__pyx_v_last_read)do { if ((__pyx_v_last_read) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_last_read))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_last_read)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_last_read
)))); } while (0); } while (0)
;
29274 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
29275 __Pyx_XDECREF(__pyx_v_val)do { if ((__pyx_v_val) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_val))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_val)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_val)))); } while (0); } while (0)
;
29276 __Pyx_XGIVEREF(__pyx_r);
29277 __Pyx_RefNannyFinishContext();
29278 return __pyx_r;
29279}
29280
29281/* "rbd.pyx":2584
29282 * int num_options
29283 *
29284 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
29285 * cdef:
29286 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
29287 */
29288
29289/* Python wrapper */
29290static int __pyx_pw_3rbd_18ConfigPoolIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29291static int __pyx_pw_3rbd_18ConfigPoolIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29292 PyObject *__pyx_v_ioctx = 0;
29293 int __pyx_lineno = 0;
29294 const char *__pyx_filename = NULL((void*)0);
29295 int __pyx_clineno = 0;
29296 int __pyx_r;
29297 __Pyx_RefNannyDeclarations
29298 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
29299 {
29300 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
29301 PyObject* values[1] = {0};
29302 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
29303 Py_ssize_t kw_args;
29304 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
29305 switch (pos_args) {
29306 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
29307 case 0: break;
29308 default: goto __pyx_L5_argtuple_error;
29309 }
29310 kw_args = PyDict_Size(__pyx_kwds);
29311 switch (pos_args) {
29312 case 0:
29313 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
29314 else goto __pyx_L5_argtuple_error;
29315 }
29316 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
29317 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2584; __pyx_clineno = __LINE__29317; goto __pyx_L3_error;}
29318 }
29319 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
29320 goto __pyx_L5_argtuple_error;
29321 } else {
29322 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
29323 }
29324 __pyx_v_ioctx = values[0];
29325 }
29326 goto __pyx_L4_argument_unpacking_done;
29327 __pyx_L5_argtuple_error:;
29328 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2584; __pyx_clineno = __LINE__29328; goto __pyx_L3_error;}
29329 __pyx_L3_error:;
29330 __Pyx_AddTraceback("rbd.ConfigPoolIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29331 __Pyx_RefNannyFinishContext();
29332 return -1;
29333 __pyx_L4_argument_unpacking_done:;
29334 __pyx_r = __pyx_pf_3rbd_18ConfigPoolIterator___init__(((struct __pyx_obj_3rbd_ConfigPoolIterator *)__pyx_v_self), __pyx_v_ioctx);
29335
29336 /* function exit code */
29337 __Pyx_RefNannyFinishContext();
29338 return __pyx_r;
29339}
29340
29341static int __pyx_pf_3rbd_18ConfigPoolIterator___init__(struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
29342 rados_ioctx_t __pyx_v__ioctx;
29343 int __pyx_v_ret;
29344 int __pyx_r;
29345 __Pyx_RefNannyDeclarations
29346 rados_ioctx_t __pyx_t_1;
29347 void *__pyx_t_2;
29348 int __pyx_t_3;
29349 PyObject *__pyx_t_4 = NULL((void*)0);
29350 PyObject *__pyx_t_5 = NULL((void*)0);
29351 int __pyx_lineno = 0;
29352 const char *__pyx_filename = NULL((void*)0);
29353 int __pyx_clineno = 0;
29354 __Pyx_RefNannySetupContext("__init__", 0);
29355
29356 /* "rbd.pyx":2586
29357 * def __init__(self, ioctx):
29358 * cdef:
29359 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
29360 * self.options = NULL
29361 * self.num_options = 32
29362 */
29363 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2586; __pyx_clineno = __LINE__29363; goto __pyx_L1_error;}
29364 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2586; __pyx_clineno = __LINE__29364; goto __pyx_L1_error;}
29365 __pyx_v__ioctx = __pyx_t_1;
29366
29367 /* "rbd.pyx":2587
29368 * cdef:
29369 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
29370 * self.options = NULL # <<<<<<<<<<<<<<
29371 * self.num_options = 32
29372 * while True:
29373 */
29374 __pyx_v_self->options = NULL((void*)0);
29375
29376 /* "rbd.pyx":2588
29377 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
29378 * self.options = NULL
29379 * self.num_options = 32 # <<<<<<<<<<<<<<
29380 * while True:
29381 * self.options = <rbd_config_option_t *>realloc_chk(
29382 */
29383 __pyx_v_self->num_options = 32;
29384
29385 /* "rbd.pyx":2589
29386 * self.options = NULL
29387 * self.num_options = 32
29388 * while True: # <<<<<<<<<<<<<<
29389 * self.options = <rbd_config_option_t *>realloc_chk(
29390 * self.options, self.num_options * sizeof(rbd_config_option_t))
29391 */
29392 while (1) {
29393
29394 /* "rbd.pyx":2590
29395 * self.num_options = 32
29396 * while True:
29397 * self.options = <rbd_config_option_t *>realloc_chk( # <<<<<<<<<<<<<<
29398 * self.options, self.num_options * sizeof(rbd_config_option_t))
29399 * with nogil:
29400 */
29401 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->options, (__pyx_v_self->num_options * (sizeof(rbd_config_option_t)))); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2590; __pyx_clineno = __LINE__29401; goto __pyx_L1_error;}
29402 __pyx_v_self->options = ((rbd_config_option_t *)__pyx_t_2);
29403
29404 /* "rbd.pyx":2592
29405 * self.options = <rbd_config_option_t *>realloc_chk(
29406 * self.options, self.num_options * sizeof(rbd_config_option_t))
29407 * with nogil: # <<<<<<<<<<<<<<
29408 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options)
29409 * if ret < 0:
29410 */
29411 {
29412 #ifdef WITH_THREAD1
29413 PyThreadState *_save;
29414 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
29415 #endif
29416 /*try:*/ {
29417
29418 /* "rbd.pyx":2593
29419 * self.options, self.num_options * sizeof(rbd_config_option_t))
29420 * with nogil:
29421 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options) # <<<<<<<<<<<<<<
29422 * if ret < 0:
29423 * if ret == -errno.ERANGE:
29424 */
29425 __pyx_v_ret = rbd_config_pool_list(__pyx_v__ioctx, __pyx_v_self->options, (&__pyx_v_self->num_options));
29426 }
29427
29428 /* "rbd.pyx":2592
29429 * self.options = <rbd_config_option_t *>realloc_chk(
29430 * self.options, self.num_options * sizeof(rbd_config_option_t))
29431 * with nogil: # <<<<<<<<<<<<<<
29432 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options)
29433 * if ret < 0:
29434 */
29435 /*finally:*/ {
29436 /*normal exit:*/{
29437 #ifdef WITH_THREAD1
29438 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
29439 #endif
29440 goto __pyx_L9;
29441 }
29442 __pyx_L9:;
29443 }
29444 }
29445
29446 /* "rbd.pyx":2594
29447 * with nogil:
29448 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options)
29449 * if ret < 0: # <<<<<<<<<<<<<<
29450 * if ret == -errno.ERANGE:
29451 * continue
29452 */
29453 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
29454 if (__pyx_t_3) {
29455
29456 /* "rbd.pyx":2595
29457 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options)
29458 * if ret < 0:
29459 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
29460 * continue
29461 * self.num_options = 0
29462 */
29463 __pyx_t_3 = ((__pyx_v_ret == (-ERANGE34)) != 0);
29464 if (__pyx_t_3) {
29465
29466 /* "rbd.pyx":2596
29467 * if ret < 0:
29468 * if ret == -errno.ERANGE:
29469 * continue # <<<<<<<<<<<<<<
29470 * self.num_options = 0
29471 * raise make_ex(ret, 'error listing config options')
29472 */
29473 goto __pyx_L3_continue;
29474
29475 /* "rbd.pyx":2595
29476 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options)
29477 * if ret < 0:
29478 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
29479 * continue
29480 * self.num_options = 0
29481 */
29482 }
29483
29484 /* "rbd.pyx":2597
29485 * if ret == -errno.ERANGE:
29486 * continue
29487 * self.num_options = 0 # <<<<<<<<<<<<<<
29488 * raise make_ex(ret, 'error listing config options')
29489 * break
29490 */
29491 __pyx_v_self->num_options = 0;
29492
29493 /* "rbd.pyx":2598
29494 * continue
29495 * self.num_options = 0
29496 * raise make_ex(ret, 'error listing config options') # <<<<<<<<<<<<<<
29497 * break
29498 *
29499 */
29500 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__29500; goto __pyx_L1_error;}
29501 __Pyx_GOTREF(__pyx_t_4);
29502 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_config_options, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__29502; goto __pyx_L1_error;}
29503 __Pyx_GOTREF(__pyx_t_5);
29504 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
29505 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
29506 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
29507 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__29507; goto __pyx_L1_error;}
29508
29509 /* "rbd.pyx":2594
29510 * with nogil:
29511 * ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options)
29512 * if ret < 0: # <<<<<<<<<<<<<<
29513 * if ret == -errno.ERANGE:
29514 * continue
29515 */
29516 }
29517
29518 /* "rbd.pyx":2599
29519 * self.num_options = 0
29520 * raise make_ex(ret, 'error listing config options')
29521 * break # <<<<<<<<<<<<<<
29522 *
29523 * def __iter__(self):
29524 */
29525 goto __pyx_L4_break;
29526 __pyx_L3_continue:;
29527 }
29528 __pyx_L4_break:;
29529
29530 /* "rbd.pyx":2584
29531 * int num_options
29532 *
29533 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
29534 * cdef:
29535 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
29536 */
29537
29538 /* function exit code */
29539 __pyx_r = 0;
29540 goto __pyx_L0;
29541 __pyx_L1_error:;
29542 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
29543 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
29544 __Pyx_AddTraceback("rbd.ConfigPoolIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29545 __pyx_r = -1;
29546 __pyx_L0:;
29547 __Pyx_RefNannyFinishContext();
29548 return __pyx_r;
29549}
29550static PyObject *__pyx_gb_3rbd_18ConfigPoolIterator_4generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
29551
29552/* "rbd.pyx":2601
29553 * break
29554 *
29555 * def __iter__(self): # <<<<<<<<<<<<<<
29556 * for i in range(self.num_options):
29557 * yield {
29558 */
29559
29560/* Python wrapper */
29561static PyObject *__pyx_pw_3rbd_18ConfigPoolIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
29562static PyObject *__pyx_pw_3rbd_18ConfigPoolIterator_3__iter__(PyObject *__pyx_v_self) {
29563 PyObject *__pyx_r = 0;
29564 __Pyx_RefNannyDeclarations
29565 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
29566 __pyx_r = __pyx_pf_3rbd_18ConfigPoolIterator_2__iter__(((struct __pyx_obj_3rbd_ConfigPoolIterator *)__pyx_v_self));
29567
29568 /* function exit code */
29569 __Pyx_RefNannyFinishContext();
29570 return __pyx_r;
29571}
29572
29573static PyObject *__pyx_pf_3rbd_18ConfigPoolIterator_2__iter__(struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self) {
29574 struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *__pyx_cur_scope;
29575 PyObject *__pyx_r = NULL((void*)0);
29576 __Pyx_RefNannyDeclarations
29577 int __pyx_lineno = 0;
29578 const char *__pyx_filename = NULL((void*)0);
29579 int __pyx_clineno = 0;
29580 __Pyx_RefNannySetupContext("__iter__", 0);
29581 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_4___iter__(__pyx_ptype_3rbd___pyx_scope_struct_4___iter__, __pyx_empty_tuple, NULL((void*)0));
29582 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
29583 __Pyx_RefNannyFinishContext();
29584 return NULL((void*)0);
29585 }
29586 __Pyx_GOTREF(__pyx_cur_scope);
29587 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
29588 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
29589 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
29590 {
29591 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_18ConfigPoolIterator_4generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ConfigPoolIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_18ConfigPoolIterator_4generator4, (PyObject *
) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ConfigPoolIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__29591; goto __pyx_L1_error;}
29592 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
29593 __Pyx_RefNannyFinishContext();
29594 return (PyObject *) gen;
29595 }
29596
29597 /* function exit code */
29598 __pyx_L1_error:;
29599 __Pyx_AddTraceback("rbd.ConfigPoolIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29600 __pyx_r = NULL((void*)0);
29601 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
29602 __Pyx_XGIVEREF(__pyx_r);
29603 __Pyx_RefNannyFinishContext();
29604 return __pyx_r;
29605}
29606
29607static PyObject *__pyx_gb_3rbd_18ConfigPoolIterator_4generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
29608{
29609 struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *)__pyx_generator->closure);
29610 PyObject *__pyx_r = NULL((void*)0);
29611 int __pyx_t_1;
29612 int __pyx_t_2;
29613 PyObject *__pyx_t_3 = NULL((void*)0);
29614 PyObject *__pyx_t_4 = NULL((void*)0);
29615 PyObject *__pyx_t_5 = NULL((void*)0);
29616 PyObject *__pyx_t_6 = NULL((void*)0);
29617 PyObject *__pyx_t_7 = NULL((void*)0);
29618 PyObject *__pyx_t_8 = NULL((void*)0);
29619 int __pyx_lineno = 0;
29620 const char *__pyx_filename = NULL((void*)0);
29621 int __pyx_clineno = 0;
29622 __Pyx_RefNannyDeclarations
29623 __Pyx_RefNannySetupContext("None", 0);
29624 switch (__pyx_generator->resume_label) {
29625 case 0: goto __pyx_L3_first_run;
29626 case 1: goto __pyx_L6_resume_from_yield;
29627 default: /* CPython raises the right error here */
29628 __Pyx_RefNannyFinishContext();
29629 return NULL((void*)0);
29630 }
29631 __pyx_L3_first_run:;
29632 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__29632; goto __pyx_L1_error;}
29633
29634 /* "rbd.pyx":2602
29635 *
29636 * def __iter__(self):
29637 * for i in range(self.num_options): # <<<<<<<<<<<<<<
29638 * yield {
29639 * 'name' : decode_cstr(self.options[i].name),
29640 */
29641 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_options;
29642 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
29643 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
29644
29645 /* "rbd.pyx":2604
29646 * for i in range(self.num_options):
29647 * yield {
29648 * 'name' : decode_cstr(self.options[i].name), # <<<<<<<<<<<<<<
29649 * 'value' : decode_cstr(self.options[i].value),
29650 * 'source' : self.options[i].source,
29651 */
29652 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29652; goto __pyx_L1_error;}
29653 __Pyx_GOTREF(__pyx_t_3);
29654 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29654; goto __pyx_L1_error;}
29655 __Pyx_GOTREF(__pyx_t_5);
29656 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->options[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29656; goto __pyx_L1_error;}
29657 __Pyx_GOTREF(__pyx_t_6);
29658 __pyx_t_7 = NULL((void*)0);
29659 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
29660 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
29661 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
29662 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
29663 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
29664 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
29665 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
29666 }
29667 }
29668 if (!__pyx_t_7) {
29669 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29669; goto __pyx_L1_error;}
29670 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
29671 __Pyx_GOTREF(__pyx_t_4);
29672 } else {
29673 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29673; goto __pyx_L1_error;}
29674 __Pyx_GOTREF(__pyx_t_8);
29675 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
29676 __Pyx_GIVEREF(__pyx_t_6);
29677 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
29678 __pyx_t_6 = 0;
29679 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29679; goto __pyx_L1_error;}
29680 __Pyx_GOTREF(__pyx_t_4);
29681 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
29682 }
29683 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
29684 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29684; goto __pyx_L1_error;}
29685 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
29686
29687 /* "rbd.pyx":2605
29688 * yield {
29689 * 'name' : decode_cstr(self.options[i].name),
29690 * 'value' : decode_cstr(self.options[i].value), # <<<<<<<<<<<<<<
29691 * 'source' : self.options[i].source,
29692 * }
29693 */
29694 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__29694; goto __pyx_L1_error;}
29695 __Pyx_GOTREF(__pyx_t_5);
29696 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->options[__pyx_cur_scope->__pyx_v_i]).value); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__29696; goto __pyx_L1_error;}
29697 __Pyx_GOTREF(__pyx_t_8);
29698 __pyx_t_6 = NULL((void*)0);
29699 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
29700 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
29701 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
29702 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
29703 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
29704 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
29705 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
29706 }
29707 }
29708 if (!__pyx_t_6) {
29709 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__29709; goto __pyx_L1_error;}
29710 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
29711 __Pyx_GOTREF(__pyx_t_4);
29712 } else {
29713 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__29713; goto __pyx_L1_error;}
29714 __Pyx_GOTREF(__pyx_t_7);
29715 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
29716 __Pyx_GIVEREF(__pyx_t_8);
29717 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
29718 __pyx_t_8 = 0;
29719 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2605; __pyx_clineno = __LINE__29719; goto __pyx_L1_error;}
29720 __Pyx_GOTREF(__pyx_t_4);
29721 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
29722 }
29723 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
29724 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_value, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29724; goto __pyx_L1_error;}
29725 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
29726
29727 /* "rbd.pyx":2606
29728 * 'name' : decode_cstr(self.options[i].name),
29729 * 'value' : decode_cstr(self.options[i].value),
29730 * 'source' : self.options[i].source, # <<<<<<<<<<<<<<
29731 * }
29732 *
29733 */
29734 __pyx_t_4 = __Pyx_PyInt_From_rbd_config_source_t((__pyx_cur_scope->__pyx_v_self->options[__pyx_cur_scope->__pyx_v_i]).source); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__29734; goto __pyx_L1_error;}
29735 __Pyx_GOTREF(__pyx_t_4);
29736 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__29736; goto __pyx_L1_error;}
29737 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
29738 __pyx_r = __pyx_t_3;
29739 __pyx_t_3 = 0;
29740 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
29741 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
29742 __Pyx_XGIVEREF(__pyx_r);
29743 __Pyx_RefNannyFinishContext();
29744 /* return from generator, yielding value */
29745 __pyx_generator->resume_label = 1;
29746 return __pyx_r;
29747 __pyx_L6_resume_from_yield:;
29748 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
29749 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
29750 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__29750; goto __pyx_L1_error;}
29751 }
29752
29753 /* "rbd.pyx":2601
29754 * break
29755 *
29756 * def __iter__(self): # <<<<<<<<<<<<<<
29757 * for i in range(self.num_options):
29758 * yield {
29759 */
29760
29761 /* function exit code */
29762 PyErr_SetNone(PyExc_StopIteration);
29763 goto __pyx_L0;
29764 __pyx_L1_error:;
29765 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
29766 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
29767 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
29768 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
29769 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
29770 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
29771 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29772 __pyx_L0:;
29773 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
29774 __pyx_generator->resume_label = -1;
29775 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
29776 __Pyx_RefNannyFinishContext();
29777 return __pyx_r;
29778}
29779
29780/* "rbd.pyx":2609
29781 * }
29782 *
29783 * def __dealloc__(self): # <<<<<<<<<<<<<<
29784 * if self.options:
29785 * rbd_config_pool_list_cleanup(self.options, self.num_options)
29786 */
29787
29788/* Python wrapper */
29789static void __pyx_pw_3rbd_18ConfigPoolIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
29790static void __pyx_pw_3rbd_18ConfigPoolIterator_6__dealloc__(PyObject *__pyx_v_self) {
29791 __Pyx_RefNannyDeclarations
29792 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
29793 __pyx_pf_3rbd_18ConfigPoolIterator_5__dealloc__(((struct __pyx_obj_3rbd_ConfigPoolIterator *)__pyx_v_self));
29794
29795 /* function exit code */
29796 __Pyx_RefNannyFinishContext();
29797}
29798
29799static void __pyx_pf_3rbd_18ConfigPoolIterator_5__dealloc__(struct __pyx_obj_3rbd_ConfigPoolIterator *__pyx_v_self) {
29800 __Pyx_RefNannyDeclarations
29801 int __pyx_t_1;
29802 __Pyx_RefNannySetupContext("__dealloc__", 0);
29803
29804 /* "rbd.pyx":2610
29805 *
29806 * def __dealloc__(self):
29807 * if self.options: # <<<<<<<<<<<<<<
29808 * rbd_config_pool_list_cleanup(self.options, self.num_options)
29809 * free(self.options)
29810 */
29811 __pyx_t_1 = (__pyx_v_self->options != 0);
29812 if (__pyx_t_1) {
29813
29814 /* "rbd.pyx":2611
29815 * def __dealloc__(self):
29816 * if self.options:
29817 * rbd_config_pool_list_cleanup(self.options, self.num_options) # <<<<<<<<<<<<<<
29818 * free(self.options)
29819 *
29820 */
29821 rbd_config_pool_list_cleanup(__pyx_v_self->options, __pyx_v_self->num_options);
29822
29823 /* "rbd.pyx":2612
29824 * if self.options:
29825 * rbd_config_pool_list_cleanup(self.options, self.num_options)
29826 * free(self.options) # <<<<<<<<<<<<<<
29827 *
29828 * cdef int diff_iterate_cb(uint64_t offset, size_t length, int write, void *cb) \
29829 */
29830 free(__pyx_v_self->options);
29831
29832 /* "rbd.pyx":2610
29833 *
29834 * def __dealloc__(self):
29835 * if self.options: # <<<<<<<<<<<<<<
29836 * rbd_config_pool_list_cleanup(self.options, self.num_options)
29837 * free(self.options)
29838 */
29839 }
29840
29841 /* "rbd.pyx":2609
29842 * }
29843 *
29844 * def __dealloc__(self): # <<<<<<<<<<<<<<
29845 * if self.options:
29846 * rbd_config_pool_list_cleanup(self.options, self.num_options)
29847 */
29848
29849 /* function exit code */
29850 __Pyx_RefNannyFinishContext();
29851}
29852
29853/* "rbd.pyx":2614
29854 * free(self.options)
29855 *
29856 * cdef int diff_iterate_cb(uint64_t offset, size_t length, int write, void *cb) \ # <<<<<<<<<<<<<<
29857 * except? -9000 with gil:
29858 * # Make sure that if we wound up with an exception from a previous callback,
29859 */
29860
29861static int __pyx_f_3rbd_diff_iterate_cb(uint64_t __pyx_v_offset, size_t __pyx_v_length, int __pyx_v_write, void *__pyx_v_cb) {
29862 PyObject *__pyx_v_ret = NULL((void*)0);
29863 int __pyx_r;
29864 __Pyx_RefNannyDeclarations
29865 int __pyx_t_1;
29866 PyObject *__pyx_t_2 = NULL((void*)0);
29867 PyObject *__pyx_t_3 = NULL((void*)0);
29868 PyObject *__pyx_t_4 = NULL((void*)0);
29869 PyObject *__pyx_t_5 = NULL((void*)0);
29870 PyObject *__pyx_t_6 = NULL((void*)0);
29871 PyObject *__pyx_t_7 = NULL((void*)0);
29872 Py_ssize_t __pyx_t_8;
29873 PyObject *__pyx_t_9 = NULL((void*)0);
29874 int __pyx_t_10;
29875 int __pyx_t_11;
29876 int __pyx_lineno = 0;
29877 const char *__pyx_filename = NULL((void*)0);
29878 int __pyx_clineno = 0;
29879 #ifdef WITH_THREAD1
29880 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
29881 #endif
29882 __Pyx_RefNannySetupContext("diff_iterate_cb", 0);
29883
29884 /* "rbd.pyx":2619
29885 * # we stop calling back (just in case librbd ever fails to bail out on the
29886 * # first negative return, as older versions did)
29887 * if exc.PyErr_Occurred(): # <<<<<<<<<<<<<<
29888 * return -9000
29889 * ret = (<object>cb)(offset, length, bool(write))
29890 */
29891 __pyx_t_1 = (PyErr_Occurred() != 0);
29892 if (__pyx_t_1) {
29893
29894 /* "rbd.pyx":2620
29895 * # first negative return, as older versions did)
29896 * if exc.PyErr_Occurred():
29897 * return -9000 # <<<<<<<<<<<<<<
29898 * ret = (<object>cb)(offset, length, bool(write))
29899 * if ret is None:
29900 */
29901 __pyx_r = -9000;
29902 goto __pyx_L0;
29903
29904 /* "rbd.pyx":2619
29905 * # we stop calling back (just in case librbd ever fails to bail out on the
29906 * # first negative return, as older versions did)
29907 * if exc.PyErr_Occurred(): # <<<<<<<<<<<<<<
29908 * return -9000
29909 * ret = (<object>cb)(offset, length, bool(write))
29910 */
29911 }
29912
29913 /* "rbd.pyx":2621
29914 * if exc.PyErr_Occurred():
29915 * return -9000
29916 * ret = (<object>cb)(offset, length, bool(write)) # <<<<<<<<<<<<<<
29917 * if ret is None:
29918 * return 0
29919 */
29920 __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_offset); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29920; goto __pyx_L1_error;}
29921 __Pyx_GOTREF(__pyx_t_3);
29922 __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29922; goto __pyx_L1_error;}
29923 __Pyx_GOTREF(__pyx_t_4);
29924 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_write); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29924; goto __pyx_L1_error;}
29925 __Pyx_GOTREF(__pyx_t_5);
29926 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29926; goto __pyx_L1_error;}
29927 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
29928 __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_1)))(((!(!__pyx_t_1))) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct
)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (
( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29928; goto __pyx_L1_error;}
29929 __Pyx_GOTREF(__pyx_t_5);
29930 __Pyx_INCREF(((PyObject *)__pyx_v_cb))( ((PyObject*)(((PyObject *)__pyx_v_cb)))->ob_refcnt++);
29931 __pyx_t_6 = ((PyObject *)__pyx_v_cb); __pyx_t_7 = NULL((void*)0);
29932 __pyx_t_8 = 0;
29933 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
29934 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
29935 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
29936 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
29937 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
29938 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
29939 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
29940 __pyx_t_8 = 1;
29941 }
29942 }
29943 __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29943; goto __pyx_L1_error;}
29944 __Pyx_GOTREF(__pyx_t_9);
29945 if (__pyx_t_7) {
29946 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
29947 }
29948 __Pyx_GIVEREF(__pyx_t_3);
29949 PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_8] = __pyx_t_3
)
;
29950 __Pyx_GIVEREF(__pyx_t_4);
29951 PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_8] = __pyx_t_4
)
;
29952 __Pyx_GIVEREF(__pyx_t_5);
29953 PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5)(((PyTupleObject *)(__pyx_t_9))->ob_item[2+__pyx_t_8] = __pyx_t_5
)
;
29954 __pyx_t_3 = 0;
29955 __pyx_t_4 = 0;
29956 __pyx_t_5 = 0;
29957 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2621; __pyx_clineno = __LINE__29957; goto __pyx_L1_error;}
29958 __Pyx_GOTREF(__pyx_t_2);
29959 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
29960 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
29961 __pyx_v_ret = __pyx_t_2;
29962 __pyx_t_2 = 0;
29963
29964 /* "rbd.pyx":2622
29965 * return -9000
29966 * ret = (<object>cb)(offset, length, bool(write))
29967 * if ret is None: # <<<<<<<<<<<<<<
29968 * return 0
29969 * return ret
29970 */
29971 __pyx_t_1 = (__pyx_v_ret == Py_None(&_Py_NoneStruct));
29972 __pyx_t_10 = (__pyx_t_1 != 0);
29973 if (__pyx_t_10) {
29974
29975 /* "rbd.pyx":2623
29976 * ret = (<object>cb)(offset, length, bool(write))
29977 * if ret is None:
29978 * return 0 # <<<<<<<<<<<<<<
29979 * return ret
29980 *
29981 */
29982 __pyx_r = 0;
29983 goto __pyx_L0;
29984
29985 /* "rbd.pyx":2622
29986 * return -9000
29987 * ret = (<object>cb)(offset, length, bool(write))
29988 * if ret is None: # <<<<<<<<<<<<<<
29989 * return 0
29990 * return ret
29991 */
29992 }
29993
29994 /* "rbd.pyx":2624
29995 * if ret is None:
29996 * return 0
29997 * return ret # <<<<<<<<<<<<<<
29998 *
29999 * cdef class Group(object):
30000 */
30001 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_ret); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2624; __pyx_clineno = __LINE__30001; goto __pyx_L1_error;}
30002 __pyx_r = __pyx_t_11;
30003 goto __pyx_L0;
30004
30005 /* "rbd.pyx":2614
30006 * free(self.options)
30007 *
30008 * cdef int diff_iterate_cb(uint64_t offset, size_t length, int write, void *cb) \ # <<<<<<<<<<<<<<
30009 * except? -9000 with gil:
30010 * # Make sure that if we wound up with an exception from a previous callback,
30011 */
30012
30013 /* function exit code */
30014 __pyx_L1_error:;
30015 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
30016 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
30017 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
30018 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
30019 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
30020 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
30021 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
30022 __Pyx_AddTraceback("rbd.diff_iterate_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
30023 __pyx_r = -9000;
30024 __pyx_L0:;
30025 __Pyx_XDECREF(__pyx_v_ret)do { if ((__pyx_v_ret) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_ret))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_ret)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_ret)))); } while (0); } while (0)
;
30026 __Pyx_RefNannyFinishContext();
30027 #ifdef WITH_THREAD1
30028 PyGILState_Release(__pyx_gilstate_save);
30029 #endif
30030 return __pyx_r;
30031}
30032
30033/* "rbd.pyx":2638
30034 * cdef rados_ioctx_t _ioctx
30035 *
30036 * def __init__(self, ioctx, name): # <<<<<<<<<<<<<<
30037 * name = cstr(name, 'name')
30038 * self.name = name
30039 */
30040
30041/* Python wrapper */
30042static int __pyx_pw_3rbd_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30043static int __pyx_pw_3rbd_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30044 PyObject *__pyx_v_ioctx = 0;
30045 PyObject *__pyx_v_name = 0;
30046 int __pyx_lineno = 0;
30047 const char *__pyx_filename = NULL((void*)0);
30048 int __pyx_clineno = 0;
30049 int __pyx_r;
30050 __Pyx_RefNannyDeclarations
30051 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
30052 {
30053 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,&__pyx_n_s_name,0};
30054 PyObject* values[2] = {0,0};
30055 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
30056 Py_ssize_t kw_args;
30057 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
30058 switch (pos_args) {
30059 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30060 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30061 case 0: break;
30062 default: goto __pyx_L5_argtuple_error;
30063 }
30064 kw_args = PyDict_Size(__pyx_kwds);
30065 switch (pos_args) {
30066 case 0:
30067 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
30068 else goto __pyx_L5_argtuple_error;
30069 case 1:
30070 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
30071 else {
30072 __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__30072; goto __pyx_L3_error;}
30073 }
30074 }
30075 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
30076 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__30076; goto __pyx_L3_error;}
30077 }
30078 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
30079 goto __pyx_L5_argtuple_error;
30080 } else {
30081 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30082 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30083 }
30084 __pyx_v_ioctx = values[0];
30085 __pyx_v_name = values[1];
30086 }
30087 goto __pyx_L4_argument_unpacking_done;
30088 __pyx_L5_argtuple_error:;
30089 __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__30089; goto __pyx_L3_error;}
30090 __pyx_L3_error:;
30091 __Pyx_AddTraceback("rbd.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30092 __Pyx_RefNannyFinishContext();
30093 return -1;
30094 __pyx_L4_argument_unpacking_done:;
30095 __pyx_r = __pyx_pf_3rbd_5Group___init__(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), __pyx_v_ioctx, __pyx_v_name);
30096
30097 /* function exit code */
30098 __Pyx_RefNannyFinishContext();
30099 return __pyx_r;
30100}
30101
30102static int __pyx_pf_3rbd_5Group___init__(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name) {
30103 int __pyx_r;
30104 __Pyx_RefNannyDeclarations
30105 PyObject *__pyx_t_1 = NULL((void*)0);
30106 PyObject *__pyx_t_2 = NULL((void*)0);
30107 PyObject *__pyx_t_3 = NULL((void*)0);
30108 Py_ssize_t __pyx_t_4;
30109 PyObject *__pyx_t_5 = NULL((void*)0);
30110 rados_ioctx_t __pyx_t_6;
30111 char *__pyx_t_7;
30112 int __pyx_lineno = 0;
30113 const char *__pyx_filename = NULL((void*)0);
30114 int __pyx_clineno = 0;
30115 __Pyx_RefNannySetupContext("__init__", 0);
30116 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
30117
30118 /* "rbd.pyx":2639
30119 *
30120 * def __init__(self, ioctx, name):
30121 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
30122 * self.name = name
30123 *
30124 */
30125 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__30125; goto __pyx_L1_error;}
30126 __Pyx_GOTREF(__pyx_t_2);
30127 __pyx_t_3 = NULL((void*)0);
30128 __pyx_t_4 = 0;
30129 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
30130 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
30131 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
30132 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
30133 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
30134 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
30135 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
30136 __pyx_t_4 = 1;
30137 }
30138 }
30139 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__30139; goto __pyx_L1_error;}
30140 __Pyx_GOTREF(__pyx_t_5);
30141 if (__pyx_t_3) {
30142 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
30143 }
30144 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
30145 __Pyx_GIVEREF(__pyx_v_name);
30146 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
30147 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
30148 __Pyx_GIVEREF(__pyx_n_s_name);
30149 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
30150 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__30150; goto __pyx_L1_error;}
30151 __Pyx_GOTREF(__pyx_t_1);
30152 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
30153 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
30154 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
30155 __pyx_t_1 = 0;
30156
30157 /* "rbd.pyx":2640
30158 * def __init__(self, ioctx, name):
30159 * name = cstr(name, 'name')
30160 * self.name = name # <<<<<<<<<<<<<<
30161 *
30162 * self._ioctx = convert_ioctx(ioctx)
30163 */
30164 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
30165 __Pyx_GIVEREF(__pyx_v_name);
30166 __Pyx_GOTREF(__pyx_v_self->name);
30167 __Pyx_DECREF(__pyx_v_self->name)do { if ( --((PyObject*)(__pyx_v_self->name))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->name)))); } while (0)
;
30168 __pyx_v_self->name = __pyx_v_name;
30169
30170 /* "rbd.pyx":2642
30171 * self.name = name
30172 *
30173 * self._ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
30174 * self._name = name
30175 *
30176 */
30177 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__30177; goto __pyx_L1_error;}
30178 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__30178; goto __pyx_L1_error;}
30179 __pyx_v_self->_ioctx = __pyx_t_6;
30180
30181 /* "rbd.pyx":2643
30182 *
30183 * self._ioctx = convert_ioctx(ioctx)
30184 * self._name = name # <<<<<<<<<<<<<<
30185 *
30186 * def __enter__(self):
30187 */
30188 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__30188; goto __pyx_L1_error;}
30189 __pyx_v_self->_name = __pyx_t_7;
30190
30191 /* "rbd.pyx":2638
30192 * cdef rados_ioctx_t _ioctx
30193 *
30194 * def __init__(self, ioctx, name): # <<<<<<<<<<<<<<
30195 * name = cstr(name, 'name')
30196 * self.name = name
30197 */
30198
30199 /* function exit code */
30200 __pyx_r = 0;
30201 goto __pyx_L0;
30202 __pyx_L1_error:;
30203 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
30204 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
30205 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
30206 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
30207 __Pyx_AddTraceback("rbd.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30208 __pyx_r = -1;
30209 __pyx_L0:;
30210 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
30211 __Pyx_RefNannyFinishContext();
30212 return __pyx_r;
30213}
30214
30215/* "rbd.pyx":2645
30216 * self._name = name
30217 *
30218 * def __enter__(self): # <<<<<<<<<<<<<<
30219 * return self
30220 *
30221 */
30222
30223/* Python wrapper */
30224static PyObject *__pyx_pw_3rbd_5Group_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
30225static char __pyx_doc_3rbd_5Group_2__enter__[] = "Group.__enter__(self)";
30226static PyObject *__pyx_pw_3rbd_5Group_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
30227 PyObject *__pyx_r = 0;
30228 __Pyx_RefNannyDeclarations
30229 __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
30230 __pyx_r = __pyx_pf_3rbd_5Group_2__enter__(((struct __pyx_obj_3rbd_Group *)__pyx_v_self));
30231
30232 /* function exit code */
30233 __Pyx_RefNannyFinishContext();
30234 return __pyx_r;
30235}
30236
30237static PyObject *__pyx_pf_3rbd_5Group_2__enter__(struct __pyx_obj_3rbd_Group *__pyx_v_self) {
30238 PyObject *__pyx_r = NULL((void*)0);
30239 __Pyx_RefNannyDeclarations
30240 __Pyx_RefNannySetupContext("__enter__", 0);
30241
30242 /* "rbd.pyx":2646
30243 *
30244 * def __enter__(self):
30245 * return self # <<<<<<<<<<<<<<
30246 *
30247 * def __exit__(self, type_, value, traceback):
30248 */
30249 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
30250 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
30251 __pyx_r = ((PyObject *)__pyx_v_self);
30252 goto __pyx_L0;
30253
30254 /* "rbd.pyx":2645
30255 * self._name = name
30256 *
30257 * def __enter__(self): # <<<<<<<<<<<<<<
30258 * return self
30259 *
30260 */
30261
30262 /* function exit code */
30263 __pyx_L0:;
30264 __Pyx_XGIVEREF(__pyx_r);
30265 __Pyx_RefNannyFinishContext();
30266 return __pyx_r;
30267}
30268
30269/* "rbd.pyx":2648
30270 * return self
30271 *
30272 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
30273 * return False
30274 *
30275 */
30276
30277/* Python wrapper */
30278static PyObject *__pyx_pw_3rbd_5Group_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30279static char __pyx_doc_3rbd_5Group_4__exit__[] = "Group.__exit__(self, type_, value, traceback)";
30280static PyObject *__pyx_pw_3rbd_5Group_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30281 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_ = 0;
30282 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value = 0;
30283 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback = 0;
30284 int __pyx_lineno = 0;
30285 const char *__pyx_filename = NULL((void*)0);
30286 int __pyx_clineno = 0;
30287 PyObject *__pyx_r = 0;
30288 __Pyx_RefNannyDeclarations
30289 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
30290 {
30291 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
30292 PyObject* values[3] = {0,0,0};
30293 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
30294 Py_ssize_t kw_args;
30295 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
30296 switch (pos_args) {
30297 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
30298 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30299 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30300 case 0: break;
30301 default: goto __pyx_L5_argtuple_error;
30302 }
30303 kw_args = PyDict_Size(__pyx_kwds);
30304 switch (pos_args) {
30305 case 0:
30306 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type
)) != 0), 1)
) kw_args--;
30307 else goto __pyx_L5_argtuple_error;
30308 case 1:
30309 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
30310 else {
30311 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__30311; goto __pyx_L3_error;}
30312 }
30313 case 2:
30314 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback
)) != 0), 1)
) kw_args--;
30315 else {
30316 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__30316; goto __pyx_L3_error;}
30317 }
30318 }
30319 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
30320 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__exit__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__30320; goto __pyx_L3_error;}
30321 }
30322 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
30323 goto __pyx_L5_argtuple_error;
30324 } else {
30325 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30326 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30327 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
30328 }
30329 __pyx_v_type_ = values[0];
30330 __pyx_v_value = values[1];
30331 __pyx_v_traceback = values[2];
30332 }
30333 goto __pyx_L4_argument_unpacking_done;
30334 __pyx_L5_argtuple_error:;
30335 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__30335; goto __pyx_L3_error;}
30336 __pyx_L3_error:;
30337 __Pyx_AddTraceback("rbd.Group.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30338 __Pyx_RefNannyFinishContext();
30339 return NULL((void*)0);
30340 __pyx_L4_argument_unpacking_done:;
30341 __pyx_r = __pyx_pf_3rbd_5Group_4__exit__(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), __pyx_v_type_, __pyx_v_value, __pyx_v_traceback);
30342
30343 /* function exit code */
30344 __Pyx_RefNannyFinishContext();
30345 return __pyx_r;
30346}
30347
30348static PyObject *__pyx_pf_3rbd_5Group_4__exit__(CYTHON_UNUSED__attribute__ ((__unused__)) struct __pyx_obj_3rbd_Group *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback) {
30349 PyObject *__pyx_r = NULL((void*)0);
30350 __Pyx_RefNannyDeclarations
30351 __Pyx_RefNannySetupContext("__exit__", 0);
30352
30353 /* "rbd.pyx":2649
30354 *
30355 * def __exit__(self, type_, value, traceback):
30356 * return False # <<<<<<<<<<<<<<
30357 *
30358 * def add_image(self, image_ioctx, image_name):
30359 */
30360 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
30361 __Pyx_INCREF(Py_False)( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++)
;
30362 __pyx_r = Py_False((PyObject *) &_Py_ZeroStruct);
30363 goto __pyx_L0;
30364
30365 /* "rbd.pyx":2648
30366 * return self
30367 *
30368 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
30369 * return False
30370 *
30371 */
30372
30373 /* function exit code */
30374 __pyx_L0:;
30375 __Pyx_XGIVEREF(__pyx_r);
30376 __Pyx_RefNannyFinishContext();
30377 return __pyx_r;
30378}
30379
30380/* "rbd.pyx":2651
30381 * return False
30382 *
30383 * def add_image(self, image_ioctx, image_name): # <<<<<<<<<<<<<<
30384 * """
30385 * Add an image to a group.
30386 */
30387
30388/* Python wrapper */
30389static PyObject *__pyx_pw_3rbd_5Group_7add_image(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30390static char __pyx_doc_3rbd_5Group_6add_image[] = "Group.add_image(self, image_ioctx, image_name)\n\n Add an image to a group.\n\n :param image_ioctx: determines which RADOS pool the image belongs to.\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the image to add\n :type name: str\n\n :raises: :class:`ObjectNotFound`\n :raises: :class:`ObjectExists`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
30391static PyObject *__pyx_pw_3rbd_5Group_7add_image(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30392 PyObject *__pyx_v_image_ioctx = 0;
30393 PyObject *__pyx_v_image_name = 0;
30394 int __pyx_lineno = 0;
30395 const char *__pyx_filename = NULL((void*)0);
30396 int __pyx_clineno = 0;
30397 PyObject *__pyx_r = 0;
30398 __Pyx_RefNannyDeclarations
30399 __Pyx_RefNannySetupContext("add_image (wrapper)", 0);
30400 {
30401 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image_ioctx,&__pyx_n_s_image_name,0};
30402 PyObject* values[2] = {0,0};
30403 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
30404 Py_ssize_t kw_args;
30405 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
30406 switch (pos_args) {
30407 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30408 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30409 case 0: break;
30410 default: goto __pyx_L5_argtuple_error;
30411 }
30412 kw_args = PyDict_Size(__pyx_kwds);
30413 switch (pos_args) {
30414 case 0:
30415 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_ioctx
)) != 0), 1)
) kw_args--;
30416 else goto __pyx_L5_argtuple_error;
30417 case 1:
30418 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
30419 else {
30420 __Pyx_RaiseArgtupleInvalid("add_image", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__30420; goto __pyx_L3_error;}
30421 }
30422 }
30423 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
30424 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_image") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "add_image") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__30424; goto __pyx_L3_error;}
30425 }
30426 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
30427 goto __pyx_L5_argtuple_error;
30428 } else {
30429 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30430 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30431 }
30432 __pyx_v_image_ioctx = values[0];
30433 __pyx_v_image_name = values[1];
30434 }
30435 goto __pyx_L4_argument_unpacking_done;
30436 __pyx_L5_argtuple_error:;
30437 __Pyx_RaiseArgtupleInvalid("add_image", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__30437; goto __pyx_L3_error;}
30438 __pyx_L3_error:;
30439 __Pyx_AddTraceback("rbd.Group.add_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
30440 __Pyx_RefNannyFinishContext();
30441 return NULL((void*)0);
30442 __pyx_L4_argument_unpacking_done:;
30443 __pyx_r = __pyx_pf_3rbd_5Group_6add_image(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), __pyx_v_image_ioctx, __pyx_v_image_name);
30444
30445 /* function exit code */
30446 __Pyx_RefNannyFinishContext();
30447 return __pyx_r;
30448}
30449
30450static PyObject *__pyx_pf_3rbd_5Group_6add_image(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_image_ioctx, PyObject *__pyx_v_image_name) {
30451 rados_ioctx_t __pyx_v__image_ioctx;
30452 char *__pyx_v__image_name;
30453 int __pyx_v_ret;
30454 PyObject *__pyx_r = NULL((void*)0);
30455 __Pyx_RefNannyDeclarations
30456 PyObject *__pyx_t_1 = NULL((void*)0);
30457 PyObject *__pyx_t_2 = NULL((void*)0);
30458 PyObject *__pyx_t_3 = NULL((void*)0);
30459 Py_ssize_t __pyx_t_4;
30460 PyObject *__pyx_t_5 = NULL((void*)0);
30461 rados_ioctx_t __pyx_t_6;
30462 char *__pyx_t_7;
30463 int __pyx_t_8;
30464 struct __pyx_opt_args_3rbd_make_ex __pyx_t_9;
30465 int __pyx_lineno = 0;
30466 const char *__pyx_filename = NULL((void*)0);
30467 int __pyx_clineno = 0;
30468 __Pyx_RefNannySetupContext("add_image", 0);
30469 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
30470
30471 /* "rbd.pyx":2665
30472 * :raises: :class:`FunctionNotSupported`
30473 * """
30474 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
30475 * cdef:
30476 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30477 */
30478 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2665; __pyx_clineno = __LINE__30478; goto __pyx_L1_error;}
30479 __Pyx_GOTREF(__pyx_t_2);
30480 __pyx_t_3 = NULL((void*)0);
30481 __pyx_t_4 = 0;
30482 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
30483 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
30484 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
30485 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
30486 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
30487 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
30488 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
30489 __pyx_t_4 = 1;
30490 }
30491 }
30492 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2665; __pyx_clineno = __LINE__30492; goto __pyx_L1_error;}
30493 __Pyx_GOTREF(__pyx_t_5);
30494 if (__pyx_t_3) {
30495 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
30496 }
30497 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
30498 __Pyx_GIVEREF(__pyx_v_image_name);
30499 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
30500 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
30501 __Pyx_GIVEREF(__pyx_n_s_image_name);
30502 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
30503 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2665; __pyx_clineno = __LINE__30503; goto __pyx_L1_error;}
30504 __Pyx_GOTREF(__pyx_t_1);
30505 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
30506 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
30507 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
30508 __pyx_t_1 = 0;
30509
30510 /* "rbd.pyx":2667
30511 * image_name = cstr(image_name, 'image_name')
30512 * cdef:
30513 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx) # <<<<<<<<<<<<<<
30514 * char *_image_name = image_name
30515 * with nogil:
30516 */
30517 if (!(likely(((__pyx_v_image_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_image_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_image_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_image_ioctx,
__pyx_ptype_5rados_Ioctx)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2667; __pyx_clineno = __LINE__30517; goto __pyx_L1_error;}
30518 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_image_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2667; __pyx_clineno = __LINE__30518; goto __pyx_L1_error;}
30519 __pyx_v__image_ioctx = __pyx_t_6;
30520
30521 /* "rbd.pyx":2668
30522 * cdef:
30523 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30524 * char *_image_name = image_name # <<<<<<<<<<<<<<
30525 * with nogil:
30526 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name)
30527 */
30528 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__30528; goto __pyx_L1_error;}
30529 __pyx_v__image_name = __pyx_t_7;
30530
30531 /* "rbd.pyx":2669
30532 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30533 * char *_image_name = image_name
30534 * with nogil: # <<<<<<<<<<<<<<
30535 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name)
30536 * if ret != 0:
30537 */
30538 {
30539 #ifdef WITH_THREAD1
30540 PyThreadState *_save;
30541 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
30542 #endif
30543 /*try:*/ {
30544
30545 /* "rbd.pyx":2670
30546 * char *_image_name = image_name
30547 * with nogil:
30548 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name) # <<<<<<<<<<<<<<
30549 * if ret != 0:
30550 * raise make_ex(ret, 'error adding image to group', group_errno_to_exception)
30551 */
30552 __pyx_v_ret = rbd_group_image_add(__pyx_v_self->_ioctx, __pyx_v_self->_name, __pyx_v__image_ioctx, __pyx_v__image_name);
30553 }
30554
30555 /* "rbd.pyx":2669
30556 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30557 * char *_image_name = image_name
30558 * with nogil: # <<<<<<<<<<<<<<
30559 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name)
30560 * if ret != 0:
30561 */
30562 /*finally:*/ {
30563 /*normal exit:*/{
30564 #ifdef WITH_THREAD1
30565 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
30566 #endif
30567 goto __pyx_L5;
30568 }
30569 __pyx_L5:;
30570 }
30571 }
30572
30573 /* "rbd.pyx":2671
30574 * with nogil:
30575 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name)
30576 * if ret != 0: # <<<<<<<<<<<<<<
30577 * raise make_ex(ret, 'error adding image to group', group_errno_to_exception)
30578 *
30579 */
30580 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
30581 if (__pyx_t_8) {
30582
30583 /* "rbd.pyx":2672
30584 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name)
30585 * if ret != 0:
30586 * raise make_ex(ret, 'error adding image to group', group_errno_to_exception) # <<<<<<<<<<<<<<
30587 *
30588 * def remove_image(self, image_ioctx, image_name):
30589 */
30590 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__30590; goto __pyx_L1_error;}
30591 __Pyx_GOTREF(__pyx_t_1);
30592 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
30593 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
30594 __pyx_t_9.__pyx_n = 1;
30595 __pyx_t_9.exception_map = __pyx_t_2;
30596 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_adding_image_to_group, &__pyx_t_9); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__30596; goto __pyx_L1_error;}
30597 __Pyx_GOTREF(__pyx_t_5);
30598 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
30599 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
30600 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
30601 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
30602 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__30602; goto __pyx_L1_error;}
30603
30604 /* "rbd.pyx":2671
30605 * with nogil:
30606 * ret = rbd_group_image_add(self._ioctx, self._name, _image_ioctx, _image_name)
30607 * if ret != 0: # <<<<<<<<<<<<<<
30608 * raise make_ex(ret, 'error adding image to group', group_errno_to_exception)
30609 *
30610 */
30611 }
30612
30613 /* "rbd.pyx":2651
30614 * return False
30615 *
30616 * def add_image(self, image_ioctx, image_name): # <<<<<<<<<<<<<<
30617 * """
30618 * Add an image to a group.
30619 */
30620
30621 /* function exit code */
30622 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
30623 goto __pyx_L0;
30624 __pyx_L1_error:;
30625 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
30626 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
30627 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
30628 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
30629 __Pyx_AddTraceback("rbd.Group.add_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
30630 __pyx_r = NULL((void*)0);
30631 __pyx_L0:;
30632 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
30633 __Pyx_XGIVEREF(__pyx_r);
30634 __Pyx_RefNannyFinishContext();
30635 return __pyx_r;
30636}
30637
30638/* "rbd.pyx":2674
30639 * raise make_ex(ret, 'error adding image to group', group_errno_to_exception)
30640 *
30641 * def remove_image(self, image_ioctx, image_name): # <<<<<<<<<<<<<<
30642 * """
30643 * Remove an image from a group.
30644 */
30645
30646/* Python wrapper */
30647static PyObject *__pyx_pw_3rbd_5Group_9remove_image(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30648static char __pyx_doc_3rbd_5Group_8remove_image[] = "Group.remove_image(self, image_ioctx, image_name)\n\n Remove an image from a group.\n\n :param image_ioctx: determines which RADOS pool the image belongs to.\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the image to remove\n :type name: str\n\n :raises: :class:`ObjectNotFound`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
30649static PyObject *__pyx_pw_3rbd_5Group_9remove_image(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30650 PyObject *__pyx_v_image_ioctx = 0;
30651 PyObject *__pyx_v_image_name = 0;
30652 int __pyx_lineno = 0;
30653 const char *__pyx_filename = NULL((void*)0);
30654 int __pyx_clineno = 0;
30655 PyObject *__pyx_r = 0;
30656 __Pyx_RefNannyDeclarations
30657 __Pyx_RefNannySetupContext("remove_image (wrapper)", 0);
30658 {
30659 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image_ioctx,&__pyx_n_s_image_name,0};
30660 PyObject* values[2] = {0,0};
30661 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
30662 Py_ssize_t kw_args;
30663 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
30664 switch (pos_args) {
30665 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30666 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30667 case 0: break;
30668 default: goto __pyx_L5_argtuple_error;
30669 }
30670 kw_args = PyDict_Size(__pyx_kwds);
30671 switch (pos_args) {
30672 case 0:
30673 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_ioctx
)) != 0), 1)
) kw_args--;
30674 else goto __pyx_L5_argtuple_error;
30675 case 1:
30676 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_name
)) != 0), 1)
) kw_args--;
30677 else {
30678 __Pyx_RaiseArgtupleInvalid("remove_image", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__30678; goto __pyx_L3_error;}
30679 }
30680 }
30681 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
30682 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_image") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "remove_image") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__30682; goto __pyx_L3_error;}
30683 }
30684 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
30685 goto __pyx_L5_argtuple_error;
30686 } else {
30687 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
30688 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
30689 }
30690 __pyx_v_image_ioctx = values[0];
30691 __pyx_v_image_name = values[1];
30692 }
30693 goto __pyx_L4_argument_unpacking_done;
30694 __pyx_L5_argtuple_error:;
30695 __Pyx_RaiseArgtupleInvalid("remove_image", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__30695; goto __pyx_L3_error;}
30696 __pyx_L3_error:;
30697 __Pyx_AddTraceback("rbd.Group.remove_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
30698 __Pyx_RefNannyFinishContext();
30699 return NULL((void*)0);
30700 __pyx_L4_argument_unpacking_done:;
30701 __pyx_r = __pyx_pf_3rbd_5Group_8remove_image(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), __pyx_v_image_ioctx, __pyx_v_image_name);
30702
30703 /* function exit code */
30704 __Pyx_RefNannyFinishContext();
30705 return __pyx_r;
30706}
30707
30708static PyObject *__pyx_pf_3rbd_5Group_8remove_image(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_image_ioctx, PyObject *__pyx_v_image_name) {
30709 rados_ioctx_t __pyx_v__image_ioctx;
30710 char *__pyx_v__image_name;
30711 int __pyx_v_ret;
30712 PyObject *__pyx_r = NULL((void*)0);
30713 __Pyx_RefNannyDeclarations
30714 PyObject *__pyx_t_1 = NULL((void*)0);
30715 PyObject *__pyx_t_2 = NULL((void*)0);
30716 PyObject *__pyx_t_3 = NULL((void*)0);
30717 Py_ssize_t __pyx_t_4;
30718 PyObject *__pyx_t_5 = NULL((void*)0);
30719 rados_ioctx_t __pyx_t_6;
30720 char *__pyx_t_7;
30721 int __pyx_t_8;
30722 struct __pyx_opt_args_3rbd_make_ex __pyx_t_9;
30723 int __pyx_lineno = 0;
30724 const char *__pyx_filename = NULL((void*)0);
30725 int __pyx_clineno = 0;
30726 __Pyx_RefNannySetupContext("remove_image", 0);
30727 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
30728
30729 /* "rbd.pyx":2687
30730 * :raises: :class:`FunctionNotSupported`
30731 * """
30732 * image_name = cstr(image_name, 'image_name') # <<<<<<<<<<<<<<
30733 * cdef:
30734 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30735 */
30736 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__30736; goto __pyx_L1_error;}
30737 __Pyx_GOTREF(__pyx_t_2);
30738 __pyx_t_3 = NULL((void*)0);
30739 __pyx_t_4 = 0;
30740 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
30741 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
30742 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
30743 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
30744 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
30745 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
30746 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
30747 __pyx_t_4 = 1;
30748 }
30749 }
30750 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__30750; goto __pyx_L1_error;}
30751 __Pyx_GOTREF(__pyx_t_5);
30752 if (__pyx_t_3) {
30753 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
30754 }
30755 __Pyx_INCREF(__pyx_v_image_name)( ((PyObject*)(__pyx_v_image_name))->ob_refcnt++);
30756 __Pyx_GIVEREF(__pyx_v_image_name);
30757 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_image_name
)
;
30758 __Pyx_INCREF(__pyx_n_s_image_name)( ((PyObject*)(__pyx_n_s_image_name))->ob_refcnt++);
30759 __Pyx_GIVEREF(__pyx_n_s_image_name);
30760 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_image_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_image_name
)
;
30761 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__30761; goto __pyx_L1_error;}
30762 __Pyx_GOTREF(__pyx_t_1);
30763 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
30764 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
30765 __Pyx_DECREF_SET(__pyx_v_image_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_name; __pyx_v_image_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
30766 __pyx_t_1 = 0;
30767
30768 /* "rbd.pyx":2689
30769 * image_name = cstr(image_name, 'image_name')
30770 * cdef:
30771 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx) # <<<<<<<<<<<<<<
30772 * char *_image_name = image_name
30773 * with nogil:
30774 */
30775 if (!(likely(((__pyx_v_image_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_image_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_image_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_image_ioctx,
__pyx_ptype_5rados_Ioctx)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; __pyx_clineno = __LINE__30775; goto __pyx_L1_error;}
30776 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_image_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; __pyx_clineno = __LINE__30776; goto __pyx_L1_error;}
30777 __pyx_v__image_ioctx = __pyx_t_6;
30778
30779 /* "rbd.pyx":2690
30780 * cdef:
30781 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30782 * char *_image_name = image_name # <<<<<<<<<<<<<<
30783 * with nogil:
30784 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name)
30785 */
30786 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_image_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; __pyx_clineno = __LINE__30786; goto __pyx_L1_error;}
30787 __pyx_v__image_name = __pyx_t_7;
30788
30789 /* "rbd.pyx":2691
30790 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30791 * char *_image_name = image_name
30792 * with nogil: # <<<<<<<<<<<<<<
30793 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name)
30794 * if ret != 0:
30795 */
30796 {
30797 #ifdef WITH_THREAD1
30798 PyThreadState *_save;
30799 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
30800 #endif
30801 /*try:*/ {
30802
30803 /* "rbd.pyx":2692
30804 * char *_image_name = image_name
30805 * with nogil:
30806 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name) # <<<<<<<<<<<<<<
30807 * if ret != 0:
30808 * raise make_ex(ret, 'error removing image from group', group_errno_to_exception)
30809 */
30810 __pyx_v_ret = rbd_group_image_remove(__pyx_v_self->_ioctx, __pyx_v_self->_name, __pyx_v__image_ioctx, __pyx_v__image_name);
30811 }
30812
30813 /* "rbd.pyx":2691
30814 * rados_ioctx_t _image_ioctx = convert_ioctx(image_ioctx)
30815 * char *_image_name = image_name
30816 * with nogil: # <<<<<<<<<<<<<<
30817 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name)
30818 * if ret != 0:
30819 */
30820 /*finally:*/ {
30821 /*normal exit:*/{
30822 #ifdef WITH_THREAD1
30823 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
30824 #endif
30825 goto __pyx_L5;
30826 }
30827 __pyx_L5:;
30828 }
30829 }
30830
30831 /* "rbd.pyx":2693
30832 * with nogil:
30833 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name)
30834 * if ret != 0: # <<<<<<<<<<<<<<
30835 * raise make_ex(ret, 'error removing image from group', group_errno_to_exception)
30836 *
30837 */
30838 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
30839 if (__pyx_t_8) {
30840
30841 /* "rbd.pyx":2694
30842 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name)
30843 * if ret != 0:
30844 * raise make_ex(ret, 'error removing image from group', group_errno_to_exception) # <<<<<<<<<<<<<<
30845 *
30846 *
30847 */
30848 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2694; __pyx_clineno = __LINE__30848; goto __pyx_L1_error;}
30849 __Pyx_GOTREF(__pyx_t_1);
30850 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
30851 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
30852 __pyx_t_9.__pyx_n = 1;
30853 __pyx_t_9.exception_map = __pyx_t_2;
30854 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_removing_image_from_group, &__pyx_t_9); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2694; __pyx_clineno = __LINE__30854; goto __pyx_L1_error;}
30855 __Pyx_GOTREF(__pyx_t_5);
30856 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
30857 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
30858 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
30859 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
30860 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2694; __pyx_clineno = __LINE__30860; goto __pyx_L1_error;}
30861
30862 /* "rbd.pyx":2693
30863 * with nogil:
30864 * ret = rbd_group_image_remove(self._ioctx, self._name, _image_ioctx, _image_name)
30865 * if ret != 0: # <<<<<<<<<<<<<<
30866 * raise make_ex(ret, 'error removing image from group', group_errno_to_exception)
30867 *
30868 */
30869 }
30870
30871 /* "rbd.pyx":2674
30872 * raise make_ex(ret, 'error adding image to group', group_errno_to_exception)
30873 *
30874 * def remove_image(self, image_ioctx, image_name): # <<<<<<<<<<<<<<
30875 * """
30876 * Remove an image from a group.
30877 */
30878
30879 /* function exit code */
30880 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
30881 goto __pyx_L0;
30882 __pyx_L1_error:;
30883 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
30884 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
30885 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
30886 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
30887 __Pyx_AddTraceback("rbd.Group.remove_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
30888 __pyx_r = NULL((void*)0);
30889 __pyx_L0:;
30890 __Pyx_XDECREF(__pyx_v_image_name)do { if ((__pyx_v_image_name) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_image_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_image_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_name
)))); } while (0); } while (0)
;
30891 __Pyx_XGIVEREF(__pyx_r);
30892 __Pyx_RefNannyFinishContext();
30893 return __pyx_r;
30894}
30895
30896/* "rbd.pyx":2697
30897 *
30898 *
30899 * def list_images(self): # <<<<<<<<<<<<<<
30900 * """
30901 * Iterate over the images of a group.
30902 */
30903
30904/* Python wrapper */
30905static PyObject *__pyx_pw_3rbd_5Group_11list_images(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
30906static char __pyx_doc_3rbd_5Group_10list_images[] = "Group.list_images(self)\n\n Iterate over the images of a group.\n\n :returns: :class:`GroupImageIterator`\n ";
30907static PyObject *__pyx_pw_3rbd_5Group_11list_images(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
30908 PyObject *__pyx_r = 0;
30909 __Pyx_RefNannyDeclarations
30910 __Pyx_RefNannySetupContext("list_images (wrapper)", 0);
30911 __pyx_r = __pyx_pf_3rbd_5Group_10list_images(((struct __pyx_obj_3rbd_Group *)__pyx_v_self));
30912
30913 /* function exit code */
30914 __Pyx_RefNannyFinishContext();
30915 return __pyx_r;
30916}
30917
30918static PyObject *__pyx_pf_3rbd_5Group_10list_images(struct __pyx_obj_3rbd_Group *__pyx_v_self) {
30919 PyObject *__pyx_r = NULL((void*)0);
30920 __Pyx_RefNannyDeclarations
30921 PyObject *__pyx_t_1 = NULL((void*)0);
30922 PyObject *__pyx_t_2 = NULL((void*)0);
30923 int __pyx_lineno = 0;
30924 const char *__pyx_filename = NULL((void*)0);
30925 int __pyx_clineno = 0;
30926 __Pyx_RefNannySetupContext("list_images", 0);
30927
30928 /* "rbd.pyx":2703
30929 * :returns: :class:`GroupImageIterator`
30930 * """
30931 * return GroupImageIterator(self) # <<<<<<<<<<<<<<
30932 *
30933 * def create_snap(self, snap_name):
30934 */
30935 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
30936 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__30936; goto __pyx_L1_error;}
30937 __Pyx_GOTREF(__pyx_t_1);
30938 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
30939 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
30940 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
30941 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_GroupImageIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__30941; goto __pyx_L1_error;}
30942 __Pyx_GOTREF(__pyx_t_2);
30943 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
30944 __pyx_r = __pyx_t_2;
30945 __pyx_t_2 = 0;
30946 goto __pyx_L0;
30947
30948 /* "rbd.pyx":2697
30949 *
30950 *
30951 * def list_images(self): # <<<<<<<<<<<<<<
30952 * """
30953 * Iterate over the images of a group.
30954 */
30955
30956 /* function exit code */
30957 __pyx_L1_error:;
30958 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
30959 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
30960 __Pyx_AddTraceback("rbd.Group.list_images", __pyx_clineno, __pyx_lineno, __pyx_filename);
30961 __pyx_r = NULL((void*)0);
30962 __pyx_L0:;
30963 __Pyx_XGIVEREF(__pyx_r);
30964 __Pyx_RefNannyFinishContext();
30965 return __pyx_r;
30966}
30967
30968/* "rbd.pyx":2705
30969 * return GroupImageIterator(self)
30970 *
30971 * def create_snap(self, snap_name): # <<<<<<<<<<<<<<
30972 * """
30973 * Create a snapshot for the group.
30974 */
30975
30976/* Python wrapper */
30977static PyObject *__pyx_pw_3rbd_5Group_13create_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_name); /*proto*/
30978static char __pyx_doc_3rbd_5Group_12create_snap[] = "Group.create_snap(self, snap_name)\n\n Create a snapshot for the group.\n\n :param snap_name: the name of the snapshot to create\n :type name: str\n\n :raises: :class:`ObjectNotFound`\n :raises: :class:`ObjectExists`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
30979static PyObject *__pyx_pw_3rbd_5Group_13create_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_name) {
30980 PyObject *__pyx_r = 0;
30981 __Pyx_RefNannyDeclarations
30982 __Pyx_RefNannySetupContext("create_snap (wrapper)", 0);
30983 __pyx_r = __pyx_pf_3rbd_5Group_12create_snap(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), ((PyObject *)__pyx_v_snap_name));
30984
30985 /* function exit code */
30986 __Pyx_RefNannyFinishContext();
30987 return __pyx_r;
30988}
30989
30990static PyObject *__pyx_pf_3rbd_5Group_12create_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_snap_name) {
30991 char *__pyx_v__snap_name;
30992 int __pyx_v_ret;
30993 PyObject *__pyx_r = NULL((void*)0);
30994 __Pyx_RefNannyDeclarations
30995 PyObject *__pyx_t_1 = NULL((void*)0);
30996 PyObject *__pyx_t_2 = NULL((void*)0);
30997 PyObject *__pyx_t_3 = NULL((void*)0);
30998 Py_ssize_t __pyx_t_4;
30999 PyObject *__pyx_t_5 = NULL((void*)0);
31000 char *__pyx_t_6;
31001 int __pyx_t_7;
31002 struct __pyx_opt_args_3rbd_make_ex __pyx_t_8;
31003 int __pyx_lineno = 0;
31004 const char *__pyx_filename = NULL((void*)0);
31005 int __pyx_clineno = 0;
31006 __Pyx_RefNannySetupContext("create_snap", 0);
31007 __Pyx_INCREF(__pyx_v_snap_name)( ((PyObject*)(__pyx_v_snap_name))->ob_refcnt++);
31008
31009 /* "rbd.pyx":2717
31010 * :raises: :class:`FunctionNotSupported`
31011 * """
31012 * snap_name = cstr(snap_name, 'snap_name') # <<<<<<<<<<<<<<
31013 * cdef:
31014 * char *_snap_name = snap_name
31015 */
31016 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__31016; goto __pyx_L1_error;}
31017 __Pyx_GOTREF(__pyx_t_2);
31018 __pyx_t_3 = NULL((void*)0);
31019 __pyx_t_4 = 0;
31020 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
31021 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
31022 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
31023 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
31024 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
31025 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
31026 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
31027 __pyx_t_4 = 1;
31028 }
31029 }
31030 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__31030; goto __pyx_L1_error;}
31031 __Pyx_GOTREF(__pyx_t_5);
31032 if (__pyx_t_3) {
31033 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
31034 }
31035 __Pyx_INCREF(__pyx_v_snap_name)( ((PyObject*)(__pyx_v_snap_name))->ob_refcnt++);
31036 __Pyx_GIVEREF(__pyx_v_snap_name);
31037 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_snap_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_snap_name
)
;
31038 __Pyx_INCREF(__pyx_n_s_snap_name)( ((PyObject*)(__pyx_n_s_snap_name))->ob_refcnt++);
31039 __Pyx_GIVEREF(__pyx_n_s_snap_name);
31040 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_snap_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_snap_name
)
;
31041 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__31041; goto __pyx_L1_error;}
31042 __Pyx_GOTREF(__pyx_t_1);
31043 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31044 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31045 __Pyx_DECREF_SET(__pyx_v_snap_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_snap_name; __pyx_v_snap_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
31046 __pyx_t_1 = 0;
31047
31048 /* "rbd.pyx":2719
31049 * snap_name = cstr(snap_name, 'snap_name')
31050 * cdef:
31051 * char *_snap_name = snap_name # <<<<<<<<<<<<<<
31052 * with nogil:
31053 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name)
31054 */
31055 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_snap_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __pyx_clineno = __LINE__31055; goto __pyx_L1_error;}
31056 __pyx_v__snap_name = __pyx_t_6;
31057
31058 /* "rbd.pyx":2720
31059 * cdef:
31060 * char *_snap_name = snap_name
31061 * with nogil: # <<<<<<<<<<<<<<
31062 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name)
31063 * if ret != 0:
31064 */
31065 {
31066 #ifdef WITH_THREAD1
31067 PyThreadState *_save;
31068 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
31069 #endif
31070 /*try:*/ {
31071
31072 /* "rbd.pyx":2721
31073 * char *_snap_name = snap_name
31074 * with nogil:
31075 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name) # <<<<<<<<<<<<<<
31076 * if ret != 0:
31077 * raise make_ex(ret, 'error creating group snapshot', group_errno_to_exception)
31078 */
31079 __pyx_v_ret = rbd_group_snap_create(__pyx_v_self->_ioctx, __pyx_v_self->_name, __pyx_v__snap_name);
31080 }
31081
31082 /* "rbd.pyx":2720
31083 * cdef:
31084 * char *_snap_name = snap_name
31085 * with nogil: # <<<<<<<<<<<<<<
31086 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name)
31087 * if ret != 0:
31088 */
31089 /*finally:*/ {
31090 /*normal exit:*/{
31091 #ifdef WITH_THREAD1
31092 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
31093 #endif
31094 goto __pyx_L5;
31095 }
31096 __pyx_L5:;
31097 }
31098 }
31099
31100 /* "rbd.pyx":2722
31101 * with nogil:
31102 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name)
31103 * if ret != 0: # <<<<<<<<<<<<<<
31104 * raise make_ex(ret, 'error creating group snapshot', group_errno_to_exception)
31105 *
31106 */
31107 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
31108 if (__pyx_t_7) {
31109
31110 /* "rbd.pyx":2723
31111 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name)
31112 * if ret != 0:
31113 * raise make_ex(ret, 'error creating group snapshot', group_errno_to_exception) # <<<<<<<<<<<<<<
31114 *
31115 * def remove_snap(self, snap_name):
31116 */
31117 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __pyx_clineno = __LINE__31117; goto __pyx_L1_error;}
31118 __Pyx_GOTREF(__pyx_t_1);
31119 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
31120 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
31121 __pyx_t_8.__pyx_n = 1;
31122 __pyx_t_8.exception_map = __pyx_t_2;
31123 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_creating_group_snapshot, &__pyx_t_8); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __pyx_clineno = __LINE__31123; goto __pyx_L1_error;}
31124 __Pyx_GOTREF(__pyx_t_5);
31125 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
31126 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31127 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31128 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31129 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __pyx_clineno = __LINE__31129; goto __pyx_L1_error;}
31130
31131 /* "rbd.pyx":2722
31132 * with nogil:
31133 * ret = rbd_group_snap_create(self._ioctx, self._name, _snap_name)
31134 * if ret != 0: # <<<<<<<<<<<<<<
31135 * raise make_ex(ret, 'error creating group snapshot', group_errno_to_exception)
31136 *
31137 */
31138 }
31139
31140 /* "rbd.pyx":2705
31141 * return GroupImageIterator(self)
31142 *
31143 * def create_snap(self, snap_name): # <<<<<<<<<<<<<<
31144 * """
31145 * Create a snapshot for the group.
31146 */
31147
31148 /* function exit code */
31149 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
31150 goto __pyx_L0;
31151 __pyx_L1_error:;
31152 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
31153 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
31154 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
31155 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
31156 __Pyx_AddTraceback("rbd.Group.create_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
31157 __pyx_r = NULL((void*)0);
31158 __pyx_L0:;
31159 __Pyx_XDECREF(__pyx_v_snap_name)do { if ((__pyx_v_snap_name) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_snap_name))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_snap_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_snap_name
)))); } while (0); } while (0)
;
31160 __Pyx_XGIVEREF(__pyx_r);
31161 __Pyx_RefNannyFinishContext();
31162 return __pyx_r;
31163}
31164
31165/* "rbd.pyx":2725
31166 * raise make_ex(ret, 'error creating group snapshot', group_errno_to_exception)
31167 *
31168 * def remove_snap(self, snap_name): # <<<<<<<<<<<<<<
31169 * """
31170 * Remove a snapshot from the group.
31171 */
31172
31173/* Python wrapper */
31174static PyObject *__pyx_pw_3rbd_5Group_15remove_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_name); /*proto*/
31175static char __pyx_doc_3rbd_5Group_14remove_snap[] = "Group.remove_snap(self, snap_name)\n\n Remove a snapshot from the group.\n\n :param snap_name: the name of the snapshot to remove\n :type name: str\n\n :raises: :class:`ObjectNotFound`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
31176static PyObject *__pyx_pw_3rbd_5Group_15remove_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_name) {
31177 PyObject *__pyx_r = 0;
31178 __Pyx_RefNannyDeclarations
31179 __Pyx_RefNannySetupContext("remove_snap (wrapper)", 0);
31180 __pyx_r = __pyx_pf_3rbd_5Group_14remove_snap(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), ((PyObject *)__pyx_v_snap_name));
31181
31182 /* function exit code */
31183 __Pyx_RefNannyFinishContext();
31184 return __pyx_r;
31185}
31186
31187static PyObject *__pyx_pf_3rbd_5Group_14remove_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_snap_name) {
31188 char *__pyx_v__snap_name;
31189 int __pyx_v_ret;
31190 PyObject *__pyx_r = NULL((void*)0);
31191 __Pyx_RefNannyDeclarations
31192 PyObject *__pyx_t_1 = NULL((void*)0);
31193 PyObject *__pyx_t_2 = NULL((void*)0);
31194 PyObject *__pyx_t_3 = NULL((void*)0);
31195 Py_ssize_t __pyx_t_4;
31196 PyObject *__pyx_t_5 = NULL((void*)0);
31197 char *__pyx_t_6;
31198 int __pyx_t_7;
31199 struct __pyx_opt_args_3rbd_make_ex __pyx_t_8;
31200 int __pyx_lineno = 0;
31201 const char *__pyx_filename = NULL((void*)0);
31202 int __pyx_clineno = 0;
31203 __Pyx_RefNannySetupContext("remove_snap", 0);
31204 __Pyx_INCREF(__pyx_v_snap_name)( ((PyObject*)(__pyx_v_snap_name))->ob_refcnt++);
31205
31206 /* "rbd.pyx":2736
31207 * :raises: :class:`FunctionNotSupported`
31208 * """
31209 * snap_name = cstr(snap_name, 'snap_name') # <<<<<<<<<<<<<<
31210 * cdef:
31211 * char *_snap_name = snap_name
31212 */
31213 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; __pyx_clineno = __LINE__31213; goto __pyx_L1_error;}
31214 __Pyx_GOTREF(__pyx_t_2);
31215 __pyx_t_3 = NULL((void*)0);
31216 __pyx_t_4 = 0;
31217 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
31218 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
31219 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
31220 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
31221 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
31222 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
31223 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
31224 __pyx_t_4 = 1;
31225 }
31226 }
31227 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; __pyx_clineno = __LINE__31227; goto __pyx_L1_error;}
31228 __Pyx_GOTREF(__pyx_t_5);
31229 if (__pyx_t_3) {
31230 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
31231 }
31232 __Pyx_INCREF(__pyx_v_snap_name)( ((PyObject*)(__pyx_v_snap_name))->ob_refcnt++);
31233 __Pyx_GIVEREF(__pyx_v_snap_name);
31234 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_snap_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_snap_name
)
;
31235 __Pyx_INCREF(__pyx_n_s_snap_name)( ((PyObject*)(__pyx_n_s_snap_name))->ob_refcnt++);
31236 __Pyx_GIVEREF(__pyx_n_s_snap_name);
31237 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_snap_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_snap_name
)
;
31238 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; __pyx_clineno = __LINE__31238; goto __pyx_L1_error;}
31239 __Pyx_GOTREF(__pyx_t_1);
31240 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31241 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31242 __Pyx_DECREF_SET(__pyx_v_snap_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_snap_name; __pyx_v_snap_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
31243 __pyx_t_1 = 0;
31244
31245 /* "rbd.pyx":2738
31246 * snap_name = cstr(snap_name, 'snap_name')
31247 * cdef:
31248 * char *_snap_name = snap_name # <<<<<<<<<<<<<<
31249 * with nogil:
31250 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name)
31251 */
31252 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_snap_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; __pyx_clineno = __LINE__31252; goto __pyx_L1_error;}
31253 __pyx_v__snap_name = __pyx_t_6;
31254
31255 /* "rbd.pyx":2739
31256 * cdef:
31257 * char *_snap_name = snap_name
31258 * with nogil: # <<<<<<<<<<<<<<
31259 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name)
31260 * if ret != 0:
31261 */
31262 {
31263 #ifdef WITH_THREAD1
31264 PyThreadState *_save;
31265 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
31266 #endif
31267 /*try:*/ {
31268
31269 /* "rbd.pyx":2740
31270 * char *_snap_name = snap_name
31271 * with nogil:
31272 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name) # <<<<<<<<<<<<<<
31273 * if ret != 0:
31274 * raise make_ex(ret, 'error removing group snapshot', group_errno_to_exception)
31275 */
31276 __pyx_v_ret = rbd_group_snap_remove(__pyx_v_self->_ioctx, __pyx_v_self->_name, __pyx_v__snap_name);
31277 }
31278
31279 /* "rbd.pyx":2739
31280 * cdef:
31281 * char *_snap_name = snap_name
31282 * with nogil: # <<<<<<<<<<<<<<
31283 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name)
31284 * if ret != 0:
31285 */
31286 /*finally:*/ {
31287 /*normal exit:*/{
31288 #ifdef WITH_THREAD1
31289 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
31290 #endif
31291 goto __pyx_L5;
31292 }
31293 __pyx_L5:;
31294 }
31295 }
31296
31297 /* "rbd.pyx":2741
31298 * with nogil:
31299 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name)
31300 * if ret != 0: # <<<<<<<<<<<<<<
31301 * raise make_ex(ret, 'error removing group snapshot', group_errno_to_exception)
31302 *
31303 */
31304 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
31305 if (__pyx_t_7) {
31306
31307 /* "rbd.pyx":2742
31308 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name)
31309 * if ret != 0:
31310 * raise make_ex(ret, 'error removing group snapshot', group_errno_to_exception) # <<<<<<<<<<<<<<
31311 *
31312 * def rename_snap(self, old_snap_name, new_snap_name):
31313 */
31314 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__31314; goto __pyx_L1_error;}
31315 __Pyx_GOTREF(__pyx_t_1);
31316 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
31317 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
31318 __pyx_t_8.__pyx_n = 1;
31319 __pyx_t_8.exception_map = __pyx_t_2;
31320 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_removing_group_snapshot, &__pyx_t_8); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__31320; goto __pyx_L1_error;}
31321 __Pyx_GOTREF(__pyx_t_5);
31322 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
31323 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31324 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31325 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31326 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2742; __pyx_clineno = __LINE__31326; goto __pyx_L1_error;}
31327
31328 /* "rbd.pyx":2741
31329 * with nogil:
31330 * ret = rbd_group_snap_remove(self._ioctx, self._name, _snap_name)
31331 * if ret != 0: # <<<<<<<<<<<<<<
31332 * raise make_ex(ret, 'error removing group snapshot', group_errno_to_exception)
31333 *
31334 */
31335 }
31336
31337 /* "rbd.pyx":2725
31338 * raise make_ex(ret, 'error creating group snapshot', group_errno_to_exception)
31339 *
31340 * def remove_snap(self, snap_name): # <<<<<<<<<<<<<<
31341 * """
31342 * Remove a snapshot from the group.
31343 */
31344
31345 /* function exit code */
31346 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
31347 goto __pyx_L0;
31348 __pyx_L1_error:;
31349 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
31350 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
31351 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
31352 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
31353 __Pyx_AddTraceback("rbd.Group.remove_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
31354 __pyx_r = NULL((void*)0);
31355 __pyx_L0:;
31356 __Pyx_XDECREF(__pyx_v_snap_name)do { if ((__pyx_v_snap_name) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_snap_name))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_snap_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_snap_name
)))); } while (0); } while (0)
;
31357 __Pyx_XGIVEREF(__pyx_r);
31358 __Pyx_RefNannyFinishContext();
31359 return __pyx_r;
31360}
31361
31362/* "rbd.pyx":2744
31363 * raise make_ex(ret, 'error removing group snapshot', group_errno_to_exception)
31364 *
31365 * def rename_snap(self, old_snap_name, new_snap_name): # <<<<<<<<<<<<<<
31366 * """
31367 * Rename group's snapshot.
31368 */
31369
31370/* Python wrapper */
31371static PyObject *__pyx_pw_3rbd_5Group_17rename_snap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31372static char __pyx_doc_3rbd_5Group_16rename_snap[] = "Group.rename_snap(self, old_snap_name, new_snap_name)\n\n Rename group's snapshot.\n\n :raises: :class:`ObjectNotFound`\n :raises: :class:`ObjectExists`\n :raises: :class:`InvalidArgument`\n :raises: :class:`FunctionNotSupported`\n ";
31373static PyObject *__pyx_pw_3rbd_5Group_17rename_snap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31374 PyObject *__pyx_v_old_snap_name = 0;
31375 PyObject *__pyx_v_new_snap_name = 0;
31376 int __pyx_lineno = 0;
31377 const char *__pyx_filename = NULL((void*)0);
31378 int __pyx_clineno = 0;
31379 PyObject *__pyx_r = 0;
31380 __Pyx_RefNannyDeclarations
31381 __Pyx_RefNannySetupContext("rename_snap (wrapper)", 0);
31382 {
31383 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old_snap_name,&__pyx_n_s_new_snap_name,0};
31384 PyObject* values[2] = {0,0};
31385 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
31386 Py_ssize_t kw_args;
31387 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
31388 switch (pos_args) {
31389 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
31390 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
31391 case 0: break;
31392 default: goto __pyx_L5_argtuple_error;
31393 }
31394 kw_args = PyDict_Size(__pyx_kwds);
31395 switch (pos_args) {
31396 case 0:
31397 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old_snap_name)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old_snap_name
)) != 0), 1)
) kw_args--;
31398 else goto __pyx_L5_argtuple_error;
31399 case 1:
31400 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_snap_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_snap_name
)) != 0), 1)
) kw_args--;
31401 else {
31402 __Pyx_RaiseArgtupleInvalid("rename_snap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__31402; goto __pyx_L3_error;}
31403 }
31404 }
31405 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
31406 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rename_snap") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "rename_snap") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__31406; goto __pyx_L3_error;}
31407 }
31408 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
31409 goto __pyx_L5_argtuple_error;
31410 } else {
31411 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
31412 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
31413 }
31414 __pyx_v_old_snap_name = values[0];
31415 __pyx_v_new_snap_name = values[1];
31416 }
31417 goto __pyx_L4_argument_unpacking_done;
31418 __pyx_L5_argtuple_error:;
31419 __Pyx_RaiseArgtupleInvalid("rename_snap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__31419; goto __pyx_L3_error;}
31420 __pyx_L3_error:;
31421 __Pyx_AddTraceback("rbd.Group.rename_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
31422 __Pyx_RefNannyFinishContext();
31423 return NULL((void*)0);
31424 __pyx_L4_argument_unpacking_done:;
31425 __pyx_r = __pyx_pf_3rbd_5Group_16rename_snap(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), __pyx_v_old_snap_name, __pyx_v_new_snap_name);
31426
31427 /* function exit code */
31428 __Pyx_RefNannyFinishContext();
31429 return __pyx_r;
31430}
31431
31432static PyObject *__pyx_pf_3rbd_5Group_16rename_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_old_snap_name, PyObject *__pyx_v_new_snap_name) {
31433 char *__pyx_v__old_snap_name;
31434 char *__pyx_v__new_snap_name;
31435 int __pyx_v_ret;
31436 PyObject *__pyx_r = NULL((void*)0);
31437 __Pyx_RefNannyDeclarations
31438 PyObject *__pyx_t_1 = NULL((void*)0);
31439 PyObject *__pyx_t_2 = NULL((void*)0);
31440 PyObject *__pyx_t_3 = NULL((void*)0);
31441 Py_ssize_t __pyx_t_4;
31442 PyObject *__pyx_t_5 = NULL((void*)0);
31443 char *__pyx_t_6;
31444 int __pyx_t_7;
31445 struct __pyx_opt_args_3rbd_make_ex __pyx_t_8;
31446 int __pyx_lineno = 0;
31447 const char *__pyx_filename = NULL((void*)0);
31448 int __pyx_clineno = 0;
31449 __Pyx_RefNannySetupContext("rename_snap", 0);
31450 __Pyx_INCREF(__pyx_v_old_snap_name)( ((PyObject*)(__pyx_v_old_snap_name))->ob_refcnt++);
31451 __Pyx_INCREF(__pyx_v_new_snap_name)( ((PyObject*)(__pyx_v_new_snap_name))->ob_refcnt++);
31452
31453 /* "rbd.pyx":2754
31454 * """
31455 *
31456 * old_snap_name = cstr(old_snap_name, 'old_snap_name') # <<<<<<<<<<<<<<
31457 * new_snap_name = cstr(new_snap_name, 'new_snap_name')
31458 * cdef:
31459 */
31460 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__31460; goto __pyx_L1_error;}
31461 __Pyx_GOTREF(__pyx_t_2);
31462 __pyx_t_3 = NULL((void*)0);
31463 __pyx_t_4 = 0;
31464 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
31465 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
31466 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
31467 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
31468 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
31469 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
31470 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
31471 __pyx_t_4 = 1;
31472 }
31473 }
31474 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__31474; goto __pyx_L1_error;}
31475 __Pyx_GOTREF(__pyx_t_5);
31476 if (__pyx_t_3) {
31477 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
31478 }
31479 __Pyx_INCREF(__pyx_v_old_snap_name)( ((PyObject*)(__pyx_v_old_snap_name))->ob_refcnt++);
31480 __Pyx_GIVEREF(__pyx_v_old_snap_name);
31481 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_old_snap_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_old_snap_name
)
;
31482 __Pyx_INCREF(__pyx_n_s_old_snap_name)( ((PyObject*)(__pyx_n_s_old_snap_name))->ob_refcnt++);
31483 __Pyx_GIVEREF(__pyx_n_s_old_snap_name);
31484 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_old_snap_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_old_snap_name
)
;
31485 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__31485; goto __pyx_L1_error;}
31486 __Pyx_GOTREF(__pyx_t_1);
31487 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31488 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31489 __Pyx_DECREF_SET(__pyx_v_old_snap_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_old_snap_name; __pyx_v_old_snap_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
31490 __pyx_t_1 = 0;
31491
31492 /* "rbd.pyx":2755
31493 *
31494 * old_snap_name = cstr(old_snap_name, 'old_snap_name')
31495 * new_snap_name = cstr(new_snap_name, 'new_snap_name') # <<<<<<<<<<<<<<
31496 * cdef:
31497 * char *_old_snap_name = old_snap_name
31498 */
31499 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2755; __pyx_clineno = __LINE__31499; goto __pyx_L1_error;}
31500 __Pyx_GOTREF(__pyx_t_2);
31501 __pyx_t_5 = NULL((void*)0);
31502 __pyx_t_4 = 0;
31503 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
31504 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
31505 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
31506 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
31507 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
31508 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
31509 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
31510 __pyx_t_4 = 1;
31511 }
31512 }
31513 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2755; __pyx_clineno = __LINE__31513; goto __pyx_L1_error;}
31514 __Pyx_GOTREF(__pyx_t_3);
31515 if (__pyx_t_5) {
31516 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
31517 }
31518 __Pyx_INCREF(__pyx_v_new_snap_name)( ((PyObject*)(__pyx_v_new_snap_name))->ob_refcnt++);
31519 __Pyx_GIVEREF(__pyx_v_new_snap_name);
31520 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_new_snap_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_new_snap_name
)
;
31521 __Pyx_INCREF(__pyx_n_s_new_snap_name)( ((PyObject*)(__pyx_n_s_new_snap_name))->ob_refcnt++);
31522 __Pyx_GIVEREF(__pyx_n_s_new_snap_name);
31523 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_new_snap_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_new_snap_name
)
;
31524 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2755; __pyx_clineno = __LINE__31524; goto __pyx_L1_error;}
31525 __Pyx_GOTREF(__pyx_t_1);
31526 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
31527 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31528 __Pyx_DECREF_SET(__pyx_v_new_snap_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_new_snap_name; __pyx_v_new_snap_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
31529 __pyx_t_1 = 0;
31530
31531 /* "rbd.pyx":2757
31532 * new_snap_name = cstr(new_snap_name, 'new_snap_name')
31533 * cdef:
31534 * char *_old_snap_name = old_snap_name # <<<<<<<<<<<<<<
31535 * char *_new_snap_name = new_snap_name
31536 * with nogil:
31537 */
31538 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_old_snap_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__31538; goto __pyx_L1_error;}
31539 __pyx_v__old_snap_name = __pyx_t_6;
31540
31541 /* "rbd.pyx":2758
31542 * cdef:
31543 * char *_old_snap_name = old_snap_name
31544 * char *_new_snap_name = new_snap_name # <<<<<<<<<<<<<<
31545 * with nogil:
31546 * ret = rbd_group_snap_rename(self._ioctx, self._name, _old_snap_name,
31547 */
31548 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_new_snap_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; __pyx_clineno = __LINE__31548; goto __pyx_L1_error;}
31549 __pyx_v__new_snap_name = __pyx_t_6;
31550
31551 /* "rbd.pyx":2759
31552 * char *_old_snap_name = old_snap_name
31553 * char *_new_snap_name = new_snap_name
31554 * with nogil: # <<<<<<<<<<<<<<
31555 * ret = rbd_group_snap_rename(self._ioctx, self._name, _old_snap_name,
31556 * _new_snap_name)
31557 */
31558 {
31559 #ifdef WITH_THREAD1
31560 PyThreadState *_save;
31561 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
31562 #endif
31563 /*try:*/ {
31564
31565 /* "rbd.pyx":2760
31566 * char *_new_snap_name = new_snap_name
31567 * with nogil:
31568 * ret = rbd_group_snap_rename(self._ioctx, self._name, _old_snap_name, # <<<<<<<<<<<<<<
31569 * _new_snap_name)
31570 * if ret != 0:
31571 */
31572 __pyx_v_ret = rbd_group_snap_rename(__pyx_v_self->_ioctx, __pyx_v_self->_name, __pyx_v__old_snap_name, __pyx_v__new_snap_name);
31573 }
31574
31575 /* "rbd.pyx":2759
31576 * char *_old_snap_name = old_snap_name
31577 * char *_new_snap_name = new_snap_name
31578 * with nogil: # <<<<<<<<<<<<<<
31579 * ret = rbd_group_snap_rename(self._ioctx, self._name, _old_snap_name,
31580 * _new_snap_name)
31581 */
31582 /*finally:*/ {
31583 /*normal exit:*/{
31584 #ifdef WITH_THREAD1
31585 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
31586 #endif
31587 goto __pyx_L5;
31588 }
31589 __pyx_L5:;
31590 }
31591 }
31592
31593 /* "rbd.pyx":2762
31594 * ret = rbd_group_snap_rename(self._ioctx, self._name, _old_snap_name,
31595 * _new_snap_name)
31596 * if ret != 0: # <<<<<<<<<<<<<<
31597 * raise make_ex(ret, 'error renaming group snapshot',
31598 * group_errno_to_exception)
31599 */
31600 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
31601 if (__pyx_t_7) {
31602
31603 /* "rbd.pyx":2763
31604 * _new_snap_name)
31605 * if ret != 0:
31606 * raise make_ex(ret, 'error renaming group snapshot', # <<<<<<<<<<<<<<
31607 * group_errno_to_exception)
31608 *
31609 */
31610 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__31610; goto __pyx_L1_error;}
31611 __Pyx_GOTREF(__pyx_t_1);
31612
31613 /* "rbd.pyx":2764
31614 * if ret != 0:
31615 * raise make_ex(ret, 'error renaming group snapshot',
31616 * group_errno_to_exception) # <<<<<<<<<<<<<<
31617 *
31618 * def list_snaps(self):
31619 */
31620 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
31621 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
31622
31623 /* "rbd.pyx":2763
31624 * _new_snap_name)
31625 * if ret != 0:
31626 * raise make_ex(ret, 'error renaming group snapshot', # <<<<<<<<<<<<<<
31627 * group_errno_to_exception)
31628 *
31629 */
31630 __pyx_t_8.__pyx_n = 1;
31631 __pyx_t_8.exception_map = __pyx_t_2;
31632 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_renaming_group_snapshot, &__pyx_t_8); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__31632; goto __pyx_L1_error;}
31633 __Pyx_GOTREF(__pyx_t_3);
31634 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
31635 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31636 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
31637 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
31638 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__31638; goto __pyx_L1_error;}
31639
31640 /* "rbd.pyx":2762
31641 * ret = rbd_group_snap_rename(self._ioctx, self._name, _old_snap_name,
31642 * _new_snap_name)
31643 * if ret != 0: # <<<<<<<<<<<<<<
31644 * raise make_ex(ret, 'error renaming group snapshot',
31645 * group_errno_to_exception)
31646 */
31647 }
31648
31649 /* "rbd.pyx":2744
31650 * raise make_ex(ret, 'error removing group snapshot', group_errno_to_exception)
31651 *
31652 * def rename_snap(self, old_snap_name, new_snap_name): # <<<<<<<<<<<<<<
31653 * """
31654 * Rename group's snapshot.
31655 */
31656
31657 /* function exit code */
31658 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
31659 goto __pyx_L0;
31660 __pyx_L1_error:;
31661 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
31662 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
31663 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
31664 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
31665 __Pyx_AddTraceback("rbd.Group.rename_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
31666 __pyx_r = NULL((void*)0);
31667 __pyx_L0:;
31668 __Pyx_XDECREF(__pyx_v_old_snap_name)do { if ((__pyx_v_old_snap_name) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_old_snap_name))->ob_refcnt != 0)
; else ( (*(((PyObject*)((PyObject *)(__pyx_v_old_snap_name)
))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_old_snap_name
)))); } while (0); } while (0)
;
31669 __Pyx_XDECREF(__pyx_v_new_snap_name)do { if ((__pyx_v_new_snap_name) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_new_snap_name))->ob_refcnt != 0)
; else ( (*(((PyObject*)((PyObject *)(__pyx_v_new_snap_name)
))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_new_snap_name
)))); } while (0); } while (0)
;
31670 __Pyx_XGIVEREF(__pyx_r);
31671 __Pyx_RefNannyFinishContext();
31672 return __pyx_r;
31673}
31674
31675/* "rbd.pyx":2766
31676 * group_errno_to_exception)
31677 *
31678 * def list_snaps(self): # <<<<<<<<<<<<<<
31679 * """
31680 * Iterate over the images of a group.
31681 */
31682
31683/* Python wrapper */
31684static PyObject *__pyx_pw_3rbd_5Group_19list_snaps(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
31685static char __pyx_doc_3rbd_5Group_18list_snaps[] = "Group.list_snaps(self)\n\n Iterate over the images of a group.\n\n :returns: :class:`GroupSnapIterator`\n ";
31686static PyObject *__pyx_pw_3rbd_5Group_19list_snaps(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
31687 PyObject *__pyx_r = 0;
31688 __Pyx_RefNannyDeclarations
31689 __Pyx_RefNannySetupContext("list_snaps (wrapper)", 0);
31690 __pyx_r = __pyx_pf_3rbd_5Group_18list_snaps(((struct __pyx_obj_3rbd_Group *)__pyx_v_self));
31691
31692 /* function exit code */
31693 __Pyx_RefNannyFinishContext();
31694 return __pyx_r;
31695}
31696
31697static PyObject *__pyx_pf_3rbd_5Group_18list_snaps(struct __pyx_obj_3rbd_Group *__pyx_v_self) {
31698 PyObject *__pyx_r = NULL((void*)0);
31699 __Pyx_RefNannyDeclarations
31700 PyObject *__pyx_t_1 = NULL((void*)0);
31701 PyObject *__pyx_t_2 = NULL((void*)0);
31702 int __pyx_lineno = 0;
31703 const char *__pyx_filename = NULL((void*)0);
31704 int __pyx_clineno = 0;
31705 __Pyx_RefNannySetupContext("list_snaps", 0);
31706
31707 /* "rbd.pyx":2772
31708 * :returns: :class:`GroupSnapIterator`
31709 * """
31710 * return GroupSnapIterator(self) # <<<<<<<<<<<<<<
31711 *
31712 * def rollback_to_snap(self, name):
31713 */
31714 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
31715 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__31715; goto __pyx_L1_error;}
31716 __Pyx_GOTREF(__pyx_t_1);
31717 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
31718 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
31719 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
31720 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_GroupSnapIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__31720; goto __pyx_L1_error;}
31721 __Pyx_GOTREF(__pyx_t_2);
31722 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
31723 __pyx_r = __pyx_t_2;
31724 __pyx_t_2 = 0;
31725 goto __pyx_L0;
31726
31727 /* "rbd.pyx":2766
31728 * group_errno_to_exception)
31729 *
31730 * def list_snaps(self): # <<<<<<<<<<<<<<
31731 * """
31732 * Iterate over the images of a group.
31733 */
31734
31735 /* function exit code */
31736 __pyx_L1_error:;
31737 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
31738 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
31739 __Pyx_AddTraceback("rbd.Group.list_snaps", __pyx_clineno, __pyx_lineno, __pyx_filename);
31740 __pyx_r = NULL((void*)0);
31741 __pyx_L0:;
31742 __Pyx_XGIVEREF(__pyx_r);
31743 __Pyx_RefNannyFinishContext();
31744 return __pyx_r;
31745}
31746
31747/* "rbd.pyx":2774
31748 * return GroupSnapIterator(self)
31749 *
31750 * def rollback_to_snap(self, name): # <<<<<<<<<<<<<<
31751 * """
31752 * Rollback group to snapshot.
31753 */
31754
31755/* Python wrapper */
31756static PyObject *__pyx_pw_3rbd_5Group_21rollback_to_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
31757static char __pyx_doc_3rbd_5Group_20rollback_to_snap[] = "Group.rollback_to_snap(self, name)\n\n Rollback group to snapshot.\n\n :param name: the group snapshot to rollback to\n :type name: str\n :raises: :class:`ObjectNotFound`\n :raises: :class:`IOError`\n ";
31758static PyObject *__pyx_pw_3rbd_5Group_21rollback_to_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
31759 PyObject *__pyx_r = 0;
31760 __Pyx_RefNannyDeclarations
31761 __Pyx_RefNannySetupContext("rollback_to_snap (wrapper)", 0);
31762 __pyx_r = __pyx_pf_3rbd_5Group_20rollback_to_snap(((struct __pyx_obj_3rbd_Group *)__pyx_v_self), ((PyObject *)__pyx_v_name));
31763
31764 /* function exit code */
31765 __Pyx_RefNannyFinishContext();
31766 return __pyx_r;
31767}
31768
31769static PyObject *__pyx_pf_3rbd_5Group_20rollback_to_snap(struct __pyx_obj_3rbd_Group *__pyx_v_self, PyObject *__pyx_v_name) {
31770 char *__pyx_v__name;
31771 int __pyx_v_ret;
31772 PyObject *__pyx_r = NULL((void*)0);
31773 __Pyx_RefNannyDeclarations
31774 PyObject *__pyx_t_1 = NULL((void*)0);
31775 PyObject *__pyx_t_2 = NULL((void*)0);
31776 PyObject *__pyx_t_3 = NULL((void*)0);
31777 Py_ssize_t __pyx_t_4;
31778 PyObject *__pyx_t_5 = NULL((void*)0);
31779 char *__pyx_t_6;
31780 int __pyx_t_7;
31781 struct __pyx_opt_args_3rbd_make_ex __pyx_t_8;
31782 int __pyx_lineno = 0;
31783 const char *__pyx_filename = NULL((void*)0);
31784 int __pyx_clineno = 0;
31785 __Pyx_RefNannySetupContext("rollback_to_snap", 0);
31786 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
31787
31788 /* "rbd.pyx":2783
31789 * :raises: :class:`IOError`
31790 * """
31791 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
31792 * cdef char *_name = name
31793 * with nogil:
31794 */
31795 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__31795; goto __pyx_L1_error;}
31796 __Pyx_GOTREF(__pyx_t_2);
31797 __pyx_t_3 = NULL((void*)0);
31798 __pyx_t_4 = 0;
31799 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
31800 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
31801 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
31802 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
31803 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
31804 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
31805 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
31806 __pyx_t_4 = 1;
31807 }
31808 }
31809 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__31809; goto __pyx_L1_error;}
31810 __Pyx_GOTREF(__pyx_t_5);
31811 if (__pyx_t_3) {
31812 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
31813 }
31814 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
31815 __Pyx_GIVEREF(__pyx_v_name);
31816 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
31817 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
31818 __Pyx_GIVEREF(__pyx_n_s_name);
31819 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
31820 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__31820; goto __pyx_L1_error;}
31821 __Pyx_GOTREF(__pyx_t_1);
31822 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31823 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31824 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
31825 __pyx_t_1 = 0;
31826
31827 /* "rbd.pyx":2784
31828 * """
31829 * name = cstr(name, 'name')
31830 * cdef char *_name = name # <<<<<<<<<<<<<<
31831 * with nogil:
31832 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name)
31833 */
31834 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; __pyx_clineno = __LINE__31834; goto __pyx_L1_error;}
31835 __pyx_v__name = __pyx_t_6;
31836
31837 /* "rbd.pyx":2785
31838 * name = cstr(name, 'name')
31839 * cdef char *_name = name
31840 * with nogil: # <<<<<<<<<<<<<<
31841 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name)
31842 * if ret != 0:
31843 */
31844 {
31845 #ifdef WITH_THREAD1
31846 PyThreadState *_save;
31847 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
31848 #endif
31849 /*try:*/ {
31850
31851 /* "rbd.pyx":2786
31852 * cdef char *_name = name
31853 * with nogil:
31854 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name) # <<<<<<<<<<<<<<
31855 * if ret != 0:
31856 * raise make_ex(ret, 'error rolling back group to snapshot', group_errno_to_exception)
31857 */
31858 __pyx_v_ret = rbd_group_snap_rollback(__pyx_v_self->_ioctx, __pyx_v_self->_name, __pyx_v__name);
31859 }
31860
31861 /* "rbd.pyx":2785
31862 * name = cstr(name, 'name')
31863 * cdef char *_name = name
31864 * with nogil: # <<<<<<<<<<<<<<
31865 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name)
31866 * if ret != 0:
31867 */
31868 /*finally:*/ {
31869 /*normal exit:*/{
31870 #ifdef WITH_THREAD1
31871 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
31872 #endif
31873 goto __pyx_L5;
31874 }
31875 __pyx_L5:;
31876 }
31877 }
31878
31879 /* "rbd.pyx":2787
31880 * with nogil:
31881 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name)
31882 * if ret != 0: # <<<<<<<<<<<<<<
31883 * raise make_ex(ret, 'error rolling back group to snapshot', group_errno_to_exception)
31884 *
31885 */
31886 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
31887 if (__pyx_t_7) {
31888
31889 /* "rbd.pyx":2788
31890 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name)
31891 * if ret != 0:
31892 * raise make_ex(ret, 'error rolling back group to snapshot', group_errno_to_exception) # <<<<<<<<<<<<<<
31893 *
31894 * cdef class Image(object):
31895 */
31896 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__31896; goto __pyx_L1_error;}
31897 __Pyx_GOTREF(__pyx_t_1);
31898 __pyx_t_2 = __pyx_v_3rbd_group_errno_to_exception;
31899 __Pyx_INCREF(__pyx_t_2)( ((PyObject*)(__pyx_t_2))->ob_refcnt++);
31900 __pyx_t_8.__pyx_n = 1;
31901 __pyx_t_8.exception_map = __pyx_t_2;
31902 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_rolling_back_group_to_snap, &__pyx_t_8); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__31902; goto __pyx_L1_error;}
31903 __Pyx_GOTREF(__pyx_t_5);
31904 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
31905 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
31906 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31907 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
31908 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__31908; goto __pyx_L1_error;}
31909
31910 /* "rbd.pyx":2787
31911 * with nogil:
31912 * ret = rbd_group_snap_rollback(self._ioctx, self._name, _name)
31913 * if ret != 0: # <<<<<<<<<<<<<<
31914 * raise make_ex(ret, 'error rolling back group to snapshot', group_errno_to_exception)
31915 *
31916 */
31917 }
31918
31919 /* "rbd.pyx":2774
31920 * return GroupSnapIterator(self)
31921 *
31922 * def rollback_to_snap(self, name): # <<<<<<<<<<<<<<
31923 * """
31924 * Rollback group to snapshot.
31925 */
31926
31927 /* function exit code */
31928 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
31929 goto __pyx_L0;
31930 __pyx_L1_error:;
31931 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
31932 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
31933 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
31934 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
31935 __Pyx_AddTraceback("rbd.Group.rollback_to_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
31936 __pyx_r = NULL((void*)0);
31937 __pyx_L0:;
31938 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
31939 __Pyx_XGIVEREF(__pyx_r);
31940 __Pyx_RefNannyFinishContext();
31941 return __pyx_r;
31942}
31943
31944/* "rbd.pyx":2804
31945 * cdef rados_ioctx_t _ioctx
31946 *
31947 * def __init__(self, ioctx, name=None, snapshot=None, # <<<<<<<<<<<<<<
31948 * read_only=False, image_id=None):
31949 * """
31950 */
31951
31952/* Python wrapper */
31953static int __pyx_pw_3rbd_5Image_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31954static char __pyx_doc_3rbd_5Image___init__[] = "\n Open the image at the given snapshot.\n Specify either name or id, otherwise :class:`InvalidArgument` is raised.\n\n If a snapshot is specified, the image will be read-only, unless\n :func:`Image.set_snap` is called later.\n\n If read-only mode is used, metadata for the :class:`Image`\n object (such as which snapshots exist) may become obsolete. See\n the C api for more details.\n\n To clean up from opening the image, :func:`Image.close` should\n be called. For ease of use, this is done automatically when\n an :class:`Image` is used as a context manager (see :pep:`343`).\n\n :param ioctx: determines which RADOS pool the image is in\n :type ioctx: :class:`rados.Ioctx`\n :param name: the name of the image\n :type name: str\n :param snapshot: which snapshot to read from\n :type snaphshot: str\n :param read_only: whether to open the image in read-only mode\n :type read_only: bool\n :param image_id: the id of the image\n :type image_id: str\n ";
31955#if CYTHON_COMPILING_IN_CPYTHON1
31956struct wrapperbase __pyx_wrapperbase_3rbd_5Image___init__;
31957#endif
31958static int __pyx_pw_3rbd_5Image_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31959 PyObject *__pyx_v_ioctx = 0;
31960 PyObject *__pyx_v_name = 0;
31961 PyObject *__pyx_v_snapshot = 0;
31962 PyObject *__pyx_v_read_only = 0;
31963 PyObject *__pyx_v_image_id = 0;
31964 int __pyx_lineno = 0;
31965 const char *__pyx_filename = NULL((void*)0);
31966 int __pyx_clineno = 0;
31967 int __pyx_r;
31968 __Pyx_RefNannyDeclarations
31969 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
31970 {
31971 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,&__pyx_n_s_name,&__pyx_n_s_snapshot,&__pyx_n_s_read_only,&__pyx_n_s_image_id,0};
31972 PyObject* values[5] = {0,0,0,0,0};
31973 values[1] = ((PyObject *)Py_None(&_Py_NoneStruct));
31974 values[2] = ((PyObject *)Py_None(&_Py_NoneStruct));
31975
31976 /* "rbd.pyx":2805
31977 *
31978 * def __init__(self, ioctx, name=None, snapshot=None,
31979 * read_only=False, image_id=None): # <<<<<<<<<<<<<<
31980 * """
31981 * Open the image at the given snapshot.
31982 */
31983 values[3] = ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct));
31984 values[4] = ((PyObject *)Py_None(&_Py_NoneStruct));
31985 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
31986 Py_ssize_t kw_args;
31987 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
31988 switch (pos_args) {
31989 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
31990 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
31991 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
31992 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
31993 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
31994 case 0: break;
31995 default: goto __pyx_L5_argtuple_error;
31996 }
31997 kw_args = PyDict_Size(__pyx_kwds);
31998 switch (pos_args) {
31999 case 0:
32000 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
32001 else goto __pyx_L5_argtuple_error;
32002 case 1:
32003 if (kw_args > 0) {
32004 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
32005 if (value) { values[1] = value; kw_args--; }
32006 }
32007 case 2:
32008 if (kw_args > 0) {
32009 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_snapshot);
32010 if (value) { values[2] = value; kw_args--; }
32011 }
32012 case 3:
32013 if (kw_args > 0) {
32014 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_read_only);
32015 if (value) { values[3] = value; kw_args--; }
32016 }
32017 case 4:
32018 if (kw_args > 0) {
32019 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image_id);
32020 if (value) { values[4] = value; kw_args--; }
32021 }
32022 }
32023 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
32024 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__32024; goto __pyx_L3_error;}
32025 }
32026 } else {
32027 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
32028 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
32029 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
32030 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
32031 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
32032 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
32033 break;
32034 default: goto __pyx_L5_argtuple_error;
32035 }
32036 }
32037 __pyx_v_ioctx = values[0];
32038 __pyx_v_name = values[1];
32039 __pyx_v_snapshot = values[2];
32040 __pyx_v_read_only = values[3];
32041 __pyx_v_image_id = values[4];
32042 }
32043 goto __pyx_L4_argument_unpacking_done;
32044 __pyx_L5_argtuple_error:;
32045 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2804; __pyx_clineno = __LINE__32045; goto __pyx_L3_error;}
32046 __pyx_L3_error:;
32047 __Pyx_AddTraceback("rbd.Image.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32048 __Pyx_RefNannyFinishContext();
32049 return -1;
32050 __pyx_L4_argument_unpacking_done:;
32051 __pyx_r = __pyx_pf_3rbd_5Image___init__(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_ioctx, __pyx_v_name, __pyx_v_snapshot, __pyx_v_read_only, __pyx_v_image_id);
32052
32053 /* "rbd.pyx":2804
32054 * cdef rados_ioctx_t _ioctx
32055 *
32056 * def __init__(self, ioctx, name=None, snapshot=None, # <<<<<<<<<<<<<<
32057 * read_only=False, image_id=None):
32058 * """
32059 */
32060
32061 /* function exit code */
32062 __Pyx_RefNannyFinishContext();
32063 return __pyx_r;
32064}
32065
32066static int __pyx_pf_3rbd_5Image___init__(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_ioctx, PyObject *__pyx_v_name, PyObject *__pyx_v_snapshot, PyObject *__pyx_v_read_only, PyObject *__pyx_v_image_id) {
32067 rados_ioctx_t __pyx_v__ioctx;
32068 char *__pyx_v__name;
32069 char *__pyx_v__image_id;
32070 char *__pyx_v__snapshot;
32071 int __pyx_v_ret;
32072 int __pyx_r;
32073 __Pyx_RefNannyDeclarations
32074 PyObject *__pyx_t_1 = NULL((void*)0);
32075 PyObject *__pyx_t_2 = NULL((void*)0);
32076 PyObject *__pyx_t_3 = NULL((void*)0);
32077 PyObject *__pyx_t_4 = NULL((void*)0);
32078 int __pyx_t_5;
32079 int __pyx_t_6;
32080 int __pyx_t_7;
32081 rados_ioctx_t __pyx_t_8;
32082 char *__pyx_t_9;
32083 int __pyx_lineno = 0;
32084 const char *__pyx_filename = NULL((void*)0);
32085 int __pyx_clineno = 0;
32086 __Pyx_RefNannySetupContext("__init__", 0);
32087 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
32088 __Pyx_INCREF(__pyx_v_snapshot)( ((PyObject*)(__pyx_v_snapshot))->ob_refcnt++);
32089 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
32090
32091 /* "rbd.pyx":2832
32092 * :type image_id: str
32093 * """
32094 * name = cstr(name, 'name', opt=True) # <<<<<<<<<<<<<<
32095 * image_id = cstr(image_id, 'image_id', opt=True)
32096 * snapshot = cstr(snapshot, 'snapshot', opt=True)
32097 */
32098 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__32098; goto __pyx_L1_error;}
32099 __Pyx_GOTREF(__pyx_t_1);
32100 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__32100; goto __pyx_L1_error;}
32101 __Pyx_GOTREF(__pyx_t_2);
32102 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
32103 __Pyx_GIVEREF(__pyx_v_name);
32104 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_name
)
;
32105 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
32106 __Pyx_GIVEREF(__pyx_n_s_name);
32107 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_name
)
;
32108 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__32108; goto __pyx_L1_error;}
32109 __Pyx_GOTREF(__pyx_t_3);
32110 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__32110; goto __pyx_L1_error;}
32111 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__32111; goto __pyx_L1_error;}
32112 __Pyx_GOTREF(__pyx_t_4);
32113 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
32114 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
32115 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32116 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_4; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
32117 __pyx_t_4 = 0;
32118
32119 /* "rbd.pyx":2833
32120 * """
32121 * name = cstr(name, 'name', opt=True)
32122 * image_id = cstr(image_id, 'image_id', opt=True) # <<<<<<<<<<<<<<
32123 * snapshot = cstr(snapshot, 'snapshot', opt=True)
32124 * self.closed = True
32125 */
32126 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__32126; goto __pyx_L1_error;}
32127 __Pyx_GOTREF(__pyx_t_4);
32128 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__32128; goto __pyx_L1_error;}
32129 __Pyx_GOTREF(__pyx_t_3);
32130 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
32131 __Pyx_GIVEREF(__pyx_v_image_id);
32132 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_image_id)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_image_id
)
;
32133 __Pyx_INCREF(__pyx_n_s_image_id)( ((PyObject*)(__pyx_n_s_image_id))->ob_refcnt++);
32134 __Pyx_GIVEREF(__pyx_n_s_image_id);
32135 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_image_id)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_n_s_image_id
)
;
32136 __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__32136; goto __pyx_L1_error;}
32137 __Pyx_GOTREF(__pyx_t_2);
32138 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__32138; goto __pyx_L1_error;}
32139 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__32139; goto __pyx_L1_error;}
32140 __Pyx_GOTREF(__pyx_t_1);
32141 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
32142 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32143 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
32144 __Pyx_DECREF_SET(__pyx_v_image_id, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_image_id; __pyx_v_image_id
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
32145 __pyx_t_1 = 0;
32146
32147 /* "rbd.pyx":2834
32148 * name = cstr(name, 'name', opt=True)
32149 * image_id = cstr(image_id, 'image_id', opt=True)
32150 * snapshot = cstr(snapshot, 'snapshot', opt=True) # <<<<<<<<<<<<<<
32151 * self.closed = True
32152 * if name is not None and image_id is not None:
32153 */
32154 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__32154; goto __pyx_L1_error;}
32155 __Pyx_GOTREF(__pyx_t_1);
32156 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__32156; goto __pyx_L1_error;}
32157 __Pyx_GOTREF(__pyx_t_2);
32158 __Pyx_INCREF(__pyx_v_snapshot)( ((PyObject*)(__pyx_v_snapshot))->ob_refcnt++);
32159 __Pyx_GIVEREF(__pyx_v_snapshot);
32160 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_snapshot)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_snapshot
)
;
32161 __Pyx_INCREF(__pyx_n_s_snapshot)( ((PyObject*)(__pyx_n_s_snapshot))->ob_refcnt++);
32162 __Pyx_GIVEREF(__pyx_n_s_snapshot);
32163 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_snapshot)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_snapshot
)
;
32164 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__32164; goto __pyx_L1_error;}
32165 __Pyx_GOTREF(__pyx_t_3);
32166 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__32166; goto __pyx_L1_error;}
32167 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__32167; goto __pyx_L1_error;}
32168 __Pyx_GOTREF(__pyx_t_4);
32169 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
32170 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
32171 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32172 __Pyx_DECREF_SET(__pyx_v_snapshot, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_snapshot; __pyx_v_snapshot
= __pyx_t_4; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
32173 __pyx_t_4 = 0;
32174
32175 /* "rbd.pyx":2835
32176 * image_id = cstr(image_id, 'image_id', opt=True)
32177 * snapshot = cstr(snapshot, 'snapshot', opt=True)
32178 * self.closed = True # <<<<<<<<<<<<<<
32179 * if name is not None and image_id is not None:
32180 * raise InvalidArgument("only need to specify image name or image id")
32181 */
32182 __pyx_v_self->closed = 1;
32183
32184 /* "rbd.pyx":2836
32185 * snapshot = cstr(snapshot, 'snapshot', opt=True)
32186 * self.closed = True
32187 * if name is not None and image_id is not None: # <<<<<<<<<<<<<<
32188 * raise InvalidArgument("only need to specify image name or image id")
32189 * elif name is None and image_id is None:
32190 */
32191 __pyx_t_6 = (__pyx_v_name != Py_None(&_Py_NoneStruct));
32192 __pyx_t_7 = (__pyx_t_6 != 0);
32193 if (__pyx_t_7) {
32194 } else {
32195 __pyx_t_5 = __pyx_t_7;
32196 goto __pyx_L4_bool_binop_done;
32197 }
32198 __pyx_t_7 = (__pyx_v_image_id != Py_None(&_Py_NoneStruct));
32199 __pyx_t_6 = (__pyx_t_7 != 0);
32200 __pyx_t_5 = __pyx_t_6;
32201 __pyx_L4_bool_binop_done:;
32202 if (__pyx_t_5) {
32203
32204 /* "rbd.pyx":2837
32205 * self.closed = True
32206 * if name is not None and image_id is not None:
32207 * raise InvalidArgument("only need to specify image name or image id") # <<<<<<<<<<<<<<
32208 * elif name is None and image_id is None:
32209 * raise InvalidArgument("image name or image id was not specified")
32210 */
32211 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__32211; goto __pyx_L1_error;}
32212 __Pyx_GOTREF(__pyx_t_4);
32213 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__16, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__32213; goto __pyx_L1_error;}
32214 __Pyx_GOTREF(__pyx_t_3);
32215 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
32216 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
32217 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32218 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__32218; goto __pyx_L1_error;}
32219
32220 /* "rbd.pyx":2836
32221 * snapshot = cstr(snapshot, 'snapshot', opt=True)
32222 * self.closed = True
32223 * if name is not None and image_id is not None: # <<<<<<<<<<<<<<
32224 * raise InvalidArgument("only need to specify image name or image id")
32225 * elif name is None and image_id is None:
32226 */
32227 }
32228
32229 /* "rbd.pyx":2838
32230 * if name is not None and image_id is not None:
32231 * raise InvalidArgument("only need to specify image name or image id")
32232 * elif name is None and image_id is None: # <<<<<<<<<<<<<<
32233 * raise InvalidArgument("image name or image id was not specified")
32234 * elif name is not None:
32235 */
32236 __pyx_t_6 = (__pyx_v_name == Py_None(&_Py_NoneStruct));
32237 __pyx_t_7 = (__pyx_t_6 != 0);
32238 if (__pyx_t_7) {
32239 } else {
32240 __pyx_t_5 = __pyx_t_7;
32241 goto __pyx_L6_bool_binop_done;
32242 }
32243 __pyx_t_7 = (__pyx_v_image_id == Py_None(&_Py_NoneStruct));
32244 __pyx_t_6 = (__pyx_t_7 != 0);
32245 __pyx_t_5 = __pyx_t_6;
32246 __pyx_L6_bool_binop_done:;
32247 if (__pyx_t_5) {
32248
32249 /* "rbd.pyx":2839
32250 * raise InvalidArgument("only need to specify image name or image id")
32251 * elif name is None and image_id is None:
32252 * raise InvalidArgument("image name or image id was not specified") # <<<<<<<<<<<<<<
32253 * elif name is not None:
32254 * self.name = name
32255 */
32256 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__32256; goto __pyx_L1_error;}
32257 __Pyx_GOTREF(__pyx_t_3);
32258 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__17, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__32258; goto __pyx_L1_error;}
32259 __Pyx_GOTREF(__pyx_t_4);
32260 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32261 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
32262 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
32263 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__32263; goto __pyx_L1_error;}
32264
32265 /* "rbd.pyx":2838
32266 * if name is not None and image_id is not None:
32267 * raise InvalidArgument("only need to specify image name or image id")
32268 * elif name is None and image_id is None: # <<<<<<<<<<<<<<
32269 * raise InvalidArgument("image name or image id was not specified")
32270 * elif name is not None:
32271 */
32272 }
32273
32274 /* "rbd.pyx":2840
32275 * elif name is None and image_id is None:
32276 * raise InvalidArgument("image name or image id was not specified")
32277 * elif name is not None: # <<<<<<<<<<<<<<
32278 * self.name = name
32279 * else:
32280 */
32281 __pyx_t_5 = (__pyx_v_name != Py_None(&_Py_NoneStruct));
32282 __pyx_t_6 = (__pyx_t_5 != 0);
32283 if (__pyx_t_6) {
32284
32285 /* "rbd.pyx":2841
32286 * raise InvalidArgument("image name or image id was not specified")
32287 * elif name is not None:
32288 * self.name = name # <<<<<<<<<<<<<<
32289 * else:
32290 * self.name = image_id
32291 */
32292 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
32293 __Pyx_GIVEREF(__pyx_v_name);
32294 __Pyx_GOTREF(__pyx_v_self->name);
32295 __Pyx_DECREF(__pyx_v_self->name)do { if ( --((PyObject*)(__pyx_v_self->name))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->name)))); } while (0)
;
32296 __pyx_v_self->name = __pyx_v_name;
32297
32298 /* "rbd.pyx":2840
32299 * elif name is None and image_id is None:
32300 * raise InvalidArgument("image name or image id was not specified")
32301 * elif name is not None: # <<<<<<<<<<<<<<
32302 * self.name = name
32303 * else:
32304 */
32305 goto __pyx_L3;
32306 }
32307
32308 /* "rbd.pyx":2843
32309 * self.name = name
32310 * else:
32311 * self.name = image_id # <<<<<<<<<<<<<<
32312 * # Keep around a reference to the ioctx, so it won't get deleted
32313 * self.ioctx = ioctx
32314 */
32315 /*else*/ {
32316 __Pyx_INCREF(__pyx_v_image_id)( ((PyObject*)(__pyx_v_image_id))->ob_refcnt++);
32317 __Pyx_GIVEREF(__pyx_v_image_id);
32318 __Pyx_GOTREF(__pyx_v_self->name);
32319 __Pyx_DECREF(__pyx_v_self->name)do { if ( --((PyObject*)(__pyx_v_self->name))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->name)))); } while (0)
;
32320 __pyx_v_self->name = __pyx_v_image_id;
32321 }
32322 __pyx_L3:;
32323
32324 /* "rbd.pyx":2845
32325 * self.name = image_id
32326 * # Keep around a reference to the ioctx, so it won't get deleted
32327 * self.ioctx = ioctx # <<<<<<<<<<<<<<
32328 * cdef:
32329 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
32330 */
32331 __Pyx_INCREF(__pyx_v_ioctx)( ((PyObject*)(__pyx_v_ioctx))->ob_refcnt++);
32332 __Pyx_GIVEREF(__pyx_v_ioctx);
32333 __Pyx_GOTREF(__pyx_v_self->ioctx);
32334 __Pyx_DECREF(__pyx_v_self->ioctx)do { if ( --((PyObject*)(__pyx_v_self->ioctx))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
ioctx)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->ioctx)))); } while (0)
;
32335 __pyx_v_self->ioctx = __pyx_v_ioctx;
32336
32337 /* "rbd.pyx":2847
32338 * self.ioctx = ioctx
32339 * cdef:
32340 * rados_ioctx_t _ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
32341 * char *_name = opt_str(name)
32342 * char *_image_id = opt_str(image_id)
32343 */
32344 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; __pyx_clineno = __LINE__32344; goto __pyx_L1_error;}
32345 __pyx_t_8 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_8 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_8 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; __pyx_clineno = __LINE__32345; goto __pyx_L1_error;}
32346 __pyx_v__ioctx = __pyx_t_8;
32347
32348 /* "rbd.pyx":2848
32349 * cdef:
32350 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
32351 * char *_name = opt_str(name) # <<<<<<<<<<<<<<
32352 * char *_image_id = opt_str(image_id)
32353 * char *_snapshot = opt_str(snapshot)
32354 */
32355 __pyx_t_9 = __pyx_f_3rbd_opt_str(__pyx_v_name); if (unlikely(__pyx_t_9 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_9 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2848; __pyx_clineno = __LINE__32355; goto __pyx_L1_error;}
32356 __pyx_v__name = __pyx_t_9;
32357
32358 /* "rbd.pyx":2849
32359 * rados_ioctx_t _ioctx = convert_ioctx(ioctx)
32360 * char *_name = opt_str(name)
32361 * char *_image_id = opt_str(image_id) # <<<<<<<<<<<<<<
32362 * char *_snapshot = opt_str(snapshot)
32363 * if read_only:
32364 */
32365 __pyx_t_9 = __pyx_f_3rbd_opt_str(__pyx_v_image_id); if (unlikely(__pyx_t_9 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_9 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__32365; goto __pyx_L1_error;}
32366 __pyx_v__image_id = __pyx_t_9;
32367
32368 /* "rbd.pyx":2850
32369 * char *_name = opt_str(name)
32370 * char *_image_id = opt_str(image_id)
32371 * char *_snapshot = opt_str(snapshot) # <<<<<<<<<<<<<<
32372 * if read_only:
32373 * with nogil:
32374 */
32375 __pyx_t_9 = __pyx_f_3rbd_opt_str(__pyx_v_snapshot); if (unlikely(__pyx_t_9 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_9 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2850; __pyx_clineno = __LINE__32375; goto __pyx_L1_error;}
32376 __pyx_v__snapshot = __pyx_t_9;
32377
32378 /* "rbd.pyx":2851
32379 * char *_image_id = opt_str(image_id)
32380 * char *_snapshot = opt_str(snapshot)
32381 * if read_only: # <<<<<<<<<<<<<<
32382 * with nogil:
32383 * if name is not None:
32384 */
32385 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_read_only); if (unlikely(__pyx_t_6 < 0)__builtin_expect(!!(__pyx_t_6 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2851; __pyx_clineno = __LINE__32385; goto __pyx_L1_error;}
32386 if (__pyx_t_6) {
32387
32388 /* "rbd.pyx":2852
32389 * char *_snapshot = opt_str(snapshot)
32390 * if read_only:
32391 * with nogil: # <<<<<<<<<<<<<<
32392 * if name is not None:
32393 * ret = rbd_open_read_only(_ioctx, _name, &self.image, _snapshot)
32394 */
32395 {
32396 #ifdef WITH_THREAD1
32397 PyThreadState *_save;
32398 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
32399 #endif
32400 /*try:*/ {
32401
32402 /* "rbd.pyx":2853
32403 * if read_only:
32404 * with nogil:
32405 * if name is not None: # <<<<<<<<<<<<<<
32406 * ret = rbd_open_read_only(_ioctx, _name, &self.image, _snapshot)
32407 * else:
32408 */
32409 __pyx_t_6 = (__pyx_v_name != Py_None(&_Py_NoneStruct));
32410 __pyx_t_5 = (__pyx_t_6 != 0);
32411 if (__pyx_t_5) {
32412
32413 /* "rbd.pyx":2854
32414 * with nogil:
32415 * if name is not None:
32416 * ret = rbd_open_read_only(_ioctx, _name, &self.image, _snapshot) # <<<<<<<<<<<<<<
32417 * else:
32418 * ret = rbd_open_by_id_read_only(_ioctx, _image_id, &self.image, _snapshot)
32419 */
32420 __pyx_v_ret = rbd_open_read_only(__pyx_v__ioctx, __pyx_v__name, (&__pyx_v_self->image), __pyx_v__snapshot);
32421
32422 /* "rbd.pyx":2853
32423 * if read_only:
32424 * with nogil:
32425 * if name is not None: # <<<<<<<<<<<<<<
32426 * ret = rbd_open_read_only(_ioctx, _name, &self.image, _snapshot)
32427 * else:
32428 */
32429 goto __pyx_L12;
32430 }
32431
32432 /* "rbd.pyx":2856
32433 * ret = rbd_open_read_only(_ioctx, _name, &self.image, _snapshot)
32434 * else:
32435 * ret = rbd_open_by_id_read_only(_ioctx, _image_id, &self.image, _snapshot) # <<<<<<<<<<<<<<
32436 * else:
32437 * with nogil:
32438 */
32439 /*else*/ {
32440 __pyx_v_ret = rbd_open_by_id_read_only(__pyx_v__ioctx, __pyx_v__image_id, (&__pyx_v_self->image), __pyx_v__snapshot);
32441 }
32442 __pyx_L12:;
32443 }
32444
32445 /* "rbd.pyx":2852
32446 * char *_snapshot = opt_str(snapshot)
32447 * if read_only:
32448 * with nogil: # <<<<<<<<<<<<<<
32449 * if name is not None:
32450 * ret = rbd_open_read_only(_ioctx, _name, &self.image, _snapshot)
32451 */
32452 /*finally:*/ {
32453 /*normal exit:*/{
32454 #ifdef WITH_THREAD1
32455 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
32456 #endif
32457 goto __pyx_L11;
32458 }
32459 __pyx_L11:;
32460 }
32461 }
32462
32463 /* "rbd.pyx":2851
32464 * char *_image_id = opt_str(image_id)
32465 * char *_snapshot = opt_str(snapshot)
32466 * if read_only: # <<<<<<<<<<<<<<
32467 * with nogil:
32468 * if name is not None:
32469 */
32470 goto __pyx_L8;
32471 }
32472
32473 /* "rbd.pyx":2858
32474 * ret = rbd_open_by_id_read_only(_ioctx, _image_id, &self.image, _snapshot)
32475 * else:
32476 * with nogil: # <<<<<<<<<<<<<<
32477 * if name is not None:
32478 * ret = rbd_open(_ioctx, _name, &self.image, _snapshot)
32479 */
32480 /*else*/ {
32481 {
32482 #ifdef WITH_THREAD1
32483 PyThreadState *_save;
32484 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
32485 #endif
32486 /*try:*/ {
32487
32488 /* "rbd.pyx":2859
32489 * else:
32490 * with nogil:
32491 * if name is not None: # <<<<<<<<<<<<<<
32492 * ret = rbd_open(_ioctx, _name, &self.image, _snapshot)
32493 * else:
32494 */
32495 __pyx_t_5 = (__pyx_v_name != Py_None(&_Py_NoneStruct));
32496 __pyx_t_6 = (__pyx_t_5 != 0);
32497 if (__pyx_t_6) {
32498
32499 /* "rbd.pyx":2860
32500 * with nogil:
32501 * if name is not None:
32502 * ret = rbd_open(_ioctx, _name, &self.image, _snapshot) # <<<<<<<<<<<<<<
32503 * else:
32504 * ret = rbd_open_by_id(_ioctx, _image_id, &self.image, _snapshot)
32505 */
32506 __pyx_v_ret = rbd_open(__pyx_v__ioctx, __pyx_v__name, (&__pyx_v_self->image), __pyx_v__snapshot);
32507
32508 /* "rbd.pyx":2859
32509 * else:
32510 * with nogil:
32511 * if name is not None: # <<<<<<<<<<<<<<
32512 * ret = rbd_open(_ioctx, _name, &self.image, _snapshot)
32513 * else:
32514 */
32515 goto __pyx_L16;
32516 }
32517
32518 /* "rbd.pyx":2862
32519 * ret = rbd_open(_ioctx, _name, &self.image, _snapshot)
32520 * else:
32521 * ret = rbd_open_by_id(_ioctx, _image_id, &self.image, _snapshot) # <<<<<<<<<<<<<<
32522 * if ret != 0:
32523 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot))
32524 */
32525 /*else*/ {
32526 __pyx_v_ret = rbd_open_by_id(__pyx_v__ioctx, __pyx_v__image_id, (&__pyx_v_self->image), __pyx_v__snapshot);
32527 }
32528 __pyx_L16:;
32529 }
32530
32531 /* "rbd.pyx":2858
32532 * ret = rbd_open_by_id_read_only(_ioctx, _image_id, &self.image, _snapshot)
32533 * else:
32534 * with nogil: # <<<<<<<<<<<<<<
32535 * if name is not None:
32536 * ret = rbd_open(_ioctx, _name, &self.image, _snapshot)
32537 */
32538 /*finally:*/ {
32539 /*normal exit:*/{
32540 #ifdef WITH_THREAD1
32541 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
32542 #endif
32543 goto __pyx_L15;
32544 }
32545 __pyx_L15:;
32546 }
32547 }
32548 }
32549 __pyx_L8:;
32550
32551 /* "rbd.pyx":2863
32552 * else:
32553 * ret = rbd_open_by_id(_ioctx, _image_id, &self.image, _snapshot)
32554 * if ret != 0: # <<<<<<<<<<<<<<
32555 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot))
32556 * self.closed = False
32557 */
32558 __pyx_t_6 = ((__pyx_v_ret != 0) != 0);
32559 if (__pyx_t_6) {
32560
32561 /* "rbd.pyx":2864
32562 * ret = rbd_open_by_id(_ioctx, _image_id, &self.image, _snapshot)
32563 * if ret != 0:
32564 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot)) # <<<<<<<<<<<<<<
32565 * self.closed = False
32566 * if name is None:
32567 */
32568 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__32568; goto __pyx_L1_error;}
32569 __Pyx_GOTREF(__pyx_t_4);
32570 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__32570; goto __pyx_L1_error;}
32571 __Pyx_GOTREF(__pyx_t_3);
32572 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
32573 __Pyx_GIVEREF(__pyx_v_self->name);
32574 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_self
->name)
;
32575 __Pyx_INCREF(__pyx_v_snapshot)( ((PyObject*)(__pyx_v_snapshot))->ob_refcnt++);
32576 __Pyx_GIVEREF(__pyx_v_snapshot);
32577 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_snapshot)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_snapshot
)
;
32578 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_opening_image_s_at_snapsho, __pyx_t_3)PyString_Format(__pyx_kp_s_error_opening_image_s_at_snapsho, __pyx_t_3
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__32578; goto __pyx_L1_error;}
32579 __Pyx_GOTREF(__pyx_t_2);
32580 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32581 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__32581; goto __pyx_L1_error;}
32582 __Pyx_GOTREF(__pyx_t_3);
32583 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
32584 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
32585 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
32586 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32587 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__32587; goto __pyx_L1_error;}
32588
32589 /* "rbd.pyx":2863
32590 * else:
32591 * ret = rbd_open_by_id(_ioctx, _image_id, &self.image, _snapshot)
32592 * if ret != 0: # <<<<<<<<<<<<<<
32593 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot))
32594 * self.closed = False
32595 */
32596 }
32597
32598 /* "rbd.pyx":2865
32599 * if ret != 0:
32600 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot))
32601 * self.closed = False # <<<<<<<<<<<<<<
32602 * if name is None:
32603 * self.name = self.get_name()
32604 */
32605 __pyx_v_self->closed = 0;
32606
32607 /* "rbd.pyx":2866
32608 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot))
32609 * self.closed = False
32610 * if name is None: # <<<<<<<<<<<<<<
32611 * self.name = self.get_name()
32612 *
32613 */
32614 __pyx_t_6 = (__pyx_v_name == Py_None(&_Py_NoneStruct));
32615 __pyx_t_5 = (__pyx_t_6 != 0);
32616 if (__pyx_t_5) {
32617
32618 /* "rbd.pyx":2867
32619 * self.closed = False
32620 * if name is None:
32621 * self.name = self.get_name() # <<<<<<<<<<<<<<
32622 *
32623 * def __enter__(self):
32624 */
32625 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_name); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; __pyx_clineno = __LINE__32625; goto __pyx_L1_error;}
32626 __Pyx_GOTREF(__pyx_t_2);
32627 __pyx_t_4 = NULL((void*)0);
32628 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
32629 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
32630 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
32631 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
32632 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
32633 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
32634 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
32635 }
32636 }
32637 if (__pyx_t_4) {
32638 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; __pyx_clineno = __LINE__32638; goto __pyx_L1_error;}
32639 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
32640 } else {
32641 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; __pyx_clineno = __LINE__32641; goto __pyx_L1_error;}
32642 }
32643 __Pyx_GOTREF(__pyx_t_3);
32644 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
32645 __Pyx_GIVEREF(__pyx_t_3);
32646 __Pyx_GOTREF(__pyx_v_self->name);
32647 __Pyx_DECREF(__pyx_v_self->name)do { if ( --((PyObject*)(__pyx_v_self->name))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->name)))); } while (0)
;
32648 __pyx_v_self->name = __pyx_t_3;
32649 __pyx_t_3 = 0;
32650
32651 /* "rbd.pyx":2866
32652 * raise make_ex(ret, 'error opening image %s at snapshot %s' % (self.name, snapshot))
32653 * self.closed = False
32654 * if name is None: # <<<<<<<<<<<<<<
32655 * self.name = self.get_name()
32656 *
32657 */
32658 }
32659
32660 /* "rbd.pyx":2804
32661 * cdef rados_ioctx_t _ioctx
32662 *
32663 * def __init__(self, ioctx, name=None, snapshot=None, # <<<<<<<<<<<<<<
32664 * read_only=False, image_id=None):
32665 * """
32666 */
32667
32668 /* function exit code */
32669 __pyx_r = 0;
32670 goto __pyx_L0;
32671 __pyx_L1_error:;
32672 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
32673 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
32674 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
32675 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
32676 __Pyx_AddTraceback("rbd.Image.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32677 __pyx_r = -1;
32678 __pyx_L0:;
32679 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
32680 __Pyx_XDECREF(__pyx_v_snapshot)do { if ((__pyx_v_snapshot) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_snapshot))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_snapshot)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_snapshot)))); }
while (0); } while (0)
;
32681 __Pyx_XDECREF(__pyx_v_image_id)do { if ((__pyx_v_image_id) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_image_id))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_image_id)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_image_id)))); }
while (0); } while (0)
;
32682 __Pyx_RefNannyFinishContext();
32683 return __pyx_r;
32684}
32685
32686/* "rbd.pyx":2869
32687 * self.name = self.get_name()
32688 *
32689 * def __enter__(self): # <<<<<<<<<<<<<<
32690 * return self
32691 *
32692 */
32693
32694/* Python wrapper */
32695static PyObject *__pyx_pw_3rbd_5Image_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
32696static char __pyx_doc_3rbd_5Image_2__enter__[] = "Image.__enter__(self)";
32697static PyObject *__pyx_pw_3rbd_5Image_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
32698 PyObject *__pyx_r = 0;
32699 __Pyx_RefNannyDeclarations
32700 __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
32701 __pyx_r = __pyx_pf_3rbd_5Image_2__enter__(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
32702
32703 /* function exit code */
32704 __Pyx_RefNannyFinishContext();
32705 return __pyx_r;
32706}
32707
32708static PyObject *__pyx_pf_3rbd_5Image_2__enter__(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
32709 PyObject *__pyx_r = NULL((void*)0);
32710 __Pyx_RefNannyDeclarations
32711 __Pyx_RefNannySetupContext("__enter__", 0);
32712
32713 /* "rbd.pyx":2870
32714 *
32715 * def __enter__(self):
32716 * return self # <<<<<<<<<<<<<<
32717 *
32718 * def __exit__(self, type_, value, traceback):
32719 */
32720 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
32721 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
32722 __pyx_r = ((PyObject *)__pyx_v_self);
32723 goto __pyx_L0;
32724
32725 /* "rbd.pyx":2869
32726 * self.name = self.get_name()
32727 *
32728 * def __enter__(self): # <<<<<<<<<<<<<<
32729 * return self
32730 *
32731 */
32732
32733 /* function exit code */
32734 __pyx_L0:;
32735 __Pyx_XGIVEREF(__pyx_r);
32736 __Pyx_RefNannyFinishContext();
32737 return __pyx_r;
32738}
32739
32740/* "rbd.pyx":2872
32741 * return self
32742 *
32743 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
32744 * """
32745 * Closes the image. See :func:`close`
32746 */
32747
32748/* Python wrapper */
32749static PyObject *__pyx_pw_3rbd_5Image_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
32750static char __pyx_doc_3rbd_5Image_4__exit__[] = "Image.__exit__(self, type_, value, traceback)\n\n Closes the image. See :func:`close`\n ";
32751static PyObject *__pyx_pw_3rbd_5Image_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32752 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_ = 0;
32753 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value = 0;
32754 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback = 0;
32755 int __pyx_lineno = 0;
32756 const char *__pyx_filename = NULL((void*)0);
32757 int __pyx_clineno = 0;
32758 PyObject *__pyx_r = 0;
32759 __Pyx_RefNannyDeclarations
32760 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
32761 {
32762 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
32763 PyObject* values[3] = {0,0,0};
32764 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
32765 Py_ssize_t kw_args;
32766 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
32767 switch (pos_args) {
32768 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
32769 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
32770 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
32771 case 0: break;
32772 default: goto __pyx_L5_argtuple_error;
32773 }
32774 kw_args = PyDict_Size(__pyx_kwds);
32775 switch (pos_args) {
32776 case 0:
32777 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type
)) != 0), 1)
) kw_args--;
32778 else goto __pyx_L5_argtuple_error;
32779 case 1:
32780 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
32781 else {
32782 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; __pyx_clineno = __LINE__32782; goto __pyx_L3_error;}
32783 }
32784 case 2:
32785 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback
)) != 0), 1)
) kw_args--;
32786 else {
32787 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; __pyx_clineno = __LINE__32787; goto __pyx_L3_error;}
32788 }
32789 }
32790 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
32791 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__exit__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; __pyx_clineno = __LINE__32791; goto __pyx_L3_error;}
32792 }
32793 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
32794 goto __pyx_L5_argtuple_error;
32795 } else {
32796 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
32797 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
32798 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
32799 }
32800 __pyx_v_type_ = values[0];
32801 __pyx_v_value = values[1];
32802 __pyx_v_traceback = values[2];
32803 }
32804 goto __pyx_L4_argument_unpacking_done;
32805 __pyx_L5_argtuple_error:;
32806 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; __pyx_clineno = __LINE__32806; goto __pyx_L3_error;}
32807 __pyx_L3_error:;
32808 __Pyx_AddTraceback("rbd.Image.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32809 __Pyx_RefNannyFinishContext();
32810 return NULL((void*)0);
32811 __pyx_L4_argument_unpacking_done:;
32812 __pyx_r = __pyx_pf_3rbd_5Image_4__exit__(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_type_, __pyx_v_value, __pyx_v_traceback);
32813
32814 /* function exit code */
32815 __Pyx_RefNannyFinishContext();
32816 return __pyx_r;
32817}
32818
32819static PyObject *__pyx_pf_3rbd_5Image_4__exit__(struct __pyx_obj_3rbd_Image *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_type_, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_value, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *__pyx_v_traceback) {
32820 PyObject *__pyx_r = NULL((void*)0);
32821 __Pyx_RefNannyDeclarations
32822 PyObject *__pyx_t_1 = NULL((void*)0);
32823 PyObject *__pyx_t_2 = NULL((void*)0);
32824 PyObject *__pyx_t_3 = NULL((void*)0);
32825 int __pyx_lineno = 0;
32826 const char *__pyx_filename = NULL((void*)0);
32827 int __pyx_clineno = 0;
32828 __Pyx_RefNannySetupContext("__exit__", 0);
32829
32830 /* "rbd.pyx":2876
32831 * Closes the image. See :func:`close`
32832 * """
32833 * self.close() # <<<<<<<<<<<<<<
32834 * return False
32835 *
32836 */
32837 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2876; __pyx_clineno = __LINE__32837; goto __pyx_L1_error;}
32838 __Pyx_GOTREF(__pyx_t_2);
32839 __pyx_t_3 = NULL((void*)0);
32840 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
32841 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
32842 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
32843 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
32844 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
32845 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
32846 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
32847 }
32848 }
32849 if (__pyx_t_3) {
32850 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2876; __pyx_clineno = __LINE__32850; goto __pyx_L1_error;}
32851 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
32852 } else {
32853 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2876; __pyx_clineno = __LINE__32853; goto __pyx_L1_error;}
32854 }
32855 __Pyx_GOTREF(__pyx_t_1);
32856 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
32857 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
32858
32859 /* "rbd.pyx":2877
32860 * """
32861 * self.close()
32862 * return False # <<<<<<<<<<<<<<
32863 *
32864 * def __get_completion(self, oncomplete):
32865 */
32866 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
32867 __Pyx_INCREF(Py_False)( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++)
;
32868 __pyx_r = Py_False((PyObject *) &_Py_ZeroStruct);
32869 goto __pyx_L0;
32870
32871 /* "rbd.pyx":2872
32872 * return self
32873 *
32874 * def __exit__(self, type_, value, traceback): # <<<<<<<<<<<<<<
32875 * """
32876 * Closes the image. See :func:`close`
32877 */
32878
32879 /* function exit code */
32880 __pyx_L1_error:;
32881 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
32882 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
32883 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
32884 __Pyx_AddTraceback("rbd.Image.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32885 __pyx_r = NULL((void*)0);
32886 __pyx_L0:;
32887 __Pyx_XGIVEREF(__pyx_r);
32888 __Pyx_RefNannyFinishContext();
32889 return __pyx_r;
32890}
32891
32892/* "rbd.pyx":2879
32893 * return False
32894 *
32895 * def __get_completion(self, oncomplete): # <<<<<<<<<<<<<<
32896 * """
32897 * Constructs a completion to use with asynchronous operations
32898 */
32899
32900/* Python wrapper */
32901static PyObject *__pyx_pw_3rbd_5Image_7__get_completion(PyObject *__pyx_v_self, PyObject *__pyx_v_oncomplete); /*proto*/
32902static char __pyx_doc_3rbd_5Image_6__get_completion[] = "Image.__get_completion(self, oncomplete)\n\n Constructs a completion to use with asynchronous operations\n\n :param oncomplete: callback for the completion\n\n :raises: :class:`Error`\n :returns: completion object\n ";
32903static PyObject *__pyx_pw_3rbd_5Image_7__get_completion(PyObject *__pyx_v_self, PyObject *__pyx_v_oncomplete) {
32904 PyObject *__pyx_r = 0;
32905 __Pyx_RefNannyDeclarations
32906 __Pyx_RefNannySetupContext("__get_completion (wrapper)", 0);
32907 __pyx_r = __pyx_pf_3rbd_5Image_6__get_completion(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_oncomplete));
32908
32909 /* function exit code */
32910 __Pyx_RefNannyFinishContext();
32911 return __pyx_r;
32912}
32913
32914static PyObject *__pyx_pf_3rbd_5Image_6__get_completion(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_oncomplete) {
32915 struct __pyx_obj_3rbd_Completion *__pyx_v_completion_obj = NULL((void*)0);
32916 rbd_completion_t __pyx_v_completion;
32917 PyObject *__pyx_v_p_completion_obj;
32918 int __pyx_v_ret;
32919 PyObject *__pyx_r = NULL((void*)0);
32920 __Pyx_RefNannyDeclarations
32921 PyObject *__pyx_t_1 = NULL((void*)0);
32922 PyObject *__pyx_t_2 = NULL((void*)0);
32923 int __pyx_t_3;
32924 int __pyx_lineno = 0;
32925 const char *__pyx_filename = NULL((void*)0);
32926 int __pyx_clineno = 0;
32927 __Pyx_RefNannySetupContext("__get_completion", 0);
32928
32929 /* "rbd.pyx":2889
32930 * """
32931 *
32932 * completion_obj = Completion(self, oncomplete) # <<<<<<<<<<<<<<
32933 *
32934 * cdef:
32935 */
32936 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2889; __pyx_clineno = __LINE__32936; goto __pyx_L1_error;}
32937 __Pyx_GOTREF(__pyx_t_1);
32938 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
32939 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
32940 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
32941 __Pyx_INCREF(__pyx_v_oncomplete)( ((PyObject*)(__pyx_v_oncomplete))->ob_refcnt++);
32942 __Pyx_GIVEREF(__pyx_v_oncomplete);
32943 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_oncomplete)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = __pyx_v_oncomplete
)
;
32944 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_Completion), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2889; __pyx_clineno = __LINE__32944; goto __pyx_L1_error;}
32945 __Pyx_GOTREF(__pyx_t_2);
32946 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
32947 __pyx_v_completion_obj = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_2);
32948 __pyx_t_2 = 0;
32949
32950 /* "rbd.pyx":2893
32951 * cdef:
32952 * rbd_completion_t completion
32953 * PyObject* p_completion_obj= <PyObject*>completion_obj # <<<<<<<<<<<<<<
32954 *
32955 * with nogil:
32956 */
32957 __pyx_v_p_completion_obj = ((PyObject *)__pyx_v_completion_obj);
32958
32959 /* "rbd.pyx":2895
32960 * PyObject* p_completion_obj= <PyObject*>completion_obj
32961 *
32962 * with nogil: # <<<<<<<<<<<<<<
32963 * ret = rbd_aio_create_completion(p_completion_obj, __aio_complete_cb,
32964 * &completion)
32965 */
32966 {
32967 #ifdef WITH_THREAD1
32968 PyThreadState *_save;
32969 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
32970 #endif
32971 /*try:*/ {
32972
32973 /* "rbd.pyx":2896
32974 *
32975 * with nogil:
32976 * ret = rbd_aio_create_completion(p_completion_obj, __aio_complete_cb, # <<<<<<<<<<<<<<
32977 * &completion)
32978 * if ret < 0:
32979 */
32980 __pyx_v_ret = rbd_aio_create_completion(__pyx_v_p_completion_obj, __pyx_f_3rbd___aio_complete_cb, (&__pyx_v_completion));
32981 }
32982
32983 /* "rbd.pyx":2895
32984 * PyObject* p_completion_obj= <PyObject*>completion_obj
32985 *
32986 * with nogil: # <<<<<<<<<<<<<<
32987 * ret = rbd_aio_create_completion(p_completion_obj, __aio_complete_cb,
32988 * &completion)
32989 */
32990 /*finally:*/ {
32991 /*normal exit:*/{
32992 #ifdef WITH_THREAD1
32993 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
32994 #endif
32995 goto __pyx_L5;
32996 }
32997 __pyx_L5:;
32998 }
32999 }
33000
33001 /* "rbd.pyx":2898
33002 * ret = rbd_aio_create_completion(p_completion_obj, __aio_complete_cb,
33003 * &completion)
33004 * if ret < 0: # <<<<<<<<<<<<<<
33005 * raise make_ex(ret, "error getting a completion")
33006 *
33007 */
33008 __pyx_t_3 = ((__pyx_v_ret < 0) != 0);
33009 if (__pyx_t_3) {
33010
33011 /* "rbd.pyx":2899
33012 * &completion)
33013 * if ret < 0:
33014 * raise make_ex(ret, "error getting a completion") # <<<<<<<<<<<<<<
33015 *
33016 * completion_obj.rbd_comp = completion
33017 */
33018 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__33018; goto __pyx_L1_error;}
33019 __Pyx_GOTREF(__pyx_t_2);
33020 __pyx_t_1 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_getting_a_completion, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__33020; goto __pyx_L1_error;}
33021 __Pyx_GOTREF(__pyx_t_1);
33022 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33023 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
33024 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
33025 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__33025; goto __pyx_L1_error;}
33026
33027 /* "rbd.pyx":2898
33028 * ret = rbd_aio_create_completion(p_completion_obj, __aio_complete_cb,
33029 * &completion)
33030 * if ret < 0: # <<<<<<<<<<<<<<
33031 * raise make_ex(ret, "error getting a completion")
33032 *
33033 */
33034 }
33035
33036 /* "rbd.pyx":2901
33037 * raise make_ex(ret, "error getting a completion")
33038 *
33039 * completion_obj.rbd_comp = completion # <<<<<<<<<<<<<<
33040 * return completion_obj
33041 *
33042 */
33043 __pyx_v_completion_obj->rbd_comp = __pyx_v_completion;
33044
33045 /* "rbd.pyx":2902
33046 *
33047 * completion_obj.rbd_comp = completion
33048 * return completion_obj # <<<<<<<<<<<<<<
33049 *
33050 * def close(self):
33051 */
33052 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
33053 __Pyx_INCREF(((PyObject *)__pyx_v_completion_obj))( ((PyObject*)(((PyObject *)__pyx_v_completion_obj)))->ob_refcnt
++)
;
33054 __pyx_r = ((PyObject *)__pyx_v_completion_obj);
33055 goto __pyx_L0;
33056
33057 /* "rbd.pyx":2879
33058 * return False
33059 *
33060 * def __get_completion(self, oncomplete): # <<<<<<<<<<<<<<
33061 * """
33062 * Constructs a completion to use with asynchronous operations
33063 */
33064
33065 /* function exit code */
33066 __pyx_L1_error:;
33067 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
33068 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
33069 __Pyx_AddTraceback("rbd.Image.__get_completion", __pyx_clineno, __pyx_lineno, __pyx_filename);
33070 __pyx_r = NULL((void*)0);
33071 __pyx_L0:;
33072 __Pyx_XDECREF((PyObject *)__pyx_v_completion_obj)do { if (((PyObject *)__pyx_v_completion_obj) == ((void*)0)) ;
else do { if ( --((PyObject*)((PyObject *)__pyx_v_completion_obj
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
(PyObject *)__pyx_v_completion_obj)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)((PyObject *)__pyx_v_completion_obj
)))); } while (0); } while (0)
;
33073 __Pyx_XGIVEREF(__pyx_r);
33074 __Pyx_RefNannyFinishContext();
33075 return __pyx_r;
33076}
33077
33078/* "rbd.pyx":2904
33079 * return completion_obj
33080 *
33081 * def close(self): # <<<<<<<<<<<<<<
33082 * """
33083 * Release the resources used by this image object.
33084 */
33085
33086/* Python wrapper */
33087static PyObject *__pyx_pw_3rbd_5Image_9close(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
33088static char __pyx_doc_3rbd_5Image_8close[] = "Image.close(self)\n\n Release the resources used by this image object.\n\n After this is called, this object should not be used.\n ";
33089static PyObject *__pyx_pw_3rbd_5Image_9close(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
33090 PyObject *__pyx_r = 0;
33091 __Pyx_RefNannyDeclarations
33092 __Pyx_RefNannySetupContext("close (wrapper)", 0);
33093 __pyx_r = __pyx_pf_3rbd_5Image_8close(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
33094
33095 /* function exit code */
33096 __Pyx_RefNannyFinishContext();
33097 return __pyx_r;
33098}
33099
33100static PyObject *__pyx_pf_3rbd_5Image_8close(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
33101 int __pyx_v_ret;
33102 PyObject *__pyx_r = NULL((void*)0);
33103 __Pyx_RefNannyDeclarations
33104 int __pyx_t_1;
33105 PyObject *__pyx_t_2 = NULL((void*)0);
33106 PyObject *__pyx_t_3 = NULL((void*)0);
33107 PyObject *__pyx_t_4 = NULL((void*)0);
33108 int __pyx_lineno = 0;
33109 const char *__pyx_filename = NULL((void*)0);
33110 int __pyx_clineno = 0;
33111 __Pyx_RefNannySetupContext("close", 0);
33112
33113 /* "rbd.pyx":2910
33114 * After this is called, this object should not be used.
33115 * """
33116 * if not self.closed: # <<<<<<<<<<<<<<
33117 * self.closed = True
33118 * with nogil:
33119 */
33120 __pyx_t_1 = ((!(__pyx_v_self->closed != 0)) != 0);
33121 if (__pyx_t_1) {
33122
33123 /* "rbd.pyx":2911
33124 * """
33125 * if not self.closed:
33126 * self.closed = True # <<<<<<<<<<<<<<
33127 * with nogil:
33128 * ret = rbd_close(self.image)
33129 */
33130 __pyx_v_self->closed = 1;
33131
33132 /* "rbd.pyx":2912
33133 * if not self.closed:
33134 * self.closed = True
33135 * with nogil: # <<<<<<<<<<<<<<
33136 * ret = rbd_close(self.image)
33137 * if ret < 0:
33138 */
33139 {
33140 #ifdef WITH_THREAD1
33141 PyThreadState *_save;
33142 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
33143 #endif
33144 /*try:*/ {
33145
33146 /* "rbd.pyx":2913
33147 * self.closed = True
33148 * with nogil:
33149 * ret = rbd_close(self.image) # <<<<<<<<<<<<<<
33150 * if ret < 0:
33151 * raise make_ex(ret, 'error while closing image %s' % (
33152 */
33153 __pyx_v_ret = rbd_close(__pyx_v_self->image);
33154 }
33155
33156 /* "rbd.pyx":2912
33157 * if not self.closed:
33158 * self.closed = True
33159 * with nogil: # <<<<<<<<<<<<<<
33160 * ret = rbd_close(self.image)
33161 * if ret < 0:
33162 */
33163 /*finally:*/ {
33164 /*normal exit:*/{
33165 #ifdef WITH_THREAD1
33166 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
33167 #endif
33168 goto __pyx_L6;
33169 }
33170 __pyx_L6:;
33171 }
33172 }
33173
33174 /* "rbd.pyx":2914
33175 * with nogil:
33176 * ret = rbd_close(self.image)
33177 * if ret < 0: # <<<<<<<<<<<<<<
33178 * raise make_ex(ret, 'error while closing image %s' % (
33179 * self.name,))
33180 */
33181 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
33182 if (__pyx_t_1) {
33183
33184 /* "rbd.pyx":2915
33185 * ret = rbd_close(self.image)
33186 * if ret < 0:
33187 * raise make_ex(ret, 'error while closing image %s' % ( # <<<<<<<<<<<<<<
33188 * self.name,))
33189 *
33190 */
33191 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__33191; goto __pyx_L1_error;}
33192 __Pyx_GOTREF(__pyx_t_2);
33193
33194 /* "rbd.pyx":2916
33195 * if ret < 0:
33196 * raise make_ex(ret, 'error while closing image %s' % (
33197 * self.name,)) # <<<<<<<<<<<<<<
33198 *
33199 * def __dealloc__(self):
33200 */
33201 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__33201; goto __pyx_L1_error;}
33202 __Pyx_GOTREF(__pyx_t_3);
33203 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
33204 __Pyx_GIVEREF(__pyx_v_self->name);
33205 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_self
->name)
;
33206
33207 /* "rbd.pyx":2915
33208 * ret = rbd_close(self.image)
33209 * if ret < 0:
33210 * raise make_ex(ret, 'error while closing image %s' % ( # <<<<<<<<<<<<<<
33211 * self.name,))
33212 *
33213 */
33214 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_while_closing_image_s, __pyx_t_3)PyString_Format(__pyx_kp_s_error_while_closing_image_s, __pyx_t_3
)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__33214; goto __pyx_L1_error;}
33215 __Pyx_GOTREF(__pyx_t_4);
33216 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33217 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__33217; goto __pyx_L1_error;}
33218 __Pyx_GOTREF(__pyx_t_3);
33219 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33220 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
33221 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
33222 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33223 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__33223; goto __pyx_L1_error;}
33224
33225 /* "rbd.pyx":2914
33226 * with nogil:
33227 * ret = rbd_close(self.image)
33228 * if ret < 0: # <<<<<<<<<<<<<<
33229 * raise make_ex(ret, 'error while closing image %s' % (
33230 * self.name,))
33231 */
33232 }
33233
33234 /* "rbd.pyx":2910
33235 * After this is called, this object should not be used.
33236 * """
33237 * if not self.closed: # <<<<<<<<<<<<<<
33238 * self.closed = True
33239 * with nogil:
33240 */
33241 }
33242
33243 /* "rbd.pyx":2904
33244 * return completion_obj
33245 *
33246 * def close(self): # <<<<<<<<<<<<<<
33247 * """
33248 * Release the resources used by this image object.
33249 */
33250
33251 /* function exit code */
33252 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
33253 goto __pyx_L0;
33254 __pyx_L1_error:;
33255 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
33256 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
33257 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
33258 __Pyx_AddTraceback("rbd.Image.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
33259 __pyx_r = NULL((void*)0);
33260 __pyx_L0:;
33261 __Pyx_XGIVEREF(__pyx_r);
33262 __Pyx_RefNannyFinishContext();
33263 return __pyx_r;
33264}
33265
33266/* "rbd.pyx":2918
33267 * self.name,))
33268 *
33269 * def __dealloc__(self): # <<<<<<<<<<<<<<
33270 * self.close()
33271 *
33272 */
33273
33274/* Python wrapper */
33275static void __pyx_pw_3rbd_5Image_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
33276static void __pyx_pw_3rbd_5Image_11__dealloc__(PyObject *__pyx_v_self) {
33277 __Pyx_RefNannyDeclarations
33278 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
33279 __pyx_pf_3rbd_5Image_10__dealloc__(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
33280
33281 /* function exit code */
33282 __Pyx_RefNannyFinishContext();
33283}
33284
33285static void __pyx_pf_3rbd_5Image_10__dealloc__(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
33286 __Pyx_RefNannyDeclarations
33287 PyObject *__pyx_t_1 = NULL((void*)0);
33288 PyObject *__pyx_t_2 = NULL((void*)0);
33289 PyObject *__pyx_t_3 = NULL((void*)0);
33290 int __pyx_lineno = 0;
33291 const char *__pyx_filename = NULL((void*)0);
33292 int __pyx_clineno = 0;
33293 __Pyx_RefNannySetupContext("__dealloc__", 0);
33294
33295 /* "rbd.pyx":2919
33296 *
33297 * def __dealloc__(self):
33298 * self.close() # <<<<<<<<<<<<<<
33299 *
33300 * def __repr__(self):
33301 */
33302 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__33302; goto __pyx_L1_error;}
33303 __Pyx_GOTREF(__pyx_t_2);
33304 __pyx_t_3 = NULL((void*)0);
33305 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
33306 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
33307 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
33308 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
33309 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
33310 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
33311 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
33312 }
33313 }
33314 if (__pyx_t_3) {
33315 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__33315; goto __pyx_L1_error;}
33316 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33317 } else {
33318 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; __pyx_clineno = __LINE__33318; goto __pyx_L1_error;}
33319 }
33320 __Pyx_GOTREF(__pyx_t_1);
33321 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33322 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
33323
33324 /* "rbd.pyx":2918
33325 * self.name,))
33326 *
33327 * def __dealloc__(self): # <<<<<<<<<<<<<<
33328 * self.close()
33329 *
33330 */
33331
33332 /* function exit code */
33333 goto __pyx_L0;
33334 __pyx_L1_error:;
33335 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
33336 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
33337 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
33338 __Pyx_WriteUnraisable("rbd.Image.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
33339 __pyx_L0:;
33340 __Pyx_RefNannyFinishContext();
33341}
33342
33343/* "rbd.pyx":2921
33344 * self.close()
33345 *
33346 * def __repr__(self): # <<<<<<<<<<<<<<
33347 * return "rbd.Image(ioctx, %r)" % self.name
33348 *
33349 */
33350
33351/* Python wrapper */
33352static PyObject *__pyx_pw_3rbd_5Image_13__repr__(PyObject *__pyx_v_self); /*proto*/
33353static PyObject *__pyx_pw_3rbd_5Image_13__repr__(PyObject *__pyx_v_self) {
33354 PyObject *__pyx_r = 0;
33355 __Pyx_RefNannyDeclarations
33356 __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
33357 __pyx_r = __pyx_pf_3rbd_5Image_12__repr__(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
33358
33359 /* function exit code */
33360 __Pyx_RefNannyFinishContext();
33361 return __pyx_r;
33362}
33363
33364static PyObject *__pyx_pf_3rbd_5Image_12__repr__(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
33365 PyObject *__pyx_r = NULL((void*)0);
33366 __Pyx_RefNannyDeclarations
33367 PyObject *__pyx_t_1 = NULL((void*)0);
33368 int __pyx_lineno = 0;
33369 const char *__pyx_filename = NULL((void*)0);
33370 int __pyx_clineno = 0;
33371 __Pyx_RefNannySetupContext("__repr__", 0);
33372
33373 /* "rbd.pyx":2922
33374 *
33375 * def __repr__(self):
33376 * return "rbd.Image(ioctx, %r)" % self.name # <<<<<<<<<<<<<<
33377 *
33378 * def resize(self, size, allow_shrink=True):
33379 */
33380 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
33381 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_rbd_Image_ioctx_r, __pyx_v_self->name)PyString_Format(__pyx_kp_s_rbd_Image_ioctx_r, __pyx_v_self->
name)
; if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __pyx_clineno = __LINE__33381; goto __pyx_L1_error;}
33382 __Pyx_GOTREF(__pyx_t_1);
33383 __pyx_r = __pyx_t_1;
33384 __pyx_t_1 = 0;
33385 goto __pyx_L0;
33386
33387 /* "rbd.pyx":2921
33388 * self.close()
33389 *
33390 * def __repr__(self): # <<<<<<<<<<<<<<
33391 * return "rbd.Image(ioctx, %r)" % self.name
33392 *
33393 */
33394
33395 /* function exit code */
33396 __pyx_L1_error:;
33397 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
33398 __Pyx_AddTraceback("rbd.Image.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33399 __pyx_r = NULL((void*)0);
33400 __pyx_L0:;
33401 __Pyx_XGIVEREF(__pyx_r);
33402 __Pyx_RefNannyFinishContext();
33403 return __pyx_r;
33404}
33405
33406/* "rbd.pyx":2924
33407 * return "rbd.Image(ioctx, %r)" % self.name
33408 *
33409 * def resize(self, size, allow_shrink=True): # <<<<<<<<<<<<<<
33410 * """
33411 * Change the size of the image, allow shrink.
33412 */
33413
33414/* Python wrapper */
33415static PyObject *__pyx_pw_3rbd_5Image_15resize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33416static char __pyx_doc_3rbd_5Image_14resize[] = "Image.resize(self, size, allow_shrink=True)\n\n Change the size of the image, allow shrink.\n\n :param size: the new size of the image\n :type size: int\n :param allow_shrink: permit shrinking\n :type allow_shrink: bool\n ";
33417static PyObject *__pyx_pw_3rbd_5Image_15resize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33418 PyObject *__pyx_v_size = 0;
33419 PyObject *__pyx_v_allow_shrink = 0;
33420 int __pyx_lineno = 0;
33421 const char *__pyx_filename = NULL((void*)0);
33422 int __pyx_clineno = 0;
33423 PyObject *__pyx_r = 0;
33424 __Pyx_RefNannyDeclarations
33425 __Pyx_RefNannySetupContext("resize (wrapper)", 0);
33426 {
33427 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_allow_shrink,0};
33428 PyObject* values[2] = {0,0};
33429 values[1] = ((PyObject *)Py_True((PyObject *) &_Py_TrueStruct));
33430 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
33431 Py_ssize_t kw_args;
33432 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
33433 switch (pos_args) {
33434 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
33435 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
33436 case 0: break;
33437 default: goto __pyx_L5_argtuple_error;
33438 }
33439 kw_args = PyDict_Size(__pyx_kwds);
33440 switch (pos_args) {
33441 case 0:
33442 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size
)) != 0), 1)
) kw_args--;
33443 else goto __pyx_L5_argtuple_error;
33444 case 1:
33445 if (kw_args > 0) {
33446 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_allow_shrink);
33447 if (value) { values[1] = value; kw_args--; }
33448 }
33449 }
33450 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
33451 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "resize") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "resize") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__33451; goto __pyx_L3_error;}
33452 }
33453 } else {
33454 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
33455 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
33456 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
33457 break;
33458 default: goto __pyx_L5_argtuple_error;
33459 }
33460 }
33461 __pyx_v_size = values[0];
33462 __pyx_v_allow_shrink = values[1];
33463 }
33464 goto __pyx_L4_argument_unpacking_done;
33465 __pyx_L5_argtuple_error:;
33466 __Pyx_RaiseArgtupleInvalid("resize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; __pyx_clineno = __LINE__33466; goto __pyx_L3_error;}
33467 __pyx_L3_error:;
33468 __Pyx_AddTraceback("rbd.Image.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
33469 __Pyx_RefNannyFinishContext();
33470 return NULL((void*)0);
33471 __pyx_L4_argument_unpacking_done:;
33472 __pyx_r = __pyx_pf_3rbd_5Image_14resize(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_size, __pyx_v_allow_shrink);
33473
33474 /* function exit code */
33475 __Pyx_RefNannyFinishContext();
33476 return __pyx_r;
33477}
33478
33479static PyObject *__pyx_pf_3rbd_5Image_14resize(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_allow_shrink) {
33480 PyObject *__pyx_v_old_size = NULL((void*)0);
33481 uint64_t __pyx_v__size;
33482 int __pyx_v__allow_shrink;
33483 librbd_progress_fn_t __pyx_v_prog_cb;
33484 int __pyx_v_ret;
33485 PyObject *__pyx_r = NULL((void*)0);
33486 __Pyx_RefNannyDeclarations
33487 PyObject *__pyx_t_1 = NULL((void*)0);
33488 PyObject *__pyx_t_2 = NULL((void*)0);
33489 PyObject *__pyx_t_3 = NULL((void*)0);
33490 int __pyx_t_4;
33491 int __pyx_t_5;
33492 int __pyx_t_6;
33493 uint64_t __pyx_t_7;
33494 int __pyx_lineno = 0;
33495 const char *__pyx_filename = NULL((void*)0);
33496 int __pyx_clineno = 0;
33497 __Pyx_RefNannySetupContext("resize", 0);
33498
33499 /* "rbd.pyx":2933
33500 * :type allow_shrink: bool
33501 * """
33502 * old_size = self.size() # <<<<<<<<<<<<<<
33503 * if old_size == size:
33504 * return
33505 */
33506 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__33506; goto __pyx_L1_error;}
33507 __Pyx_GOTREF(__pyx_t_2);
33508 __pyx_t_3 = NULL((void*)0);
33509 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
33510 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
33511 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
33512 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
33513 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
33514 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
33515 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
33516 }
33517 }
33518 if (__pyx_t_3) {
33519 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__33519; goto __pyx_L1_error;}
33520 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33521 } else {
33522 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__33522; goto __pyx_L1_error;}
33523 }
33524 __Pyx_GOTREF(__pyx_t_1);
33525 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33526 __pyx_v_old_size = __pyx_t_1;
33527 __pyx_t_1 = 0;
33528
33529 /* "rbd.pyx":2934
33530 * """
33531 * old_size = self.size()
33532 * if old_size == size: # <<<<<<<<<<<<<<
33533 * return
33534 * if not allow_shrink and old_size > size:
33535 */
33536 __pyx_t_1 = PyObject_RichCompare(__pyx_v_old_size, __pyx_v_size, Py_EQ2); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__33536; goto __pyx_L1_error;}
33537 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)__builtin_expect(!!(__pyx_t_4 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2934; __pyx_clineno = __LINE__33537; goto __pyx_L1_error;}
33538 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
33539 if (__pyx_t_4) {
33540
33541 /* "rbd.pyx":2935
33542 * old_size = self.size()
33543 * if old_size == size:
33544 * return # <<<<<<<<<<<<<<
33545 * if not allow_shrink and old_size > size:
33546 * raise InvalidArgument("error allow_shrink is False but old_size > new_size")
33547 */
33548 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
33549 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
33550 goto __pyx_L0;
33551
33552 /* "rbd.pyx":2934
33553 * """
33554 * old_size = self.size()
33555 * if old_size == size: # <<<<<<<<<<<<<<
33556 * return
33557 * if not allow_shrink and old_size > size:
33558 */
33559 }
33560
33561 /* "rbd.pyx":2936
33562 * if old_size == size:
33563 * return
33564 * if not allow_shrink and old_size > size: # <<<<<<<<<<<<<<
33565 * raise InvalidArgument("error allow_shrink is False but old_size > new_size")
33566 * cdef:
33567 */
33568 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_allow_shrink); if (unlikely(__pyx_t_5 < 0)__builtin_expect(!!(__pyx_t_5 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2936; __pyx_clineno = __LINE__33568; goto __pyx_L1_error;}
33569 __pyx_t_6 = ((!__pyx_t_5) != 0);
33570 if (__pyx_t_6) {
33571 } else {
33572 __pyx_t_4 = __pyx_t_6;
33573 goto __pyx_L5_bool_binop_done;
33574 }
33575 __pyx_t_1 = PyObject_RichCompare(__pyx_v_old_size, __pyx_v_size, Py_GT4); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2936; __pyx_clineno = __LINE__33575; goto __pyx_L1_error;}
33576 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)__builtin_expect(!!(__pyx_t_6 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2936; __pyx_clineno = __LINE__33576; goto __pyx_L1_error;}
33577 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
33578 __pyx_t_4 = __pyx_t_6;
33579 __pyx_L5_bool_binop_done:;
33580 if (__pyx_t_4) {
33581
33582 /* "rbd.pyx":2937
33583 * return
33584 * if not allow_shrink and old_size > size:
33585 * raise InvalidArgument("error allow_shrink is False but old_size > new_size") # <<<<<<<<<<<<<<
33586 * cdef:
33587 * uint64_t _size = size
33588 */
33589 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__33589; goto __pyx_L1_error;}
33590 __Pyx_GOTREF(__pyx_t_1);
33591 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__33591; goto __pyx_L1_error;}
33592 __Pyx_GOTREF(__pyx_t_2);
33593 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
33594 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
33595 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33596 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__33596; goto __pyx_L1_error;}
33597
33598 /* "rbd.pyx":2936
33599 * if old_size == size:
33600 * return
33601 * if not allow_shrink and old_size > size: # <<<<<<<<<<<<<<
33602 * raise InvalidArgument("error allow_shrink is False but old_size > new_size")
33603 * cdef:
33604 */
33605 }
33606
33607 /* "rbd.pyx":2939
33608 * raise InvalidArgument("error allow_shrink is False but old_size > new_size")
33609 * cdef:
33610 * uint64_t _size = size # <<<<<<<<<<<<<<
33611 * bint _allow_shrink = allow_shrink
33612 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
33613 */
33614 __pyx_t_7 = __Pyx_PyInt_As_uint64_t(__pyx_v_size); if (unlikely((__pyx_t_7 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2939; __pyx_clineno = __LINE__33614; goto __pyx_L1_error;}
33615 __pyx_v__size = __pyx_t_7;
33616
33617 /* "rbd.pyx":2940
33618 * cdef:
33619 * uint64_t _size = size
33620 * bint _allow_shrink = allow_shrink # <<<<<<<<<<<<<<
33621 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
33622 * with nogil:
33623 */
33624 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_allow_shrink); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2940; __pyx_clineno = __LINE__33624; goto __pyx_L1_error;}
33625 __pyx_v__allow_shrink = __pyx_t_4;
33626
33627 /* "rbd.pyx":2941
33628 * uint64_t _size = size
33629 * bint _allow_shrink = allow_shrink
33630 * librbd_progress_fn_t prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
33631 * with nogil:
33632 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL)
33633 */
33634 __pyx_v_prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
33635
33636 /* "rbd.pyx":2942
33637 * bint _allow_shrink = allow_shrink
33638 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
33639 * with nogil: # <<<<<<<<<<<<<<
33640 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL)
33641 * if ret < 0:
33642 */
33643 {
33644 #ifdef WITH_THREAD1
33645 PyThreadState *_save;
33646 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
33647 #endif
33648 /*try:*/ {
33649
33650 /* "rbd.pyx":2943
33651 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
33652 * with nogil:
33653 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL) # <<<<<<<<<<<<<<
33654 * if ret < 0:
33655 * raise make_ex(ret, 'error resizing image %s' % self.name)
33656 */
33657 __pyx_v_ret = rbd_resize2(__pyx_v_self->image, __pyx_v__size, __pyx_v__allow_shrink, __pyx_v_prog_cb, NULL((void*)0));
33658 }
33659
33660 /* "rbd.pyx":2942
33661 * bint _allow_shrink = allow_shrink
33662 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
33663 * with nogil: # <<<<<<<<<<<<<<
33664 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL)
33665 * if ret < 0:
33666 */
33667 /*finally:*/ {
33668 /*normal exit:*/{
33669 #ifdef WITH_THREAD1
33670 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
33671 #endif
33672 goto __pyx_L9;
33673 }
33674 __pyx_L9:;
33675 }
33676 }
33677
33678 /* "rbd.pyx":2944
33679 * with nogil:
33680 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL)
33681 * if ret < 0: # <<<<<<<<<<<<<<
33682 * raise make_ex(ret, 'error resizing image %s' % self.name)
33683 *
33684 */
33685 __pyx_t_4 = ((__pyx_v_ret < 0) != 0);
33686 if (__pyx_t_4) {
33687
33688 /* "rbd.pyx":2945
33689 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL)
33690 * if ret < 0:
33691 * raise make_ex(ret, 'error resizing image %s' % self.name) # <<<<<<<<<<<<<<
33692 *
33693 * def stat(self):
33694 */
33695 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__33695; goto __pyx_L1_error;}
33696 __Pyx_GOTREF(__pyx_t_2);
33697 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_error_resizing_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_resizing_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__33697; goto __pyx_L1_error;}
33698 __Pyx_GOTREF(__pyx_t_1);
33699 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__33699; goto __pyx_L1_error;}
33700 __Pyx_GOTREF(__pyx_t_3);
33701 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33702 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
33703 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
33704 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33705 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__33705; goto __pyx_L1_error;}
33706
33707 /* "rbd.pyx":2944
33708 * with nogil:
33709 * ret = rbd_resize2(self.image, _size, _allow_shrink, prog_cb, NULL)
33710 * if ret < 0: # <<<<<<<<<<<<<<
33711 * raise make_ex(ret, 'error resizing image %s' % self.name)
33712 *
33713 */
33714 }
33715
33716 /* "rbd.pyx":2924
33717 * return "rbd.Image(ioctx, %r)" % self.name
33718 *
33719 * def resize(self, size, allow_shrink=True): # <<<<<<<<<<<<<<
33720 * """
33721 * Change the size of the image, allow shrink.
33722 */
33723
33724 /* function exit code */
33725 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
33726 goto __pyx_L0;
33727 __pyx_L1_error:;
33728 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
33729 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
33730 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
33731 __Pyx_AddTraceback("rbd.Image.resize", __pyx_clineno, __pyx_lineno, __pyx_filename);
33732 __pyx_r = NULL((void*)0);
33733 __pyx_L0:;
33734 __Pyx_XDECREF(__pyx_v_old_size)do { if ((__pyx_v_old_size) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_old_size))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_old_size)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_old_size)))); }
while (0); } while (0)
;
33735 __Pyx_XGIVEREF(__pyx_r);
33736 __Pyx_RefNannyFinishContext();
33737 return __pyx_r;
33738}
33739
33740/* "rbd.pyx":2947
33741 * raise make_ex(ret, 'error resizing image %s' % self.name)
33742 *
33743 * def stat(self): # <<<<<<<<<<<<<<
33744 * """
33745 * Get information about the image. Currently parent pool and
33746 */
33747
33748/* Python wrapper */
33749static PyObject *__pyx_pw_3rbd_5Image_17stat(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
33750static char __pyx_doc_3rbd_5Image_16stat[] = "Image.stat(self)\n\n Get information about the image. Currently parent pool and\n parent name are always -1 and ''.\n\n :returns: dict - contains the following keys:\n\n * ``size`` (int) - the size of the image in bytes\n\n * ``obj_size`` (int) - the size of each object that comprises the\n image\n\n * ``num_objs`` (int) - the number of objects in the image\n\n * ``order`` (int) - log_2(object_size)\n\n * ``block_name_prefix`` (str) - the prefix of the RADOS objects used\n to store the image\n\n * ``parent_pool`` (int) - deprecated\n\n * ``parent_name`` (str) - deprecated\n\n See also :meth:`format` and :meth:`features`.\n\n ";
33751static PyObject *__pyx_pw_3rbd_5Image_17stat(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
33752 PyObject *__pyx_r = 0;
33753 __Pyx_RefNannyDeclarations
33754 __Pyx_RefNannySetupContext("stat (wrapper)", 0);
33755 __pyx_r = __pyx_pf_3rbd_5Image_16stat(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
33756
33757 /* function exit code */
33758 __Pyx_RefNannyFinishContext();
33759 return __pyx_r;
33760}
33761
33762static PyObject *__pyx_pf_3rbd_5Image_16stat(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
33763 rbd_image_info_t __pyx_v_info;
33764 int __pyx_v_ret;
33765 PyObject *__pyx_r = NULL((void*)0);
33766 __Pyx_RefNannyDeclarations
33767 int __pyx_t_1;
33768 PyObject *__pyx_t_2 = NULL((void*)0);
33769 PyObject *__pyx_t_3 = NULL((void*)0);
33770 PyObject *__pyx_t_4 = NULL((void*)0);
33771 PyObject *__pyx_t_5 = NULL((void*)0);
33772 PyObject *__pyx_t_6 = NULL((void*)0);
33773 PyObject *__pyx_t_7 = NULL((void*)0);
33774 int __pyx_lineno = 0;
33775 const char *__pyx_filename = NULL((void*)0);
33776 int __pyx_clineno = 0;
33777 __Pyx_RefNannySetupContext("stat", 0);
33778
33779 /* "rbd.pyx":2974
33780 * """
33781 * cdef rbd_image_info_t info
33782 * with nogil: # <<<<<<<<<<<<<<
33783 * ret = rbd_stat(self.image, &info, sizeof(info))
33784 * if ret != 0:
33785 */
33786 {
33787 #ifdef WITH_THREAD1
33788 PyThreadState *_save;
33789 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
33790 #endif
33791 /*try:*/ {
33792
33793 /* "rbd.pyx":2975
33794 * cdef rbd_image_info_t info
33795 * with nogil:
33796 * ret = rbd_stat(self.image, &info, sizeof(info)) # <<<<<<<<<<<<<<
33797 * if ret != 0:
33798 * raise make_ex(ret, 'error getting info for image %s' % self.name)
33799 */
33800 __pyx_v_ret = rbd_stat(__pyx_v_self->image, (&__pyx_v_info), (sizeof(__pyx_v_info)));
33801 }
33802
33803 /* "rbd.pyx":2974
33804 * """
33805 * cdef rbd_image_info_t info
33806 * with nogil: # <<<<<<<<<<<<<<
33807 * ret = rbd_stat(self.image, &info, sizeof(info))
33808 * if ret != 0:
33809 */
33810 /*finally:*/ {
33811 /*normal exit:*/{
33812 #ifdef WITH_THREAD1
33813 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
33814 #endif
33815 goto __pyx_L5;
33816 }
33817 __pyx_L5:;
33818 }
33819 }
33820
33821 /* "rbd.pyx":2976
33822 * with nogil:
33823 * ret = rbd_stat(self.image, &info, sizeof(info))
33824 * if ret != 0: # <<<<<<<<<<<<<<
33825 * raise make_ex(ret, 'error getting info for image %s' % self.name)
33826 * return {
33827 */
33828 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
33829 if (__pyx_t_1) {
33830
33831 /* "rbd.pyx":2977
33832 * ret = rbd_stat(self.image, &info, sizeof(info))
33833 * if ret != 0:
33834 * raise make_ex(ret, 'error getting info for image %s' % self.name) # <<<<<<<<<<<<<<
33835 * return {
33836 * 'size' : info.size,
33837 */
33838 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__33838; goto __pyx_L1_error;}
33839 __Pyx_GOTREF(__pyx_t_2);
33840 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_info_for_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_info_for_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__33840; goto __pyx_L1_error;}
33841 __Pyx_GOTREF(__pyx_t_3);
33842 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__33842; goto __pyx_L1_error;}
33843 __Pyx_GOTREF(__pyx_t_4);
33844 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33845 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33846 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
33847 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
33848 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2977; __pyx_clineno = __LINE__33848; goto __pyx_L1_error;}
33849
33850 /* "rbd.pyx":2976
33851 * with nogil:
33852 * ret = rbd_stat(self.image, &info, sizeof(info))
33853 * if ret != 0: # <<<<<<<<<<<<<<
33854 * raise make_ex(ret, 'error getting info for image %s' % self.name)
33855 * return {
33856 */
33857 }
33858
33859 /* "rbd.pyx":2978
33860 * if ret != 0:
33861 * raise make_ex(ret, 'error getting info for image %s' % self.name)
33862 * return { # <<<<<<<<<<<<<<
33863 * 'size' : info.size,
33864 * 'obj_size' : info.obj_size,
33865 */
33866 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
33867
33868 /* "rbd.pyx":2979
33869 * raise make_ex(ret, 'error getting info for image %s' % self.name)
33870 * return {
33871 * 'size' : info.size, # <<<<<<<<<<<<<<
33872 * 'obj_size' : info.obj_size,
33873 * 'num_objs' : info.num_objs,
33874 */
33875 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33875; goto __pyx_L1_error;}
33876 __Pyx_GOTREF(__pyx_t_4);
33877 __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_info.size); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33877; goto __pyx_L1_error;}
33878 __Pyx_GOTREF(__pyx_t_3);
33879 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33879; goto __pyx_L1_error;}
33880 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33881
33882 /* "rbd.pyx":2980
33883 * return {
33884 * 'size' : info.size,
33885 * 'obj_size' : info.obj_size, # <<<<<<<<<<<<<<
33886 * 'num_objs' : info.num_objs,
33887 * 'order' : info.order,
33888 */
33889 __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_info.obj_size); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2980; __pyx_clineno = __LINE__33889; goto __pyx_L1_error;}
33890 __Pyx_GOTREF(__pyx_t_3);
33891 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_obj_size, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33891; goto __pyx_L1_error;}
33892 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33893
33894 /* "rbd.pyx":2981
33895 * 'size' : info.size,
33896 * 'obj_size' : info.obj_size,
33897 * 'num_objs' : info.num_objs, # <<<<<<<<<<<<<<
33898 * 'order' : info.order,
33899 * 'block_name_prefix' : decode_cstr(info.block_name_prefix),
33900 */
33901 __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_info.num_objs); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__33901; goto __pyx_L1_error;}
33902 __Pyx_GOTREF(__pyx_t_3);
33903 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_num_objs, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33903; goto __pyx_L1_error;}
33904 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33905
33906 /* "rbd.pyx":2982
33907 * 'obj_size' : info.obj_size,
33908 * 'num_objs' : info.num_objs,
33909 * 'order' : info.order, # <<<<<<<<<<<<<<
33910 * 'block_name_prefix' : decode_cstr(info.block_name_prefix),
33911 * 'parent_pool' : info.parent_pool,
33912 */
33913 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_info.order); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__33913; goto __pyx_L1_error;}
33914 __Pyx_GOTREF(__pyx_t_3);
33915 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33915; goto __pyx_L1_error;}
33916 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33917
33918 /* "rbd.pyx":2983
33919 * 'num_objs' : info.num_objs,
33920 * 'order' : info.order,
33921 * 'block_name_prefix' : decode_cstr(info.block_name_prefix), # <<<<<<<<<<<<<<
33922 * 'parent_pool' : info.parent_pool,
33923 * 'parent_name' : info.parent_name
33924 */
33925 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__33925; goto __pyx_L1_error;}
33926 __Pyx_GOTREF(__pyx_t_2);
33927 __pyx_t_5 = __Pyx_PyObject_FromStringPyString_FromString(__pyx_v_info.block_name_prefix); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__33927; goto __pyx_L1_error;}
33928 __Pyx_GOTREF(__pyx_t_5);
33929 __pyx_t_6 = NULL((void*)0);
33930 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
33931 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
33932 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
33933 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
33934 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
33935 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
33936 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
33937 }
33938 }
33939 if (!__pyx_t_6) {
33940 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__33940; goto __pyx_L1_error;}
33941 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
33942 __Pyx_GOTREF(__pyx_t_3);
33943 } else {
33944 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__33944; goto __pyx_L1_error;}
33945 __Pyx_GOTREF(__pyx_t_7);
33946 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
33947 __Pyx_GIVEREF(__pyx_t_5);
33948 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
33949 __pyx_t_5 = 0;
33950 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2983; __pyx_clineno = __LINE__33950; goto __pyx_L1_error;}
33951 __Pyx_GOTREF(__pyx_t_3);
33952 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
33953 }
33954 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
33955 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_block_name_prefix, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33955; goto __pyx_L1_error;}
33956 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33957
33958 /* "rbd.pyx":2984
33959 * 'order' : info.order,
33960 * 'block_name_prefix' : decode_cstr(info.block_name_prefix),
33961 * 'parent_pool' : info.parent_pool, # <<<<<<<<<<<<<<
33962 * 'parent_name' : info.parent_name
33963 * }
33964 */
33965 __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_info.parent_pool); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; __pyx_clineno = __LINE__33965; goto __pyx_L1_error;}
33966 __Pyx_GOTREF(__pyx_t_3);
33967 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parent_pool, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33967; goto __pyx_L1_error;}
33968 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33969
33970 /* "rbd.pyx":2985
33971 * 'block_name_prefix' : decode_cstr(info.block_name_prefix),
33972 * 'parent_pool' : info.parent_pool,
33973 * 'parent_name' : info.parent_name # <<<<<<<<<<<<<<
33974 * }
33975 *
33976 */
33977 __pyx_t_3 = __Pyx_PyObject_FromStringPyString_FromString(__pyx_v_info.parent_name); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__33977; goto __pyx_L1_error;}
33978 __Pyx_GOTREF(__pyx_t_3);
33979 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parent_name, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__33979; goto __pyx_L1_error;}
33980 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
33981 __pyx_r = __pyx_t_4;
33982 __pyx_t_4 = 0;
33983 goto __pyx_L0;
33984
33985 /* "rbd.pyx":2947
33986 * raise make_ex(ret, 'error resizing image %s' % self.name)
33987 *
33988 * def stat(self): # <<<<<<<<<<<<<<
33989 * """
33990 * Get information about the image. Currently parent pool and
33991 */
33992
33993 /* function exit code */
33994 __pyx_L1_error:;
33995 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
33996 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
33997 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
33998 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
33999 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
34000 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
34001 __Pyx_AddTraceback("rbd.Image.stat", __pyx_clineno, __pyx_lineno, __pyx_filename);
34002 __pyx_r = NULL((void*)0);
34003 __pyx_L0:;
34004 __Pyx_XGIVEREF(__pyx_r);
34005 __Pyx_RefNannyFinishContext();
34006 return __pyx_r;
34007}
34008
34009/* "rbd.pyx":2988
34010 * }
34011 *
34012 * def get_name(self): # <<<<<<<<<<<<<<
34013 * """
34014 * Get the RBD image name
34015 */
34016
34017/* Python wrapper */
34018static PyObject *__pyx_pw_3rbd_5Image_19get_name(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
34019static char __pyx_doc_3rbd_5Image_18get_name[] = "Image.get_name(self)\n\n Get the RBD image name\n\n :returns: str - image name\n ";
34020static PyObject *__pyx_pw_3rbd_5Image_19get_name(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
34021 PyObject *__pyx_r = 0;
34022 __Pyx_RefNannyDeclarations
34023 __Pyx_RefNannySetupContext("get_name (wrapper)", 0);
34024 __pyx_r = __pyx_pf_3rbd_5Image_18get_name(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
34025
34026 /* function exit code */
34027 __Pyx_RefNannyFinishContext();
34028 return __pyx_r;
34029}
34030
34031static PyObject *__pyx_pf_3rbd_5Image_18get_name(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
34032 int __pyx_v_ret;
34033 size_t __pyx_v_size;
34034 char *__pyx_v_image_name;
34035 PyObject *__pyx_r = NULL((void*)0);
34036 __Pyx_RefNannyDeclarations
34037 int __pyx_t_1;
34038 void *__pyx_t_2;
34039 PyObject *__pyx_t_3 = NULL((void*)0);
34040 PyObject *__pyx_t_4 = NULL((void*)0);
34041 PyObject *__pyx_t_5 = NULL((void*)0);
34042 PyObject *__pyx_t_6 = NULL((void*)0);
34043 PyObject *__pyx_t_7 = NULL((void*)0);
34044 int __pyx_t_8;
34045 int __pyx_t_9;
34046 char const *__pyx_t_10;
34047 PyObject *__pyx_t_11 = NULL((void*)0);
34048 PyObject *__pyx_t_12 = NULL((void*)0);
34049 PyObject *__pyx_t_13 = NULL((void*)0);
34050 PyObject *__pyx_t_14 = NULL((void*)0);
34051 PyObject *__pyx_t_15 = NULL((void*)0);
34052 PyObject *__pyx_t_16 = NULL((void*)0);
34053 int __pyx_lineno = 0;
34054 const char *__pyx_filename = NULL((void*)0);
34055 int __pyx_clineno = 0;
34056 __Pyx_RefNannySetupContext("get_name", 0);
34057
34058 /* "rbd.pyx":2995
34059 * """
34060 * cdef:
34061 * int ret = -errno.ERANGE # <<<<<<<<<<<<<<
34062 * size_t size = 64
34063 * char *image_name = NULL
34064 */
34065 __pyx_v_ret = (-ERANGE34);
34066
34067 /* "rbd.pyx":2996
34068 * cdef:
34069 * int ret = -errno.ERANGE
34070 * size_t size = 64 # <<<<<<<<<<<<<<
34071 * char *image_name = NULL
34072 * try:
34073 */
34074 __pyx_v_size = 64;
34075
34076 /* "rbd.pyx":2997
34077 * int ret = -errno.ERANGE
34078 * size_t size = 64
34079 * char *image_name = NULL # <<<<<<<<<<<<<<
34080 * try:
34081 * while ret == -errno.ERANGE:
34082 */
34083 __pyx_v_image_name = NULL((void*)0);
34084
34085 /* "rbd.pyx":2998
34086 * size_t size = 64
34087 * char *image_name = NULL
34088 * try: # <<<<<<<<<<<<<<
34089 * while ret == -errno.ERANGE:
34090 * image_name = <char *>realloc_chk(image_name, size)
34091 */
34092 /*try:*/ {
34093
34094 /* "rbd.pyx":2999
34095 * char *image_name = NULL
34096 * try:
34097 * while ret == -errno.ERANGE: # <<<<<<<<<<<<<<
34098 * image_name = <char *>realloc_chk(image_name, size)
34099 * with nogil:
34100 */
34101 while (1) {
34102 __pyx_t_1 = ((__pyx_v_ret == (-ERANGE34)) != 0);
34103 if (!__pyx_t_1) break;
34104
34105 /* "rbd.pyx":3000
34106 * try:
34107 * while ret == -errno.ERANGE:
34108 * image_name = <char *>realloc_chk(image_name, size) # <<<<<<<<<<<<<<
34109 * with nogil:
34110 * ret = rbd_get_name(self.image, image_name, &size)
34111 */
34112 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_image_name, __pyx_v_size); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__34112; goto __pyx_L4_error;}
34113 __pyx_v_image_name = ((char *)__pyx_t_2);
34114
34115 /* "rbd.pyx":3001
34116 * while ret == -errno.ERANGE:
34117 * image_name = <char *>realloc_chk(image_name, size)
34118 * with nogil: # <<<<<<<<<<<<<<
34119 * ret = rbd_get_name(self.image, image_name, &size)
34120 *
34121 */
34122 {
34123 #ifdef WITH_THREAD1
34124 PyThreadState *_save;
34125 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
34126 #endif
34127 /*try:*/ {
34128
34129 /* "rbd.pyx":3002
34130 * image_name = <char *>realloc_chk(image_name, size)
34131 * with nogil:
34132 * ret = rbd_get_name(self.image, image_name, &size) # <<<<<<<<<<<<<<
34133 *
34134 * if ret != 0:
34135 */
34136 __pyx_v_ret = rbd_get_name(__pyx_v_self->image, __pyx_v_image_name, (&__pyx_v_size));
34137 }
34138
34139 /* "rbd.pyx":3001
34140 * while ret == -errno.ERANGE:
34141 * image_name = <char *>realloc_chk(image_name, size)
34142 * with nogil: # <<<<<<<<<<<<<<
34143 * ret = rbd_get_name(self.image, image_name, &size)
34144 *
34145 */
34146 /*finally:*/ {
34147 /*normal exit:*/{
34148 #ifdef WITH_THREAD1
34149 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
34150 #endif
34151 goto __pyx_L12;
34152 }
34153 __pyx_L12:;
34154 }
34155 }
34156 }
34157
34158 /* "rbd.pyx":3004
34159 * ret = rbd_get_name(self.image, image_name, &size)
34160 *
34161 * if ret != 0: # <<<<<<<<<<<<<<
34162 * raise make_ex(ret, 'error getting name for image %s' % self.name)
34163 * return decode_cstr(image_name)
34164 */
34165 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
34166 if (__pyx_t_1) {
34167
34168 /* "rbd.pyx":3005
34169 *
34170 * if ret != 0:
34171 * raise make_ex(ret, 'error getting name for image %s' % self.name) # <<<<<<<<<<<<<<
34172 * return decode_cstr(image_name)
34173 * finally:
34174 */
34175 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__34175; goto __pyx_L4_error;}
34176 __Pyx_GOTREF(__pyx_t_3);
34177 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_name_for_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_name_for_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__34177; goto __pyx_L4_error;}
34178 __Pyx_GOTREF(__pyx_t_4);
34179 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__34179; goto __pyx_L4_error;}
34180 __Pyx_GOTREF(__pyx_t_5);
34181 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
34182 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
34183 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
34184 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
34185 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__34185; goto __pyx_L4_error;}
34186
34187 /* "rbd.pyx":3004
34188 * ret = rbd_get_name(self.image, image_name, &size)
34189 *
34190 * if ret != 0: # <<<<<<<<<<<<<<
34191 * raise make_ex(ret, 'error getting name for image %s' % self.name)
34192 * return decode_cstr(image_name)
34193 */
34194 }
34195
34196 /* "rbd.pyx":3006
34197 * if ret != 0:
34198 * raise make_ex(ret, 'error getting name for image %s' % self.name)
34199 * return decode_cstr(image_name) # <<<<<<<<<<<<<<
34200 * finally:
34201 * free(image_name)
34202 */
34203 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
34204 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__34204; goto __pyx_L4_error;}
34205 __Pyx_GOTREF(__pyx_t_4);
34206 __pyx_t_3 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_image_name); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__34206; goto __pyx_L4_error;}
34207 __Pyx_GOTREF(__pyx_t_3);
34208 __pyx_t_6 = NULL((void*)0);
34209 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
34210 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
34211 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
34212 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
34213 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
34214 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
34215 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
34216 }
34217 }
34218 if (!__pyx_t_6) {
34219 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__34219; goto __pyx_L4_error;}
34220 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
34221 __Pyx_GOTREF(__pyx_t_5);
34222 } else {
34223 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__34223; goto __pyx_L4_error;}
34224 __Pyx_GOTREF(__pyx_t_7);
34225 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
34226 __Pyx_GIVEREF(__pyx_t_3);
34227 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_3);
34228 __pyx_t_3 = 0;
34229 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__34229; goto __pyx_L4_error;}
34230 __Pyx_GOTREF(__pyx_t_5);
34231 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
34232 }
34233 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
34234 __pyx_r = __pyx_t_5;
34235 __pyx_t_5 = 0;
34236 goto __pyx_L3_return;
34237 }
34238
34239 /* "rbd.pyx":3008
34240 * return decode_cstr(image_name)
34241 * finally:
34242 * free(image_name) # <<<<<<<<<<<<<<
34243 *
34244 * def id(self):
34245 */
34246 /*finally:*/ {
34247 /*exception exit:*/{
34248 __pyx_L4_error:;
34249 __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
34250 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
34251 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
34252 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
34253 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
34254 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
34255 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
34256 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_11, &
__pyx_t_12, &__pyx_t_13) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
34257 __Pyx_XGOTREF(__pyx_t_11);
34258 __Pyx_XGOTREF(__pyx_t_12);
34259 __Pyx_XGOTREF(__pyx_t_13);
34260 __Pyx_XGOTREF(__pyx_t_14);
34261 __Pyx_XGOTREF(__pyx_t_15);
34262 __Pyx_XGOTREF(__pyx_t_16);
34263 __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
34264 {
34265 free(__pyx_v_image_name);
34266 }
34267 if (PY_MAJOR_VERSION2 >= 3) {
34268 __Pyx_XGIVEREF(__pyx_t_14);
34269 __Pyx_XGIVEREF(__pyx_t_15);
34270 __Pyx_XGIVEREF(__pyx_t_16);
34271 __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
34272 }
34273 __Pyx_XGIVEREF(__pyx_t_11);
34274 __Pyx_XGIVEREF(__pyx_t_12);
34275 __Pyx_XGIVEREF(__pyx_t_13);
34276 __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
34277 __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
34278 __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
34279 goto __pyx_L1_error;
34280 }
34281 __pyx_L3_return: {
34282 __pyx_t_16 = __pyx_r;
34283 __pyx_r = 0;
34284 free(__pyx_v_image_name);
34285 __pyx_r = __pyx_t_16;
34286 __pyx_t_16 = 0;
34287 goto __pyx_L0;
34288 }
34289 }
34290
34291 /* "rbd.pyx":2988
34292 * }
34293 *
34294 * def get_name(self): # <<<<<<<<<<<<<<
34295 * """
34296 * Get the RBD image name
34297 */
34298
34299 /* function exit code */
34300 __pyx_L1_error:;
34301 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
34302 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
34303 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
34304 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
34305 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
34306 __Pyx_AddTraceback("rbd.Image.get_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
34307 __pyx_r = NULL((void*)0);
34308 __pyx_L0:;
34309 __Pyx_XGIVEREF(__pyx_r);
34310 __Pyx_RefNannyFinishContext();
34311 return __pyx_r;
34312}
34313
34314/* "rbd.pyx":3010
34315 * free(image_name)
34316 *
34317 * def id(self): # <<<<<<<<<<<<<<
34318 * """
34319 * Get the RBD v2 internal image id
34320 */
34321
34322/* Python wrapper */
34323static PyObject *__pyx_pw_3rbd_5Image_21id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
34324static char __pyx_doc_3rbd_5Image_20id[] = "Image.id(self)\n\n Get the RBD v2 internal image id\n\n :returns: str - image id\n ";
34325static PyObject *__pyx_pw_3rbd_5Image_21id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
34326 PyObject *__pyx_r = 0;
34327 __Pyx_RefNannyDeclarations
34328 __Pyx_RefNannySetupContext("id (wrapper)", 0);
34329 __pyx_r = __pyx_pf_3rbd_5Image_20id(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
34330
34331 /* function exit code */
34332 __Pyx_RefNannyFinishContext();
34333 return __pyx_r;
34334}
34335
34336static PyObject *__pyx_pf_3rbd_5Image_20id(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
34337 int __pyx_v_ret;
34338 size_t __pyx_v_size;
34339 char *__pyx_v_image_id;
34340 PyObject *__pyx_r = NULL((void*)0);
34341 __Pyx_RefNannyDeclarations
34342 int __pyx_t_1;
34343 int __pyx_t_2;
34344 void *__pyx_t_3;
34345 PyObject *__pyx_t_4 = NULL((void*)0);
34346 PyObject *__pyx_t_5 = NULL((void*)0);
34347 PyObject *__pyx_t_6 = NULL((void*)0);
34348 PyObject *__pyx_t_7 = NULL((void*)0);
34349 PyObject *__pyx_t_8 = NULL((void*)0);
34350 int __pyx_t_9;
34351 int __pyx_t_10;
34352 char const *__pyx_t_11;
34353 PyObject *__pyx_t_12 = NULL((void*)0);
34354 PyObject *__pyx_t_13 = NULL((void*)0);
34355 PyObject *__pyx_t_14 = NULL((void*)0);
34356 PyObject *__pyx_t_15 = NULL((void*)0);
34357 PyObject *__pyx_t_16 = NULL((void*)0);
34358 PyObject *__pyx_t_17 = NULL((void*)0);
34359 int __pyx_lineno = 0;
34360 const char *__pyx_filename = NULL((void*)0);
34361 int __pyx_clineno = 0;
34362 __Pyx_RefNannySetupContext("id", 0);
34363
34364 /* "rbd.pyx":3017
34365 * """
34366 * cdef:
34367 * int ret = -errno.ERANGE # <<<<<<<<<<<<<<
34368 * size_t size = 32
34369 * char *image_id = NULL
34370 */
34371 __pyx_v_ret = (-ERANGE34);
34372
34373 /* "rbd.pyx":3018
34374 * cdef:
34375 * int ret = -errno.ERANGE
34376 * size_t size = 32 # <<<<<<<<<<<<<<
34377 * char *image_id = NULL
34378 * try:
34379 */
34380 __pyx_v_size = 32;
34381
34382 /* "rbd.pyx":3019
34383 * int ret = -errno.ERANGE
34384 * size_t size = 32
34385 * char *image_id = NULL # <<<<<<<<<<<<<<
34386 * try:
34387 * while ret == -errno.ERANGE and size <= 4096:
34388 */
34389 __pyx_v_image_id = NULL((void*)0);
34390
34391 /* "rbd.pyx":3020
34392 * size_t size = 32
34393 * char *image_id = NULL
34394 * try: # <<<<<<<<<<<<<<
34395 * while ret == -errno.ERANGE and size <= 4096:
34396 * image_id = <char *>realloc_chk(image_id, size)
34397 */
34398 /*try:*/ {
34399
34400 /* "rbd.pyx":3021
34401 * char *image_id = NULL
34402 * try:
34403 * while ret == -errno.ERANGE and size <= 4096: # <<<<<<<<<<<<<<
34404 * image_id = <char *>realloc_chk(image_id, size)
34405 * with nogil:
34406 */
34407 while (1) {
34408 __pyx_t_2 = ((__pyx_v_ret == (-ERANGE34)) != 0);
34409 if (__pyx_t_2) {
34410 } else {
34411 __pyx_t_1 = __pyx_t_2;
34412 goto __pyx_L8_bool_binop_done;
34413 }
34414 __pyx_t_2 = ((__pyx_v_size <= 0x1000) != 0);
34415 __pyx_t_1 = __pyx_t_2;
34416 __pyx_L8_bool_binop_done:;
34417 if (!__pyx_t_1) break;
34418
34419 /* "rbd.pyx":3022
34420 * try:
34421 * while ret == -errno.ERANGE and size <= 4096:
34422 * image_id = <char *>realloc_chk(image_id, size) # <<<<<<<<<<<<<<
34423 * with nogil:
34424 * ret = rbd_get_id(self.image, image_id, size)
34425 */
34426 __pyx_t_3 = __pyx_f_3rbd_realloc_chk(__pyx_v_image_id, __pyx_v_size); if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__34426; goto __pyx_L4_error;}
34427 __pyx_v_image_id = ((char *)__pyx_t_3);
34428
34429 /* "rbd.pyx":3023
34430 * while ret == -errno.ERANGE and size <= 4096:
34431 * image_id = <char *>realloc_chk(image_id, size)
34432 * with nogil: # <<<<<<<<<<<<<<
34433 * ret = rbd_get_id(self.image, image_id, size)
34434 * if ret == -errno.ERANGE:
34435 */
34436 {
34437 #ifdef WITH_THREAD1
34438 PyThreadState *_save;
34439 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
34440 #endif
34441 /*try:*/ {
34442
34443 /* "rbd.pyx":3024
34444 * image_id = <char *>realloc_chk(image_id, size)
34445 * with nogil:
34446 * ret = rbd_get_id(self.image, image_id, size) # <<<<<<<<<<<<<<
34447 * if ret == -errno.ERANGE:
34448 * size *= 2
34449 */
34450 __pyx_v_ret = rbd_get_id(__pyx_v_self->image, __pyx_v_image_id, __pyx_v_size);
34451 }
34452
34453 /* "rbd.pyx":3023
34454 * while ret == -errno.ERANGE and size <= 4096:
34455 * image_id = <char *>realloc_chk(image_id, size)
34456 * with nogil: # <<<<<<<<<<<<<<
34457 * ret = rbd_get_id(self.image, image_id, size)
34458 * if ret == -errno.ERANGE:
34459 */
34460 /*finally:*/ {
34461 /*normal exit:*/{
34462 #ifdef WITH_THREAD1
34463 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
34464 #endif
34465 goto __pyx_L14;
34466 }
34467 __pyx_L14:;
34468 }
34469 }
34470
34471 /* "rbd.pyx":3025
34472 * with nogil:
34473 * ret = rbd_get_id(self.image, image_id, size)
34474 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
34475 * size *= 2
34476 *
34477 */
34478 __pyx_t_1 = ((__pyx_v_ret == (-ERANGE34)) != 0);
34479 if (__pyx_t_1) {
34480
34481 /* "rbd.pyx":3026
34482 * ret = rbd_get_id(self.image, image_id, size)
34483 * if ret == -errno.ERANGE:
34484 * size *= 2 # <<<<<<<<<<<<<<
34485 *
34486 * if ret != 0:
34487 */
34488 __pyx_v_size = (__pyx_v_size * 2);
34489
34490 /* "rbd.pyx":3025
34491 * with nogil:
34492 * ret = rbd_get_id(self.image, image_id, size)
34493 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
34494 * size *= 2
34495 *
34496 */
34497 }
34498 }
34499
34500 /* "rbd.pyx":3028
34501 * size *= 2
34502 *
34503 * if ret != 0: # <<<<<<<<<<<<<<
34504 * raise make_ex(ret, 'error getting id for image %s' % self.name)
34505 * return decode_cstr(image_id)
34506 */
34507 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
34508 if (__pyx_t_1) {
34509
34510 /* "rbd.pyx":3029
34511 *
34512 * if ret != 0:
34513 * raise make_ex(ret, 'error getting id for image %s' % self.name) # <<<<<<<<<<<<<<
34514 * return decode_cstr(image_id)
34515 * finally:
34516 */
34517 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__34517; goto __pyx_L4_error;}
34518 __Pyx_GOTREF(__pyx_t_4);
34519 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_id_for_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_id_for_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__34519; goto __pyx_L4_error;}
34520 __Pyx_GOTREF(__pyx_t_5);
34521 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__34521; goto __pyx_L4_error;}
34522 __Pyx_GOTREF(__pyx_t_6);
34523 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
34524 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
34525 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
34526 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
34527 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; __pyx_clineno = __LINE__34527; goto __pyx_L4_error;}
34528
34529 /* "rbd.pyx":3028
34530 * size *= 2
34531 *
34532 * if ret != 0: # <<<<<<<<<<<<<<
34533 * raise make_ex(ret, 'error getting id for image %s' % self.name)
34534 * return decode_cstr(image_id)
34535 */
34536 }
34537
34538 /* "rbd.pyx":3030
34539 * if ret != 0:
34540 * raise make_ex(ret, 'error getting id for image %s' % self.name)
34541 * return decode_cstr(image_id) # <<<<<<<<<<<<<<
34542 * finally:
34543 * free(image_id)
34544 */
34545 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
34546 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__34546; goto __pyx_L4_error;}
34547 __Pyx_GOTREF(__pyx_t_5);
34548 __pyx_t_4 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_image_id); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__34548; goto __pyx_L4_error;}
34549 __Pyx_GOTREF(__pyx_t_4);
34550 __pyx_t_7 = NULL((void*)0);
34551 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
34552 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
34553 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
34554 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
34555 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
34556 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
34557 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
34558 }
34559 }
34560 if (!__pyx_t_7) {
34561 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__34561; goto __pyx_L4_error;}
34562 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
34563 __Pyx_GOTREF(__pyx_t_6);
34564 } else {
34565 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__34565; goto __pyx_L4_error;}
34566 __Pyx_GOTREF(__pyx_t_8);
34567 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
34568 __Pyx_GIVEREF(__pyx_t_4);
34569 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_4);
34570 __pyx_t_4 = 0;
34571 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; __pyx_clineno = __LINE__34571; goto __pyx_L4_error;}
34572 __Pyx_GOTREF(__pyx_t_6);
34573 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
34574 }
34575 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
34576 __pyx_r = __pyx_t_6;
34577 __pyx_t_6 = 0;
34578 goto __pyx_L3_return;
34579 }
34580
34581 /* "rbd.pyx":3032
34582 * return decode_cstr(image_id)
34583 * finally:
34584 * free(image_id) # <<<<<<<<<<<<<<
34585 *
34586 * def block_name_prefix(self):
34587 */
34588 /*finally:*/ {
34589 /*exception exit:*/{
34590 __pyx_L4_error:;
34591 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
34592 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
34593 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
34594 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
34595 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
34596 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
34597 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
34598 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_12, &
__pyx_t_13, &__pyx_t_14) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
34599 __Pyx_XGOTREF(__pyx_t_12);
34600 __Pyx_XGOTREF(__pyx_t_13);
34601 __Pyx_XGOTREF(__pyx_t_14);
34602 __Pyx_XGOTREF(__pyx_t_15);
34603 __Pyx_XGOTREF(__pyx_t_16);
34604 __Pyx_XGOTREF(__pyx_t_17);
34605 __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
34606 {
34607 free(__pyx_v_image_id);
34608 }
34609 if (PY_MAJOR_VERSION2 >= 3) {
34610 __Pyx_XGIVEREF(__pyx_t_15);
34611 __Pyx_XGIVEREF(__pyx_t_16);
34612 __Pyx_XGIVEREF(__pyx_t_17);
34613 __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
34614 }
34615 __Pyx_XGIVEREF(__pyx_t_12);
34616 __Pyx_XGIVEREF(__pyx_t_13);
34617 __Pyx_XGIVEREF(__pyx_t_14);
34618 __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
34619 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
34620 __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
34621 goto __pyx_L1_error;
34622 }
34623 __pyx_L3_return: {
34624 __pyx_t_17 = __pyx_r;
34625 __pyx_r = 0;
34626 free(__pyx_v_image_id);
34627 __pyx_r = __pyx_t_17;
34628 __pyx_t_17 = 0;
34629 goto __pyx_L0;
34630 }
34631 }
34632
34633 /* "rbd.pyx":3010
34634 * free(image_name)
34635 *
34636 * def id(self): # <<<<<<<<<<<<<<
34637 * """
34638 * Get the RBD v2 internal image id
34639 */
34640
34641 /* function exit code */
34642 __pyx_L1_error:;
34643 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
34644 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
34645 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
34646 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
34647 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
34648 __Pyx_AddTraceback("rbd.Image.id", __pyx_clineno, __pyx_lineno, __pyx_filename);
34649 __pyx_r = NULL((void*)0);
34650 __pyx_L0:;
34651 __Pyx_XGIVEREF(__pyx_r);
34652 __Pyx_RefNannyFinishContext();
34653 return __pyx_r;
34654}
34655
34656/* "rbd.pyx":3034
34657 * free(image_id)
34658 *
34659 * def block_name_prefix(self): # <<<<<<<<<<<<<<
34660 * """
34661 * Get the RBD block name prefix
34662 */
34663
34664/* Python wrapper */
34665static PyObject *__pyx_pw_3rbd_5Image_23block_name_prefix(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
34666static char __pyx_doc_3rbd_5Image_22block_name_prefix[] = "Image.block_name_prefix(self)\n\n Get the RBD block name prefix\n\n :returns: str - block name prefix\n ";
34667static PyObject *__pyx_pw_3rbd_5Image_23block_name_prefix(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
34668 PyObject *__pyx_r = 0;
34669 __Pyx_RefNannyDeclarations
34670 __Pyx_RefNannySetupContext("block_name_prefix (wrapper)", 0);
34671 __pyx_r = __pyx_pf_3rbd_5Image_22block_name_prefix(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
34672
34673 /* function exit code */
34674 __Pyx_RefNannyFinishContext();
34675 return __pyx_r;
34676}
34677
34678static PyObject *__pyx_pf_3rbd_5Image_22block_name_prefix(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
34679 int __pyx_v_ret;
34680 size_t __pyx_v_size;
34681 char *__pyx_v_prefix;
34682 PyObject *__pyx_r = NULL((void*)0);
34683 __Pyx_RefNannyDeclarations
34684 int __pyx_t_1;
34685 int __pyx_t_2;
34686 void *__pyx_t_3;
34687 PyObject *__pyx_t_4 = NULL((void*)0);
34688 PyObject *__pyx_t_5 = NULL((void*)0);
34689 PyObject *__pyx_t_6 = NULL((void*)0);
34690 PyObject *__pyx_t_7 = NULL((void*)0);
34691 PyObject *__pyx_t_8 = NULL((void*)0);
34692 int __pyx_t_9;
34693 int __pyx_t_10;
34694 char const *__pyx_t_11;
34695 PyObject *__pyx_t_12 = NULL((void*)0);
34696 PyObject *__pyx_t_13 = NULL((void*)0);
34697 PyObject *__pyx_t_14 = NULL((void*)0);
34698 PyObject *__pyx_t_15 = NULL((void*)0);
34699 PyObject *__pyx_t_16 = NULL((void*)0);
34700 PyObject *__pyx_t_17 = NULL((void*)0);
34701 int __pyx_lineno = 0;
34702 const char *__pyx_filename = NULL((void*)0);
34703 int __pyx_clineno = 0;
34704 __Pyx_RefNannySetupContext("block_name_prefix", 0);
34705
34706 /* "rbd.pyx":3041
34707 * """
34708 * cdef:
34709 * int ret = -errno.ERANGE # <<<<<<<<<<<<<<
34710 * size_t size = 32
34711 * char *prefix = NULL
34712 */
34713 __pyx_v_ret = (-ERANGE34);
34714
34715 /* "rbd.pyx":3042
34716 * cdef:
34717 * int ret = -errno.ERANGE
34718 * size_t size = 32 # <<<<<<<<<<<<<<
34719 * char *prefix = NULL
34720 * try:
34721 */
34722 __pyx_v_size = 32;
34723
34724 /* "rbd.pyx":3043
34725 * int ret = -errno.ERANGE
34726 * size_t size = 32
34727 * char *prefix = NULL # <<<<<<<<<<<<<<
34728 * try:
34729 * while ret == -errno.ERANGE and size <= 4096:
34730 */
34731 __pyx_v_prefix = NULL((void*)0);
34732
34733 /* "rbd.pyx":3044
34734 * size_t size = 32
34735 * char *prefix = NULL
34736 * try: # <<<<<<<<<<<<<<
34737 * while ret == -errno.ERANGE and size <= 4096:
34738 * prefix = <char *>realloc_chk(prefix, size)
34739 */
34740 /*try:*/ {
34741
34742 /* "rbd.pyx":3045
34743 * char *prefix = NULL
34744 * try:
34745 * while ret == -errno.ERANGE and size <= 4096: # <<<<<<<<<<<<<<
34746 * prefix = <char *>realloc_chk(prefix, size)
34747 * with nogil:
34748 */
34749 while (1) {
34750 __pyx_t_2 = ((__pyx_v_ret == (-ERANGE34)) != 0);
34751 if (__pyx_t_2) {
34752 } else {
34753 __pyx_t_1 = __pyx_t_2;
34754 goto __pyx_L8_bool_binop_done;
34755 }
34756 __pyx_t_2 = ((__pyx_v_size <= 0x1000) != 0);
34757 __pyx_t_1 = __pyx_t_2;
34758 __pyx_L8_bool_binop_done:;
34759 if (!__pyx_t_1) break;
34760
34761 /* "rbd.pyx":3046
34762 * try:
34763 * while ret == -errno.ERANGE and size <= 4096:
34764 * prefix = <char *>realloc_chk(prefix, size) # <<<<<<<<<<<<<<
34765 * with nogil:
34766 * ret = rbd_get_block_name_prefix(self.image, prefix, size)
34767 */
34768 __pyx_t_3 = __pyx_f_3rbd_realloc_chk(__pyx_v_prefix, __pyx_v_size); if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__34768; goto __pyx_L4_error;}
34769 __pyx_v_prefix = ((char *)__pyx_t_3);
34770
34771 /* "rbd.pyx":3047
34772 * while ret == -errno.ERANGE and size <= 4096:
34773 * prefix = <char *>realloc_chk(prefix, size)
34774 * with nogil: # <<<<<<<<<<<<<<
34775 * ret = rbd_get_block_name_prefix(self.image, prefix, size)
34776 * if ret == -errno.ERANGE:
34777 */
34778 {
34779 #ifdef WITH_THREAD1
34780 PyThreadState *_save;
34781 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
34782 #endif
34783 /*try:*/ {
34784
34785 /* "rbd.pyx":3048
34786 * prefix = <char *>realloc_chk(prefix, size)
34787 * with nogil:
34788 * ret = rbd_get_block_name_prefix(self.image, prefix, size) # <<<<<<<<<<<<<<
34789 * if ret == -errno.ERANGE:
34790 * size *= 2
34791 */
34792 __pyx_v_ret = rbd_get_block_name_prefix(__pyx_v_self->image, __pyx_v_prefix, __pyx_v_size);
34793 }
34794
34795 /* "rbd.pyx":3047
34796 * while ret == -errno.ERANGE and size <= 4096:
34797 * prefix = <char *>realloc_chk(prefix, size)
34798 * with nogil: # <<<<<<<<<<<<<<
34799 * ret = rbd_get_block_name_prefix(self.image, prefix, size)
34800 * if ret == -errno.ERANGE:
34801 */
34802 /*finally:*/ {
34803 /*normal exit:*/{
34804 #ifdef WITH_THREAD1
34805 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
34806 #endif
34807 goto __pyx_L14;
34808 }
34809 __pyx_L14:;
34810 }
34811 }
34812
34813 /* "rbd.pyx":3049
34814 * with nogil:
34815 * ret = rbd_get_block_name_prefix(self.image, prefix, size)
34816 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
34817 * size *= 2
34818 *
34819 */
34820 __pyx_t_1 = ((__pyx_v_ret == (-ERANGE34)) != 0);
34821 if (__pyx_t_1) {
34822
34823 /* "rbd.pyx":3050
34824 * ret = rbd_get_block_name_prefix(self.image, prefix, size)
34825 * if ret == -errno.ERANGE:
34826 * size *= 2 # <<<<<<<<<<<<<<
34827 *
34828 * if ret != 0:
34829 */
34830 __pyx_v_size = (__pyx_v_size * 2);
34831
34832 /* "rbd.pyx":3049
34833 * with nogil:
34834 * ret = rbd_get_block_name_prefix(self.image, prefix, size)
34835 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
34836 * size *= 2
34837 *
34838 */
34839 }
34840 }
34841
34842 /* "rbd.pyx":3052
34843 * size *= 2
34844 *
34845 * if ret != 0: # <<<<<<<<<<<<<<
34846 * raise make_ex(ret, 'error getting block name prefix for image %s' % self.name)
34847 * return decode_cstr(prefix)
34848 */
34849 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
34850 if (__pyx_t_1) {
34851
34852 /* "rbd.pyx":3053
34853 *
34854 * if ret != 0:
34855 * raise make_ex(ret, 'error getting block name prefix for image %s' % self.name) # <<<<<<<<<<<<<<
34856 * return decode_cstr(prefix)
34857 * finally:
34858 */
34859 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__34859; goto __pyx_L4_error;}
34860 __Pyx_GOTREF(__pyx_t_4);
34861 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_block_name_prefix, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_block_name_prefix, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__34861; goto __pyx_L4_error;}
34862 __Pyx_GOTREF(__pyx_t_5);
34863 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__34863; goto __pyx_L4_error;}
34864 __Pyx_GOTREF(__pyx_t_6);
34865 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
34866 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
34867 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
34868 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
34869 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__34869; goto __pyx_L4_error;}
34870
34871 /* "rbd.pyx":3052
34872 * size *= 2
34873 *
34874 * if ret != 0: # <<<<<<<<<<<<<<
34875 * raise make_ex(ret, 'error getting block name prefix for image %s' % self.name)
34876 * return decode_cstr(prefix)
34877 */
34878 }
34879
34880 /* "rbd.pyx":3054
34881 * if ret != 0:
34882 * raise make_ex(ret, 'error getting block name prefix for image %s' % self.name)
34883 * return decode_cstr(prefix) # <<<<<<<<<<<<<<
34884 * finally:
34885 * free(prefix)
34886 */
34887 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
34888 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__34888; goto __pyx_L4_error;}
34889 __Pyx_GOTREF(__pyx_t_5);
34890 __pyx_t_4 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_prefix); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__34890; goto __pyx_L4_error;}
34891 __Pyx_GOTREF(__pyx_t_4);
34892 __pyx_t_7 = NULL((void*)0);
34893 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
34894 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
34895 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
34896 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
34897 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
34898 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
34899 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
34900 }
34901 }
34902 if (!__pyx_t_7) {
34903 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__34903; goto __pyx_L4_error;}
34904 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
34905 __Pyx_GOTREF(__pyx_t_6);
34906 } else {
34907 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__34907; goto __pyx_L4_error;}
34908 __Pyx_GOTREF(__pyx_t_8);
34909 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
34910 __Pyx_GIVEREF(__pyx_t_4);
34911 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_4);
34912 __pyx_t_4 = 0;
34913 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__34913; goto __pyx_L4_error;}
34914 __Pyx_GOTREF(__pyx_t_6);
34915 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
34916 }
34917 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
34918 __pyx_r = __pyx_t_6;
34919 __pyx_t_6 = 0;
34920 goto __pyx_L3_return;
34921 }
34922
34923 /* "rbd.pyx":3056
34924 * return decode_cstr(prefix)
34925 * finally:
34926 * free(prefix) # <<<<<<<<<<<<<<
34927 *
34928 * def data_pool_id(self):
34929 */
34930 /*finally:*/ {
34931 /*exception exit:*/{
34932 __pyx_L4_error:;
34933 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
34934 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
34935 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
34936 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
34937 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
34938 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
34939 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
34940 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_12, &
__pyx_t_13, &__pyx_t_14) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
34941 __Pyx_XGOTREF(__pyx_t_12);
34942 __Pyx_XGOTREF(__pyx_t_13);
34943 __Pyx_XGOTREF(__pyx_t_14);
34944 __Pyx_XGOTREF(__pyx_t_15);
34945 __Pyx_XGOTREF(__pyx_t_16);
34946 __Pyx_XGOTREF(__pyx_t_17);
34947 __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
34948 {
34949 free(__pyx_v_prefix);
34950 }
34951 if (PY_MAJOR_VERSION2 >= 3) {
34952 __Pyx_XGIVEREF(__pyx_t_15);
34953 __Pyx_XGIVEREF(__pyx_t_16);
34954 __Pyx_XGIVEREF(__pyx_t_17);
34955 __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
34956 }
34957 __Pyx_XGIVEREF(__pyx_t_12);
34958 __Pyx_XGIVEREF(__pyx_t_13);
34959 __Pyx_XGIVEREF(__pyx_t_14);
34960 __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
34961 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
34962 __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
34963 goto __pyx_L1_error;
34964 }
34965 __pyx_L3_return: {
34966 __pyx_t_17 = __pyx_r;
34967 __pyx_r = 0;
34968 free(__pyx_v_prefix);
34969 __pyx_r = __pyx_t_17;
34970 __pyx_t_17 = 0;
34971 goto __pyx_L0;
34972 }
34973 }
34974
34975 /* "rbd.pyx":3034
34976 * free(image_id)
34977 *
34978 * def block_name_prefix(self): # <<<<<<<<<<<<<<
34979 * """
34980 * Get the RBD block name prefix
34981 */
34982
34983 /* function exit code */
34984 __pyx_L1_error:;
34985 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
34986 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
34987 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
34988 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
34989 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
34990 __Pyx_AddTraceback("rbd.Image.block_name_prefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
34991 __pyx_r = NULL((void*)0);
34992 __pyx_L0:;
34993 __Pyx_XGIVEREF(__pyx_r);
34994 __Pyx_RefNannyFinishContext();
34995 return __pyx_r;
34996}
34997
34998/* "rbd.pyx":3058
34999 * free(prefix)
35000 *
35001 * def data_pool_id(self): # <<<<<<<<<<<<<<
35002 * """
35003 * Get the pool id of the pool where the data of this RBD image is stored.
35004 */
35005
35006/* Python wrapper */
35007static PyObject *__pyx_pw_3rbd_5Image_25data_pool_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
35008static char __pyx_doc_3rbd_5Image_24data_pool_id[] = "Image.data_pool_id(self)\n\n Get the pool id of the pool where the data of this RBD image is stored.\n\n :returns: int - the pool id\n ";
35009static PyObject *__pyx_pw_3rbd_5Image_25data_pool_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
35010 PyObject *__pyx_r = 0;
35011 __Pyx_RefNannyDeclarations
35012 __Pyx_RefNannySetupContext("data_pool_id (wrapper)", 0);
35013 __pyx_r = __pyx_pf_3rbd_5Image_24data_pool_id(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
35014
35015 /* function exit code */
35016 __Pyx_RefNannyFinishContext();
35017 return __pyx_r;
35018}
35019
35020static PyObject *__pyx_pf_3rbd_5Image_24data_pool_id(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
35021 PyObject *__pyx_r = NULL((void*)0);
35022 __Pyx_RefNannyDeclarations
35023 PyObject *__pyx_t_1 = NULL((void*)0);
35024 int __pyx_lineno = 0;
35025 const char *__pyx_filename = NULL((void*)0);
35026 int __pyx_clineno = 0;
35027 __Pyx_RefNannySetupContext("data_pool_id", 0);
35028
35029 /* "rbd.pyx":3064
35030 * :returns: int - the pool id
35031 * """
35032 * return rbd_get_data_pool_id(self.image) # <<<<<<<<<<<<<<
35033 *
35034 * def parent_info(self):
35035 */
35036 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
35037 __pyx_t_1 = __Pyx_PyInt_From_int64_t(rbd_get_data_pool_id(__pyx_v_self->image)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__35037; goto __pyx_L1_error;}
35038 __Pyx_GOTREF(__pyx_t_1);
35039 __pyx_r = __pyx_t_1;
35040 __pyx_t_1 = 0;
35041 goto __pyx_L0;
35042
35043 /* "rbd.pyx":3058
35044 * free(prefix)
35045 *
35046 * def data_pool_id(self): # <<<<<<<<<<<<<<
35047 * """
35048 * Get the pool id of the pool where the data of this RBD image is stored.
35049 */
35050
35051 /* function exit code */
35052 __pyx_L1_error:;
35053 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
35054 __Pyx_AddTraceback("rbd.Image.data_pool_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
35055 __pyx_r = NULL((void*)0);
35056 __pyx_L0:;
35057 __Pyx_XGIVEREF(__pyx_r);
35058 __Pyx_RefNannyFinishContext();
35059 return __pyx_r;
35060}
35061
35062/* "rbd.pyx":3066
35063 * return rbd_get_data_pool_id(self.image)
35064 *
35065 * def parent_info(self): # <<<<<<<<<<<<<<
35066 * """
35067 * Get information about a cloned image's parent (if any)
35068 */
35069
35070/* Python wrapper */
35071static PyObject *__pyx_pw_3rbd_5Image_27parent_info(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
35072static char __pyx_doc_3rbd_5Image_26parent_info[] = "Image.parent_info(self)\n\n Get information about a cloned image's parent (if any)\n\n :returns: tuple - ``(pool name, image name, snapshot name)`` components\n of the parent image\n :raises: :class:`ImageNotFound` if the image doesn't have a parent\n ";
35073static PyObject *__pyx_pw_3rbd_5Image_27parent_info(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
35074 PyObject *__pyx_r = 0;
35075 __Pyx_RefNannyDeclarations
35076 __Pyx_RefNannySetupContext("parent_info (wrapper)", 0);
35077 __pyx_r = __pyx_pf_3rbd_5Image_26parent_info(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
35078
35079 /* function exit code */
35080 __Pyx_RefNannyFinishContext();
35081 return __pyx_r;
35082}
35083
35084static PyObject *__pyx_pf_3rbd_5Image_26parent_info(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
35085 rbd_linked_image_spec_t __pyx_v_parent_spec;
35086 rbd_snap_spec_t __pyx_v_snap_spec;
35087 int __pyx_v_ret;
35088 PyObject *__pyx_v_result = NULL((void*)0);
35089 PyObject *__pyx_r = NULL((void*)0);
35090 __Pyx_RefNannyDeclarations
35091 int __pyx_t_1;
35092 PyObject *__pyx_t_2 = NULL((void*)0);
35093 PyObject *__pyx_t_3 = NULL((void*)0);
35094 PyObject *__pyx_t_4 = NULL((void*)0);
35095 PyObject *__pyx_t_5 = NULL((void*)0);
35096 PyObject *__pyx_t_6 = NULL((void*)0);
35097 PyObject *__pyx_t_7 = NULL((void*)0);
35098 PyObject *__pyx_t_8 = NULL((void*)0);
35099 int __pyx_lineno = 0;
35100 const char *__pyx_filename = NULL((void*)0);
35101 int __pyx_clineno = 0;
35102 __Pyx_RefNannySetupContext("parent_info", 0);
35103
35104 /* "rbd.pyx":3077
35105 * rbd_linked_image_spec_t parent_spec
35106 * rbd_snap_spec_t snap_spec
35107 * with nogil: # <<<<<<<<<<<<<<
35108 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35109 * if ret != 0:
35110 */
35111 {
35112 #ifdef WITH_THREAD1
35113 PyThreadState *_save;
35114 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
35115 #endif
35116 /*try:*/ {
35117
35118 /* "rbd.pyx":3078
35119 * rbd_snap_spec_t snap_spec
35120 * with nogil:
35121 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec) # <<<<<<<<<<<<<<
35122 * if ret != 0:
35123 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35124 */
35125 __pyx_v_ret = rbd_get_parent(__pyx_v_self->image, (&__pyx_v_parent_spec), (&__pyx_v_snap_spec));
35126 }
35127
35128 /* "rbd.pyx":3077
35129 * rbd_linked_image_spec_t parent_spec
35130 * rbd_snap_spec_t snap_spec
35131 * with nogil: # <<<<<<<<<<<<<<
35132 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35133 * if ret != 0:
35134 */
35135 /*finally:*/ {
35136 /*normal exit:*/{
35137 #ifdef WITH_THREAD1
35138 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
35139 #endif
35140 goto __pyx_L5;
35141 }
35142 __pyx_L5:;
35143 }
35144 }
35145
35146 /* "rbd.pyx":3079
35147 * with nogil:
35148 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35149 * if ret != 0: # <<<<<<<<<<<<<<
35150 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35151 *
35152 */
35153 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
35154 if (__pyx_t_1) {
35155
35156 /* "rbd.pyx":3080
35157 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35158 * if ret != 0:
35159 * raise make_ex(ret, 'error getting parent info for image %s' % self.name) # <<<<<<<<<<<<<<
35160 *
35161 * result = (decode_cstr(parent_spec.pool_name),
35162 */
35163 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__35163; goto __pyx_L1_error;}
35164 __Pyx_GOTREF(__pyx_t_2);
35165 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_parent_info_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_parent_info_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__35165; goto __pyx_L1_error;}
35166 __Pyx_GOTREF(__pyx_t_3);
35167 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__35167; goto __pyx_L1_error;}
35168 __Pyx_GOTREF(__pyx_t_4);
35169 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35170 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35171 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
35172 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
35173 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__35173; goto __pyx_L1_error;}
35174
35175 /* "rbd.pyx":3079
35176 * with nogil:
35177 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35178 * if ret != 0: # <<<<<<<<<<<<<<
35179 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35180 *
35181 */
35182 }
35183
35184 /* "rbd.pyx":3082
35185 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35186 *
35187 * result = (decode_cstr(parent_spec.pool_name), # <<<<<<<<<<<<<<
35188 * decode_cstr(parent_spec.image_name),
35189 * decode_cstr(snap_spec.name))
35190 */
35191 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__35191; goto __pyx_L1_error;}
35192 __Pyx_GOTREF(__pyx_t_3);
35193 __pyx_t_2 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_parent_spec.pool_name); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__35193; goto __pyx_L1_error;}
35194 __Pyx_GOTREF(__pyx_t_2);
35195 __pyx_t_5 = NULL((void*)0);
35196 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
35197 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
35198 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
35199 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
35200 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
35201 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
35202 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
35203 }
35204 }
35205 if (!__pyx_t_5) {
35206 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__35206; goto __pyx_L1_error;}
35207 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35208 __Pyx_GOTREF(__pyx_t_4);
35209 } else {
35210 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__35210; goto __pyx_L1_error;}
35211 __Pyx_GOTREF(__pyx_t_6);
35212 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
35213 __Pyx_GIVEREF(__pyx_t_2);
35214 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_2);
35215 __pyx_t_2 = 0;
35216 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__35216; goto __pyx_L1_error;}
35217 __Pyx_GOTREF(__pyx_t_4);
35218 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
35219 }
35220 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35221
35222 /* "rbd.pyx":3083
35223 *
35224 * result = (decode_cstr(parent_spec.pool_name),
35225 * decode_cstr(parent_spec.image_name), # <<<<<<<<<<<<<<
35226 * decode_cstr(snap_spec.name))
35227 *
35228 */
35229 __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__35229; goto __pyx_L1_error;}
35230 __Pyx_GOTREF(__pyx_t_6);
35231 __pyx_t_2 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_parent_spec.image_name); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__35231; goto __pyx_L1_error;}
35232 __Pyx_GOTREF(__pyx_t_2);
35233 __pyx_t_5 = NULL((void*)0);
35234 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
35235 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
35236 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
35237 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
35238 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
35239 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
35240 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
35241 }
35242 }
35243 if (!__pyx_t_5) {
35244 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__35244; goto __pyx_L1_error;}
35245 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35246 __Pyx_GOTREF(__pyx_t_3);
35247 } else {
35248 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__35248; goto __pyx_L1_error;}
35249 __Pyx_GOTREF(__pyx_t_7);
35250 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
35251 __Pyx_GIVEREF(__pyx_t_2);
35252 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_2);
35253 __pyx_t_2 = 0;
35254 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__35254; goto __pyx_L1_error;}
35255 __Pyx_GOTREF(__pyx_t_3);
35256 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
35257 }
35258 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
35259
35260 /* "rbd.pyx":3084
35261 * result = (decode_cstr(parent_spec.pool_name),
35262 * decode_cstr(parent_spec.image_name),
35263 * decode_cstr(snap_spec.name)) # <<<<<<<<<<<<<<
35264 *
35265 * rbd_linked_image_spec_cleanup(&parent_spec)
35266 */
35267 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__35267; goto __pyx_L1_error;}
35268 __Pyx_GOTREF(__pyx_t_7);
35269 __pyx_t_2 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_snap_spec.name); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__35269; goto __pyx_L1_error;}
35270 __Pyx_GOTREF(__pyx_t_2);
35271 __pyx_t_5 = NULL((void*)0);
35272 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_7))__builtin_expect(!!(((__pyx_t_7)->ob_type == &PyMethod_Type
)), 0)
) {
35273 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7)(((PyMethodObject *)__pyx_t_7) -> im_self);
35274 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
35275 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7)(((PyMethodObject *)__pyx_t_7) -> im_func);
35276 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
35277 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
35278 __Pyx_DECREF_SET(__pyx_t_7, function)do { PyObject *tmp = (PyObject *) __pyx_t_7; __pyx_t_7 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
35279 }
35280 }
35281 if (!__pyx_t_5) {
35282 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__35282; goto __pyx_L1_error;}
35283 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35284 __Pyx_GOTREF(__pyx_t_6);
35285 } else {
35286 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__35286; goto __pyx_L1_error;}
35287 __Pyx_GOTREF(__pyx_t_8);
35288 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
35289 __Pyx_GIVEREF(__pyx_t_2);
35290 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_2);
35291 __pyx_t_2 = 0;
35292 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__35292; goto __pyx_L1_error;}
35293 __Pyx_GOTREF(__pyx_t_6);
35294 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
35295 }
35296 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
35297
35298 /* "rbd.pyx":3082
35299 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35300 *
35301 * result = (decode_cstr(parent_spec.pool_name), # <<<<<<<<<<<<<<
35302 * decode_cstr(parent_spec.image_name),
35303 * decode_cstr(snap_spec.name))
35304 */
35305 __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__35305; goto __pyx_L1_error;}
35306 __Pyx_GOTREF(__pyx_t_7);
35307 __Pyx_GIVEREF(__pyx_t_4);
35308 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_4);
35309 __Pyx_GIVEREF(__pyx_t_3);
35310 PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[1] = __pyx_t_3);
35311 __Pyx_GIVEREF(__pyx_t_6);
35312 PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[2] = __pyx_t_6);
35313 __pyx_t_4 = 0;
35314 __pyx_t_3 = 0;
35315 __pyx_t_6 = 0;
35316 __pyx_v_result = ((PyObject*)__pyx_t_7);
35317 __pyx_t_7 = 0;
35318
35319 /* "rbd.pyx":3086
35320 * decode_cstr(snap_spec.name))
35321 *
35322 * rbd_linked_image_spec_cleanup(&parent_spec) # <<<<<<<<<<<<<<
35323 * rbd_snap_spec_cleanup(&snap_spec)
35324 * return result
35325 */
35326 rbd_linked_image_spec_cleanup((&__pyx_v_parent_spec));
35327
35328 /* "rbd.pyx":3087
35329 *
35330 * rbd_linked_image_spec_cleanup(&parent_spec)
35331 * rbd_snap_spec_cleanup(&snap_spec) # <<<<<<<<<<<<<<
35332 * return result
35333 *
35334 */
35335 rbd_snap_spec_cleanup((&__pyx_v_snap_spec));
35336
35337 /* "rbd.pyx":3088
35338 * rbd_linked_image_spec_cleanup(&parent_spec)
35339 * rbd_snap_spec_cleanup(&snap_spec)
35340 * return result # <<<<<<<<<<<<<<
35341 *
35342 * def parent_id(self):
35343 */
35344 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
35345 __Pyx_INCREF(__pyx_v_result)( ((PyObject*)(__pyx_v_result))->ob_refcnt++);
35346 __pyx_r = __pyx_v_result;
35347 goto __pyx_L0;
35348
35349 /* "rbd.pyx":3066
35350 * return rbd_get_data_pool_id(self.image)
35351 *
35352 * def parent_info(self): # <<<<<<<<<<<<<<
35353 * """
35354 * Get information about a cloned image's parent (if any)
35355 */
35356
35357 /* function exit code */
35358 __pyx_L1_error:;
35359 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
35360 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
35361 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
35362 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
35363 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
35364 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
35365 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
35366 __Pyx_AddTraceback("rbd.Image.parent_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
35367 __pyx_r = NULL((void*)0);
35368 __pyx_L0:;
35369 __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while
(0); } while (0)
;
35370 __Pyx_XGIVEREF(__pyx_r);
35371 __Pyx_RefNannyFinishContext();
35372 return __pyx_r;
35373}
35374
35375/* "rbd.pyx":3090
35376 * return result
35377 *
35378 * def parent_id(self): # <<<<<<<<<<<<<<
35379 * """
35380 * Get image id of a cloned image's parent (if any)
35381 */
35382
35383/* Python wrapper */
35384static PyObject *__pyx_pw_3rbd_5Image_29parent_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
35385static char __pyx_doc_3rbd_5Image_28parent_id[] = "Image.parent_id(self)\n\n Get image id of a cloned image's parent (if any)\n\n :returns: str - the parent id\n :raises: :class:`ImageNotFound` if the image doesn't have a parent\n ";
35386static PyObject *__pyx_pw_3rbd_5Image_29parent_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
35387 PyObject *__pyx_r = 0;
35388 __Pyx_RefNannyDeclarations
35389 __Pyx_RefNannySetupContext("parent_id (wrapper)", 0);
35390 __pyx_r = __pyx_pf_3rbd_5Image_28parent_id(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
35391
35392 /* function exit code */
35393 __Pyx_RefNannyFinishContext();
35394 return __pyx_r;
35395}
35396
35397static PyObject *__pyx_pf_3rbd_5Image_28parent_id(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
35398 rbd_linked_image_spec_t __pyx_v_parent_spec;
35399 rbd_snap_spec_t __pyx_v_snap_spec;
35400 int __pyx_v_ret;
35401 PyObject *__pyx_v_result = NULL((void*)0);
35402 PyObject *__pyx_r = NULL((void*)0);
35403 __Pyx_RefNannyDeclarations
35404 int __pyx_t_1;
35405 PyObject *__pyx_t_2 = NULL((void*)0);
35406 PyObject *__pyx_t_3 = NULL((void*)0);
35407 PyObject *__pyx_t_4 = NULL((void*)0);
35408 PyObject *__pyx_t_5 = NULL((void*)0);
35409 PyObject *__pyx_t_6 = NULL((void*)0);
35410 int __pyx_lineno = 0;
35411 const char *__pyx_filename = NULL((void*)0);
35412 int __pyx_clineno = 0;
35413 __Pyx_RefNannySetupContext("parent_id", 0);
35414
35415 /* "rbd.pyx":3100
35416 * rbd_linked_image_spec_t parent_spec
35417 * rbd_snap_spec_t snap_spec
35418 * with nogil: # <<<<<<<<<<<<<<
35419 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35420 * if ret != 0:
35421 */
35422 {
35423 #ifdef WITH_THREAD1
35424 PyThreadState *_save;
35425 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
35426 #endif
35427 /*try:*/ {
35428
35429 /* "rbd.pyx":3101
35430 * rbd_snap_spec_t snap_spec
35431 * with nogil:
35432 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec) # <<<<<<<<<<<<<<
35433 * if ret != 0:
35434 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35435 */
35436 __pyx_v_ret = rbd_get_parent(__pyx_v_self->image, (&__pyx_v_parent_spec), (&__pyx_v_snap_spec));
35437 }
35438
35439 /* "rbd.pyx":3100
35440 * rbd_linked_image_spec_t parent_spec
35441 * rbd_snap_spec_t snap_spec
35442 * with nogil: # <<<<<<<<<<<<<<
35443 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35444 * if ret != 0:
35445 */
35446 /*finally:*/ {
35447 /*normal exit:*/{
35448 #ifdef WITH_THREAD1
35449 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
35450 #endif
35451 goto __pyx_L5;
35452 }
35453 __pyx_L5:;
35454 }
35455 }
35456
35457 /* "rbd.pyx":3102
35458 * with nogil:
35459 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35460 * if ret != 0: # <<<<<<<<<<<<<<
35461 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35462 *
35463 */
35464 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
35465 if (__pyx_t_1) {
35466
35467 /* "rbd.pyx":3103
35468 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35469 * if ret != 0:
35470 * raise make_ex(ret, 'error getting parent info for image %s' % self.name) # <<<<<<<<<<<<<<
35471 *
35472 * result = decode_cstr(parent_spec.image_id)
35473 */
35474 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__35474; goto __pyx_L1_error;}
35475 __Pyx_GOTREF(__pyx_t_2);
35476 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_parent_info_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_parent_info_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__35476; goto __pyx_L1_error;}
35477 __Pyx_GOTREF(__pyx_t_3);
35478 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__35478; goto __pyx_L1_error;}
35479 __Pyx_GOTREF(__pyx_t_4);
35480 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35481 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35482 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
35483 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
35484 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__35484; goto __pyx_L1_error;}
35485
35486 /* "rbd.pyx":3102
35487 * with nogil:
35488 * ret = rbd_get_parent(self.image, &parent_spec, &snap_spec)
35489 * if ret != 0: # <<<<<<<<<<<<<<
35490 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35491 *
35492 */
35493 }
35494
35495 /* "rbd.pyx":3105
35496 * raise make_ex(ret, 'error getting parent info for image %s' % self.name)
35497 *
35498 * result = decode_cstr(parent_spec.image_id) # <<<<<<<<<<<<<<
35499 *
35500 * rbd_linked_image_spec_cleanup(&parent_spec)
35501 */
35502 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__35502; goto __pyx_L1_error;}
35503 __Pyx_GOTREF(__pyx_t_3);
35504 __pyx_t_2 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_parent_spec.image_id); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__35504; goto __pyx_L1_error;}
35505 __Pyx_GOTREF(__pyx_t_2);
35506 __pyx_t_5 = NULL((void*)0);
35507 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
35508 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
35509 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
35510 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
35511 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
35512 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
35513 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
35514 }
35515 }
35516 if (!__pyx_t_5) {
35517 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__35517; goto __pyx_L1_error;}
35518 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35519 __Pyx_GOTREF(__pyx_t_4);
35520 } else {
35521 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__35521; goto __pyx_L1_error;}
35522 __Pyx_GOTREF(__pyx_t_6);
35523 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
35524 __Pyx_GIVEREF(__pyx_t_2);
35525 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_2);
35526 __pyx_t_2 = 0;
35527 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__35527; goto __pyx_L1_error;}
35528 __Pyx_GOTREF(__pyx_t_4);
35529 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
35530 }
35531 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35532 __pyx_v_result = __pyx_t_4;
35533 __pyx_t_4 = 0;
35534
35535 /* "rbd.pyx":3107
35536 * result = decode_cstr(parent_spec.image_id)
35537 *
35538 * rbd_linked_image_spec_cleanup(&parent_spec) # <<<<<<<<<<<<<<
35539 * rbd_snap_spec_cleanup(&snap_spec)
35540 * return result
35541 */
35542 rbd_linked_image_spec_cleanup((&__pyx_v_parent_spec));
35543
35544 /* "rbd.pyx":3108
35545 *
35546 * rbd_linked_image_spec_cleanup(&parent_spec)
35547 * rbd_snap_spec_cleanup(&snap_spec) # <<<<<<<<<<<<<<
35548 * return result
35549 *
35550 */
35551 rbd_snap_spec_cleanup((&__pyx_v_snap_spec));
35552
35553 /* "rbd.pyx":3109
35554 * rbd_linked_image_spec_cleanup(&parent_spec)
35555 * rbd_snap_spec_cleanup(&snap_spec)
35556 * return result # <<<<<<<<<<<<<<
35557 *
35558 * def old_format(self):
35559 */
35560 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
35561 __Pyx_INCREF(__pyx_v_result)( ((PyObject*)(__pyx_v_result))->ob_refcnt++);
35562 __pyx_r = __pyx_v_result;
35563 goto __pyx_L0;
35564
35565 /* "rbd.pyx":3090
35566 * return result
35567 *
35568 * def parent_id(self): # <<<<<<<<<<<<<<
35569 * """
35570 * Get image id of a cloned image's parent (if any)
35571 */
35572
35573 /* function exit code */
35574 __pyx_L1_error:;
35575 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
35576 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
35577 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
35578 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
35579 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
35580 __Pyx_AddTraceback("rbd.Image.parent_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
35581 __pyx_r = NULL((void*)0);
35582 __pyx_L0:;
35583 __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while
(0); } while (0)
;
35584 __Pyx_XGIVEREF(__pyx_r);
35585 __Pyx_RefNannyFinishContext();
35586 return __pyx_r;
35587}
35588
35589/* "rbd.pyx":3111
35590 * return result
35591 *
35592 * def old_format(self): # <<<<<<<<<<<<<<
35593 * """
35594 * Find out whether the image uses the old RBD format.
35595 */
35596
35597/* Python wrapper */
35598static PyObject *__pyx_pw_3rbd_5Image_31old_format(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
35599static char __pyx_doc_3rbd_5Image_30old_format[] = "Image.old_format(self)\n\n Find out whether the image uses the old RBD format.\n\n :returns: bool - whether the image uses the old RBD format\n ";
35600static PyObject *__pyx_pw_3rbd_5Image_31old_format(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
35601 PyObject *__pyx_r = 0;
35602 __Pyx_RefNannyDeclarations
35603 __Pyx_RefNannySetupContext("old_format (wrapper)", 0);
35604 __pyx_r = __pyx_pf_3rbd_5Image_30old_format(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
35605
35606 /* function exit code */
35607 __Pyx_RefNannyFinishContext();
35608 return __pyx_r;
35609}
35610
35611static PyObject *__pyx_pf_3rbd_5Image_30old_format(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
35612 uint8_t __pyx_v_old;
35613 int __pyx_v_ret;
35614 PyObject *__pyx_r = NULL((void*)0);
35615 __Pyx_RefNannyDeclarations
35616 int __pyx_t_1;
35617 PyObject *__pyx_t_2 = NULL((void*)0);
35618 PyObject *__pyx_t_3 = NULL((void*)0);
35619 PyObject *__pyx_t_4 = NULL((void*)0);
35620 int __pyx_lineno = 0;
35621 const char *__pyx_filename = NULL((void*)0);
35622 int __pyx_clineno = 0;
35623 __Pyx_RefNannySetupContext("old_format", 0);
35624
35625 /* "rbd.pyx":3118
35626 * """
35627 * cdef uint8_t old
35628 * with nogil: # <<<<<<<<<<<<<<
35629 * ret = rbd_get_old_format(self.image, &old)
35630 * if ret != 0:
35631 */
35632 {
35633 #ifdef WITH_THREAD1
35634 PyThreadState *_save;
35635 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
35636 #endif
35637 /*try:*/ {
35638
35639 /* "rbd.pyx":3119
35640 * cdef uint8_t old
35641 * with nogil:
35642 * ret = rbd_get_old_format(self.image, &old) # <<<<<<<<<<<<<<
35643 * if ret != 0:
35644 * raise make_ex(ret, 'error getting old_format for image %s' % (self.name))
35645 */
35646 __pyx_v_ret = rbd_get_old_format(__pyx_v_self->image, (&__pyx_v_old));
35647 }
35648
35649 /* "rbd.pyx":3118
35650 * """
35651 * cdef uint8_t old
35652 * with nogil: # <<<<<<<<<<<<<<
35653 * ret = rbd_get_old_format(self.image, &old)
35654 * if ret != 0:
35655 */
35656 /*finally:*/ {
35657 /*normal exit:*/{
35658 #ifdef WITH_THREAD1
35659 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
35660 #endif
35661 goto __pyx_L5;
35662 }
35663 __pyx_L5:;
35664 }
35665 }
35666
35667 /* "rbd.pyx":3120
35668 * with nogil:
35669 * ret = rbd_get_old_format(self.image, &old)
35670 * if ret != 0: # <<<<<<<<<<<<<<
35671 * raise make_ex(ret, 'error getting old_format for image %s' % (self.name))
35672 * return old != 0
35673 */
35674 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
35675 if (__pyx_t_1) {
35676
35677 /* "rbd.pyx":3121
35678 * ret = rbd_get_old_format(self.image, &old)
35679 * if ret != 0:
35680 * raise make_ex(ret, 'error getting old_format for image %s' % (self.name)) # <<<<<<<<<<<<<<
35681 * return old != 0
35682 *
35683 */
35684 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__35684; goto __pyx_L1_error;}
35685 __Pyx_GOTREF(__pyx_t_2);
35686 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_old_format_for_ima, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_old_format_for_ima, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__35686; goto __pyx_L1_error;}
35687 __Pyx_GOTREF(__pyx_t_3);
35688 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__35688; goto __pyx_L1_error;}
35689 __Pyx_GOTREF(__pyx_t_4);
35690 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35691 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35692 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
35693 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
35694 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3121; __pyx_clineno = __LINE__35694; goto __pyx_L1_error;}
35695
35696 /* "rbd.pyx":3120
35697 * with nogil:
35698 * ret = rbd_get_old_format(self.image, &old)
35699 * if ret != 0: # <<<<<<<<<<<<<<
35700 * raise make_ex(ret, 'error getting old_format for image %s' % (self.name))
35701 * return old != 0
35702 */
35703 }
35704
35705 /* "rbd.pyx":3122
35706 * if ret != 0:
35707 * raise make_ex(ret, 'error getting old_format for image %s' % (self.name))
35708 * return old != 0 # <<<<<<<<<<<<<<
35709 *
35710 * def size(self):
35711 */
35712 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
35713 __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_old != 0))(((__pyx_v_old != 0)) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct
)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (
( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; __pyx_clineno = __LINE__35713; goto __pyx_L1_error;}
35714 __Pyx_GOTREF(__pyx_t_4);
35715 __pyx_r = __pyx_t_4;
35716 __pyx_t_4 = 0;
35717 goto __pyx_L0;
35718
35719 /* "rbd.pyx":3111
35720 * return result
35721 *
35722 * def old_format(self): # <<<<<<<<<<<<<<
35723 * """
35724 * Find out whether the image uses the old RBD format.
35725 */
35726
35727 /* function exit code */
35728 __pyx_L1_error:;
35729 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
35730 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
35731 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
35732 __Pyx_AddTraceback("rbd.Image.old_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
35733 __pyx_r = NULL((void*)0);
35734 __pyx_L0:;
35735 __Pyx_XGIVEREF(__pyx_r);
35736 __Pyx_RefNannyFinishContext();
35737 return __pyx_r;
35738}
35739
35740/* "rbd.pyx":3124
35741 * return old != 0
35742 *
35743 * def size(self): # <<<<<<<<<<<<<<
35744 * """
35745 * Get the size of the image. If open to a snapshot, returns the
35746 */
35747
35748/* Python wrapper */
35749static PyObject *__pyx_pw_3rbd_5Image_33size(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
35750static char __pyx_doc_3rbd_5Image_32size[] = "Image.size(self)\n\n Get the size of the image. If open to a snapshot, returns the\n size of that snapshot.\n\n :returns: int - the size of the image in bytes\n ";
35751static PyObject *__pyx_pw_3rbd_5Image_33size(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
35752 PyObject *__pyx_r = 0;
35753 __Pyx_RefNannyDeclarations
35754 __Pyx_RefNannySetupContext("size (wrapper)", 0);
35755 __pyx_r = __pyx_pf_3rbd_5Image_32size(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
35756
35757 /* function exit code */
35758 __Pyx_RefNannyFinishContext();
35759 return __pyx_r;
35760}
35761
35762static PyObject *__pyx_pf_3rbd_5Image_32size(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
35763 uint64_t __pyx_v_image_size;
35764 int __pyx_v_ret;
35765 PyObject *__pyx_r = NULL((void*)0);
35766 __Pyx_RefNannyDeclarations
35767 int __pyx_t_1;
35768 PyObject *__pyx_t_2 = NULL((void*)0);
35769 PyObject *__pyx_t_3 = NULL((void*)0);
35770 PyObject *__pyx_t_4 = NULL((void*)0);
35771 int __pyx_lineno = 0;
35772 const char *__pyx_filename = NULL((void*)0);
35773 int __pyx_clineno = 0;
35774 __Pyx_RefNannySetupContext("size", 0);
35775
35776 /* "rbd.pyx":3132
35777 * """
35778 * cdef uint64_t image_size
35779 * with nogil: # <<<<<<<<<<<<<<
35780 * ret = rbd_get_size(self.image, &image_size)
35781 * if ret != 0:
35782 */
35783 {
35784 #ifdef WITH_THREAD1
35785 PyThreadState *_save;
35786 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
35787 #endif
35788 /*try:*/ {
35789
35790 /* "rbd.pyx":3133
35791 * cdef uint64_t image_size
35792 * with nogil:
35793 * ret = rbd_get_size(self.image, &image_size) # <<<<<<<<<<<<<<
35794 * if ret != 0:
35795 * raise make_ex(ret, 'error getting size for image %s' % (self.name))
35796 */
35797 __pyx_v_ret = rbd_get_size(__pyx_v_self->image, (&__pyx_v_image_size));
35798 }
35799
35800 /* "rbd.pyx":3132
35801 * """
35802 * cdef uint64_t image_size
35803 * with nogil: # <<<<<<<<<<<<<<
35804 * ret = rbd_get_size(self.image, &image_size)
35805 * if ret != 0:
35806 */
35807 /*finally:*/ {
35808 /*normal exit:*/{
35809 #ifdef WITH_THREAD1
35810 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
35811 #endif
35812 goto __pyx_L5;
35813 }
35814 __pyx_L5:;
35815 }
35816 }
35817
35818 /* "rbd.pyx":3134
35819 * with nogil:
35820 * ret = rbd_get_size(self.image, &image_size)
35821 * if ret != 0: # <<<<<<<<<<<<<<
35822 * raise make_ex(ret, 'error getting size for image %s' % (self.name))
35823 * return image_size
35824 */
35825 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
35826 if (__pyx_t_1) {
35827
35828 /* "rbd.pyx":3135
35829 * ret = rbd_get_size(self.image, &image_size)
35830 * if ret != 0:
35831 * raise make_ex(ret, 'error getting size for image %s' % (self.name)) # <<<<<<<<<<<<<<
35832 * return image_size
35833 *
35834 */
35835 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__35835; goto __pyx_L1_error;}
35836 __Pyx_GOTREF(__pyx_t_2);
35837 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_size_for_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_size_for_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__35837; goto __pyx_L1_error;}
35838 __Pyx_GOTREF(__pyx_t_3);
35839 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__35839; goto __pyx_L1_error;}
35840 __Pyx_GOTREF(__pyx_t_4);
35841 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35842 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35843 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
35844 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
35845 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3135; __pyx_clineno = __LINE__35845; goto __pyx_L1_error;}
35846
35847 /* "rbd.pyx":3134
35848 * with nogil:
35849 * ret = rbd_get_size(self.image, &image_size)
35850 * if ret != 0: # <<<<<<<<<<<<<<
35851 * raise make_ex(ret, 'error getting size for image %s' % (self.name))
35852 * return image_size
35853 */
35854 }
35855
35856 /* "rbd.pyx":3136
35857 * if ret != 0:
35858 * raise make_ex(ret, 'error getting size for image %s' % (self.name))
35859 * return image_size # <<<<<<<<<<<<<<
35860 *
35861 * def features(self):
35862 */
35863 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
35864 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_image_size); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__35864; goto __pyx_L1_error;}
35865 __Pyx_GOTREF(__pyx_t_4);
35866 __pyx_r = __pyx_t_4;
35867 __pyx_t_4 = 0;
35868 goto __pyx_L0;
35869
35870 /* "rbd.pyx":3124
35871 * return old != 0
35872 *
35873 * def size(self): # <<<<<<<<<<<<<<
35874 * """
35875 * Get the size of the image. If open to a snapshot, returns the
35876 */
35877
35878 /* function exit code */
35879 __pyx_L1_error:;
35880 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
35881 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
35882 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
35883 __Pyx_AddTraceback("rbd.Image.size", __pyx_clineno, __pyx_lineno, __pyx_filename);
35884 __pyx_r = NULL((void*)0);
35885 __pyx_L0:;
35886 __Pyx_XGIVEREF(__pyx_r);
35887 __Pyx_RefNannyFinishContext();
35888 return __pyx_r;
35889}
35890
35891/* "rbd.pyx":3138
35892 * return image_size
35893 *
35894 * def features(self): # <<<<<<<<<<<<<<
35895 * """
35896 * Get the features bitmask of the image.
35897 */
35898
35899/* Python wrapper */
35900static PyObject *__pyx_pw_3rbd_5Image_35features(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
35901static char __pyx_doc_3rbd_5Image_34features[] = "Image.features(self)\n\n Get the features bitmask of the image.\n\n :returns: int - the features bitmask of the image\n ";
35902static PyObject *__pyx_pw_3rbd_5Image_35features(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
35903 PyObject *__pyx_r = 0;
35904 __Pyx_RefNannyDeclarations
35905 __Pyx_RefNannySetupContext("features (wrapper)", 0);
35906 __pyx_r = __pyx_pf_3rbd_5Image_34features(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
35907
35908 /* function exit code */
35909 __Pyx_RefNannyFinishContext();
35910 return __pyx_r;
35911}
35912
35913static PyObject *__pyx_pf_3rbd_5Image_34features(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
35914 uint64_t __pyx_v_features;
35915 int __pyx_v_ret;
35916 PyObject *__pyx_r = NULL((void*)0);
35917 __Pyx_RefNannyDeclarations
35918 int __pyx_t_1;
35919 PyObject *__pyx_t_2 = NULL((void*)0);
35920 PyObject *__pyx_t_3 = NULL((void*)0);
35921 PyObject *__pyx_t_4 = NULL((void*)0);
35922 int __pyx_lineno = 0;
35923 const char *__pyx_filename = NULL((void*)0);
35924 int __pyx_clineno = 0;
35925 __Pyx_RefNannySetupContext("features", 0);
35926
35927 /* "rbd.pyx":3145
35928 * """
35929 * cdef uint64_t features
35930 * with nogil: # <<<<<<<<<<<<<<
35931 * ret = rbd_get_features(self.image, &features)
35932 * if ret != 0:
35933 */
35934 {
35935 #ifdef WITH_THREAD1
35936 PyThreadState *_save;
35937 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
35938 #endif
35939 /*try:*/ {
35940
35941 /* "rbd.pyx":3146
35942 * cdef uint64_t features
35943 * with nogil:
35944 * ret = rbd_get_features(self.image, &features) # <<<<<<<<<<<<<<
35945 * if ret != 0:
35946 * raise make_ex(ret, 'error getting features for image %s' % (self.name))
35947 */
35948 __pyx_v_ret = rbd_get_features(__pyx_v_self->image, (&__pyx_v_features));
35949 }
35950
35951 /* "rbd.pyx":3145
35952 * """
35953 * cdef uint64_t features
35954 * with nogil: # <<<<<<<<<<<<<<
35955 * ret = rbd_get_features(self.image, &features)
35956 * if ret != 0:
35957 */
35958 /*finally:*/ {
35959 /*normal exit:*/{
35960 #ifdef WITH_THREAD1
35961 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
35962 #endif
35963 goto __pyx_L5;
35964 }
35965 __pyx_L5:;
35966 }
35967 }
35968
35969 /* "rbd.pyx":3147
35970 * with nogil:
35971 * ret = rbd_get_features(self.image, &features)
35972 * if ret != 0: # <<<<<<<<<<<<<<
35973 * raise make_ex(ret, 'error getting features for image %s' % (self.name))
35974 * return features
35975 */
35976 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
35977 if (__pyx_t_1) {
35978
35979 /* "rbd.pyx":3148
35980 * ret = rbd_get_features(self.image, &features)
35981 * if ret != 0:
35982 * raise make_ex(ret, 'error getting features for image %s' % (self.name)) # <<<<<<<<<<<<<<
35983 * return features
35984 *
35985 */
35986 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__35986; goto __pyx_L1_error;}
35987 __Pyx_GOTREF(__pyx_t_2);
35988 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_features_for_image, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_features_for_image, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__35988; goto __pyx_L1_error;}
35989 __Pyx_GOTREF(__pyx_t_3);
35990 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__35990; goto __pyx_L1_error;}
35991 __Pyx_GOTREF(__pyx_t_4);
35992 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
35993 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
35994 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
35995 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
35996 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__35996; goto __pyx_L1_error;}
35997
35998 /* "rbd.pyx":3147
35999 * with nogil:
36000 * ret = rbd_get_features(self.image, &features)
36001 * if ret != 0: # <<<<<<<<<<<<<<
36002 * raise make_ex(ret, 'error getting features for image %s' % (self.name))
36003 * return features
36004 */
36005 }
36006
36007 /* "rbd.pyx":3149
36008 * if ret != 0:
36009 * raise make_ex(ret, 'error getting features for image %s' % (self.name))
36010 * return features # <<<<<<<<<<<<<<
36011 *
36012 * def update_features(self, features, enabled):
36013 */
36014 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
36015 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_features); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__36015; goto __pyx_L1_error;}
36016 __Pyx_GOTREF(__pyx_t_4);
36017 __pyx_r = __pyx_t_4;
36018 __pyx_t_4 = 0;
36019 goto __pyx_L0;
36020
36021 /* "rbd.pyx":3138
36022 * return image_size
36023 *
36024 * def features(self): # <<<<<<<<<<<<<<
36025 * """
36026 * Get the features bitmask of the image.
36027 */
36028
36029 /* function exit code */
36030 __pyx_L1_error:;
36031 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
36032 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
36033 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
36034 __Pyx_AddTraceback("rbd.Image.features", __pyx_clineno, __pyx_lineno, __pyx_filename);
36035 __pyx_r = NULL((void*)0);
36036 __pyx_L0:;
36037 __Pyx_XGIVEREF(__pyx_r);
36038 __Pyx_RefNannyFinishContext();
36039 return __pyx_r;
36040}
36041
36042/* "rbd.pyx":3151
36043 * return features
36044 *
36045 * def update_features(self, features, enabled): # <<<<<<<<<<<<<<
36046 * """
36047 * Update the features bitmask of the image by enabling/disabling
36048 */
36049
36050/* Python wrapper */
36051static PyObject *__pyx_pw_3rbd_5Image_37update_features(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
36052static char __pyx_doc_3rbd_5Image_36update_features[] = "Image.update_features(self, features, enabled)\n\n Update the features bitmask of the image by enabling/disabling\n a single feature. The feature must support the ability to be\n dynamically enabled/disabled.\n\n :param features: feature bitmask to enable/disable\n :type features: int\n :param enabled: whether to enable/disable the feature\n :type enabled: bool\n :raises: :class:`InvalidArgument`\n ";
36053static PyObject *__pyx_pw_3rbd_5Image_37update_features(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
36054 PyObject *__pyx_v_features = 0;
36055 PyObject *__pyx_v_enabled = 0;
36056 int __pyx_lineno = 0;
36057 const char *__pyx_filename = NULL((void*)0);
36058 int __pyx_clineno = 0;
36059 PyObject *__pyx_r = 0;
36060 __Pyx_RefNannyDeclarations
36061 __Pyx_RefNannySetupContext("update_features (wrapper)", 0);
36062 {
36063 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_features,&__pyx_n_s_enabled,0};
36064 PyObject* values[2] = {0,0};
36065 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
36066 Py_ssize_t kw_args;
36067 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
36068 switch (pos_args) {
36069 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
36070 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
36071 case 0: break;
36072 default: goto __pyx_L5_argtuple_error;
36073 }
36074 kw_args = PyDict_Size(__pyx_kwds);
36075 switch (pos_args) {
36076 case 0:
36077 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features
)) != 0), 1)
) kw_args--;
36078 else goto __pyx_L5_argtuple_error;
36079 case 1:
36080 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enabled)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enabled
)) != 0), 1)
) kw_args--;
36081 else {
36082 __Pyx_RaiseArgtupleInvalid("update_features", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3151; __pyx_clineno = __LINE__36082; goto __pyx_L3_error;}
36083 }
36084 }
36085 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
36086 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_features") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "update_features") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3151; __pyx_clineno = __LINE__36086; goto __pyx_L3_error;}
36087 }
36088 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
36089 goto __pyx_L5_argtuple_error;
36090 } else {
36091 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
36092 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
36093 }
36094 __pyx_v_features = values[0];
36095 __pyx_v_enabled = values[1];
36096 }
36097 goto __pyx_L4_argument_unpacking_done;
36098 __pyx_L5_argtuple_error:;
36099 __Pyx_RaiseArgtupleInvalid("update_features", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3151; __pyx_clineno = __LINE__36099; goto __pyx_L3_error;}
36100 __pyx_L3_error:;
36101 __Pyx_AddTraceback("rbd.Image.update_features", __pyx_clineno, __pyx_lineno, __pyx_filename);
36102 __Pyx_RefNannyFinishContext();
36103 return NULL((void*)0);
36104 __pyx_L4_argument_unpacking_done:;
36105 __pyx_r = __pyx_pf_3rbd_5Image_36update_features(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_features, __pyx_v_enabled);
36106
36107 /* function exit code */
36108 __Pyx_RefNannyFinishContext();
36109 return __pyx_r;
36110}
36111
36112static PyObject *__pyx_pf_3rbd_5Image_36update_features(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_features, PyObject *__pyx_v_enabled) {
36113 uint64_t __pyx_v__features;
36114 uint8_t __pyx_v__enabled;
36115 int __pyx_v_ret;
36116 PyObject *__pyx_r = NULL((void*)0);
36117 __Pyx_RefNannyDeclarations
36118 uint64_t __pyx_t_1;
36119 int __pyx_t_2;
36120 PyObject *__pyx_t_3 = NULL((void*)0);
36121 PyObject *__pyx_t_4 = NULL((void*)0);
36122 PyObject *__pyx_t_5 = NULL((void*)0);
36123 int __pyx_lineno = 0;
36124 const char *__pyx_filename = NULL((void*)0);
36125 int __pyx_clineno = 0;
36126 __Pyx_RefNannySetupContext("update_features", 0);
36127
36128 /* "rbd.pyx":3164
36129 * """
36130 * cdef:
36131 * uint64_t _features = features # <<<<<<<<<<<<<<
36132 * uint8_t _enabled = bool(enabled)
36133 * with nogil:
36134 */
36135 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_features); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; __pyx_clineno = __LINE__36135; goto __pyx_L1_error;}
36136 __pyx_v__features = __pyx_t_1;
36137
36138 /* "rbd.pyx":3165
36139 * cdef:
36140 * uint64_t _features = features
36141 * uint8_t _enabled = bool(enabled) # <<<<<<<<<<<<<<
36142 * with nogil:
36143 * ret = rbd_update_features(self.image, _features, _enabled)
36144 */
36145 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__36145; goto __pyx_L1_error;}
36146 __pyx_v__enabled = (!(!__pyx_t_2));
36147
36148 /* "rbd.pyx":3166
36149 * uint64_t _features = features
36150 * uint8_t _enabled = bool(enabled)
36151 * with nogil: # <<<<<<<<<<<<<<
36152 * ret = rbd_update_features(self.image, _features, _enabled)
36153 * if ret != 0:
36154 */
36155 {
36156 #ifdef WITH_THREAD1
36157 PyThreadState *_save;
36158 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
36159 #endif
36160 /*try:*/ {
36161
36162 /* "rbd.pyx":3167
36163 * uint8_t _enabled = bool(enabled)
36164 * with nogil:
36165 * ret = rbd_update_features(self.image, _features, _enabled) # <<<<<<<<<<<<<<
36166 * if ret != 0:
36167 * raise make_ex(ret, 'error updating features for image %s' %
36168 */
36169 __pyx_v_ret = rbd_update_features(__pyx_v_self->image, __pyx_v__features, __pyx_v__enabled);
36170 }
36171
36172 /* "rbd.pyx":3166
36173 * uint64_t _features = features
36174 * uint8_t _enabled = bool(enabled)
36175 * with nogil: # <<<<<<<<<<<<<<
36176 * ret = rbd_update_features(self.image, _features, _enabled)
36177 * if ret != 0:
36178 */
36179 /*finally:*/ {
36180 /*normal exit:*/{
36181 #ifdef WITH_THREAD1
36182 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
36183 #endif
36184 goto __pyx_L5;
36185 }
36186 __pyx_L5:;
36187 }
36188 }
36189
36190 /* "rbd.pyx":3168
36191 * with nogil:
36192 * ret = rbd_update_features(self.image, _features, _enabled)
36193 * if ret != 0: # <<<<<<<<<<<<<<
36194 * raise make_ex(ret, 'error updating features for image %s' %
36195 * (self.name))
36196 */
36197 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
36198 if (__pyx_t_2) {
36199
36200 /* "rbd.pyx":3169
36201 * ret = rbd_update_features(self.image, _features, _enabled)
36202 * if ret != 0:
36203 * raise make_ex(ret, 'error updating features for image %s' % # <<<<<<<<<<<<<<
36204 * (self.name))
36205 *
36206 */
36207 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__36207; goto __pyx_L1_error;}
36208 __Pyx_GOTREF(__pyx_t_3);
36209
36210 /* "rbd.pyx":3170
36211 * if ret != 0:
36212 * raise make_ex(ret, 'error updating features for image %s' %
36213 * (self.name)) # <<<<<<<<<<<<<<
36214 *
36215 * def op_features(self):
36216 */
36217 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_updating_features_for_imag, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_updating_features_for_imag, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__36217; goto __pyx_L1_error;}
36218 __Pyx_GOTREF(__pyx_t_4);
36219
36220 /* "rbd.pyx":3169
36221 * ret = rbd_update_features(self.image, _features, _enabled)
36222 * if ret != 0:
36223 * raise make_ex(ret, 'error updating features for image %s' % # <<<<<<<<<<<<<<
36224 * (self.name))
36225 *
36226 */
36227 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__36227; goto __pyx_L1_error;}
36228 __Pyx_GOTREF(__pyx_t_5);
36229 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36230 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
36231 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
36232 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
36233 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__36233; goto __pyx_L1_error;}
36234
36235 /* "rbd.pyx":3168
36236 * with nogil:
36237 * ret = rbd_update_features(self.image, _features, _enabled)
36238 * if ret != 0: # <<<<<<<<<<<<<<
36239 * raise make_ex(ret, 'error updating features for image %s' %
36240 * (self.name))
36241 */
36242 }
36243
36244 /* "rbd.pyx":3151
36245 * return features
36246 *
36247 * def update_features(self, features, enabled): # <<<<<<<<<<<<<<
36248 * """
36249 * Update the features bitmask of the image by enabling/disabling
36250 */
36251
36252 /* function exit code */
36253 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
36254 goto __pyx_L0;
36255 __pyx_L1_error:;
36256 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
36257 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
36258 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
36259 __Pyx_AddTraceback("rbd.Image.update_features", __pyx_clineno, __pyx_lineno, __pyx_filename);
36260 __pyx_r = NULL((void*)0);
36261 __pyx_L0:;
36262 __Pyx_XGIVEREF(__pyx_r);
36263 __Pyx_RefNannyFinishContext();
36264 return __pyx_r;
36265}
36266
36267/* "rbd.pyx":3172
36268 * (self.name))
36269 *
36270 * def op_features(self): # <<<<<<<<<<<<<<
36271 * """
36272 * Get the op features bitmask of the image.
36273 */
36274
36275/* Python wrapper */
36276static PyObject *__pyx_pw_3rbd_5Image_39op_features(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
36277static char __pyx_doc_3rbd_5Image_38op_features[] = "Image.op_features(self)\n\n Get the op features bitmask of the image.\n\n :returns: int - the op features bitmask of the image\n ";
36278static PyObject *__pyx_pw_3rbd_5Image_39op_features(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
36279 PyObject *__pyx_r = 0;
36280 __Pyx_RefNannyDeclarations
36281 __Pyx_RefNannySetupContext("op_features (wrapper)", 0);
36282 __pyx_r = __pyx_pf_3rbd_5Image_38op_features(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
36283
36284 /* function exit code */
36285 __Pyx_RefNannyFinishContext();
36286 return __pyx_r;
36287}
36288
36289static PyObject *__pyx_pf_3rbd_5Image_38op_features(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
36290 uint64_t __pyx_v_op_features;
36291 int __pyx_v_ret;
36292 PyObject *__pyx_r = NULL((void*)0);
36293 __Pyx_RefNannyDeclarations
36294 int __pyx_t_1;
36295 PyObject *__pyx_t_2 = NULL((void*)0);
36296 PyObject *__pyx_t_3 = NULL((void*)0);
36297 PyObject *__pyx_t_4 = NULL((void*)0);
36298 int __pyx_lineno = 0;
36299 const char *__pyx_filename = NULL((void*)0);
36300 int __pyx_clineno = 0;
36301 __Pyx_RefNannySetupContext("op_features", 0);
36302
36303 /* "rbd.pyx":3179
36304 * """
36305 * cdef uint64_t op_features
36306 * with nogil: # <<<<<<<<<<<<<<
36307 * ret = rbd_get_op_features(self.image, &op_features)
36308 * if ret != 0:
36309 */
36310 {
36311 #ifdef WITH_THREAD1
36312 PyThreadState *_save;
36313 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
36314 #endif
36315 /*try:*/ {
36316
36317 /* "rbd.pyx":3180
36318 * cdef uint64_t op_features
36319 * with nogil:
36320 * ret = rbd_get_op_features(self.image, &op_features) # <<<<<<<<<<<<<<
36321 * if ret != 0:
36322 * raise make_ex(ret, 'error getting op features for image %s' % (self.name))
36323 */
36324 __pyx_v_ret = rbd_get_op_features(__pyx_v_self->image, (&__pyx_v_op_features));
36325 }
36326
36327 /* "rbd.pyx":3179
36328 * """
36329 * cdef uint64_t op_features
36330 * with nogil: # <<<<<<<<<<<<<<
36331 * ret = rbd_get_op_features(self.image, &op_features)
36332 * if ret != 0:
36333 */
36334 /*finally:*/ {
36335 /*normal exit:*/{
36336 #ifdef WITH_THREAD1
36337 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
36338 #endif
36339 goto __pyx_L5;
36340 }
36341 __pyx_L5:;
36342 }
36343 }
36344
36345 /* "rbd.pyx":3181
36346 * with nogil:
36347 * ret = rbd_get_op_features(self.image, &op_features)
36348 * if ret != 0: # <<<<<<<<<<<<<<
36349 * raise make_ex(ret, 'error getting op features for image %s' % (self.name))
36350 * return op_features
36351 */
36352 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
36353 if (__pyx_t_1) {
36354
36355 /* "rbd.pyx":3182
36356 * ret = rbd_get_op_features(self.image, &op_features)
36357 * if ret != 0:
36358 * raise make_ex(ret, 'error getting op features for image %s' % (self.name)) # <<<<<<<<<<<<<<
36359 * return op_features
36360 *
36361 */
36362 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__36362; goto __pyx_L1_error;}
36363 __Pyx_GOTREF(__pyx_t_2);
36364 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_op_features_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_op_features_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__36364; goto __pyx_L1_error;}
36365 __Pyx_GOTREF(__pyx_t_3);
36366 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__36366; goto __pyx_L1_error;}
36367 __Pyx_GOTREF(__pyx_t_4);
36368 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
36369 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36370 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
36371 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
36372 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3182; __pyx_clineno = __LINE__36372; goto __pyx_L1_error;}
36373
36374 /* "rbd.pyx":3181
36375 * with nogil:
36376 * ret = rbd_get_op_features(self.image, &op_features)
36377 * if ret != 0: # <<<<<<<<<<<<<<
36378 * raise make_ex(ret, 'error getting op features for image %s' % (self.name))
36379 * return op_features
36380 */
36381 }
36382
36383 /* "rbd.pyx":3183
36384 * if ret != 0:
36385 * raise make_ex(ret, 'error getting op features for image %s' % (self.name))
36386 * return op_features # <<<<<<<<<<<<<<
36387 *
36388 * def overlap(self):
36389 */
36390 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
36391 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_op_features); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __pyx_clineno = __LINE__36391; goto __pyx_L1_error;}
36392 __Pyx_GOTREF(__pyx_t_4);
36393 __pyx_r = __pyx_t_4;
36394 __pyx_t_4 = 0;
36395 goto __pyx_L0;
36396
36397 /* "rbd.pyx":3172
36398 * (self.name))
36399 *
36400 * def op_features(self): # <<<<<<<<<<<<<<
36401 * """
36402 * Get the op features bitmask of the image.
36403 */
36404
36405 /* function exit code */
36406 __pyx_L1_error:;
36407 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
36408 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
36409 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
36410 __Pyx_AddTraceback("rbd.Image.op_features", __pyx_clineno, __pyx_lineno, __pyx_filename);
36411 __pyx_r = NULL((void*)0);
36412 __pyx_L0:;
36413 __Pyx_XGIVEREF(__pyx_r);
36414 __Pyx_RefNannyFinishContext();
36415 return __pyx_r;
36416}
36417
36418/* "rbd.pyx":3185
36419 * return op_features
36420 *
36421 * def overlap(self): # <<<<<<<<<<<<<<
36422 * """
36423 * Get the number of overlapping bytes between the image and its parent
36424 */
36425
36426/* Python wrapper */
36427static PyObject *__pyx_pw_3rbd_5Image_41overlap(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
36428static char __pyx_doc_3rbd_5Image_40overlap[] = "Image.overlap(self)\n\n Get the number of overlapping bytes between the image and its parent\n image. If open to a snapshot, returns the overlap between the snapshot\n and the parent image.\n\n :returns: int - the overlap in bytes\n :raises: :class:`ImageNotFound` if the image doesn't have a parent\n ";
36429static PyObject *__pyx_pw_3rbd_5Image_41overlap(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
36430 PyObject *__pyx_r = 0;
36431 __Pyx_RefNannyDeclarations
36432 __Pyx_RefNannySetupContext("overlap (wrapper)", 0);
36433 __pyx_r = __pyx_pf_3rbd_5Image_40overlap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
36434
36435 /* function exit code */
36436 __Pyx_RefNannyFinishContext();
36437 return __pyx_r;
36438}
36439
36440static PyObject *__pyx_pf_3rbd_5Image_40overlap(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
36441 uint64_t __pyx_v_overlap;
36442 int __pyx_v_ret;
36443 PyObject *__pyx_r = NULL((void*)0);
36444 __Pyx_RefNannyDeclarations
36445 int __pyx_t_1;
36446 PyObject *__pyx_t_2 = NULL((void*)0);
36447 PyObject *__pyx_t_3 = NULL((void*)0);
36448 PyObject *__pyx_t_4 = NULL((void*)0);
36449 int __pyx_lineno = 0;
36450 const char *__pyx_filename = NULL((void*)0);
36451 int __pyx_clineno = 0;
36452 __Pyx_RefNannySetupContext("overlap", 0);
36453
36454 /* "rbd.pyx":3195
36455 * """
36456 * cdef uint64_t overlap
36457 * with nogil: # <<<<<<<<<<<<<<
36458 * ret = rbd_get_overlap(self.image, &overlap)
36459 * if ret != 0:
36460 */
36461 {
36462 #ifdef WITH_THREAD1
36463 PyThreadState *_save;
36464 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
36465 #endif
36466 /*try:*/ {
36467
36468 /* "rbd.pyx":3196
36469 * cdef uint64_t overlap
36470 * with nogil:
36471 * ret = rbd_get_overlap(self.image, &overlap) # <<<<<<<<<<<<<<
36472 * if ret != 0:
36473 * raise make_ex(ret, 'error getting overlap for image %s' % (self.name))
36474 */
36475 __pyx_v_ret = rbd_get_overlap(__pyx_v_self->image, (&__pyx_v_overlap));
36476 }
36477
36478 /* "rbd.pyx":3195
36479 * """
36480 * cdef uint64_t overlap
36481 * with nogil: # <<<<<<<<<<<<<<
36482 * ret = rbd_get_overlap(self.image, &overlap)
36483 * if ret != 0:
36484 */
36485 /*finally:*/ {
36486 /*normal exit:*/{
36487 #ifdef WITH_THREAD1
36488 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
36489 #endif
36490 goto __pyx_L5;
36491 }
36492 __pyx_L5:;
36493 }
36494 }
36495
36496 /* "rbd.pyx":3197
36497 * with nogil:
36498 * ret = rbd_get_overlap(self.image, &overlap)
36499 * if ret != 0: # <<<<<<<<<<<<<<
36500 * raise make_ex(ret, 'error getting overlap for image %s' % (self.name))
36501 * return overlap
36502 */
36503 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
36504 if (__pyx_t_1) {
36505
36506 /* "rbd.pyx":3198
36507 * ret = rbd_get_overlap(self.image, &overlap)
36508 * if ret != 0:
36509 * raise make_ex(ret, 'error getting overlap for image %s' % (self.name)) # <<<<<<<<<<<<<<
36510 * return overlap
36511 *
36512 */
36513 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__36513; goto __pyx_L1_error;}
36514 __Pyx_GOTREF(__pyx_t_2);
36515 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_overlap_for_image, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_overlap_for_image, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__36515; goto __pyx_L1_error;}
36516 __Pyx_GOTREF(__pyx_t_3);
36517 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__36517; goto __pyx_L1_error;}
36518 __Pyx_GOTREF(__pyx_t_4);
36519 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
36520 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36521 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
36522 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
36523 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__36523; goto __pyx_L1_error;}
36524
36525 /* "rbd.pyx":3197
36526 * with nogil:
36527 * ret = rbd_get_overlap(self.image, &overlap)
36528 * if ret != 0: # <<<<<<<<<<<<<<
36529 * raise make_ex(ret, 'error getting overlap for image %s' % (self.name))
36530 * return overlap
36531 */
36532 }
36533
36534 /* "rbd.pyx":3199
36535 * if ret != 0:
36536 * raise make_ex(ret, 'error getting overlap for image %s' % (self.name))
36537 * return overlap # <<<<<<<<<<<<<<
36538 *
36539 * def flags(self):
36540 */
36541 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
36542 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_overlap); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__36542; goto __pyx_L1_error;}
36543 __Pyx_GOTREF(__pyx_t_4);
36544 __pyx_r = __pyx_t_4;
36545 __pyx_t_4 = 0;
36546 goto __pyx_L0;
36547
36548 /* "rbd.pyx":3185
36549 * return op_features
36550 *
36551 * def overlap(self): # <<<<<<<<<<<<<<
36552 * """
36553 * Get the number of overlapping bytes between the image and its parent
36554 */
36555
36556 /* function exit code */
36557 __pyx_L1_error:;
36558 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
36559 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
36560 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
36561 __Pyx_AddTraceback("rbd.Image.overlap", __pyx_clineno, __pyx_lineno, __pyx_filename);
36562 __pyx_r = NULL((void*)0);
36563 __pyx_L0:;
36564 __Pyx_XGIVEREF(__pyx_r);
36565 __Pyx_RefNannyFinishContext();
36566 return __pyx_r;
36567}
36568
36569/* "rbd.pyx":3201
36570 * return overlap
36571 *
36572 * def flags(self): # <<<<<<<<<<<<<<
36573 * """
36574 * Get the flags bitmask of the image.
36575 */
36576
36577/* Python wrapper */
36578static PyObject *__pyx_pw_3rbd_5Image_43flags(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
36579static char __pyx_doc_3rbd_5Image_42flags[] = "Image.flags(self)\n\n Get the flags bitmask of the image.\n\n :returns: int - the flags bitmask of the image\n ";
36580static PyObject *__pyx_pw_3rbd_5Image_43flags(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
36581 PyObject *__pyx_r = 0;
36582 __Pyx_RefNannyDeclarations
36583 __Pyx_RefNannySetupContext("flags (wrapper)", 0);
36584 __pyx_r = __pyx_pf_3rbd_5Image_42flags(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
36585
36586 /* function exit code */
36587 __Pyx_RefNannyFinishContext();
36588 return __pyx_r;
36589}
36590
36591static PyObject *__pyx_pf_3rbd_5Image_42flags(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
36592 uint64_t __pyx_v_flags;
36593 int __pyx_v_ret;
36594 PyObject *__pyx_r = NULL((void*)0);
36595 __Pyx_RefNannyDeclarations
36596 int __pyx_t_1;
36597 PyObject *__pyx_t_2 = NULL((void*)0);
36598 PyObject *__pyx_t_3 = NULL((void*)0);
36599 PyObject *__pyx_t_4 = NULL((void*)0);
36600 int __pyx_lineno = 0;
36601 const char *__pyx_filename = NULL((void*)0);
36602 int __pyx_clineno = 0;
36603 __Pyx_RefNannySetupContext("flags", 0);
36604
36605 /* "rbd.pyx":3208
36606 * """
36607 * cdef uint64_t flags
36608 * with nogil: # <<<<<<<<<<<<<<
36609 * ret = rbd_get_flags(self.image, &flags)
36610 * if ret != 0:
36611 */
36612 {
36613 #ifdef WITH_THREAD1
36614 PyThreadState *_save;
36615 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
36616 #endif
36617 /*try:*/ {
36618
36619 /* "rbd.pyx":3209
36620 * cdef uint64_t flags
36621 * with nogil:
36622 * ret = rbd_get_flags(self.image, &flags) # <<<<<<<<<<<<<<
36623 * if ret != 0:
36624 * raise make_ex(ret, 'error getting flags for image %s' % (self.name))
36625 */
36626 __pyx_v_ret = rbd_get_flags(__pyx_v_self->image, (&__pyx_v_flags));
36627 }
36628
36629 /* "rbd.pyx":3208
36630 * """
36631 * cdef uint64_t flags
36632 * with nogil: # <<<<<<<<<<<<<<
36633 * ret = rbd_get_flags(self.image, &flags)
36634 * if ret != 0:
36635 */
36636 /*finally:*/ {
36637 /*normal exit:*/{
36638 #ifdef WITH_THREAD1
36639 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
36640 #endif
36641 goto __pyx_L5;
36642 }
36643 __pyx_L5:;
36644 }
36645 }
36646
36647 /* "rbd.pyx":3210
36648 * with nogil:
36649 * ret = rbd_get_flags(self.image, &flags)
36650 * if ret != 0: # <<<<<<<<<<<<<<
36651 * raise make_ex(ret, 'error getting flags for image %s' % (self.name))
36652 * return flags
36653 */
36654 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
36655 if (__pyx_t_1) {
36656
36657 /* "rbd.pyx":3211
36658 * ret = rbd_get_flags(self.image, &flags)
36659 * if ret != 0:
36660 * raise make_ex(ret, 'error getting flags for image %s' % (self.name)) # <<<<<<<<<<<<<<
36661 * return flags
36662 *
36663 */
36664 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__36664; goto __pyx_L1_error;}
36665 __Pyx_GOTREF(__pyx_t_2);
36666 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_flags_for_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_flags_for_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__36666; goto __pyx_L1_error;}
36667 __Pyx_GOTREF(__pyx_t_3);
36668 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__36668; goto __pyx_L1_error;}
36669 __Pyx_GOTREF(__pyx_t_4);
36670 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
36671 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36672 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
36673 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
36674 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3211; __pyx_clineno = __LINE__36674; goto __pyx_L1_error;}
36675
36676 /* "rbd.pyx":3210
36677 * with nogil:
36678 * ret = rbd_get_flags(self.image, &flags)
36679 * if ret != 0: # <<<<<<<<<<<<<<
36680 * raise make_ex(ret, 'error getting flags for image %s' % (self.name))
36681 * return flags
36682 */
36683 }
36684
36685 /* "rbd.pyx":3212
36686 * if ret != 0:
36687 * raise make_ex(ret, 'error getting flags for image %s' % (self.name))
36688 * return flags # <<<<<<<<<<<<<<
36689 *
36690 * def group(self):
36691 */
36692 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
36693 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_flags); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3212; __pyx_clineno = __LINE__36693; goto __pyx_L1_error;}
36694 __Pyx_GOTREF(__pyx_t_4);
36695 __pyx_r = __pyx_t_4;
36696 __pyx_t_4 = 0;
36697 goto __pyx_L0;
36698
36699 /* "rbd.pyx":3201
36700 * return overlap
36701 *
36702 * def flags(self): # <<<<<<<<<<<<<<
36703 * """
36704 * Get the flags bitmask of the image.
36705 */
36706
36707 /* function exit code */
36708 __pyx_L1_error:;
36709 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
36710 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
36711 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
36712 __Pyx_AddTraceback("rbd.Image.flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
36713 __pyx_r = NULL((void*)0);
36714 __pyx_L0:;
36715 __Pyx_XGIVEREF(__pyx_r);
36716 __Pyx_RefNannyFinishContext();
36717 return __pyx_r;
36718}
36719
36720/* "rbd.pyx":3214
36721 * return flags
36722 *
36723 * def group(self): # <<<<<<<<<<<<<<
36724 * """
36725 * Get information about the image's group.
36726 */
36727
36728/* Python wrapper */
36729static PyObject *__pyx_pw_3rbd_5Image_45group(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
36730static char __pyx_doc_3rbd_5Image_44group[] = "Image.group(self)\n\n Get information about the image's group.\n\n :returns: dict - contains the following keys:\n\n * ``pool`` (int) - id of the group pool\n\n * ``name`` (str) - name of the group\n\n ";
36731static PyObject *__pyx_pw_3rbd_5Image_45group(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
36732 PyObject *__pyx_r = 0;
36733 __Pyx_RefNannyDeclarations
36734 __Pyx_RefNannySetupContext("group (wrapper)", 0);
36735 __pyx_r = __pyx_pf_3rbd_5Image_44group(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
36736
36737 /* function exit code */
36738 __Pyx_RefNannyFinishContext();
36739 return __pyx_r;
36740}
36741
36742static PyObject *__pyx_pf_3rbd_5Image_44group(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
36743 rbd_group_info_t __pyx_v_info;
36744 int __pyx_v_ret;
36745 PyObject *__pyx_v_result = NULL((void*)0);
36746 PyObject *__pyx_r = NULL((void*)0);
36747 __Pyx_RefNannyDeclarations
36748 int __pyx_t_1;
36749 PyObject *__pyx_t_2 = NULL((void*)0);
36750 PyObject *__pyx_t_3 = NULL((void*)0);
36751 PyObject *__pyx_t_4 = NULL((void*)0);
36752 PyObject *__pyx_t_5 = NULL((void*)0);
36753 PyObject *__pyx_t_6 = NULL((void*)0);
36754 PyObject *__pyx_t_7 = NULL((void*)0);
36755 int __pyx_lineno = 0;
36756 const char *__pyx_filename = NULL((void*)0);
36757 int __pyx_clineno = 0;
36758 __Pyx_RefNannySetupContext("group", 0);
36759
36760 /* "rbd.pyx":3226
36761 * """
36762 * cdef rbd_group_info_t info
36763 * with nogil: # <<<<<<<<<<<<<<
36764 * ret = rbd_get_group(self.image, &info, sizeof(info))
36765 * if ret != 0:
36766 */
36767 {
36768 #ifdef WITH_THREAD1
36769 PyThreadState *_save;
36770 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
36771 #endif
36772 /*try:*/ {
36773
36774 /* "rbd.pyx":3227
36775 * cdef rbd_group_info_t info
36776 * with nogil:
36777 * ret = rbd_get_group(self.image, &info, sizeof(info)) # <<<<<<<<<<<<<<
36778 * if ret != 0:
36779 * raise make_ex(ret, 'error getting group for image %s' % self.name)
36780 */
36781 __pyx_v_ret = rbd_get_group(__pyx_v_self->image, (&__pyx_v_info), (sizeof(__pyx_v_info)));
36782 }
36783
36784 /* "rbd.pyx":3226
36785 * """
36786 * cdef rbd_group_info_t info
36787 * with nogil: # <<<<<<<<<<<<<<
36788 * ret = rbd_get_group(self.image, &info, sizeof(info))
36789 * if ret != 0:
36790 */
36791 /*finally:*/ {
36792 /*normal exit:*/{
36793 #ifdef WITH_THREAD1
36794 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
36795 #endif
36796 goto __pyx_L5;
36797 }
36798 __pyx_L5:;
36799 }
36800 }
36801
36802 /* "rbd.pyx":3228
36803 * with nogil:
36804 * ret = rbd_get_group(self.image, &info, sizeof(info))
36805 * if ret != 0: # <<<<<<<<<<<<<<
36806 * raise make_ex(ret, 'error getting group for image %s' % self.name)
36807 * result = {
36808 */
36809 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
36810 if (__pyx_t_1) {
36811
36812 /* "rbd.pyx":3229
36813 * ret = rbd_get_group(self.image, &info, sizeof(info))
36814 * if ret != 0:
36815 * raise make_ex(ret, 'error getting group for image %s' % self.name) # <<<<<<<<<<<<<<
36816 * result = {
36817 * 'pool' : info.pool,
36818 */
36819 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__36819; goto __pyx_L1_error;}
36820 __Pyx_GOTREF(__pyx_t_2);
36821 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_group_for_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_group_for_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__36821; goto __pyx_L1_error;}
36822 __Pyx_GOTREF(__pyx_t_3);
36823 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__36823; goto __pyx_L1_error;}
36824 __Pyx_GOTREF(__pyx_t_4);
36825 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
36826 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36827 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
36828 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
36829 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3229; __pyx_clineno = __LINE__36829; goto __pyx_L1_error;}
36830
36831 /* "rbd.pyx":3228
36832 * with nogil:
36833 * ret = rbd_get_group(self.image, &info, sizeof(info))
36834 * if ret != 0: # <<<<<<<<<<<<<<
36835 * raise make_ex(ret, 'error getting group for image %s' % self.name)
36836 * result = {
36837 */
36838 }
36839
36840 /* "rbd.pyx":3231
36841 * raise make_ex(ret, 'error getting group for image %s' % self.name)
36842 * result = {
36843 * 'pool' : info.pool, # <<<<<<<<<<<<<<
36844 * 'name' : decode_cstr(info.name)
36845 * }
36846 */
36847 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__36847; goto __pyx_L1_error;}
36848 __Pyx_GOTREF(__pyx_t_4);
36849 __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_info.pool); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__36849; goto __pyx_L1_error;}
36850 __Pyx_GOTREF(__pyx_t_3);
36851 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pool, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__36851; goto __pyx_L1_error;}
36852 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36853
36854 /* "rbd.pyx":3232
36855 * result = {
36856 * 'pool' : info.pool,
36857 * 'name' : decode_cstr(info.name) # <<<<<<<<<<<<<<
36858 * }
36859 * rbd_group_info_cleanup(&info, sizeof(info))
36860 */
36861 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__36861; goto __pyx_L1_error;}
36862 __Pyx_GOTREF(__pyx_t_2);
36863 __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_info.name); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__36863; goto __pyx_L1_error;}
36864 __Pyx_GOTREF(__pyx_t_5);
36865 __pyx_t_6 = NULL((void*)0);
36866 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
36867 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
36868 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
36869 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
36870 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
36871 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
36872 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
36873 }
36874 }
36875 if (!__pyx_t_6) {
36876 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__36876; goto __pyx_L1_error;}
36877 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
36878 __Pyx_GOTREF(__pyx_t_3);
36879 } else {
36880 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__36880; goto __pyx_L1_error;}
36881 __Pyx_GOTREF(__pyx_t_7);
36882 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
36883 __Pyx_GIVEREF(__pyx_t_5);
36884 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
36885 __pyx_t_5 = 0;
36886 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__36886; goto __pyx_L1_error;}
36887 __Pyx_GOTREF(__pyx_t_3);
36888 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
36889 }
36890 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
36891 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__36891; goto __pyx_L1_error;}
36892 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
36893 __pyx_v_result = ((PyObject*)__pyx_t_4);
36894 __pyx_t_4 = 0;
36895
36896 /* "rbd.pyx":3234
36897 * 'name' : decode_cstr(info.name)
36898 * }
36899 * rbd_group_info_cleanup(&info, sizeof(info)) # <<<<<<<<<<<<<<
36900 * return result
36901 *
36902 */
36903 rbd_group_info_cleanup((&__pyx_v_info), (sizeof(__pyx_v_info)));
36904
36905 /* "rbd.pyx":3235
36906 * }
36907 * rbd_group_info_cleanup(&info, sizeof(info))
36908 * return result # <<<<<<<<<<<<<<
36909 *
36910 * def is_exclusive_lock_owner(self):
36911 */
36912 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
36913 __Pyx_INCREF(__pyx_v_result)( ((PyObject*)(__pyx_v_result))->ob_refcnt++);
36914 __pyx_r = __pyx_v_result;
36915 goto __pyx_L0;
36916
36917 /* "rbd.pyx":3214
36918 * return flags
36919 *
36920 * def group(self): # <<<<<<<<<<<<<<
36921 * """
36922 * Get information about the image's group.
36923 */
36924
36925 /* function exit code */
36926 __pyx_L1_error:;
36927 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
36928 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
36929 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
36930 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
36931 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
36932 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
36933 __Pyx_AddTraceback("rbd.Image.group", __pyx_clineno, __pyx_lineno, __pyx_filename);
36934 __pyx_r = NULL((void*)0);
36935 __pyx_L0:;
36936 __Pyx_XDECREF(__pyx_v_result)do { if ((__pyx_v_result) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_result))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_result)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_result)))); } while
(0); } while (0)
;
36937 __Pyx_XGIVEREF(__pyx_r);
36938 __Pyx_RefNannyFinishContext();
36939 return __pyx_r;
36940}
36941
36942/* "rbd.pyx":3237
36943 * return result
36944 *
36945 * def is_exclusive_lock_owner(self): # <<<<<<<<<<<<<<
36946 * """
36947 * Get the status of the image exclusive lock.
36948 */
36949
36950/* Python wrapper */
36951static PyObject *__pyx_pw_3rbd_5Image_47is_exclusive_lock_owner(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
36952static char __pyx_doc_3rbd_5Image_46is_exclusive_lock_owner[] = "Image.is_exclusive_lock_owner(self)\n\n Get the status of the image exclusive lock.\n\n :returns: bool - true if the image is exclusively locked\n ";
36953static PyObject *__pyx_pw_3rbd_5Image_47is_exclusive_lock_owner(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
36954 PyObject *__pyx_r = 0;
36955 __Pyx_RefNannyDeclarations
36956 __Pyx_RefNannySetupContext("is_exclusive_lock_owner (wrapper)", 0);
36957 __pyx_r = __pyx_pf_3rbd_5Image_46is_exclusive_lock_owner(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
36958
36959 /* function exit code */
36960 __Pyx_RefNannyFinishContext();
36961 return __pyx_r;
36962}
36963
36964static PyObject *__pyx_pf_3rbd_5Image_46is_exclusive_lock_owner(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
36965 int __pyx_v_owner;
36966 int __pyx_v_ret;
36967 PyObject *__pyx_r = NULL((void*)0);
36968 __Pyx_RefNannyDeclarations
36969 int __pyx_t_1;
36970 PyObject *__pyx_t_2 = NULL((void*)0);
36971 PyObject *__pyx_t_3 = NULL((void*)0);
36972 PyObject *__pyx_t_4 = NULL((void*)0);
36973 int __pyx_lineno = 0;
36974 const char *__pyx_filename = NULL((void*)0);
36975 int __pyx_clineno = 0;
36976 __Pyx_RefNannySetupContext("is_exclusive_lock_owner", 0);
36977
36978 /* "rbd.pyx":3244
36979 * """
36980 * cdef int owner
36981 * with nogil: # <<<<<<<<<<<<<<
36982 * ret = rbd_is_exclusive_lock_owner(self.image, &owner)
36983 * if ret != 0:
36984 */
36985 {
36986 #ifdef WITH_THREAD1
36987 PyThreadState *_save;
36988 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
36989 #endif
36990 /*try:*/ {
36991
36992 /* "rbd.pyx":3245
36993 * cdef int owner
36994 * with nogil:
36995 * ret = rbd_is_exclusive_lock_owner(self.image, &owner) # <<<<<<<<<<<<<<
36996 * if ret != 0:
36997 * raise make_ex(ret, 'error getting lock status for image %s' % (self.name))
36998 */
36999 __pyx_v_ret = rbd_is_exclusive_lock_owner(__pyx_v_self->image, (&__pyx_v_owner));
37000 }
37001
37002 /* "rbd.pyx":3244
37003 * """
37004 * cdef int owner
37005 * with nogil: # <<<<<<<<<<<<<<
37006 * ret = rbd_is_exclusive_lock_owner(self.image, &owner)
37007 * if ret != 0:
37008 */
37009 /*finally:*/ {
37010 /*normal exit:*/{
37011 #ifdef WITH_THREAD1
37012 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
37013 #endif
37014 goto __pyx_L5;
37015 }
37016 __pyx_L5:;
37017 }
37018 }
37019
37020 /* "rbd.pyx":3246
37021 * with nogil:
37022 * ret = rbd_is_exclusive_lock_owner(self.image, &owner)
37023 * if ret != 0: # <<<<<<<<<<<<<<
37024 * raise make_ex(ret, 'error getting lock status for image %s' % (self.name))
37025 * return owner == 1
37026 */
37027 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
37028 if (__pyx_t_1) {
37029
37030 /* "rbd.pyx":3247
37031 * ret = rbd_is_exclusive_lock_owner(self.image, &owner)
37032 * if ret != 0:
37033 * raise make_ex(ret, 'error getting lock status for image %s' % (self.name)) # <<<<<<<<<<<<<<
37034 * return owner == 1
37035 *
37036 */
37037 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; __pyx_clineno = __LINE__37037; goto __pyx_L1_error;}
37038 __Pyx_GOTREF(__pyx_t_2);
37039 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_lock_status_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_lock_status_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; __pyx_clineno = __LINE__37039; goto __pyx_L1_error;}
37040 __Pyx_GOTREF(__pyx_t_3);
37041 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; __pyx_clineno = __LINE__37041; goto __pyx_L1_error;}
37042 __Pyx_GOTREF(__pyx_t_4);
37043 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
37044 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37045 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
37046 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
37047 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; __pyx_clineno = __LINE__37047; goto __pyx_L1_error;}
37048
37049 /* "rbd.pyx":3246
37050 * with nogil:
37051 * ret = rbd_is_exclusive_lock_owner(self.image, &owner)
37052 * if ret != 0: # <<<<<<<<<<<<<<
37053 * raise make_ex(ret, 'error getting lock status for image %s' % (self.name))
37054 * return owner == 1
37055 */
37056 }
37057
37058 /* "rbd.pyx":3248
37059 * if ret != 0:
37060 * raise make_ex(ret, 'error getting lock status for image %s' % (self.name))
37061 * return owner == 1 # <<<<<<<<<<<<<<
37062 *
37063 * def copy(self, dest_ioctx, dest_name, features=None, order=None,
37064 */
37065 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
37066 __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_owner == 1))(((__pyx_v_owner == 1)) ? (( ((PyObject*)(((PyObject *) &
_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct
)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->
ob_refcnt++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__37066; goto __pyx_L1_error;}
37067 __Pyx_GOTREF(__pyx_t_4);
37068 __pyx_r = __pyx_t_4;
37069 __pyx_t_4 = 0;
37070 goto __pyx_L0;
37071
37072 /* "rbd.pyx":3237
37073 * return result
37074 *
37075 * def is_exclusive_lock_owner(self): # <<<<<<<<<<<<<<
37076 * """
37077 * Get the status of the image exclusive lock.
37078 */
37079
37080 /* function exit code */
37081 __pyx_L1_error:;
37082 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
37083 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
37084 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
37085 __Pyx_AddTraceback("rbd.Image.is_exclusive_lock_owner", __pyx_clineno, __pyx_lineno, __pyx_filename);
37086 __pyx_r = NULL((void*)0);
37087 __pyx_L0:;
37088 __Pyx_XGIVEREF(__pyx_r);
37089 __Pyx_RefNannyFinishContext();
37090 return __pyx_r;
37091}
37092
37093/* "rbd.pyx":3250
37094 * return owner == 1
37095 *
37096 * def copy(self, dest_ioctx, dest_name, features=None, order=None, # <<<<<<<<<<<<<<
37097 * stripe_unit=None, stripe_count=None, data_pool=None):
37098 * """
37099 */
37100
37101/* Python wrapper */
37102static PyObject *__pyx_pw_3rbd_5Image_49copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37103static char __pyx_doc_3rbd_5Image_48copy[] = "Image.copy(self, dest_ioctx, dest_name, features=None, order=None, stripe_unit=None, stripe_count=None, data_pool=None)\n\n Copy the image to another location.\n\n :param dest_ioctx: determines which pool to copy into\n :type dest_ioctx: :class:`rados.Ioctx`\n :param dest_name: the name of the copy\n :type dest_name: str\n :param features: bitmask of features to enable; if set, must include layering\n :type features: int\n :param order: the image is split into (2**order) byte objects\n :type order: int\n :param stripe_unit: stripe unit in bytes (default None to let librbd decide)\n :type stripe_unit: int\n :param stripe_count: objects to stripe over before looping\n :type stripe_count: int\n :param data_pool: optional separate pool for data blocks\n :type data_pool: str\n :raises: :class:`TypeError`\n :raises: :class:`InvalidArgument`\n :raises: :class:`ImageExists`\n :raises: :class:`FunctionNotSupported`\n :raises: :class:`ArgumentOutOfRange`\n ";
37104static PyObject *__pyx_pw_3rbd_5Image_49copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37105 PyObject *__pyx_v_dest_ioctx = 0;
37106 PyObject *__pyx_v_dest_name = 0;
37107 PyObject *__pyx_v_features = 0;
37108 PyObject *__pyx_v_order = 0;
37109 PyObject *__pyx_v_stripe_unit = 0;
37110 PyObject *__pyx_v_stripe_count = 0;
37111 PyObject *__pyx_v_data_pool = 0;
37112 int __pyx_lineno = 0;
37113 const char *__pyx_filename = NULL((void*)0);
37114 int __pyx_clineno = 0;
37115 PyObject *__pyx_r = 0;
37116 __Pyx_RefNannyDeclarations
37117 __Pyx_RefNannySetupContext("copy (wrapper)", 0);
37118 {
37119 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dest_ioctx,&__pyx_n_s_dest_name,&__pyx_n_s_features,&__pyx_n_s_order,&__pyx_n_s_stripe_unit,&__pyx_n_s_stripe_count,&__pyx_n_s_data_pool,0};
37120 PyObject* values[7] = {0,0,0,0,0,0,0};
37121 values[2] = ((PyObject *)Py_None(&_Py_NoneStruct));
37122 values[3] = ((PyObject *)Py_None(&_Py_NoneStruct));
37123
37124 /* "rbd.pyx":3251
37125 *
37126 * def copy(self, dest_ioctx, dest_name, features=None, order=None,
37127 * stripe_unit=None, stripe_count=None, data_pool=None): # <<<<<<<<<<<<<<
37128 * """
37129 * Copy the image to another location.
37130 */
37131 values[4] = ((PyObject *)Py_None(&_Py_NoneStruct));
37132 values[5] = ((PyObject *)Py_None(&_Py_NoneStruct));
37133 values[6] = ((PyObject *)Py_None(&_Py_NoneStruct));
37134 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
37135 Py_ssize_t kw_args;
37136 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
37137 switch (pos_args) {
37138 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
37139 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
37140 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
37141 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
37142 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
37143 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
37144 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
37145 case 0: break;
37146 default: goto __pyx_L5_argtuple_error;
37147 }
37148 kw_args = PyDict_Size(__pyx_kwds);
37149 switch (pos_args) {
37150 case 0:
37151 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_ioctx
)) != 0), 1)
) kw_args--;
37152 else goto __pyx_L5_argtuple_error;
37153 case 1:
37154 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_name
)) != 0), 1)
) kw_args--;
37155 else {
37156 __Pyx_RaiseArgtupleInvalid("copy", 0, 2, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__37156; goto __pyx_L3_error;}
37157 }
37158 case 2:
37159 if (kw_args > 0) {
37160 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features);
37161 if (value) { values[2] = value; kw_args--; }
37162 }
37163 case 3:
37164 if (kw_args > 0) {
37165 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_order);
37166 if (value) { values[3] = value; kw_args--; }
37167 }
37168 case 4:
37169 if (kw_args > 0) {
37170 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_unit);
37171 if (value) { values[4] = value; kw_args--; }
37172 }
37173 case 5:
37174 if (kw_args > 0) {
37175 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_count);
37176 if (value) { values[5] = value; kw_args--; }
37177 }
37178 case 6:
37179 if (kw_args > 0) {
37180 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_pool);
37181 if (value) { values[6] = value; kw_args--; }
37182 }
37183 }
37184 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
37185 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copy") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "copy") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__37185; goto __pyx_L3_error;}
37186 }
37187 } else {
37188 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
37189 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
37190 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
37191 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
37192 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
37193 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
37194 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
37195 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
37196 break;
37197 default: goto __pyx_L5_argtuple_error;
37198 }
37199 }
37200 __pyx_v_dest_ioctx = values[0];
37201 __pyx_v_dest_name = values[1];
37202 __pyx_v_features = values[2];
37203 __pyx_v_order = values[3];
37204 __pyx_v_stripe_unit = values[4];
37205 __pyx_v_stripe_count = values[5];
37206 __pyx_v_data_pool = values[6];
37207 }
37208 goto __pyx_L4_argument_unpacking_done;
37209 __pyx_L5_argtuple_error:;
37210 __Pyx_RaiseArgtupleInvalid("copy", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__37210; goto __pyx_L3_error;}
37211 __pyx_L3_error:;
37212 __Pyx_AddTraceback("rbd.Image.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
37213 __Pyx_RefNannyFinishContext();
37214 return NULL((void*)0);
37215 __pyx_L4_argument_unpacking_done:;
37216 __pyx_r = __pyx_pf_3rbd_5Image_48copy(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_dest_ioctx, __pyx_v_dest_name, __pyx_v_features, __pyx_v_order, __pyx_v_stripe_unit, __pyx_v_stripe_count, __pyx_v_data_pool);
37217
37218 /* "rbd.pyx":3250
37219 * return owner == 1
37220 *
37221 * def copy(self, dest_ioctx, dest_name, features=None, order=None, # <<<<<<<<<<<<<<
37222 * stripe_unit=None, stripe_count=None, data_pool=None):
37223 * """
37224 */
37225
37226 /* function exit code */
37227 __Pyx_RefNannyFinishContext();
37228 return __pyx_r;
37229}
37230
37231static PyObject *__pyx_pf_3rbd_5Image_48copy(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_dest_ioctx, PyObject *__pyx_v_dest_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool) {
37232 rados_ioctx_t __pyx_v__dest_ioctx;
37233 char *__pyx_v__dest_name;
37234 rbd_image_options_t __pyx_v_opts;
37235 int __pyx_v_ret;
37236 PyObject *__pyx_r = NULL((void*)0);
37237 __Pyx_RefNannyDeclarations
37238 PyObject *__pyx_t_1 = NULL((void*)0);
37239 PyObject *__pyx_t_2 = NULL((void*)0);
37240 PyObject *__pyx_t_3 = NULL((void*)0);
37241 Py_ssize_t __pyx_t_4;
37242 PyObject *__pyx_t_5 = NULL((void*)0);
37243 rados_ioctx_t __pyx_t_6;
37244 char *__pyx_t_7;
37245 int __pyx_t_8;
37246 int __pyx_t_9;
37247 int __pyx_t_10;
37248 uint64_t __pyx_t_11;
37249 char const *__pyx_t_12;
37250 int __pyx_t_13;
37251 char const *__pyx_t_14;
37252 PyObject *__pyx_t_15 = NULL((void*)0);
37253 PyObject *__pyx_t_16 = NULL((void*)0);
37254 PyObject *__pyx_t_17 = NULL((void*)0);
37255 PyObject *__pyx_t_18 = NULL((void*)0);
37256 PyObject *__pyx_t_19 = NULL((void*)0);
37257 PyObject *__pyx_t_20 = NULL((void*)0);
37258 int __pyx_lineno = 0;
37259 const char *__pyx_filename = NULL((void*)0);
37260 int __pyx_clineno = 0;
37261 __Pyx_RefNannySetupContext("copy", 0);
37262 __Pyx_INCREF(__pyx_v_dest_name)( ((PyObject*)(__pyx_v_dest_name))->ob_refcnt++);
37263 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
37264
37265 /* "rbd.pyx":3275
37266 * :raises: :class:`ArgumentOutOfRange`
37267 * """
37268 * dest_name = cstr(dest_name, 'dest_name') # <<<<<<<<<<<<<<
37269 * data_pool = cstr(data_pool, 'data_pool', opt=True)
37270 * cdef:
37271 */
37272 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__37272; goto __pyx_L1_error;}
37273 __Pyx_GOTREF(__pyx_t_2);
37274 __pyx_t_3 = NULL((void*)0);
37275 __pyx_t_4 = 0;
37276 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
37277 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
37278 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
37279 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
37280 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
37281 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
37282 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
37283 __pyx_t_4 = 1;
37284 }
37285 }
37286 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__37286; goto __pyx_L1_error;}
37287 __Pyx_GOTREF(__pyx_t_5);
37288 if (__pyx_t_3) {
37289 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
37290 }
37291 __Pyx_INCREF(__pyx_v_dest_name)( ((PyObject*)(__pyx_v_dest_name))->ob_refcnt++);
37292 __Pyx_GIVEREF(__pyx_v_dest_name);
37293 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_dest_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_dest_name
)
;
37294 __Pyx_INCREF(__pyx_n_s_dest_name)( ((PyObject*)(__pyx_n_s_dest_name))->ob_refcnt++);
37295 __Pyx_GIVEREF(__pyx_n_s_dest_name);
37296 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_dest_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_dest_name
)
;
37297 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__37297; goto __pyx_L1_error;}
37298 __Pyx_GOTREF(__pyx_t_1);
37299 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
37300 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
37301 __Pyx_DECREF_SET(__pyx_v_dest_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_dest_name; __pyx_v_dest_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
37302 __pyx_t_1 = 0;
37303
37304 /* "rbd.pyx":3276
37305 * """
37306 * dest_name = cstr(dest_name, 'dest_name')
37307 * data_pool = cstr(data_pool, 'data_pool', opt=True) # <<<<<<<<<<<<<<
37308 * cdef:
37309 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
37310 */
37311 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__37311; goto __pyx_L1_error;}
37312 __Pyx_GOTREF(__pyx_t_1);
37313 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__37313; goto __pyx_L1_error;}
37314 __Pyx_GOTREF(__pyx_t_2);
37315 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
37316 __Pyx_GIVEREF(__pyx_v_data_pool);
37317 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_data_pool
)
;
37318 __Pyx_INCREF(__pyx_n_s_data_pool)( ((PyObject*)(__pyx_n_s_data_pool))->ob_refcnt++);
37319 __Pyx_GIVEREF(__pyx_n_s_data_pool);
37320 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_data_pool
)
;
37321 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__37321; goto __pyx_L1_error;}
37322 __Pyx_GOTREF(__pyx_t_5);
37323 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__37323; goto __pyx_L1_error;}
37324 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__37324; goto __pyx_L1_error;}
37325 __Pyx_GOTREF(__pyx_t_3);
37326 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
37327 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
37328 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
37329 __Pyx_DECREF_SET(__pyx_v_data_pool, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_data_pool; __pyx_v_data_pool
= __pyx_t_3; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
37330 __pyx_t_3 = 0;
37331
37332 /* "rbd.pyx":3278
37333 * data_pool = cstr(data_pool, 'data_pool', opt=True)
37334 * cdef:
37335 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx) # <<<<<<<<<<<<<<
37336 * char *_dest_name = dest_name
37337 * rbd_image_options_t opts
37338 */
37339 if (!(likely(((__pyx_v_dest_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dest_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_dest_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_dest_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; __pyx_clineno = __LINE__37339; goto __pyx_L1_error;}
37340 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_dest_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; __pyx_clineno = __LINE__37340; goto __pyx_L1_error;}
37341 __pyx_v__dest_ioctx = __pyx_t_6;
37342
37343 /* "rbd.pyx":3279
37344 * cdef:
37345 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
37346 * char *_dest_name = dest_name # <<<<<<<<<<<<<<
37347 * rbd_image_options_t opts
37348 *
37349 */
37350 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_dest_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; __pyx_clineno = __LINE__37350; goto __pyx_L1_error;}
37351 __pyx_v__dest_name = __pyx_t_7;
37352
37353 /* "rbd.pyx":3282
37354 * rbd_image_options_t opts
37355 *
37356 * rbd_image_options_create(&opts) # <<<<<<<<<<<<<<
37357 * try:
37358 * if features is not None:
37359 */
37360 rbd_image_options_create((&__pyx_v_opts));
37361
37362 /* "rbd.pyx":3283
37363 *
37364 * rbd_image_options_create(&opts)
37365 * try: # <<<<<<<<<<<<<<
37366 * if features is not None:
37367 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
37368 */
37369 /*try:*/ {
37370
37371 /* "rbd.pyx":3284
37372 * rbd_image_options_create(&opts)
37373 * try:
37374 * if features is not None: # <<<<<<<<<<<<<<
37375 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
37376 * features)
37377 */
37378 __pyx_t_8 = (__pyx_v_features != Py_None(&_Py_NoneStruct));
37379 __pyx_t_9 = (__pyx_t_8 != 0);
37380 if (__pyx_t_9) {
37381
37382 /* "rbd.pyx":3285
37383 * try:
37384 * if features is not None:
37385 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
37386 * features)
37387 * if order is not None:
37388 */
37389 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_FEATURES); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__37389; goto __pyx_L4_error;}
37390 __Pyx_GOTREF(__pyx_t_3);
37391 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__37391; goto __pyx_L4_error;}
37392 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37393
37394 /* "rbd.pyx":3286
37395 * if features is not None:
37396 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
37397 * features) # <<<<<<<<<<<<<<
37398 * if order is not None:
37399 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
37400 */
37401 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_features); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3286; __pyx_clineno = __LINE__37401; goto __pyx_L4_error;}
37402
37403 /* "rbd.pyx":3285
37404 * try:
37405 * if features is not None:
37406 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
37407 * features)
37408 * if order is not None:
37409 */
37410 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
37411
37412 /* "rbd.pyx":3284
37413 * rbd_image_options_create(&opts)
37414 * try:
37415 * if features is not None: # <<<<<<<<<<<<<<
37416 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
37417 * features)
37418 */
37419 }
37420
37421 /* "rbd.pyx":3287
37422 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
37423 * features)
37424 * if order is not None: # <<<<<<<<<<<<<<
37425 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
37426 * order)
37427 */
37428 __pyx_t_9 = (__pyx_v_order != Py_None(&_Py_NoneStruct));
37429 __pyx_t_8 = (__pyx_t_9 != 0);
37430 if (__pyx_t_8) {
37431
37432 /* "rbd.pyx":3288
37433 * features)
37434 * if order is not None:
37435 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
37436 * order)
37437 * if stripe_unit is not None:
37438 */
37439 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_ORDER); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __pyx_clineno = __LINE__37439; goto __pyx_L4_error;}
37440 __Pyx_GOTREF(__pyx_t_3);
37441 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __pyx_clineno = __LINE__37441; goto __pyx_L4_error;}
37442 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37443
37444 /* "rbd.pyx":3289
37445 * if order is not None:
37446 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
37447 * order) # <<<<<<<<<<<<<<
37448 * if stripe_unit is not None:
37449 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
37450 */
37451 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_order); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3289; __pyx_clineno = __LINE__37451; goto __pyx_L4_error;}
37452
37453 /* "rbd.pyx":3288
37454 * features)
37455 * if order is not None:
37456 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
37457 * order)
37458 * if stripe_unit is not None:
37459 */
37460 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
37461
37462 /* "rbd.pyx":3287
37463 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
37464 * features)
37465 * if order is not None: # <<<<<<<<<<<<<<
37466 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
37467 * order)
37468 */
37469 }
37470
37471 /* "rbd.pyx":3290
37472 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
37473 * order)
37474 * if stripe_unit is not None: # <<<<<<<<<<<<<<
37475 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
37476 * stripe_unit)
37477 */
37478 __pyx_t_8 = (__pyx_v_stripe_unit != Py_None(&_Py_NoneStruct));
37479 __pyx_t_9 = (__pyx_t_8 != 0);
37480 if (__pyx_t_9) {
37481
37482 /* "rbd.pyx":3291
37483 * order)
37484 * if stripe_unit is not None:
37485 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
37486 * stripe_unit)
37487 * if stripe_count is not None:
37488 */
37489 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; __pyx_clineno = __LINE__37489; goto __pyx_L4_error;}
37490 __Pyx_GOTREF(__pyx_t_3);
37491 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; __pyx_clineno = __LINE__37491; goto __pyx_L4_error;}
37492 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37493
37494 /* "rbd.pyx":3292
37495 * if stripe_unit is not None:
37496 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
37497 * stripe_unit) # <<<<<<<<<<<<<<
37498 * if stripe_count is not None:
37499 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
37500 */
37501 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_unit); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__37501; goto __pyx_L4_error;}
37502
37503 /* "rbd.pyx":3291
37504 * order)
37505 * if stripe_unit is not None:
37506 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
37507 * stripe_unit)
37508 * if stripe_count is not None:
37509 */
37510 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
37511
37512 /* "rbd.pyx":3290
37513 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
37514 * order)
37515 * if stripe_unit is not None: # <<<<<<<<<<<<<<
37516 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
37517 * stripe_unit)
37518 */
37519 }
37520
37521 /* "rbd.pyx":3293
37522 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
37523 * stripe_unit)
37524 * if stripe_count is not None: # <<<<<<<<<<<<<<
37525 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
37526 * stripe_count)
37527 */
37528 __pyx_t_9 = (__pyx_v_stripe_count != Py_None(&_Py_NoneStruct));
37529 __pyx_t_8 = (__pyx_t_9 != 0);
37530 if (__pyx_t_8) {
37531
37532 /* "rbd.pyx":3294
37533 * stripe_unit)
37534 * if stripe_count is not None:
37535 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
37536 * stripe_count)
37537 * if data_pool is not None:
37538 */
37539 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__37539; goto __pyx_L4_error;}
37540 __Pyx_GOTREF(__pyx_t_3);
37541 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__37541; goto __pyx_L4_error;}
37542 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37543
37544 /* "rbd.pyx":3295
37545 * if stripe_count is not None:
37546 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
37547 * stripe_count) # <<<<<<<<<<<<<<
37548 * if data_pool is not None:
37549 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
37550 */
37551 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_count); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__37551; goto __pyx_L4_error;}
37552
37553 /* "rbd.pyx":3294
37554 * stripe_unit)
37555 * if stripe_count is not None:
37556 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
37557 * stripe_count)
37558 * if data_pool is not None:
37559 */
37560 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
37561
37562 /* "rbd.pyx":3293
37563 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
37564 * stripe_unit)
37565 * if stripe_count is not None: # <<<<<<<<<<<<<<
37566 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
37567 * stripe_count)
37568 */
37569 }
37570
37571 /* "rbd.pyx":3296
37572 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
37573 * stripe_count)
37574 * if data_pool is not None: # <<<<<<<<<<<<<<
37575 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
37576 * data_pool)
37577 */
37578 __pyx_t_8 = (__pyx_v_data_pool != Py_None(&_Py_NoneStruct));
37579 __pyx_t_9 = (__pyx_t_8 != 0);
37580 if (__pyx_t_9) {
37581
37582 /* "rbd.pyx":3297
37583 * stripe_count)
37584 * if data_pool is not None:
37585 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
37586 * data_pool)
37587 * with nogil:
37588 */
37589 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__37589; goto __pyx_L4_error;}
37590 __Pyx_GOTREF(__pyx_t_3);
37591 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__37591; goto __pyx_L4_error;}
37592 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37593
37594 /* "rbd.pyx":3298
37595 * if data_pool is not None:
37596 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
37597 * data_pool) # <<<<<<<<<<<<<<
37598 * with nogil:
37599 * ret = rbd_copy3(self.image, _dest_ioctx, _dest_name, opts)
37600 */
37601 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_data_pool); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__37601; goto __pyx_L4_error;}
37602
37603 /* "rbd.pyx":3297
37604 * stripe_count)
37605 * if data_pool is not None:
37606 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
37607 * data_pool)
37608 * with nogil:
37609 */
37610 rbd_image_options_set_string(__pyx_v_opts, __pyx_t_10, __pyx_t_12);
37611
37612 /* "rbd.pyx":3296
37613 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
37614 * stripe_count)
37615 * if data_pool is not None: # <<<<<<<<<<<<<<
37616 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
37617 * data_pool)
37618 */
37619 }
37620
37621 /* "rbd.pyx":3299
37622 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
37623 * data_pool)
37624 * with nogil: # <<<<<<<<<<<<<<
37625 * ret = rbd_copy3(self.image, _dest_ioctx, _dest_name, opts)
37626 * finally:
37627 */
37628 {
37629 #ifdef WITH_THREAD1
37630 PyThreadState *_save;
37631 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
37632 #endif
37633 /*try:*/ {
37634
37635 /* "rbd.pyx":3300
37636 * data_pool)
37637 * with nogil:
37638 * ret = rbd_copy3(self.image, _dest_ioctx, _dest_name, opts) # <<<<<<<<<<<<<<
37639 * finally:
37640 * rbd_image_options_destroy(opts)
37641 */
37642 __pyx_v_ret = rbd_copy3(__pyx_v_self->image, __pyx_v__dest_ioctx, __pyx_v__dest_name, __pyx_v_opts);
37643 }
37644
37645 /* "rbd.pyx":3299
37646 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
37647 * data_pool)
37648 * with nogil: # <<<<<<<<<<<<<<
37649 * ret = rbd_copy3(self.image, _dest_ioctx, _dest_name, opts)
37650 * finally:
37651 */
37652 /*finally:*/ {
37653 /*normal exit:*/{
37654 #ifdef WITH_THREAD1
37655 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
37656 #endif
37657 goto __pyx_L13;
37658 }
37659 __pyx_L13:;
37660 }
37661 }
37662 }
37663
37664 /* "rbd.pyx":3302
37665 * ret = rbd_copy3(self.image, _dest_ioctx, _dest_name, opts)
37666 * finally:
37667 * rbd_image_options_destroy(opts) # <<<<<<<<<<<<<<
37668 * if ret < 0:
37669 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
37670 */
37671 /*finally:*/ {
37672 /*normal exit:*/{
37673 rbd_image_options_destroy(__pyx_v_opts);
37674 goto __pyx_L5;
37675 }
37676 /*exception exit:*/{
37677 __pyx_L4_error:;
37678 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
37679 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
37680 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
37681 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
37682 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
37683 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
37684 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
37685 __Pyx_XGOTREF(__pyx_t_15);
37686 __Pyx_XGOTREF(__pyx_t_16);
37687 __Pyx_XGOTREF(__pyx_t_17);
37688 __Pyx_XGOTREF(__pyx_t_18);
37689 __Pyx_XGOTREF(__pyx_t_19);
37690 __Pyx_XGOTREF(__pyx_t_20);
37691 __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
37692 {
37693 rbd_image_options_destroy(__pyx_v_opts);
37694 }
37695 if (PY_MAJOR_VERSION2 >= 3) {
37696 __Pyx_XGIVEREF(__pyx_t_18);
37697 __Pyx_XGIVEREF(__pyx_t_19);
37698 __Pyx_XGIVEREF(__pyx_t_20);
37699 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
37700 }
37701 __Pyx_XGIVEREF(__pyx_t_15);
37702 __Pyx_XGIVEREF(__pyx_t_16);
37703 __Pyx_XGIVEREF(__pyx_t_17);
37704 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
37705 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
37706 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
37707 goto __pyx_L1_error;
37708 }
37709 __pyx_L5:;
37710 }
37711
37712 /* "rbd.pyx":3303
37713 * finally:
37714 * rbd_image_options_destroy(opts)
37715 * if ret < 0: # <<<<<<<<<<<<<<
37716 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
37717 *
37718 */
37719 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
37720 if (__pyx_t_9) {
37721
37722 /* "rbd.pyx":3304
37723 * rbd_image_options_destroy(opts)
37724 * if ret < 0:
37725 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name)) # <<<<<<<<<<<<<<
37726 *
37727 * def deep_copy(self, dest_ioctx, dest_name, features=None, order=None,
37728 */
37729 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__37729; goto __pyx_L1_error;}
37730 __Pyx_GOTREF(__pyx_t_3);
37731 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__37731; goto __pyx_L1_error;}
37732 __Pyx_GOTREF(__pyx_t_5);
37733 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
37734 __Pyx_GIVEREF(__pyx_v_self->name);
37735 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_self
->name)
;
37736 __Pyx_INCREF(__pyx_v_dest_name)( ((PyObject*)(__pyx_v_dest_name))->ob_refcnt++);
37737 __Pyx_GIVEREF(__pyx_v_dest_name);
37738 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_dest_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_v_dest_name
)
;
37739 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_copying_image_s_to_s, __pyx_t_5)PyString_Format(__pyx_kp_s_error_copying_image_s_to_s, __pyx_t_5
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__37739; goto __pyx_L1_error;}
37740 __Pyx_GOTREF(__pyx_t_2);
37741 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
37742 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__37742; goto __pyx_L1_error;}
37743 __Pyx_GOTREF(__pyx_t_5);
37744 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
37745 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
37746 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
37747 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
37748 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__37748; goto __pyx_L1_error;}
37749
37750 /* "rbd.pyx":3303
37751 * finally:
37752 * rbd_image_options_destroy(opts)
37753 * if ret < 0: # <<<<<<<<<<<<<<
37754 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
37755 *
37756 */
37757 }
37758
37759 /* "rbd.pyx":3250
37760 * return owner == 1
37761 *
37762 * def copy(self, dest_ioctx, dest_name, features=None, order=None, # <<<<<<<<<<<<<<
37763 * stripe_unit=None, stripe_count=None, data_pool=None):
37764 * """
37765 */
37766
37767 /* function exit code */
37768 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
37769 goto __pyx_L0;
37770 __pyx_L1_error:;
37771 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
37772 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
37773 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
37774 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
37775 __Pyx_AddTraceback("rbd.Image.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
37776 __pyx_r = NULL((void*)0);
37777 __pyx_L0:;
37778 __Pyx_XDECREF(__pyx_v_dest_name)do { if ((__pyx_v_dest_name) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_dest_name))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_dest_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dest_name
)))); } while (0); } while (0)
;
37779 __Pyx_XDECREF(__pyx_v_data_pool)do { if ((__pyx_v_data_pool) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_data_pool))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_data_pool)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_data_pool
)))); } while (0); } while (0)
;
37780 __Pyx_XGIVEREF(__pyx_r);
37781 __Pyx_RefNannyFinishContext();
37782 return __pyx_r;
37783}
37784
37785/* "rbd.pyx":3306
37786 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
37787 *
37788 * def deep_copy(self, dest_ioctx, dest_name, features=None, order=None, # <<<<<<<<<<<<<<
37789 * stripe_unit=None, stripe_count=None, data_pool=None):
37790 * """
37791 */
37792
37793/* Python wrapper */
37794static PyObject *__pyx_pw_3rbd_5Image_51deep_copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37795static char __pyx_doc_3rbd_5Image_50deep_copy[] = "Image.deep_copy(self, dest_ioctx, dest_name, features=None, order=None, stripe_unit=None, stripe_count=None, data_pool=None)\n\n Deep copy the image to another location.\n\n :param dest_ioctx: determines which pool to copy into\n :type dest_ioctx: :class:`rados.Ioctx`\n :param dest_name: the name of the copy\n :type dest_name: str\n :param features: bitmask of features to enable; if set, must include layering\n :type features: int\n :param order: the image is split into (2**order) byte objects\n :type order: int\n :param stripe_unit: stripe unit in bytes (default None to let librbd decide)\n :type stripe_unit: int\n :param stripe_count: objects to stripe over before looping\n :type stripe_count: int\n :param data_pool: optional separate pool for data blocks\n :type data_pool: str\n :raises: :class:`TypeError`\n :raises: :class:`InvalidArgument`\n :raises: :class:`ImageExists`\n :raises: :class:`FunctionNotSupported`\n :raises: :class:`ArgumentOutOfRange`\n ";
37796static PyObject *__pyx_pw_3rbd_5Image_51deep_copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37797 PyObject *__pyx_v_dest_ioctx = 0;
37798 PyObject *__pyx_v_dest_name = 0;
37799 PyObject *__pyx_v_features = 0;
37800 PyObject *__pyx_v_order = 0;
37801 PyObject *__pyx_v_stripe_unit = 0;
37802 PyObject *__pyx_v_stripe_count = 0;
37803 PyObject *__pyx_v_data_pool = 0;
37804 int __pyx_lineno = 0;
37805 const char *__pyx_filename = NULL((void*)0);
37806 int __pyx_clineno = 0;
37807 PyObject *__pyx_r = 0;
37808 __Pyx_RefNannyDeclarations
37809 __Pyx_RefNannySetupContext("deep_copy (wrapper)", 0);
37810 {
37811 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dest_ioctx,&__pyx_n_s_dest_name,&__pyx_n_s_features,&__pyx_n_s_order,&__pyx_n_s_stripe_unit,&__pyx_n_s_stripe_count,&__pyx_n_s_data_pool,0};
37812 PyObject* values[7] = {0,0,0,0,0,0,0};
37813 values[2] = ((PyObject *)Py_None(&_Py_NoneStruct));
37814 values[3] = ((PyObject *)Py_None(&_Py_NoneStruct));
37815
37816 /* "rbd.pyx":3307
37817 *
37818 * def deep_copy(self, dest_ioctx, dest_name, features=None, order=None,
37819 * stripe_unit=None, stripe_count=None, data_pool=None): # <<<<<<<<<<<<<<
37820 * """
37821 * Deep copy the image to another location.
37822 */
37823 values[4] = ((PyObject *)Py_None(&_Py_NoneStruct));
37824 values[5] = ((PyObject *)Py_None(&_Py_NoneStruct));
37825 values[6] = ((PyObject *)Py_None(&_Py_NoneStruct));
37826 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
37827 Py_ssize_t kw_args;
37828 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
37829 switch (pos_args) {
37830 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
37831 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
37832 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
37833 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
37834 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
37835 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
37836 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
37837 case 0: break;
37838 default: goto __pyx_L5_argtuple_error;
37839 }
37840 kw_args = PyDict_Size(__pyx_kwds);
37841 switch (pos_args) {
37842 case 0:
37843 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_ioctx
)) != 0), 1)
) kw_args--;
37844 else goto __pyx_L5_argtuple_error;
37845 case 1:
37846 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_name)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest_name
)) != 0), 1)
) kw_args--;
37847 else {
37848 __Pyx_RaiseArgtupleInvalid("deep_copy", 0, 2, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__37848; goto __pyx_L3_error;}
37849 }
37850 case 2:
37851 if (kw_args > 0) {
37852 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_features);
37853 if (value) { values[2] = value; kw_args--; }
37854 }
37855 case 3:
37856 if (kw_args > 0) {
37857 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_order);
37858 if (value) { values[3] = value; kw_args--; }
37859 }
37860 case 4:
37861 if (kw_args > 0) {
37862 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_unit);
37863 if (value) { values[4] = value; kw_args--; }
37864 }
37865 case 5:
37866 if (kw_args > 0) {
37867 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stripe_count);
37868 if (value) { values[5] = value; kw_args--; }
37869 }
37870 case 6:
37871 if (kw_args > 0) {
37872 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data_pool);
37873 if (value) { values[6] = value; kw_args--; }
37874 }
37875 }
37876 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
37877 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deep_copy") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "deep_copy") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__37877; goto __pyx_L3_error;}
37878 }
37879 } else {
37880 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
37881 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6)(((PyTupleObject *)(__pyx_args))->ob_item[6]);
37882 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
37883 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
37884 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
37885 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
37886 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
37887 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
37888 break;
37889 default: goto __pyx_L5_argtuple_error;
37890 }
37891 }
37892 __pyx_v_dest_ioctx = values[0];
37893 __pyx_v_dest_name = values[1];
37894 __pyx_v_features = values[2];
37895 __pyx_v_order = values[3];
37896 __pyx_v_stripe_unit = values[4];
37897 __pyx_v_stripe_count = values[5];
37898 __pyx_v_data_pool = values[6];
37899 }
37900 goto __pyx_L4_argument_unpacking_done;
37901 __pyx_L5_argtuple_error:;
37902 __Pyx_RaiseArgtupleInvalid("deep_copy", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__37902; goto __pyx_L3_error;}
37903 __pyx_L3_error:;
37904 __Pyx_AddTraceback("rbd.Image.deep_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
37905 __Pyx_RefNannyFinishContext();
37906 return NULL((void*)0);
37907 __pyx_L4_argument_unpacking_done:;
37908 __pyx_r = __pyx_pf_3rbd_5Image_50deep_copy(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_dest_ioctx, __pyx_v_dest_name, __pyx_v_features, __pyx_v_order, __pyx_v_stripe_unit, __pyx_v_stripe_count, __pyx_v_data_pool);
37909
37910 /* "rbd.pyx":3306
37911 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
37912 *
37913 * def deep_copy(self, dest_ioctx, dest_name, features=None, order=None, # <<<<<<<<<<<<<<
37914 * stripe_unit=None, stripe_count=None, data_pool=None):
37915 * """
37916 */
37917
37918 /* function exit code */
37919 __Pyx_RefNannyFinishContext();
37920 return __pyx_r;
37921}
37922
37923static PyObject *__pyx_pf_3rbd_5Image_50deep_copy(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_dest_ioctx, PyObject *__pyx_v_dest_name, PyObject *__pyx_v_features, PyObject *__pyx_v_order, PyObject *__pyx_v_stripe_unit, PyObject *__pyx_v_stripe_count, PyObject *__pyx_v_data_pool) {
37924 rados_ioctx_t __pyx_v__dest_ioctx;
37925 char *__pyx_v__dest_name;
37926 rbd_image_options_t __pyx_v_opts;
37927 int __pyx_v_ret;
37928 PyObject *__pyx_r = NULL((void*)0);
37929 __Pyx_RefNannyDeclarations
37930 PyObject *__pyx_t_1 = NULL((void*)0);
37931 PyObject *__pyx_t_2 = NULL((void*)0);
37932 PyObject *__pyx_t_3 = NULL((void*)0);
37933 Py_ssize_t __pyx_t_4;
37934 PyObject *__pyx_t_5 = NULL((void*)0);
37935 rados_ioctx_t __pyx_t_6;
37936 char *__pyx_t_7;
37937 int __pyx_t_8;
37938 int __pyx_t_9;
37939 int __pyx_t_10;
37940 uint64_t __pyx_t_11;
37941 char const *__pyx_t_12;
37942 int __pyx_t_13;
37943 char const *__pyx_t_14;
37944 PyObject *__pyx_t_15 = NULL((void*)0);
37945 PyObject *__pyx_t_16 = NULL((void*)0);
37946 PyObject *__pyx_t_17 = NULL((void*)0);
37947 PyObject *__pyx_t_18 = NULL((void*)0);
37948 PyObject *__pyx_t_19 = NULL((void*)0);
37949 PyObject *__pyx_t_20 = NULL((void*)0);
37950 int __pyx_lineno = 0;
37951 const char *__pyx_filename = NULL((void*)0);
37952 int __pyx_clineno = 0;
37953 __Pyx_RefNannySetupContext("deep_copy", 0);
37954 __Pyx_INCREF(__pyx_v_dest_name)( ((PyObject*)(__pyx_v_dest_name))->ob_refcnt++);
37955 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
37956
37957 /* "rbd.pyx":3331
37958 * :raises: :class:`ArgumentOutOfRange`
37959 * """
37960 * dest_name = cstr(dest_name, 'dest_name') # <<<<<<<<<<<<<<
37961 * data_pool = cstr(data_pool, 'data_pool', opt=True)
37962 * cdef:
37963 */
37964 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3331; __pyx_clineno = __LINE__37964; goto __pyx_L1_error;}
37965 __Pyx_GOTREF(__pyx_t_2);
37966 __pyx_t_3 = NULL((void*)0);
37967 __pyx_t_4 = 0;
37968 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
37969 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
37970 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
37971 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
37972 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
37973 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
37974 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
37975 __pyx_t_4 = 1;
37976 }
37977 }
37978 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3331; __pyx_clineno = __LINE__37978; goto __pyx_L1_error;}
37979 __Pyx_GOTREF(__pyx_t_5);
37980 if (__pyx_t_3) {
37981 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
37982 }
37983 __Pyx_INCREF(__pyx_v_dest_name)( ((PyObject*)(__pyx_v_dest_name))->ob_refcnt++);
37984 __Pyx_GIVEREF(__pyx_v_dest_name);
37985 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_dest_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_dest_name
)
;
37986 __Pyx_INCREF(__pyx_n_s_dest_name)( ((PyObject*)(__pyx_n_s_dest_name))->ob_refcnt++);
37987 __Pyx_GIVEREF(__pyx_n_s_dest_name);
37988 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_dest_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_dest_name
)
;
37989 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3331; __pyx_clineno = __LINE__37989; goto __pyx_L1_error;}
37990 __Pyx_GOTREF(__pyx_t_1);
37991 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
37992 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
37993 __Pyx_DECREF_SET(__pyx_v_dest_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_dest_name; __pyx_v_dest_name
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
37994 __pyx_t_1 = 0;
37995
37996 /* "rbd.pyx":3332
37997 * """
37998 * dest_name = cstr(dest_name, 'dest_name')
37999 * data_pool = cstr(data_pool, 'data_pool', opt=True) # <<<<<<<<<<<<<<
38000 * cdef:
38001 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
38002 */
38003 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__38003; goto __pyx_L1_error;}
38004 __Pyx_GOTREF(__pyx_t_1);
38005 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__38005; goto __pyx_L1_error;}
38006 __Pyx_GOTREF(__pyx_t_2);
38007 __Pyx_INCREF(__pyx_v_data_pool)( ((PyObject*)(__pyx_v_data_pool))->ob_refcnt++);
38008 __Pyx_GIVEREF(__pyx_v_data_pool);
38009 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_data_pool
)
;
38010 __Pyx_INCREF(__pyx_n_s_data_pool)( ((PyObject*)(__pyx_n_s_data_pool))->ob_refcnt++);
38011 __Pyx_GIVEREF(__pyx_n_s_data_pool);
38012 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_data_pool)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_data_pool
)
;
38013 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__38013; goto __pyx_L1_error;}
38014 __Pyx_GOTREF(__pyx_t_5);
38015 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__38015; goto __pyx_L1_error;}
38016 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__38016; goto __pyx_L1_error;}
38017 __Pyx_GOTREF(__pyx_t_3);
38018 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
38019 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38020 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
38021 __Pyx_DECREF_SET(__pyx_v_data_pool, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_data_pool; __pyx_v_data_pool
= __pyx_t_3; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
38022 __pyx_t_3 = 0;
38023
38024 /* "rbd.pyx":3334
38025 * data_pool = cstr(data_pool, 'data_pool', opt=True)
38026 * cdef:
38027 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx) # <<<<<<<<<<<<<<
38028 * char *_dest_name = dest_name
38029 * rbd_image_options_t opts
38030 */
38031 if (!(likely(((__pyx_v_dest_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dest_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_dest_ioctx) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_dest_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__38031; goto __pyx_L1_error;}
38032 __pyx_t_6 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_dest_ioctx)); if (unlikely(__pyx_t_6 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_6 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__38032; goto __pyx_L1_error;}
38033 __pyx_v__dest_ioctx = __pyx_t_6;
38034
38035 /* "rbd.pyx":3335
38036 * cdef:
38037 * rados_ioctx_t _dest_ioctx = convert_ioctx(dest_ioctx)
38038 * char *_dest_name = dest_name # <<<<<<<<<<<<<<
38039 * rbd_image_options_t opts
38040 *
38041 */
38042 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_dest_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3335; __pyx_clineno = __LINE__38042; goto __pyx_L1_error;}
38043 __pyx_v__dest_name = __pyx_t_7;
38044
38045 /* "rbd.pyx":3338
38046 * rbd_image_options_t opts
38047 *
38048 * rbd_image_options_create(&opts) # <<<<<<<<<<<<<<
38049 * try:
38050 * if features is not None:
38051 */
38052 rbd_image_options_create((&__pyx_v_opts));
38053
38054 /* "rbd.pyx":3339
38055 *
38056 * rbd_image_options_create(&opts)
38057 * try: # <<<<<<<<<<<<<<
38058 * if features is not None:
38059 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
38060 */
38061 /*try:*/ {
38062
38063 /* "rbd.pyx":3340
38064 * rbd_image_options_create(&opts)
38065 * try:
38066 * if features is not None: # <<<<<<<<<<<<<<
38067 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
38068 * features)
38069 */
38070 __pyx_t_8 = (__pyx_v_features != Py_None(&_Py_NoneStruct));
38071 __pyx_t_9 = (__pyx_t_8 != 0);
38072 if (__pyx_t_9) {
38073
38074 /* "rbd.pyx":3341
38075 * try:
38076 * if features is not None:
38077 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
38078 * features)
38079 * if order is not None:
38080 */
38081 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_FEATURES); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__38081; goto __pyx_L4_error;}
38082 __Pyx_GOTREF(__pyx_t_3);
38083 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__38083; goto __pyx_L4_error;}
38084 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38085
38086 /* "rbd.pyx":3342
38087 * if features is not None:
38088 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
38089 * features) # <<<<<<<<<<<<<<
38090 * if order is not None:
38091 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
38092 */
38093 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_features); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__38093; goto __pyx_L4_error;}
38094
38095 /* "rbd.pyx":3341
38096 * try:
38097 * if features is not None:
38098 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES, # <<<<<<<<<<<<<<
38099 * features)
38100 * if order is not None:
38101 */
38102 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
38103
38104 /* "rbd.pyx":3340
38105 * rbd_image_options_create(&opts)
38106 * try:
38107 * if features is not None: # <<<<<<<<<<<<<<
38108 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
38109 * features)
38110 */
38111 }
38112
38113 /* "rbd.pyx":3343
38114 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
38115 * features)
38116 * if order is not None: # <<<<<<<<<<<<<<
38117 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
38118 * order)
38119 */
38120 __pyx_t_9 = (__pyx_v_order != Py_None(&_Py_NoneStruct));
38121 __pyx_t_8 = (__pyx_t_9 != 0);
38122 if (__pyx_t_8) {
38123
38124 /* "rbd.pyx":3344
38125 * features)
38126 * if order is not None:
38127 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
38128 * order)
38129 * if stripe_unit is not None:
38130 */
38131 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_ORDER); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__38131; goto __pyx_L4_error;}
38132 __Pyx_GOTREF(__pyx_t_3);
38133 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__38133; goto __pyx_L4_error;}
38134 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38135
38136 /* "rbd.pyx":3345
38137 * if order is not None:
38138 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
38139 * order) # <<<<<<<<<<<<<<
38140 * if stripe_unit is not None:
38141 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
38142 */
38143 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_order); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__38143; goto __pyx_L4_error;}
38144
38145 /* "rbd.pyx":3344
38146 * features)
38147 * if order is not None:
38148 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER, # <<<<<<<<<<<<<<
38149 * order)
38150 * if stripe_unit is not None:
38151 */
38152 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
38153
38154 /* "rbd.pyx":3343
38155 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_FEATURES,
38156 * features)
38157 * if order is not None: # <<<<<<<<<<<<<<
38158 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
38159 * order)
38160 */
38161 }
38162
38163 /* "rbd.pyx":3346
38164 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
38165 * order)
38166 * if stripe_unit is not None: # <<<<<<<<<<<<<<
38167 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
38168 * stripe_unit)
38169 */
38170 __pyx_t_8 = (__pyx_v_stripe_unit != Py_None(&_Py_NoneStruct));
38171 __pyx_t_9 = (__pyx_t_8 != 0);
38172 if (__pyx_t_9) {
38173
38174 /* "rbd.pyx":3347
38175 * order)
38176 * if stripe_unit is not None:
38177 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
38178 * stripe_unit)
38179 * if stripe_count is not None:
38180 */
38181 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__38181; goto __pyx_L4_error;}
38182 __Pyx_GOTREF(__pyx_t_3);
38183 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__38183; goto __pyx_L4_error;}
38184 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38185
38186 /* "rbd.pyx":3348
38187 * if stripe_unit is not None:
38188 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
38189 * stripe_unit) # <<<<<<<<<<<<<<
38190 * if stripe_count is not None:
38191 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
38192 */
38193 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_unit); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__38193; goto __pyx_L4_error;}
38194
38195 /* "rbd.pyx":3347
38196 * order)
38197 * if stripe_unit is not None:
38198 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT, # <<<<<<<<<<<<<<
38199 * stripe_unit)
38200 * if stripe_count is not None:
38201 */
38202 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
38203
38204 /* "rbd.pyx":3346
38205 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_ORDER,
38206 * order)
38207 * if stripe_unit is not None: # <<<<<<<<<<<<<<
38208 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
38209 * stripe_unit)
38210 */
38211 }
38212
38213 /* "rbd.pyx":3349
38214 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
38215 * stripe_unit)
38216 * if stripe_count is not None: # <<<<<<<<<<<<<<
38217 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
38218 * stripe_count)
38219 */
38220 __pyx_t_9 = (__pyx_v_stripe_count != Py_None(&_Py_NoneStruct));
38221 __pyx_t_8 = (__pyx_t_9 != 0);
38222 if (__pyx_t_8) {
38223
38224 /* "rbd.pyx":3350
38225 * stripe_unit)
38226 * if stripe_count is not None:
38227 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
38228 * stripe_count)
38229 * if data_pool is not None:
38230 */
38231 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__38231; goto __pyx_L4_error;}
38232 __Pyx_GOTREF(__pyx_t_3);
38233 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __pyx_clineno = __LINE__38233; goto __pyx_L4_error;}
38234 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38235
38236 /* "rbd.pyx":3351
38237 * if stripe_count is not None:
38238 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
38239 * stripe_count) # <<<<<<<<<<<<<<
38240 * if data_pool is not None:
38241 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
38242 */
38243 __pyx_t_11 = __Pyx_PyInt_As_uint64_t(__pyx_v_stripe_count); if (unlikely((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__38243; goto __pyx_L4_error;}
38244
38245 /* "rbd.pyx":3350
38246 * stripe_unit)
38247 * if stripe_count is not None:
38248 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT, # <<<<<<<<<<<<<<
38249 * stripe_count)
38250 * if data_pool is not None:
38251 */
38252 rbd_image_options_set_uint64(__pyx_v_opts, __pyx_t_10, __pyx_t_11);
38253
38254 /* "rbd.pyx":3349
38255 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_UNIT,
38256 * stripe_unit)
38257 * if stripe_count is not None: # <<<<<<<<<<<<<<
38258 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
38259 * stripe_count)
38260 */
38261 }
38262
38263 /* "rbd.pyx":3352
38264 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
38265 * stripe_count)
38266 * if data_pool is not None: # <<<<<<<<<<<<<<
38267 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
38268 * data_pool)
38269 */
38270 __pyx_t_8 = (__pyx_v_data_pool != Py_None(&_Py_NoneStruct));
38271 __pyx_t_9 = (__pyx_t_8 != 0);
38272 if (__pyx_t_9) {
38273
38274 /* "rbd.pyx":3353
38275 * stripe_count)
38276 * if data_pool is not None:
38277 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
38278 * data_pool)
38279 * with nogil:
38280 */
38281 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__38281; goto __pyx_L4_error;}
38282 __Pyx_GOTREF(__pyx_t_3);
38283 __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_10 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3353; __pyx_clineno = __LINE__38283; goto __pyx_L4_error;}
38284 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38285
38286 /* "rbd.pyx":3354
38287 * if data_pool is not None:
38288 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
38289 * data_pool) # <<<<<<<<<<<<<<
38290 * with nogil:
38291 * ret = rbd_deep_copy(self.image, _dest_ioctx, _dest_name, opts)
38292 */
38293 __pyx_t_12 = __Pyx_PyObject_AsString(__pyx_v_data_pool); if (unlikely((!__pyx_t_12) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_12) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __pyx_clineno = __LINE__38293; goto __pyx_L4_error;}
38294
38295 /* "rbd.pyx":3353
38296 * stripe_count)
38297 * if data_pool is not None:
38298 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL, # <<<<<<<<<<<<<<
38299 * data_pool)
38300 * with nogil:
38301 */
38302 rbd_image_options_set_string(__pyx_v_opts, __pyx_t_10, __pyx_t_12);
38303
38304 /* "rbd.pyx":3352
38305 * rbd_image_options_set_uint64(opts, RBD_IMAGE_OPTION_STRIPE_COUNT,
38306 * stripe_count)
38307 * if data_pool is not None: # <<<<<<<<<<<<<<
38308 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
38309 * data_pool)
38310 */
38311 }
38312
38313 /* "rbd.pyx":3355
38314 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
38315 * data_pool)
38316 * with nogil: # <<<<<<<<<<<<<<
38317 * ret = rbd_deep_copy(self.image, _dest_ioctx, _dest_name, opts)
38318 * finally:
38319 */
38320 {
38321 #ifdef WITH_THREAD1
38322 PyThreadState *_save;
38323 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
38324 #endif
38325 /*try:*/ {
38326
38327 /* "rbd.pyx":3356
38328 * data_pool)
38329 * with nogil:
38330 * ret = rbd_deep_copy(self.image, _dest_ioctx, _dest_name, opts) # <<<<<<<<<<<<<<
38331 * finally:
38332 * rbd_image_options_destroy(opts)
38333 */
38334 __pyx_v_ret = rbd_deep_copy(__pyx_v_self->image, __pyx_v__dest_ioctx, __pyx_v__dest_name, __pyx_v_opts);
38335 }
38336
38337 /* "rbd.pyx":3355
38338 * rbd_image_options_set_string(opts, RBD_IMAGE_OPTION_DATA_POOL,
38339 * data_pool)
38340 * with nogil: # <<<<<<<<<<<<<<
38341 * ret = rbd_deep_copy(self.image, _dest_ioctx, _dest_name, opts)
38342 * finally:
38343 */
38344 /*finally:*/ {
38345 /*normal exit:*/{
38346 #ifdef WITH_THREAD1
38347 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
38348 #endif
38349 goto __pyx_L13;
38350 }
38351 __pyx_L13:;
38352 }
38353 }
38354 }
38355
38356 /* "rbd.pyx":3358
38357 * ret = rbd_deep_copy(self.image, _dest_ioctx, _dest_name, opts)
38358 * finally:
38359 * rbd_image_options_destroy(opts) # <<<<<<<<<<<<<<
38360 * if ret < 0:
38361 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
38362 */
38363 /*finally:*/ {
38364 /*normal exit:*/{
38365 rbd_image_options_destroy(__pyx_v_opts);
38366 goto __pyx_L5;
38367 }
38368 /*exception exit:*/{
38369 __pyx_L4_error:;
38370 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
38371 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
38372 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
38373 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
38374 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
38375 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
38376 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
38377 __Pyx_XGOTREF(__pyx_t_15);
38378 __Pyx_XGOTREF(__pyx_t_16);
38379 __Pyx_XGOTREF(__pyx_t_17);
38380 __Pyx_XGOTREF(__pyx_t_18);
38381 __Pyx_XGOTREF(__pyx_t_19);
38382 __Pyx_XGOTREF(__pyx_t_20);
38383 __pyx_t_10 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
38384 {
38385 rbd_image_options_destroy(__pyx_v_opts);
38386 }
38387 if (PY_MAJOR_VERSION2 >= 3) {
38388 __Pyx_XGIVEREF(__pyx_t_18);
38389 __Pyx_XGIVEREF(__pyx_t_19);
38390 __Pyx_XGIVEREF(__pyx_t_20);
38391 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
38392 }
38393 __Pyx_XGIVEREF(__pyx_t_15);
38394 __Pyx_XGIVEREF(__pyx_t_16);
38395 __Pyx_XGIVEREF(__pyx_t_17);
38396 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
38397 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
38398 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
38399 goto __pyx_L1_error;
38400 }
38401 __pyx_L5:;
38402 }
38403
38404 /* "rbd.pyx":3359
38405 * finally:
38406 * rbd_image_options_destroy(opts)
38407 * if ret < 0: # <<<<<<<<<<<<<<
38408 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
38409 *
38410 */
38411 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
38412 if (__pyx_t_9) {
38413
38414 /* "rbd.pyx":3360
38415 * rbd_image_options_destroy(opts)
38416 * if ret < 0:
38417 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name)) # <<<<<<<<<<<<<<
38418 *
38419 * def list_snaps(self):
38420 */
38421 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__38421; goto __pyx_L1_error;}
38422 __Pyx_GOTREF(__pyx_t_3);
38423 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__38423; goto __pyx_L1_error;}
38424 __Pyx_GOTREF(__pyx_t_5);
38425 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
38426 __Pyx_GIVEREF(__pyx_v_self->name);
38427 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_self
->name)
;
38428 __Pyx_INCREF(__pyx_v_dest_name)( ((PyObject*)(__pyx_v_dest_name))->ob_refcnt++);
38429 __Pyx_GIVEREF(__pyx_v_dest_name);
38430 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_dest_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_v_dest_name
)
;
38431 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_copying_image_s_to_s, __pyx_t_5)PyString_Format(__pyx_kp_s_error_copying_image_s_to_s, __pyx_t_5
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__38431; goto __pyx_L1_error;}
38432 __Pyx_GOTREF(__pyx_t_2);
38433 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
38434 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__38434; goto __pyx_L1_error;}
38435 __Pyx_GOTREF(__pyx_t_5);
38436 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38437 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38438 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
38439 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
38440 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__38440; goto __pyx_L1_error;}
38441
38442 /* "rbd.pyx":3359
38443 * finally:
38444 * rbd_image_options_destroy(opts)
38445 * if ret < 0: # <<<<<<<<<<<<<<
38446 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
38447 *
38448 */
38449 }
38450
38451 /* "rbd.pyx":3306
38452 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
38453 *
38454 * def deep_copy(self, dest_ioctx, dest_name, features=None, order=None, # <<<<<<<<<<<<<<
38455 * stripe_unit=None, stripe_count=None, data_pool=None):
38456 * """
38457 */
38458
38459 /* function exit code */
38460 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
38461 goto __pyx_L0;
38462 __pyx_L1_error:;
38463 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
38464 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
38465 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
38466 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
38467 __Pyx_AddTraceback("rbd.Image.deep_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
38468 __pyx_r = NULL((void*)0);
38469 __pyx_L0:;
38470 __Pyx_XDECREF(__pyx_v_dest_name)do { if ((__pyx_v_dest_name) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_dest_name))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_dest_name)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dest_name
)))); } while (0); } while (0)
;
38471 __Pyx_XDECREF(__pyx_v_data_pool)do { if ((__pyx_v_data_pool) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_data_pool))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_data_pool)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_data_pool
)))); } while (0); } while (0)
;
38472 __Pyx_XGIVEREF(__pyx_r);
38473 __Pyx_RefNannyFinishContext();
38474 return __pyx_r;
38475}
38476
38477/* "rbd.pyx":3362
38478 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
38479 *
38480 * def list_snaps(self): # <<<<<<<<<<<<<<
38481 * """
38482 * Iterate over the snapshots of an image.
38483 */
38484
38485/* Python wrapper */
38486static PyObject *__pyx_pw_3rbd_5Image_53list_snaps(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
38487static char __pyx_doc_3rbd_5Image_52list_snaps[] = "Image.list_snaps(self)\n\n Iterate over the snapshots of an image.\n\n :returns: :class:`SnapIterator`\n ";
38488static PyObject *__pyx_pw_3rbd_5Image_53list_snaps(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
38489 PyObject *__pyx_r = 0;
38490 __Pyx_RefNannyDeclarations
38491 __Pyx_RefNannySetupContext("list_snaps (wrapper)", 0);
38492 __pyx_r = __pyx_pf_3rbd_5Image_52list_snaps(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
38493
38494 /* function exit code */
38495 __Pyx_RefNannyFinishContext();
38496 return __pyx_r;
38497}
38498
38499static PyObject *__pyx_pf_3rbd_5Image_52list_snaps(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
38500 PyObject *__pyx_r = NULL((void*)0);
38501 __Pyx_RefNannyDeclarations
38502 PyObject *__pyx_t_1 = NULL((void*)0);
38503 PyObject *__pyx_t_2 = NULL((void*)0);
38504 int __pyx_lineno = 0;
38505 const char *__pyx_filename = NULL((void*)0);
38506 int __pyx_clineno = 0;
38507 __Pyx_RefNannySetupContext("list_snaps", 0);
38508
38509 /* "rbd.pyx":3368
38510 * :returns: :class:`SnapIterator`
38511 * """
38512 * return SnapIterator(self) # <<<<<<<<<<<<<<
38513 *
38514 * def create_snap(self, name):
38515 */
38516 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
38517 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3368; __pyx_clineno = __LINE__38517; goto __pyx_L1_error;}
38518 __Pyx_GOTREF(__pyx_t_1);
38519 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
38520 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
38521 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
38522 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_SnapIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3368; __pyx_clineno = __LINE__38522; goto __pyx_L1_error;}
38523 __Pyx_GOTREF(__pyx_t_2);
38524 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
38525 __pyx_r = __pyx_t_2;
38526 __pyx_t_2 = 0;
38527 goto __pyx_L0;
38528
38529 /* "rbd.pyx":3362
38530 * raise make_ex(ret, 'error copying image %s to %s' % (self.name, dest_name))
38531 *
38532 * def list_snaps(self): # <<<<<<<<<<<<<<
38533 * """
38534 * Iterate over the snapshots of an image.
38535 */
38536
38537 /* function exit code */
38538 __pyx_L1_error:;
38539 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
38540 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
38541 __Pyx_AddTraceback("rbd.Image.list_snaps", __pyx_clineno, __pyx_lineno, __pyx_filename);
38542 __pyx_r = NULL((void*)0);
38543 __pyx_L0:;
38544 __Pyx_XGIVEREF(__pyx_r);
38545 __Pyx_RefNannyFinishContext();
38546 return __pyx_r;
38547}
38548
38549/* "rbd.pyx":3370
38550 * return SnapIterator(self)
38551 *
38552 * def create_snap(self, name): # <<<<<<<<<<<<<<
38553 * """
38554 * Create a snapshot of the image.
38555 */
38556
38557/* Python wrapper */
38558static PyObject *__pyx_pw_3rbd_5Image_55create_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
38559static char __pyx_doc_3rbd_5Image_54create_snap[] = "Image.create_snap(self, name)\n\n Create a snapshot of the image.\n\n :param name: the name of the snapshot\n :type name: str\n :raises: :class:`ImageExists`\n ";
38560static PyObject *__pyx_pw_3rbd_5Image_55create_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
38561 PyObject *__pyx_r = 0;
38562 __Pyx_RefNannyDeclarations
38563 __Pyx_RefNannySetupContext("create_snap (wrapper)", 0);
38564 __pyx_r = __pyx_pf_3rbd_5Image_54create_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
38565
38566 /* function exit code */
38567 __Pyx_RefNannyFinishContext();
38568 return __pyx_r;
38569}
38570
38571static PyObject *__pyx_pf_3rbd_5Image_54create_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
38572 char *__pyx_v__name;
38573 int __pyx_v_ret;
38574 PyObject *__pyx_r = NULL((void*)0);
38575 __Pyx_RefNannyDeclarations
38576 PyObject *__pyx_t_1 = NULL((void*)0);
38577 PyObject *__pyx_t_2 = NULL((void*)0);
38578 PyObject *__pyx_t_3 = NULL((void*)0);
38579 Py_ssize_t __pyx_t_4;
38580 PyObject *__pyx_t_5 = NULL((void*)0);
38581 char *__pyx_t_6;
38582 int __pyx_t_7;
38583 int __pyx_lineno = 0;
38584 const char *__pyx_filename = NULL((void*)0);
38585 int __pyx_clineno = 0;
38586 __Pyx_RefNannySetupContext("create_snap", 0);
38587 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
38588
38589 /* "rbd.pyx":3378
38590 * :raises: :class:`ImageExists`
38591 * """
38592 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
38593 * cdef char *_name = name
38594 * with nogil:
38595 */
38596 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3378; __pyx_clineno = __LINE__38596; goto __pyx_L1_error;}
38597 __Pyx_GOTREF(__pyx_t_2);
38598 __pyx_t_3 = NULL((void*)0);
38599 __pyx_t_4 = 0;
38600 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
38601 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
38602 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
38603 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
38604 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
38605 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
38606 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
38607 __pyx_t_4 = 1;
38608 }
38609 }
38610 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3378; __pyx_clineno = __LINE__38610; goto __pyx_L1_error;}
38611 __Pyx_GOTREF(__pyx_t_5);
38612 if (__pyx_t_3) {
38613 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
38614 }
38615 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
38616 __Pyx_GIVEREF(__pyx_v_name);
38617 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
38618 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
38619 __Pyx_GIVEREF(__pyx_n_s_name);
38620 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
38621 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3378; __pyx_clineno = __LINE__38621; goto __pyx_L1_error;}
38622 __Pyx_GOTREF(__pyx_t_1);
38623 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
38624 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38625 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
38626 __pyx_t_1 = 0;
38627
38628 /* "rbd.pyx":3379
38629 * """
38630 * name = cstr(name, 'name')
38631 * cdef char *_name = name # <<<<<<<<<<<<<<
38632 * with nogil:
38633 * ret = rbd_snap_create(self.image, _name)
38634 */
38635 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__38635; goto __pyx_L1_error;}
38636 __pyx_v__name = __pyx_t_6;
38637
38638 /* "rbd.pyx":3380
38639 * name = cstr(name, 'name')
38640 * cdef char *_name = name
38641 * with nogil: # <<<<<<<<<<<<<<
38642 * ret = rbd_snap_create(self.image, _name)
38643 * if ret != 0:
38644 */
38645 {
38646 #ifdef WITH_THREAD1
38647 PyThreadState *_save;
38648 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
38649 #endif
38650 /*try:*/ {
38651
38652 /* "rbd.pyx":3381
38653 * cdef char *_name = name
38654 * with nogil:
38655 * ret = rbd_snap_create(self.image, _name) # <<<<<<<<<<<<<<
38656 * if ret != 0:
38657 * raise make_ex(ret, 'error creating snapshot %s from %s' % (name, self.name))
38658 */
38659 __pyx_v_ret = rbd_snap_create(__pyx_v_self->image, __pyx_v__name);
38660 }
38661
38662 /* "rbd.pyx":3380
38663 * name = cstr(name, 'name')
38664 * cdef char *_name = name
38665 * with nogil: # <<<<<<<<<<<<<<
38666 * ret = rbd_snap_create(self.image, _name)
38667 * if ret != 0:
38668 */
38669 /*finally:*/ {
38670 /*normal exit:*/{
38671 #ifdef WITH_THREAD1
38672 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
38673 #endif
38674 goto __pyx_L5;
38675 }
38676 __pyx_L5:;
38677 }
38678 }
38679
38680 /* "rbd.pyx":3382
38681 * with nogil:
38682 * ret = rbd_snap_create(self.image, _name)
38683 * if ret != 0: # <<<<<<<<<<<<<<
38684 * raise make_ex(ret, 'error creating snapshot %s from %s' % (name, self.name))
38685 *
38686 */
38687 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
38688 if (__pyx_t_7) {
38689
38690 /* "rbd.pyx":3383
38691 * ret = rbd_snap_create(self.image, _name)
38692 * if ret != 0:
38693 * raise make_ex(ret, 'error creating snapshot %s from %s' % (name, self.name)) # <<<<<<<<<<<<<<
38694 *
38695 * def rename_snap(self, srcname, dstname):
38696 */
38697 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__38697; goto __pyx_L1_error;}
38698 __Pyx_GOTREF(__pyx_t_1);
38699 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__38699; goto __pyx_L1_error;}
38700 __Pyx_GOTREF(__pyx_t_2);
38701 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
38702 __Pyx_GIVEREF(__pyx_v_name);
38703 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_name
)
;
38704 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
38705 __Pyx_GIVEREF(__pyx_v_self->name);
38706 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_self
->name)
;
38707 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_creating_snapshot_s_from_s, __pyx_t_2)PyString_Format(__pyx_kp_s_error_creating_snapshot_s_from_s, __pyx_t_2
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__38707; goto __pyx_L1_error;}
38708 __Pyx_GOTREF(__pyx_t_5);
38709 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38710 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__38710; goto __pyx_L1_error;}
38711 __Pyx_GOTREF(__pyx_t_2);
38712 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
38713 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
38714 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
38715 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38716 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__38716; goto __pyx_L1_error;}
38717
38718 /* "rbd.pyx":3382
38719 * with nogil:
38720 * ret = rbd_snap_create(self.image, _name)
38721 * if ret != 0: # <<<<<<<<<<<<<<
38722 * raise make_ex(ret, 'error creating snapshot %s from %s' % (name, self.name))
38723 *
38724 */
38725 }
38726
38727 /* "rbd.pyx":3370
38728 * return SnapIterator(self)
38729 *
38730 * def create_snap(self, name): # <<<<<<<<<<<<<<
38731 * """
38732 * Create a snapshot of the image.
38733 */
38734
38735 /* function exit code */
38736 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
38737 goto __pyx_L0;
38738 __pyx_L1_error:;
38739 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
38740 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
38741 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
38742 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
38743 __Pyx_AddTraceback("rbd.Image.create_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
38744 __pyx_r = NULL((void*)0);
38745 __pyx_L0:;
38746 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
38747 __Pyx_XGIVEREF(__pyx_r);
38748 __Pyx_RefNannyFinishContext();
38749 return __pyx_r;
38750}
38751
38752/* "rbd.pyx":3385
38753 * raise make_ex(ret, 'error creating snapshot %s from %s' % (name, self.name))
38754 *
38755 * def rename_snap(self, srcname, dstname): # <<<<<<<<<<<<<<
38756 * """
38757 * rename a snapshot of the image.
38758 */
38759
38760/* Python wrapper */
38761static PyObject *__pyx_pw_3rbd_5Image_57rename_snap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38762static char __pyx_doc_3rbd_5Image_56rename_snap[] = "Image.rename_snap(self, srcname, dstname)\n\n rename a snapshot of the image.\n\n :param srcname: the src name of the snapshot\n :type srcname: str\n :param dstname: the dst name of the snapshot\n :type dstname: str\n :raises: :class:`ImageExists`\n ";
38763static PyObject *__pyx_pw_3rbd_5Image_57rename_snap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38764 PyObject *__pyx_v_srcname = 0;
38765 PyObject *__pyx_v_dstname = 0;
38766 int __pyx_lineno = 0;
38767 const char *__pyx_filename = NULL((void*)0);
38768 int __pyx_clineno = 0;
38769 PyObject *__pyx_r = 0;
38770 __Pyx_RefNannyDeclarations
38771 __Pyx_RefNannySetupContext("rename_snap (wrapper)", 0);
38772 {
38773 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_srcname,&__pyx_n_s_dstname,0};
38774 PyObject* values[2] = {0,0};
38775 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
38776 Py_ssize_t kw_args;
38777 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
38778 switch (pos_args) {
38779 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
38780 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
38781 case 0: break;
38782 default: goto __pyx_L5_argtuple_error;
38783 }
38784 kw_args = PyDict_Size(__pyx_kwds);
38785 switch (pos_args) {
38786 case 0:
38787 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_srcname)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_srcname
)) != 0), 1)
) kw_args--;
38788 else goto __pyx_L5_argtuple_error;
38789 case 1:
38790 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dstname)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dstname
)) != 0), 1)
) kw_args--;
38791 else {
38792 __Pyx_RaiseArgtupleInvalid("rename_snap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3385; __pyx_clineno = __LINE__38792; goto __pyx_L3_error;}
38793 }
38794 }
38795 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
38796 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rename_snap") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "rename_snap") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3385; __pyx_clineno = __LINE__38796; goto __pyx_L3_error;}
38797 }
38798 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
38799 goto __pyx_L5_argtuple_error;
38800 } else {
38801 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
38802 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
38803 }
38804 __pyx_v_srcname = values[0];
38805 __pyx_v_dstname = values[1];
38806 }
38807 goto __pyx_L4_argument_unpacking_done;
38808 __pyx_L5_argtuple_error:;
38809 __Pyx_RaiseArgtupleInvalid("rename_snap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3385; __pyx_clineno = __LINE__38809; goto __pyx_L3_error;}
38810 __pyx_L3_error:;
38811 __Pyx_AddTraceback("rbd.Image.rename_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
38812 __Pyx_RefNannyFinishContext();
38813 return NULL((void*)0);
38814 __pyx_L4_argument_unpacking_done:;
38815 __pyx_r = __pyx_pf_3rbd_5Image_56rename_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_srcname, __pyx_v_dstname);
38816
38817 /* function exit code */
38818 __Pyx_RefNannyFinishContext();
38819 return __pyx_r;
38820}
38821
38822static PyObject *__pyx_pf_3rbd_5Image_56rename_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_srcname, PyObject *__pyx_v_dstname) {
38823 char *__pyx_v__srcname;
38824 char *__pyx_v__dstname;
38825 int __pyx_v_ret;
38826 PyObject *__pyx_r = NULL((void*)0);
38827 __Pyx_RefNannyDeclarations
38828 PyObject *__pyx_t_1 = NULL((void*)0);
38829 PyObject *__pyx_t_2 = NULL((void*)0);
38830 PyObject *__pyx_t_3 = NULL((void*)0);
38831 Py_ssize_t __pyx_t_4;
38832 PyObject *__pyx_t_5 = NULL((void*)0);
38833 char *__pyx_t_6;
38834 int __pyx_t_7;
38835 int __pyx_lineno = 0;
38836 const char *__pyx_filename = NULL((void*)0);
38837 int __pyx_clineno = 0;
38838 __Pyx_RefNannySetupContext("rename_snap", 0);
38839 __Pyx_INCREF(__pyx_v_srcname)( ((PyObject*)(__pyx_v_srcname))->ob_refcnt++);
38840 __Pyx_INCREF(__pyx_v_dstname)( ((PyObject*)(__pyx_v_dstname))->ob_refcnt++);
38841
38842 /* "rbd.pyx":3395
38843 * :raises: :class:`ImageExists`
38844 * """
38845 * srcname = cstr(srcname, 'srcname') # <<<<<<<<<<<<<<
38846 * dstname = cstr(dstname, 'dstname')
38847 * cdef:
38848 */
38849 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__38849; goto __pyx_L1_error;}
38850 __Pyx_GOTREF(__pyx_t_2);
38851 __pyx_t_3 = NULL((void*)0);
38852 __pyx_t_4 = 0;
38853 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
38854 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
38855 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
38856 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
38857 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
38858 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
38859 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
38860 __pyx_t_4 = 1;
38861 }
38862 }
38863 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__38863; goto __pyx_L1_error;}
38864 __Pyx_GOTREF(__pyx_t_5);
38865 if (__pyx_t_3) {
38866 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
38867 }
38868 __Pyx_INCREF(__pyx_v_srcname)( ((PyObject*)(__pyx_v_srcname))->ob_refcnt++);
38869 __Pyx_GIVEREF(__pyx_v_srcname);
38870 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_srcname)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_srcname
)
;
38871 __Pyx_INCREF(__pyx_n_s_srcname)( ((PyObject*)(__pyx_n_s_srcname))->ob_refcnt++);
38872 __Pyx_GIVEREF(__pyx_n_s_srcname);
38873 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_srcname)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_srcname
)
;
38874 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__38874; goto __pyx_L1_error;}
38875 __Pyx_GOTREF(__pyx_t_1);
38876 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
38877 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38878 __Pyx_DECREF_SET(__pyx_v_srcname, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_srcname; __pyx_v_srcname
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
38879 __pyx_t_1 = 0;
38880
38881 /* "rbd.pyx":3396
38882 * """
38883 * srcname = cstr(srcname, 'srcname')
38884 * dstname = cstr(dstname, 'dstname') # <<<<<<<<<<<<<<
38885 * cdef:
38886 * char *_srcname = srcname
38887 */
38888 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__38888; goto __pyx_L1_error;}
38889 __Pyx_GOTREF(__pyx_t_2);
38890 __pyx_t_5 = NULL((void*)0);
38891 __pyx_t_4 = 0;
38892 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
38893 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
38894 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
38895 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
38896 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
38897 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
38898 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
38899 __pyx_t_4 = 1;
38900 }
38901 }
38902 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__38902; goto __pyx_L1_error;}
38903 __Pyx_GOTREF(__pyx_t_3);
38904 if (__pyx_t_5) {
38905 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
38906 }
38907 __Pyx_INCREF(__pyx_v_dstname)( ((PyObject*)(__pyx_v_dstname))->ob_refcnt++);
38908 __Pyx_GIVEREF(__pyx_v_dstname);
38909 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_dstname)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_dstname
)
;
38910 __Pyx_INCREF(__pyx_n_s_dstname)( ((PyObject*)(__pyx_n_s_dstname))->ob_refcnt++);
38911 __Pyx_GIVEREF(__pyx_n_s_dstname);
38912 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_dstname)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_dstname
)
;
38913 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__38913; goto __pyx_L1_error;}
38914 __Pyx_GOTREF(__pyx_t_1);
38915 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
38916 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
38917 __Pyx_DECREF_SET(__pyx_v_dstname, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_dstname; __pyx_v_dstname
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
38918 __pyx_t_1 = 0;
38919
38920 /* "rbd.pyx":3398
38921 * dstname = cstr(dstname, 'dstname')
38922 * cdef:
38923 * char *_srcname = srcname # <<<<<<<<<<<<<<
38924 * char *_dstname = dstname
38925 * with nogil:
38926 */
38927 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_srcname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3398; __pyx_clineno = __LINE__38927; goto __pyx_L1_error;}
38928 __pyx_v__srcname = __pyx_t_6;
38929
38930 /* "rbd.pyx":3399
38931 * cdef:
38932 * char *_srcname = srcname
38933 * char *_dstname = dstname # <<<<<<<<<<<<<<
38934 * with nogil:
38935 * ret = rbd_snap_rename(self.image, _srcname, _dstname)
38936 */
38937 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_dstname); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3399; __pyx_clineno = __LINE__38937; goto __pyx_L1_error;}
38938 __pyx_v__dstname = __pyx_t_6;
38939
38940 /* "rbd.pyx":3400
38941 * char *_srcname = srcname
38942 * char *_dstname = dstname
38943 * with nogil: # <<<<<<<<<<<<<<
38944 * ret = rbd_snap_rename(self.image, _srcname, _dstname)
38945 * if ret != 0:
38946 */
38947 {
38948 #ifdef WITH_THREAD1
38949 PyThreadState *_save;
38950 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
38951 #endif
38952 /*try:*/ {
38953
38954 /* "rbd.pyx":3401
38955 * char *_dstname = dstname
38956 * with nogil:
38957 * ret = rbd_snap_rename(self.image, _srcname, _dstname) # <<<<<<<<<<<<<<
38958 * if ret != 0:
38959 * raise make_ex(ret, 'error renaming snapshot of %s from %s to %s' % (self.name, srcname, dstname))
38960 */
38961 __pyx_v_ret = rbd_snap_rename(__pyx_v_self->image, __pyx_v__srcname, __pyx_v__dstname);
38962 }
38963
38964 /* "rbd.pyx":3400
38965 * char *_srcname = srcname
38966 * char *_dstname = dstname
38967 * with nogil: # <<<<<<<<<<<<<<
38968 * ret = rbd_snap_rename(self.image, _srcname, _dstname)
38969 * if ret != 0:
38970 */
38971 /*finally:*/ {
38972 /*normal exit:*/{
38973 #ifdef WITH_THREAD1
38974 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
38975 #endif
38976 goto __pyx_L5;
38977 }
38978 __pyx_L5:;
38979 }
38980 }
38981
38982 /* "rbd.pyx":3402
38983 * with nogil:
38984 * ret = rbd_snap_rename(self.image, _srcname, _dstname)
38985 * if ret != 0: # <<<<<<<<<<<<<<
38986 * raise make_ex(ret, 'error renaming snapshot of %s from %s to %s' % (self.name, srcname, dstname))
38987 *
38988 */
38989 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
38990 if (__pyx_t_7) {
38991
38992 /* "rbd.pyx":3403
38993 * ret = rbd_snap_rename(self.image, _srcname, _dstname)
38994 * if ret != 0:
38995 * raise make_ex(ret, 'error renaming snapshot of %s from %s to %s' % (self.name, srcname, dstname)) # <<<<<<<<<<<<<<
38996 *
38997 * def remove_snap(self, name):
38998 */
38999 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__38999; goto __pyx_L1_error;}
39000 __Pyx_GOTREF(__pyx_t_1);
39001 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__39001; goto __pyx_L1_error;}
39002 __Pyx_GOTREF(__pyx_t_2);
39003 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
39004 __Pyx_GIVEREF(__pyx_v_self->name);
39005 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_self
->name)
;
39006 __Pyx_INCREF(__pyx_v_srcname)( ((PyObject*)(__pyx_v_srcname))->ob_refcnt++);
39007 __Pyx_GIVEREF(__pyx_v_srcname);
39008 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_srcname)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_srcname
)
;
39009 __Pyx_INCREF(__pyx_v_dstname)( ((PyObject*)(__pyx_v_dstname))->ob_refcnt++);
39010 __Pyx_GIVEREF(__pyx_v_dstname);
39011 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_dstname)(((PyTupleObject *)(__pyx_t_2))->ob_item[2] = __pyx_v_dstname
)
;
39012 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_renaming_snapshot_of_s_fro, __pyx_t_2)PyString_Format(__pyx_kp_s_error_renaming_snapshot_of_s_fro, __pyx_t_2
)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__39012; goto __pyx_L1_error;}
39013 __Pyx_GOTREF(__pyx_t_3);
39014 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39015 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__39015; goto __pyx_L1_error;}
39016 __Pyx_GOTREF(__pyx_t_2);
39017 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
39018 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
39019 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
39020 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39021 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__39021; goto __pyx_L1_error;}
39022
39023 /* "rbd.pyx":3402
39024 * with nogil:
39025 * ret = rbd_snap_rename(self.image, _srcname, _dstname)
39026 * if ret != 0: # <<<<<<<<<<<<<<
39027 * raise make_ex(ret, 'error renaming snapshot of %s from %s to %s' % (self.name, srcname, dstname))
39028 *
39029 */
39030 }
39031
39032 /* "rbd.pyx":3385
39033 * raise make_ex(ret, 'error creating snapshot %s from %s' % (name, self.name))
39034 *
39035 * def rename_snap(self, srcname, dstname): # <<<<<<<<<<<<<<
39036 * """
39037 * rename a snapshot of the image.
39038 */
39039
39040 /* function exit code */
39041 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
39042 goto __pyx_L0;
39043 __pyx_L1_error:;
39044 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
39045 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
39046 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
39047 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
39048 __Pyx_AddTraceback("rbd.Image.rename_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
39049 __pyx_r = NULL((void*)0);
39050 __pyx_L0:;
39051 __Pyx_XDECREF(__pyx_v_srcname)do { if ((__pyx_v_srcname) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_srcname))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_srcname)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_srcname)))); } while
(0); } while (0)
;
39052 __Pyx_XDECREF(__pyx_v_dstname)do { if ((__pyx_v_dstname) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_dstname))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_dstname)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_dstname)))); } while
(0); } while (0)
;
39053 __Pyx_XGIVEREF(__pyx_r);
39054 __Pyx_RefNannyFinishContext();
39055 return __pyx_r;
39056}
39057
39058/* "rbd.pyx":3405
39059 * raise make_ex(ret, 'error renaming snapshot of %s from %s to %s' % (self.name, srcname, dstname))
39060 *
39061 * def remove_snap(self, name): # <<<<<<<<<<<<<<
39062 * """
39063 * Delete a snapshot of the image.
39064 */
39065
39066/* Python wrapper */
39067static PyObject *__pyx_pw_3rbd_5Image_59remove_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
39068static char __pyx_doc_3rbd_5Image_58remove_snap[] = "Image.remove_snap(self, name)\n\n Delete a snapshot of the image.\n\n :param name: the name of the snapshot\n :type name: str\n :raises: :class:`IOError`, :class:`ImageBusy`\n ";
39069static PyObject *__pyx_pw_3rbd_5Image_59remove_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
39070 PyObject *__pyx_r = 0;
39071 __Pyx_RefNannyDeclarations
39072 __Pyx_RefNannySetupContext("remove_snap (wrapper)", 0);
39073 __pyx_r = __pyx_pf_3rbd_5Image_58remove_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
39074
39075 /* function exit code */
39076 __Pyx_RefNannyFinishContext();
39077 return __pyx_r;
39078}
39079
39080static PyObject *__pyx_pf_3rbd_5Image_58remove_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
39081 char *__pyx_v__name;
39082 int __pyx_v_ret;
39083 PyObject *__pyx_r = NULL((void*)0);
39084 __Pyx_RefNannyDeclarations
39085 PyObject *__pyx_t_1 = NULL((void*)0);
39086 PyObject *__pyx_t_2 = NULL((void*)0);
39087 PyObject *__pyx_t_3 = NULL((void*)0);
39088 Py_ssize_t __pyx_t_4;
39089 PyObject *__pyx_t_5 = NULL((void*)0);
39090 char *__pyx_t_6;
39091 int __pyx_t_7;
39092 int __pyx_lineno = 0;
39093 const char *__pyx_filename = NULL((void*)0);
39094 int __pyx_clineno = 0;
39095 __Pyx_RefNannySetupContext("remove_snap", 0);
39096 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39097
39098 /* "rbd.pyx":3413
39099 * :raises: :class:`IOError`, :class:`ImageBusy`
39100 * """
39101 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
39102 * cdef char *_name = name
39103 * with nogil:
39104 */
39105 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__39105; goto __pyx_L1_error;}
39106 __Pyx_GOTREF(__pyx_t_2);
39107 __pyx_t_3 = NULL((void*)0);
39108 __pyx_t_4 = 0;
39109 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
39110 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
39111 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
39112 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
39113 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
39114 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
39115 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
39116 __pyx_t_4 = 1;
39117 }
39118 }
39119 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__39119; goto __pyx_L1_error;}
39120 __Pyx_GOTREF(__pyx_t_5);
39121 if (__pyx_t_3) {
39122 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
39123 }
39124 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39125 __Pyx_GIVEREF(__pyx_v_name);
39126 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
39127 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
39128 __Pyx_GIVEREF(__pyx_n_s_name);
39129 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
39130 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__39130; goto __pyx_L1_error;}
39131 __Pyx_GOTREF(__pyx_t_1);
39132 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39133 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39134 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
39135 __pyx_t_1 = 0;
39136
39137 /* "rbd.pyx":3414
39138 * """
39139 * name = cstr(name, 'name')
39140 * cdef char *_name = name # <<<<<<<<<<<<<<
39141 * with nogil:
39142 * ret = rbd_snap_remove(self.image, _name)
39143 */
39144 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3414; __pyx_clineno = __LINE__39144; goto __pyx_L1_error;}
39145 __pyx_v__name = __pyx_t_6;
39146
39147 /* "rbd.pyx":3415
39148 * name = cstr(name, 'name')
39149 * cdef char *_name = name
39150 * with nogil: # <<<<<<<<<<<<<<
39151 * ret = rbd_snap_remove(self.image, _name)
39152 * if ret != 0:
39153 */
39154 {
39155 #ifdef WITH_THREAD1
39156 PyThreadState *_save;
39157 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
39158 #endif
39159 /*try:*/ {
39160
39161 /* "rbd.pyx":3416
39162 * cdef char *_name = name
39163 * with nogil:
39164 * ret = rbd_snap_remove(self.image, _name) # <<<<<<<<<<<<<<
39165 * if ret != 0:
39166 * raise make_ex(ret, 'error removing snapshot %s from %s' % (name, self.name))
39167 */
39168 __pyx_v_ret = rbd_snap_remove(__pyx_v_self->image, __pyx_v__name);
39169 }
39170
39171 /* "rbd.pyx":3415
39172 * name = cstr(name, 'name')
39173 * cdef char *_name = name
39174 * with nogil: # <<<<<<<<<<<<<<
39175 * ret = rbd_snap_remove(self.image, _name)
39176 * if ret != 0:
39177 */
39178 /*finally:*/ {
39179 /*normal exit:*/{
39180 #ifdef WITH_THREAD1
39181 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
39182 #endif
39183 goto __pyx_L5;
39184 }
39185 __pyx_L5:;
39186 }
39187 }
39188
39189 /* "rbd.pyx":3417
39190 * with nogil:
39191 * ret = rbd_snap_remove(self.image, _name)
39192 * if ret != 0: # <<<<<<<<<<<<<<
39193 * raise make_ex(ret, 'error removing snapshot %s from %s' % (name, self.name))
39194 *
39195 */
39196 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
39197 if (__pyx_t_7) {
39198
39199 /* "rbd.pyx":3418
39200 * ret = rbd_snap_remove(self.image, _name)
39201 * if ret != 0:
39202 * raise make_ex(ret, 'error removing snapshot %s from %s' % (name, self.name)) # <<<<<<<<<<<<<<
39203 *
39204 * def remove_snap2(self, name, flags):
39205 */
39206 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3418; __pyx_clineno = __LINE__39206; goto __pyx_L1_error;}
39207 __Pyx_GOTREF(__pyx_t_1);
39208 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3418; __pyx_clineno = __LINE__39208; goto __pyx_L1_error;}
39209 __Pyx_GOTREF(__pyx_t_2);
39210 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39211 __Pyx_GIVEREF(__pyx_v_name);
39212 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_name
)
;
39213 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
39214 __Pyx_GIVEREF(__pyx_v_self->name);
39215 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_self
->name)
;
39216 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_removing_snapshot_s_from_s, __pyx_t_2)PyString_Format(__pyx_kp_s_error_removing_snapshot_s_from_s, __pyx_t_2
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3418; __pyx_clineno = __LINE__39216; goto __pyx_L1_error;}
39217 __Pyx_GOTREF(__pyx_t_5);
39218 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39219 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3418; __pyx_clineno = __LINE__39219; goto __pyx_L1_error;}
39220 __Pyx_GOTREF(__pyx_t_2);
39221 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
39222 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39223 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
39224 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39225 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3418; __pyx_clineno = __LINE__39225; goto __pyx_L1_error;}
39226
39227 /* "rbd.pyx":3417
39228 * with nogil:
39229 * ret = rbd_snap_remove(self.image, _name)
39230 * if ret != 0: # <<<<<<<<<<<<<<
39231 * raise make_ex(ret, 'error removing snapshot %s from %s' % (name, self.name))
39232 *
39233 */
39234 }
39235
39236 /* "rbd.pyx":3405
39237 * raise make_ex(ret, 'error renaming snapshot of %s from %s to %s' % (self.name, srcname, dstname))
39238 *
39239 * def remove_snap(self, name): # <<<<<<<<<<<<<<
39240 * """
39241 * Delete a snapshot of the image.
39242 */
39243
39244 /* function exit code */
39245 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
39246 goto __pyx_L0;
39247 __pyx_L1_error:;
39248 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
39249 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
39250 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
39251 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
39252 __Pyx_AddTraceback("rbd.Image.remove_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
39253 __pyx_r = NULL((void*)0);
39254 __pyx_L0:;
39255 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
39256 __Pyx_XGIVEREF(__pyx_r);
39257 __Pyx_RefNannyFinishContext();
39258 return __pyx_r;
39259}
39260
39261/* "rbd.pyx":3420
39262 * raise make_ex(ret, 'error removing snapshot %s from %s' % (name, self.name))
39263 *
39264 * def remove_snap2(self, name, flags): # <<<<<<<<<<<<<<
39265 * """
39266 * Delete a snapshot of the image.
39267 */
39268
39269/* Python wrapper */
39270static PyObject *__pyx_pw_3rbd_5Image_61remove_snap2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39271static char __pyx_doc_3rbd_5Image_60remove_snap2[] = "Image.remove_snap2(self, name, flags)\n\n Delete a snapshot of the image.\n\n :param name: the name of the snapshot\n :param flags: the flags for removal\n :type name: str\n :raises: :class:`IOError`, :class:`ImageBusy`\n ";
39272static PyObject *__pyx_pw_3rbd_5Image_61remove_snap2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39273 PyObject *__pyx_v_name = 0;
39274 PyObject *__pyx_v_flags = 0;
39275 int __pyx_lineno = 0;
39276 const char *__pyx_filename = NULL((void*)0);
39277 int __pyx_clineno = 0;
39278 PyObject *__pyx_r = 0;
39279 __Pyx_RefNannyDeclarations
39280 __Pyx_RefNannySetupContext("remove_snap2 (wrapper)", 0);
39281 {
39282 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_flags,0};
39283 PyObject* values[2] = {0,0};
39284 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
39285 Py_ssize_t kw_args;
39286 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
39287 switch (pos_args) {
39288 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
39289 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
39290 case 0: break;
39291 default: goto __pyx_L5_argtuple_error;
39292 }
39293 kw_args = PyDict_Size(__pyx_kwds);
39294 switch (pos_args) {
39295 case 0:
39296 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name
)) != 0), 1)
) kw_args--;
39297 else goto __pyx_L5_argtuple_error;
39298 case 1:
39299 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags
)) != 0), 1)
) kw_args--;
39300 else {
39301 __Pyx_RaiseArgtupleInvalid("remove_snap2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3420; __pyx_clineno = __LINE__39301; goto __pyx_L3_error;}
39302 }
39303 }
39304 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
39305 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_snap2") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "remove_snap2") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3420; __pyx_clineno = __LINE__39305; goto __pyx_L3_error;}
39306 }
39307 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
39308 goto __pyx_L5_argtuple_error;
39309 } else {
39310 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
39311 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
39312 }
39313 __pyx_v_name = values[0];
39314 __pyx_v_flags = values[1];
39315 }
39316 goto __pyx_L4_argument_unpacking_done;
39317 __pyx_L5_argtuple_error:;
39318 __Pyx_RaiseArgtupleInvalid("remove_snap2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3420; __pyx_clineno = __LINE__39318; goto __pyx_L3_error;}
39319 __pyx_L3_error:;
39320 __Pyx_AddTraceback("rbd.Image.remove_snap2", __pyx_clineno, __pyx_lineno, __pyx_filename);
39321 __Pyx_RefNannyFinishContext();
39322 return NULL((void*)0);
39323 __pyx_L4_argument_unpacking_done:;
39324 __pyx_r = __pyx_pf_3rbd_5Image_60remove_snap2(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_name, __pyx_v_flags);
39325
39326 /* function exit code */
39327 __Pyx_RefNannyFinishContext();
39328 return __pyx_r;
39329}
39330
39331static PyObject *__pyx_pf_3rbd_5Image_60remove_snap2(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_flags) {
39332 char *__pyx_v__name;
39333 uint32_t __pyx_v__flags;
39334 librbd_progress_fn_t __pyx_v_prog_cb;
39335 int __pyx_v_ret;
39336 PyObject *__pyx_r = NULL((void*)0);
39337 __Pyx_RefNannyDeclarations
39338 PyObject *__pyx_t_1 = NULL((void*)0);
39339 PyObject *__pyx_t_2 = NULL((void*)0);
39340 PyObject *__pyx_t_3 = NULL((void*)0);
39341 Py_ssize_t __pyx_t_4;
39342 PyObject *__pyx_t_5 = NULL((void*)0);
39343 char *__pyx_t_6;
39344 uint32_t __pyx_t_7;
39345 int __pyx_t_8;
39346 int __pyx_lineno = 0;
39347 const char *__pyx_filename = NULL((void*)0);
39348 int __pyx_clineno = 0;
39349 __Pyx_RefNannySetupContext("remove_snap2", 0);
39350 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39351
39352 /* "rbd.pyx":3429
39353 * :raises: :class:`IOError`, :class:`ImageBusy`
39354 * """
39355 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
39356 * cdef:
39357 * char *_name = name
39358 */
39359 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __pyx_clineno = __LINE__39359; goto __pyx_L1_error;}
39360 __Pyx_GOTREF(__pyx_t_2);
39361 __pyx_t_3 = NULL((void*)0);
39362 __pyx_t_4 = 0;
39363 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
39364 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
39365 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
39366 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
39367 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
39368 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
39369 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
39370 __pyx_t_4 = 1;
39371 }
39372 }
39373 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __pyx_clineno = __LINE__39373; goto __pyx_L1_error;}
39374 __Pyx_GOTREF(__pyx_t_5);
39375 if (__pyx_t_3) {
39376 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
39377 }
39378 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39379 __Pyx_GIVEREF(__pyx_v_name);
39380 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
39381 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
39382 __Pyx_GIVEREF(__pyx_n_s_name);
39383 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
39384 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3429; __pyx_clineno = __LINE__39384; goto __pyx_L1_error;}
39385 __Pyx_GOTREF(__pyx_t_1);
39386 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39387 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39388 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
39389 __pyx_t_1 = 0;
39390
39391 /* "rbd.pyx":3431
39392 * name = cstr(name, 'name')
39393 * cdef:
39394 * char *_name = name # <<<<<<<<<<<<<<
39395 * uint32_t _flags = flags
39396 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
39397 */
39398 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3431; __pyx_clineno = __LINE__39398; goto __pyx_L1_error;}
39399 __pyx_v__name = __pyx_t_6;
39400
39401 /* "rbd.pyx":3432
39402 * cdef:
39403 * char *_name = name
39404 * uint32_t _flags = flags # <<<<<<<<<<<<<<
39405 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
39406 * with nogil:
39407 */
39408 __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_v_flags); if (unlikely((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (uint32_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__39408; goto __pyx_L1_error;}
39409 __pyx_v__flags = __pyx_t_7;
39410
39411 /* "rbd.pyx":3433
39412 * char *_name = name
39413 * uint32_t _flags = flags
39414 * librbd_progress_fn_t prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
39415 * with nogil:
39416 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL)
39417 */
39418 __pyx_v_prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
39419
39420 /* "rbd.pyx":3434
39421 * uint32_t _flags = flags
39422 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
39423 * with nogil: # <<<<<<<<<<<<<<
39424 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL)
39425 * if ret != 0:
39426 */
39427 {
39428 #ifdef WITH_THREAD1
39429 PyThreadState *_save;
39430 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
39431 #endif
39432 /*try:*/ {
39433
39434 /* "rbd.pyx":3435
39435 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
39436 * with nogil:
39437 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL) # <<<<<<<<<<<<<<
39438 * if ret != 0:
39439 * raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags))
39440 */
39441 __pyx_v_ret = rbd_snap_remove2(__pyx_v_self->image, __pyx_v__name, __pyx_v__flags, __pyx_v_prog_cb, NULL((void*)0));
39442 }
39443
39444 /* "rbd.pyx":3434
39445 * uint32_t _flags = flags
39446 * librbd_progress_fn_t prog_cb = &no_op_progress_callback
39447 * with nogil: # <<<<<<<<<<<<<<
39448 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL)
39449 * if ret != 0:
39450 */
39451 /*finally:*/ {
39452 /*normal exit:*/{
39453 #ifdef WITH_THREAD1
39454 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
39455 #endif
39456 goto __pyx_L5;
39457 }
39458 __pyx_L5:;
39459 }
39460 }
39461
39462 /* "rbd.pyx":3436
39463 * with nogil:
39464 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL)
39465 * if ret != 0: # <<<<<<<<<<<<<<
39466 * raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags))
39467 *
39468 */
39469 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
39470 if (__pyx_t_8) {
39471
39472 /* "rbd.pyx":3437
39473 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL)
39474 * if ret != 0:
39475 * raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags)) # <<<<<<<<<<<<<<
39476 *
39477 * def remove_snap_by_id(self, snap_id):
39478 */
39479 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__39479; goto __pyx_L1_error;}
39480 __Pyx_GOTREF(__pyx_t_1);
39481 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__39481; goto __pyx_L1_error;}
39482 __Pyx_GOTREF(__pyx_t_2);
39483 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39484 __Pyx_GIVEREF(__pyx_v_name);
39485 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_name
)
;
39486 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
39487 __Pyx_GIVEREF(__pyx_v_self->name);
39488 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_self
->name)
;
39489 __Pyx_INCREF(__pyx_v_flags)( ((PyObject*)(__pyx_v_flags))->ob_refcnt++);
39490 __Pyx_GIVEREF(__pyx_v_flags);
39491 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_flags)(((PyTupleObject *)(__pyx_t_2))->ob_item[2] = __pyx_v_flags
)
;
39492 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_removing_snapshot_s_from_s_2, __pyx_t_2)PyString_Format(__pyx_kp_s_error_removing_snapshot_s_from_s_2
, __pyx_t_2)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__39492; goto __pyx_L1_error;}
39493 __Pyx_GOTREF(__pyx_t_5);
39494 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39495 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__39495; goto __pyx_L1_error;}
39496 __Pyx_GOTREF(__pyx_t_2);
39497 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
39498 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39499 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
39500 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39501 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__39501; goto __pyx_L1_error;}
39502
39503 /* "rbd.pyx":3436
39504 * with nogil:
39505 * ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL)
39506 * if ret != 0: # <<<<<<<<<<<<<<
39507 * raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags))
39508 *
39509 */
39510 }
39511
39512 /* "rbd.pyx":3420
39513 * raise make_ex(ret, 'error removing snapshot %s from %s' % (name, self.name))
39514 *
39515 * def remove_snap2(self, name, flags): # <<<<<<<<<<<<<<
39516 * """
39517 * Delete a snapshot of the image.
39518 */
39519
39520 /* function exit code */
39521 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
39522 goto __pyx_L0;
39523 __pyx_L1_error:;
39524 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
39525 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
39526 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
39527 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
39528 __Pyx_AddTraceback("rbd.Image.remove_snap2", __pyx_clineno, __pyx_lineno, __pyx_filename);
39529 __pyx_r = NULL((void*)0);
39530 __pyx_L0:;
39531 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
39532 __Pyx_XGIVEREF(__pyx_r);
39533 __Pyx_RefNannyFinishContext();
39534 return __pyx_r;
39535}
39536
39537/* "rbd.pyx":3439
39538 * raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags))
39539 *
39540 * def remove_snap_by_id(self, snap_id): # <<<<<<<<<<<<<<
39541 * """
39542 * Delete a snapshot of the image by its id.
39543 */
39544
39545/* Python wrapper */
39546static PyObject *__pyx_pw_3rbd_5Image_63remove_snap_by_id(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id); /*proto*/
39547static char __pyx_doc_3rbd_5Image_62remove_snap_by_id[] = "Image.remove_snap_by_id(self, snap_id)\n\n Delete a snapshot of the image by its id.\n\n :param id: the id of the snapshot\n :type name: int\n :raises: :class:`IOError`, :class:`ImageBusy`\n ";
39548static PyObject *__pyx_pw_3rbd_5Image_63remove_snap_by_id(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id) {
39549 PyObject *__pyx_r = 0;
39550 __Pyx_RefNannyDeclarations
39551 __Pyx_RefNannySetupContext("remove_snap_by_id (wrapper)", 0);
39552 __pyx_r = __pyx_pf_3rbd_5Image_62remove_snap_by_id(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_snap_id));
39553
39554 /* function exit code */
39555 __Pyx_RefNannyFinishContext();
39556 return __pyx_r;
39557}
39558
39559static PyObject *__pyx_pf_3rbd_5Image_62remove_snap_by_id(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id) {
39560 uint64_t __pyx_v__snap_id;
39561 int __pyx_v_ret;
39562 PyObject *__pyx_r = NULL((void*)0);
39563 __Pyx_RefNannyDeclarations
39564 uint64_t __pyx_t_1;
39565 int __pyx_t_2;
39566 PyObject *__pyx_t_3 = NULL((void*)0);
39567 PyObject *__pyx_t_4 = NULL((void*)0);
39568 PyObject *__pyx_t_5 = NULL((void*)0);
39569 int __pyx_lineno = 0;
39570 const char *__pyx_filename = NULL((void*)0);
39571 int __pyx_clineno = 0;
39572 __Pyx_RefNannySetupContext("remove_snap_by_id", 0);
39573
39574 /* "rbd.pyx":3448
39575 * """
39576 * cdef:
39577 * uint64_t _snap_id = snap_id # <<<<<<<<<<<<<<
39578 * with nogil:
39579 * ret = rbd_snap_remove_by_id(self.image, _snap_id)
39580 */
39581 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_snap_id); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __pyx_clineno = __LINE__39581; goto __pyx_L1_error;}
39582 __pyx_v__snap_id = __pyx_t_1;
39583
39584 /* "rbd.pyx":3449
39585 * cdef:
39586 * uint64_t _snap_id = snap_id
39587 * with nogil: # <<<<<<<<<<<<<<
39588 * ret = rbd_snap_remove_by_id(self.image, _snap_id)
39589 * if ret != 0:
39590 */
39591 {
39592 #ifdef WITH_THREAD1
39593 PyThreadState *_save;
39594 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
39595 #endif
39596 /*try:*/ {
39597
39598 /* "rbd.pyx":3450
39599 * uint64_t _snap_id = snap_id
39600 * with nogil:
39601 * ret = rbd_snap_remove_by_id(self.image, _snap_id) # <<<<<<<<<<<<<<
39602 * if ret != 0:
39603 * raise make_ex(ret, 'error removing snapshot %s from %s' % (snap_id, self.name))
39604 */
39605 __pyx_v_ret = rbd_snap_remove_by_id(__pyx_v_self->image, __pyx_v__snap_id);
39606 }
39607
39608 /* "rbd.pyx":3449
39609 * cdef:
39610 * uint64_t _snap_id = snap_id
39611 * with nogil: # <<<<<<<<<<<<<<
39612 * ret = rbd_snap_remove_by_id(self.image, _snap_id)
39613 * if ret != 0:
39614 */
39615 /*finally:*/ {
39616 /*normal exit:*/{
39617 #ifdef WITH_THREAD1
39618 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
39619 #endif
39620 goto __pyx_L5;
39621 }
39622 __pyx_L5:;
39623 }
39624 }
39625
39626 /* "rbd.pyx":3451
39627 * with nogil:
39628 * ret = rbd_snap_remove_by_id(self.image, _snap_id)
39629 * if ret != 0: # <<<<<<<<<<<<<<
39630 * raise make_ex(ret, 'error removing snapshot %s from %s' % (snap_id, self.name))
39631 *
39632 */
39633 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
39634 if (__pyx_t_2) {
39635
39636 /* "rbd.pyx":3452
39637 * ret = rbd_snap_remove_by_id(self.image, _snap_id)
39638 * if ret != 0:
39639 * raise make_ex(ret, 'error removing snapshot %s from %s' % (snap_id, self.name)) # <<<<<<<<<<<<<<
39640 *
39641 * def rollback_to_snap(self, name):
39642 */
39643 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__39643; goto __pyx_L1_error;}
39644 __Pyx_GOTREF(__pyx_t_3);
39645 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__39645; goto __pyx_L1_error;}
39646 __Pyx_GOTREF(__pyx_t_4);
39647 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
39648 __Pyx_GIVEREF(__pyx_v_snap_id);
39649 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_snap_id)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_v_snap_id
)
;
39650 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
39651 __Pyx_GIVEREF(__pyx_v_self->name);
39652 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_v_self
->name)
;
39653 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_removing_snapshot_s_from_s, __pyx_t_4)PyString_Format(__pyx_kp_s_error_removing_snapshot_s_from_s, __pyx_t_4
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__39653; goto __pyx_L1_error;}
39654 __Pyx_GOTREF(__pyx_t_5);
39655 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
39656 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__39656; goto __pyx_L1_error;}
39657 __Pyx_GOTREF(__pyx_t_4);
39658 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
39659 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39660 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
39661 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
39662 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__39662; goto __pyx_L1_error;}
39663
39664 /* "rbd.pyx":3451
39665 * with nogil:
39666 * ret = rbd_snap_remove_by_id(self.image, _snap_id)
39667 * if ret != 0: # <<<<<<<<<<<<<<
39668 * raise make_ex(ret, 'error removing snapshot %s from %s' % (snap_id, self.name))
39669 *
39670 */
39671 }
39672
39673 /* "rbd.pyx":3439
39674 * raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags))
39675 *
39676 * def remove_snap_by_id(self, snap_id): # <<<<<<<<<<<<<<
39677 * """
39678 * Delete a snapshot of the image by its id.
39679 */
39680
39681 /* function exit code */
39682 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
39683 goto __pyx_L0;
39684 __pyx_L1_error:;
39685 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
39686 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
39687 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
39688 __Pyx_AddTraceback("rbd.Image.remove_snap_by_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
39689 __pyx_r = NULL((void*)0);
39690 __pyx_L0:;
39691 __Pyx_XGIVEREF(__pyx_r);
39692 __Pyx_RefNannyFinishContext();
39693 return __pyx_r;
39694}
39695
39696/* "rbd.pyx":3454
39697 * raise make_ex(ret, 'error removing snapshot %s from %s' % (snap_id, self.name))
39698 *
39699 * def rollback_to_snap(self, name): # <<<<<<<<<<<<<<
39700 * """
39701 * Revert the image to its contents at a snapshot. This is a
39702 */
39703
39704/* Python wrapper */
39705static PyObject *__pyx_pw_3rbd_5Image_65rollback_to_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
39706static char __pyx_doc_3rbd_5Image_64rollback_to_snap[] = "Image.rollback_to_snap(self, name)\n\n Revert the image to its contents at a snapshot. This is a\n potentially expensive operation, since it rolls back each\n object individually.\n\n :param name: the snapshot to rollback to\n :type name: str\n :raises: :class:`IOError`\n ";
39707static PyObject *__pyx_pw_3rbd_5Image_65rollback_to_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
39708 PyObject *__pyx_r = 0;
39709 __Pyx_RefNannyDeclarations
39710 __Pyx_RefNannySetupContext("rollback_to_snap (wrapper)", 0);
39711 __pyx_r = __pyx_pf_3rbd_5Image_64rollback_to_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
39712
39713 /* function exit code */
39714 __Pyx_RefNannyFinishContext();
39715 return __pyx_r;
39716}
39717
39718static PyObject *__pyx_pf_3rbd_5Image_64rollback_to_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
39719 char *__pyx_v__name;
39720 int __pyx_v_ret;
39721 PyObject *__pyx_r = NULL((void*)0);
39722 __Pyx_RefNannyDeclarations
39723 PyObject *__pyx_t_1 = NULL((void*)0);
39724 PyObject *__pyx_t_2 = NULL((void*)0);
39725 PyObject *__pyx_t_3 = NULL((void*)0);
39726 Py_ssize_t __pyx_t_4;
39727 PyObject *__pyx_t_5 = NULL((void*)0);
39728 char *__pyx_t_6;
39729 int __pyx_t_7;
39730 int __pyx_lineno = 0;
39731 const char *__pyx_filename = NULL((void*)0);
39732 int __pyx_clineno = 0;
39733 __Pyx_RefNannySetupContext("rollback_to_snap", 0);
39734 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39735
39736 /* "rbd.pyx":3464
39737 * :raises: :class:`IOError`
39738 * """
39739 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
39740 * cdef char *_name = name
39741 * with nogil:
39742 */
39743 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__39743; goto __pyx_L1_error;}
39744 __Pyx_GOTREF(__pyx_t_2);
39745 __pyx_t_3 = NULL((void*)0);
39746 __pyx_t_4 = 0;
39747 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
39748 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
39749 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
39750 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
39751 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
39752 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
39753 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
39754 __pyx_t_4 = 1;
39755 }
39756 }
39757 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__39757; goto __pyx_L1_error;}
39758 __Pyx_GOTREF(__pyx_t_5);
39759 if (__pyx_t_3) {
39760 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
39761 }
39762 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39763 __Pyx_GIVEREF(__pyx_v_name);
39764 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
39765 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
39766 __Pyx_GIVEREF(__pyx_n_s_name);
39767 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
39768 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __pyx_clineno = __LINE__39768; goto __pyx_L1_error;}
39769 __Pyx_GOTREF(__pyx_t_1);
39770 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39771 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39772 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
39773 __pyx_t_1 = 0;
39774
39775 /* "rbd.pyx":3465
39776 * """
39777 * name = cstr(name, 'name')
39778 * cdef char *_name = name # <<<<<<<<<<<<<<
39779 * with nogil:
39780 * ret = rbd_snap_rollback(self.image, _name)
39781 */
39782 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__39782; goto __pyx_L1_error;}
39783 __pyx_v__name = __pyx_t_6;
39784
39785 /* "rbd.pyx":3466
39786 * name = cstr(name, 'name')
39787 * cdef char *_name = name
39788 * with nogil: # <<<<<<<<<<<<<<
39789 * ret = rbd_snap_rollback(self.image, _name)
39790 * if ret != 0:
39791 */
39792 {
39793 #ifdef WITH_THREAD1
39794 PyThreadState *_save;
39795 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
39796 #endif
39797 /*try:*/ {
39798
39799 /* "rbd.pyx":3467
39800 * cdef char *_name = name
39801 * with nogil:
39802 * ret = rbd_snap_rollback(self.image, _name) # <<<<<<<<<<<<<<
39803 * if ret != 0:
39804 * raise make_ex(ret, 'error rolling back image %s to snapshot %s' % (self.name, name))
39805 */
39806 __pyx_v_ret = rbd_snap_rollback(__pyx_v_self->image, __pyx_v__name);
39807 }
39808
39809 /* "rbd.pyx":3466
39810 * name = cstr(name, 'name')
39811 * cdef char *_name = name
39812 * with nogil: # <<<<<<<<<<<<<<
39813 * ret = rbd_snap_rollback(self.image, _name)
39814 * if ret != 0:
39815 */
39816 /*finally:*/ {
39817 /*normal exit:*/{
39818 #ifdef WITH_THREAD1
39819 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
39820 #endif
39821 goto __pyx_L5;
39822 }
39823 __pyx_L5:;
39824 }
39825 }
39826
39827 /* "rbd.pyx":3468
39828 * with nogil:
39829 * ret = rbd_snap_rollback(self.image, _name)
39830 * if ret != 0: # <<<<<<<<<<<<<<
39831 * raise make_ex(ret, 'error rolling back image %s to snapshot %s' % (self.name, name))
39832 *
39833 */
39834 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
39835 if (__pyx_t_7) {
39836
39837 /* "rbd.pyx":3469
39838 * ret = rbd_snap_rollback(self.image, _name)
39839 * if ret != 0:
39840 * raise make_ex(ret, 'error rolling back image %s to snapshot %s' % (self.name, name)) # <<<<<<<<<<<<<<
39841 *
39842 * def protect_snap(self, name):
39843 */
39844 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __pyx_clineno = __LINE__39844; goto __pyx_L1_error;}
39845 __Pyx_GOTREF(__pyx_t_1);
39846 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __pyx_clineno = __LINE__39846; goto __pyx_L1_error;}
39847 __Pyx_GOTREF(__pyx_t_2);
39848 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
39849 __Pyx_GIVEREF(__pyx_v_self->name);
39850 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_self
->name)
;
39851 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39852 __Pyx_GIVEREF(__pyx_v_name);
39853 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_name
)
;
39854 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_rolling_back_image_s_to_sn, __pyx_t_2)PyString_Format(__pyx_kp_s_error_rolling_back_image_s_to_sn, __pyx_t_2
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __pyx_clineno = __LINE__39854; goto __pyx_L1_error;}
39855 __Pyx_GOTREF(__pyx_t_5);
39856 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39857 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __pyx_clineno = __LINE__39857; goto __pyx_L1_error;}
39858 __Pyx_GOTREF(__pyx_t_2);
39859 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
39860 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39861 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
39862 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39863 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __pyx_clineno = __LINE__39863; goto __pyx_L1_error;}
39864
39865 /* "rbd.pyx":3468
39866 * with nogil:
39867 * ret = rbd_snap_rollback(self.image, _name)
39868 * if ret != 0: # <<<<<<<<<<<<<<
39869 * raise make_ex(ret, 'error rolling back image %s to snapshot %s' % (self.name, name))
39870 *
39871 */
39872 }
39873
39874 /* "rbd.pyx":3454
39875 * raise make_ex(ret, 'error removing snapshot %s from %s' % (snap_id, self.name))
39876 *
39877 * def rollback_to_snap(self, name): # <<<<<<<<<<<<<<
39878 * """
39879 * Revert the image to its contents at a snapshot. This is a
39880 */
39881
39882 /* function exit code */
39883 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
39884 goto __pyx_L0;
39885 __pyx_L1_error:;
39886 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
39887 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
39888 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
39889 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
39890 __Pyx_AddTraceback("rbd.Image.rollback_to_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
39891 __pyx_r = NULL((void*)0);
39892 __pyx_L0:;
39893 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
39894 __Pyx_XGIVEREF(__pyx_r);
39895 __Pyx_RefNannyFinishContext();
39896 return __pyx_r;
39897}
39898
39899/* "rbd.pyx":3471
39900 * raise make_ex(ret, 'error rolling back image %s to snapshot %s' % (self.name, name))
39901 *
39902 * def protect_snap(self, name): # <<<<<<<<<<<<<<
39903 * """
39904 * Mark a snapshot as protected. This means it can't be deleted
39905 */
39906
39907/* Python wrapper */
39908static PyObject *__pyx_pw_3rbd_5Image_67protect_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
39909static char __pyx_doc_3rbd_5Image_66protect_snap[] = "Image.protect_snap(self, name)\n\n Mark a snapshot as protected. This means it can't be deleted\n until it is unprotected.\n\n :param name: the snapshot to protect\n :type name: str\n :raises: :class:`IOError`, :class:`ImageNotFound`\n ";
39910static PyObject *__pyx_pw_3rbd_5Image_67protect_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
39911 PyObject *__pyx_r = 0;
39912 __Pyx_RefNannyDeclarations
39913 __Pyx_RefNannySetupContext("protect_snap (wrapper)", 0);
39914 __pyx_r = __pyx_pf_3rbd_5Image_66protect_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
39915
39916 /* function exit code */
39917 __Pyx_RefNannyFinishContext();
39918 return __pyx_r;
39919}
39920
39921static PyObject *__pyx_pf_3rbd_5Image_66protect_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
39922 char *__pyx_v__name;
39923 int __pyx_v_ret;
39924 PyObject *__pyx_r = NULL((void*)0);
39925 __Pyx_RefNannyDeclarations
39926 PyObject *__pyx_t_1 = NULL((void*)0);
39927 PyObject *__pyx_t_2 = NULL((void*)0);
39928 PyObject *__pyx_t_3 = NULL((void*)0);
39929 Py_ssize_t __pyx_t_4;
39930 PyObject *__pyx_t_5 = NULL((void*)0);
39931 char *__pyx_t_6;
39932 int __pyx_t_7;
39933 int __pyx_lineno = 0;
39934 const char *__pyx_filename = NULL((void*)0);
39935 int __pyx_clineno = 0;
39936 __Pyx_RefNannySetupContext("protect_snap", 0);
39937 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39938
39939 /* "rbd.pyx":3480
39940 * :raises: :class:`IOError`, :class:`ImageNotFound`
39941 * """
39942 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
39943 * cdef char *_name = name
39944 * with nogil:
39945 */
39946 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3480; __pyx_clineno = __LINE__39946; goto __pyx_L1_error;}
39947 __Pyx_GOTREF(__pyx_t_2);
39948 __pyx_t_3 = NULL((void*)0);
39949 __pyx_t_4 = 0;
39950 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
39951 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
39952 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
39953 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
39954 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
39955 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
39956 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
39957 __pyx_t_4 = 1;
39958 }
39959 }
39960 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3480; __pyx_clineno = __LINE__39960; goto __pyx_L1_error;}
39961 __Pyx_GOTREF(__pyx_t_5);
39962 if (__pyx_t_3) {
39963 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
39964 }
39965 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
39966 __Pyx_GIVEREF(__pyx_v_name);
39967 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
39968 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
39969 __Pyx_GIVEREF(__pyx_n_s_name);
39970 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
39971 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3480; __pyx_clineno = __LINE__39971; goto __pyx_L1_error;}
39972 __Pyx_GOTREF(__pyx_t_1);
39973 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
39974 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
39975 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
39976 __pyx_t_1 = 0;
39977
39978 /* "rbd.pyx":3481
39979 * """
39980 * name = cstr(name, 'name')
39981 * cdef char *_name = name # <<<<<<<<<<<<<<
39982 * with nogil:
39983 * ret = rbd_snap_protect(self.image, _name)
39984 */
39985 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3481; __pyx_clineno = __LINE__39985; goto __pyx_L1_error;}
39986 __pyx_v__name = __pyx_t_6;
39987
39988 /* "rbd.pyx":3482
39989 * name = cstr(name, 'name')
39990 * cdef char *_name = name
39991 * with nogil: # <<<<<<<<<<<<<<
39992 * ret = rbd_snap_protect(self.image, _name)
39993 * if ret != 0:
39994 */
39995 {
39996 #ifdef WITH_THREAD1
39997 PyThreadState *_save;
39998 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
39999 #endif
40000 /*try:*/ {
40001
40002 /* "rbd.pyx":3483
40003 * cdef char *_name = name
40004 * with nogil:
40005 * ret = rbd_snap_protect(self.image, _name) # <<<<<<<<<<<<<<
40006 * if ret != 0:
40007 * raise make_ex(ret, 'error protecting snapshot %s@%s' % (self.name, name))
40008 */
40009 __pyx_v_ret = rbd_snap_protect(__pyx_v_self->image, __pyx_v__name);
40010 }
40011
40012 /* "rbd.pyx":3482
40013 * name = cstr(name, 'name')
40014 * cdef char *_name = name
40015 * with nogil: # <<<<<<<<<<<<<<
40016 * ret = rbd_snap_protect(self.image, _name)
40017 * if ret != 0:
40018 */
40019 /*finally:*/ {
40020 /*normal exit:*/{
40021 #ifdef WITH_THREAD1
40022 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
40023 #endif
40024 goto __pyx_L5;
40025 }
40026 __pyx_L5:;
40027 }
40028 }
40029
40030 /* "rbd.pyx":3484
40031 * with nogil:
40032 * ret = rbd_snap_protect(self.image, _name)
40033 * if ret != 0: # <<<<<<<<<<<<<<
40034 * raise make_ex(ret, 'error protecting snapshot %s@%s' % (self.name, name))
40035 *
40036 */
40037 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
40038 if (__pyx_t_7) {
40039
40040 /* "rbd.pyx":3485
40041 * ret = rbd_snap_protect(self.image, _name)
40042 * if ret != 0:
40043 * raise make_ex(ret, 'error protecting snapshot %s@%s' % (self.name, name)) # <<<<<<<<<<<<<<
40044 *
40045 * def unprotect_snap(self, name):
40046 */
40047 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __pyx_clineno = __LINE__40047; goto __pyx_L1_error;}
40048 __Pyx_GOTREF(__pyx_t_1);
40049 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __pyx_clineno = __LINE__40049; goto __pyx_L1_error;}
40050 __Pyx_GOTREF(__pyx_t_2);
40051 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
40052 __Pyx_GIVEREF(__pyx_v_self->name);
40053 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_self
->name)
;
40054 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40055 __Pyx_GIVEREF(__pyx_v_name);
40056 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_name
)
;
40057 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_protecting_snapshot_s_s, __pyx_t_2)PyString_Format(__pyx_kp_s_error_protecting_snapshot_s_s, __pyx_t_2
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __pyx_clineno = __LINE__40057; goto __pyx_L1_error;}
40058 __Pyx_GOTREF(__pyx_t_5);
40059 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40060 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __pyx_clineno = __LINE__40060; goto __pyx_L1_error;}
40061 __Pyx_GOTREF(__pyx_t_2);
40062 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
40063 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40064 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
40065 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40066 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __pyx_clineno = __LINE__40066; goto __pyx_L1_error;}
40067
40068 /* "rbd.pyx":3484
40069 * with nogil:
40070 * ret = rbd_snap_protect(self.image, _name)
40071 * if ret != 0: # <<<<<<<<<<<<<<
40072 * raise make_ex(ret, 'error protecting snapshot %s@%s' % (self.name, name))
40073 *
40074 */
40075 }
40076
40077 /* "rbd.pyx":3471
40078 * raise make_ex(ret, 'error rolling back image %s to snapshot %s' % (self.name, name))
40079 *
40080 * def protect_snap(self, name): # <<<<<<<<<<<<<<
40081 * """
40082 * Mark a snapshot as protected. This means it can't be deleted
40083 */
40084
40085 /* function exit code */
40086 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
40087 goto __pyx_L0;
40088 __pyx_L1_error:;
40089 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
40090 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
40091 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
40092 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
40093 __Pyx_AddTraceback("rbd.Image.protect_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
40094 __pyx_r = NULL((void*)0);
40095 __pyx_L0:;
40096 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
40097 __Pyx_XGIVEREF(__pyx_r);
40098 __Pyx_RefNannyFinishContext();
40099 return __pyx_r;
40100}
40101
40102/* "rbd.pyx":3487
40103 * raise make_ex(ret, 'error protecting snapshot %s@%s' % (self.name, name))
40104 *
40105 * def unprotect_snap(self, name): # <<<<<<<<<<<<<<
40106 * """
40107 * Mark a snapshot unprotected. This allows it to be deleted if
40108 */
40109
40110/* Python wrapper */
40111static PyObject *__pyx_pw_3rbd_5Image_69unprotect_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
40112static char __pyx_doc_3rbd_5Image_68unprotect_snap[] = "Image.unprotect_snap(self, name)\n\n Mark a snapshot unprotected. This allows it to be deleted if\n it was protected.\n\n :param name: the snapshot to unprotect\n :type name: str\n :raises: :class:`IOError`, :class:`ImageNotFound`\n ";
40113static PyObject *__pyx_pw_3rbd_5Image_69unprotect_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
40114 PyObject *__pyx_r = 0;
40115 __Pyx_RefNannyDeclarations
40116 __Pyx_RefNannySetupContext("unprotect_snap (wrapper)", 0);
40117 __pyx_r = __pyx_pf_3rbd_5Image_68unprotect_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
40118
40119 /* function exit code */
40120 __Pyx_RefNannyFinishContext();
40121 return __pyx_r;
40122}
40123
40124static PyObject *__pyx_pf_3rbd_5Image_68unprotect_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
40125 char *__pyx_v__name;
40126 int __pyx_v_ret;
40127 PyObject *__pyx_r = NULL((void*)0);
40128 __Pyx_RefNannyDeclarations
40129 PyObject *__pyx_t_1 = NULL((void*)0);
40130 PyObject *__pyx_t_2 = NULL((void*)0);
40131 PyObject *__pyx_t_3 = NULL((void*)0);
40132 Py_ssize_t __pyx_t_4;
40133 PyObject *__pyx_t_5 = NULL((void*)0);
40134 char *__pyx_t_6;
40135 int __pyx_t_7;
40136 int __pyx_lineno = 0;
40137 const char *__pyx_filename = NULL((void*)0);
40138 int __pyx_clineno = 0;
40139 __Pyx_RefNannySetupContext("unprotect_snap", 0);
40140 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40141
40142 /* "rbd.pyx":3496
40143 * :raises: :class:`IOError`, :class:`ImageNotFound`
40144 * """
40145 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
40146 * cdef char *_name = name
40147 * with nogil:
40148 */
40149 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3496; __pyx_clineno = __LINE__40149; goto __pyx_L1_error;}
40150 __Pyx_GOTREF(__pyx_t_2);
40151 __pyx_t_3 = NULL((void*)0);
40152 __pyx_t_4 = 0;
40153 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
40154 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
40155 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
40156 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
40157 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
40158 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
40159 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
40160 __pyx_t_4 = 1;
40161 }
40162 }
40163 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3496; __pyx_clineno = __LINE__40163; goto __pyx_L1_error;}
40164 __Pyx_GOTREF(__pyx_t_5);
40165 if (__pyx_t_3) {
40166 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
40167 }
40168 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40169 __Pyx_GIVEREF(__pyx_v_name);
40170 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
40171 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
40172 __Pyx_GIVEREF(__pyx_n_s_name);
40173 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
40174 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3496; __pyx_clineno = __LINE__40174; goto __pyx_L1_error;}
40175 __Pyx_GOTREF(__pyx_t_1);
40176 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40177 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40178 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
40179 __pyx_t_1 = 0;
40180
40181 /* "rbd.pyx":3497
40182 * """
40183 * name = cstr(name, 'name')
40184 * cdef char *_name = name # <<<<<<<<<<<<<<
40185 * with nogil:
40186 * ret = rbd_snap_unprotect(self.image, _name)
40187 */
40188 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__40188; goto __pyx_L1_error;}
40189 __pyx_v__name = __pyx_t_6;
40190
40191 /* "rbd.pyx":3498
40192 * name = cstr(name, 'name')
40193 * cdef char *_name = name
40194 * with nogil: # <<<<<<<<<<<<<<
40195 * ret = rbd_snap_unprotect(self.image, _name)
40196 * if ret != 0:
40197 */
40198 {
40199 #ifdef WITH_THREAD1
40200 PyThreadState *_save;
40201 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
40202 #endif
40203 /*try:*/ {
40204
40205 /* "rbd.pyx":3499
40206 * cdef char *_name = name
40207 * with nogil:
40208 * ret = rbd_snap_unprotect(self.image, _name) # <<<<<<<<<<<<<<
40209 * if ret != 0:
40210 * raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name))
40211 */
40212 __pyx_v_ret = rbd_snap_unprotect(__pyx_v_self->image, __pyx_v__name);
40213 }
40214
40215 /* "rbd.pyx":3498
40216 * name = cstr(name, 'name')
40217 * cdef char *_name = name
40218 * with nogil: # <<<<<<<<<<<<<<
40219 * ret = rbd_snap_unprotect(self.image, _name)
40220 * if ret != 0:
40221 */
40222 /*finally:*/ {
40223 /*normal exit:*/{
40224 #ifdef WITH_THREAD1
40225 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
40226 #endif
40227 goto __pyx_L5;
40228 }
40229 __pyx_L5:;
40230 }
40231 }
40232
40233 /* "rbd.pyx":3500
40234 * with nogil:
40235 * ret = rbd_snap_unprotect(self.image, _name)
40236 * if ret != 0: # <<<<<<<<<<<<<<
40237 * raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name))
40238 *
40239 */
40240 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
40241 if (__pyx_t_7) {
40242
40243 /* "rbd.pyx":3501
40244 * ret = rbd_snap_unprotect(self.image, _name)
40245 * if ret != 0:
40246 * raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name)) # <<<<<<<<<<<<<<
40247 *
40248 * def is_protected_snap(self, name):
40249 */
40250 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__40250; goto __pyx_L1_error;}
40251 __Pyx_GOTREF(__pyx_t_1);
40252 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__40252; goto __pyx_L1_error;}
40253 __Pyx_GOTREF(__pyx_t_2);
40254 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
40255 __Pyx_GIVEREF(__pyx_v_self->name);
40256 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_self
->name)
;
40257 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40258 __Pyx_GIVEREF(__pyx_v_name);
40259 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_name
)
;
40260 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_unprotecting_snapshot_s_s, __pyx_t_2)PyString_Format(__pyx_kp_s_error_unprotecting_snapshot_s_s, __pyx_t_2
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__40260; goto __pyx_L1_error;}
40261 __Pyx_GOTREF(__pyx_t_5);
40262 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40263 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__40263; goto __pyx_L1_error;}
40264 __Pyx_GOTREF(__pyx_t_2);
40265 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
40266 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40267 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
40268 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40269 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__40269; goto __pyx_L1_error;}
40270
40271 /* "rbd.pyx":3500
40272 * with nogil:
40273 * ret = rbd_snap_unprotect(self.image, _name)
40274 * if ret != 0: # <<<<<<<<<<<<<<
40275 * raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name))
40276 *
40277 */
40278 }
40279
40280 /* "rbd.pyx":3487
40281 * raise make_ex(ret, 'error protecting snapshot %s@%s' % (self.name, name))
40282 *
40283 * def unprotect_snap(self, name): # <<<<<<<<<<<<<<
40284 * """
40285 * Mark a snapshot unprotected. This allows it to be deleted if
40286 */
40287
40288 /* function exit code */
40289 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
40290 goto __pyx_L0;
40291 __pyx_L1_error:;
40292 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
40293 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
40294 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
40295 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
40296 __Pyx_AddTraceback("rbd.Image.unprotect_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
40297 __pyx_r = NULL((void*)0);
40298 __pyx_L0:;
40299 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
40300 __Pyx_XGIVEREF(__pyx_r);
40301 __Pyx_RefNannyFinishContext();
40302 return __pyx_r;
40303}
40304
40305/* "rbd.pyx":3503
40306 * raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name))
40307 *
40308 * def is_protected_snap(self, name): # <<<<<<<<<<<<<<
40309 * """
40310 * Find out whether a snapshot is protected from deletion.
40311 */
40312
40313/* Python wrapper */
40314static PyObject *__pyx_pw_3rbd_5Image_71is_protected_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
40315static char __pyx_doc_3rbd_5Image_70is_protected_snap[] = "Image.is_protected_snap(self, name)\n\n Find out whether a snapshot is protected from deletion.\n\n :param name: the snapshot to check\n :type name: str\n :returns: bool - whether the snapshot is protected\n :raises: :class:`IOError`, :class:`ImageNotFound`\n ";
40316static PyObject *__pyx_pw_3rbd_5Image_71is_protected_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
40317 PyObject *__pyx_r = 0;
40318 __Pyx_RefNannyDeclarations
40319 __Pyx_RefNannySetupContext("is_protected_snap (wrapper)", 0);
40320 __pyx_r = __pyx_pf_3rbd_5Image_70is_protected_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
40321
40322 /* function exit code */
40323 __Pyx_RefNannyFinishContext();
40324 return __pyx_r;
40325}
40326
40327static PyObject *__pyx_pf_3rbd_5Image_70is_protected_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
40328 char *__pyx_v__name;
40329 int __pyx_v_is_protected;
40330 int __pyx_v_ret;
40331 PyObject *__pyx_r = NULL((void*)0);
40332 __Pyx_RefNannyDeclarations
40333 PyObject *__pyx_t_1 = NULL((void*)0);
40334 PyObject *__pyx_t_2 = NULL((void*)0);
40335 PyObject *__pyx_t_3 = NULL((void*)0);
40336 Py_ssize_t __pyx_t_4;
40337 PyObject *__pyx_t_5 = NULL((void*)0);
40338 char *__pyx_t_6;
40339 int __pyx_t_7;
40340 int __pyx_lineno = 0;
40341 const char *__pyx_filename = NULL((void*)0);
40342 int __pyx_clineno = 0;
40343 __Pyx_RefNannySetupContext("is_protected_snap", 0);
40344 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40345
40346 /* "rbd.pyx":3512
40347 * :raises: :class:`IOError`, :class:`ImageNotFound`
40348 * """
40349 * name = cstr(name, 'name') # <<<<<<<<<<<<<<
40350 * cdef:
40351 * char *_name = name
40352 */
40353 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __pyx_clineno = __LINE__40353; goto __pyx_L1_error;}
40354 __Pyx_GOTREF(__pyx_t_2);
40355 __pyx_t_3 = NULL((void*)0);
40356 __pyx_t_4 = 0;
40357 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
40358 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
40359 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
40360 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
40361 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
40362 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
40363 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
40364 __pyx_t_4 = 1;
40365 }
40366 }
40367 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __pyx_clineno = __LINE__40367; goto __pyx_L1_error;}
40368 __Pyx_GOTREF(__pyx_t_5);
40369 if (__pyx_t_3) {
40370 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
40371 }
40372 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40373 __Pyx_GIVEREF(__pyx_v_name);
40374 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_name
)
;
40375 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
40376 __Pyx_GIVEREF(__pyx_n_s_name);
40377 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_name
)
;
40378 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __pyx_clineno = __LINE__40378; goto __pyx_L1_error;}
40379 __Pyx_GOTREF(__pyx_t_1);
40380 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40381 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40382 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
40383 __pyx_t_1 = 0;
40384
40385 /* "rbd.pyx":3514
40386 * name = cstr(name, 'name')
40387 * cdef:
40388 * char *_name = name # <<<<<<<<<<<<<<
40389 * int is_protected
40390 * with nogil:
40391 */
40392 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3514; __pyx_clineno = __LINE__40392; goto __pyx_L1_error;}
40393 __pyx_v__name = __pyx_t_6;
40394
40395 /* "rbd.pyx":3516
40396 * char *_name = name
40397 * int is_protected
40398 * with nogil: # <<<<<<<<<<<<<<
40399 * ret = rbd_snap_is_protected(self.image, _name, &is_protected)
40400 * if ret != 0:
40401 */
40402 {
40403 #ifdef WITH_THREAD1
40404 PyThreadState *_save;
40405 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
40406 #endif
40407 /*try:*/ {
40408
40409 /* "rbd.pyx":3517
40410 * int is_protected
40411 * with nogil:
40412 * ret = rbd_snap_is_protected(self.image, _name, &is_protected) # <<<<<<<<<<<<<<
40413 * if ret != 0:
40414 * raise make_ex(ret, 'error checking if snapshot %s@%s is protected' % (self.name, name))
40415 */
40416 __pyx_v_ret = rbd_snap_is_protected(__pyx_v_self->image, __pyx_v__name, (&__pyx_v_is_protected));
40417 }
40418
40419 /* "rbd.pyx":3516
40420 * char *_name = name
40421 * int is_protected
40422 * with nogil: # <<<<<<<<<<<<<<
40423 * ret = rbd_snap_is_protected(self.image, _name, &is_protected)
40424 * if ret != 0:
40425 */
40426 /*finally:*/ {
40427 /*normal exit:*/{
40428 #ifdef WITH_THREAD1
40429 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
40430 #endif
40431 goto __pyx_L5;
40432 }
40433 __pyx_L5:;
40434 }
40435 }
40436
40437 /* "rbd.pyx":3518
40438 * with nogil:
40439 * ret = rbd_snap_is_protected(self.image, _name, &is_protected)
40440 * if ret != 0: # <<<<<<<<<<<<<<
40441 * raise make_ex(ret, 'error checking if snapshot %s@%s is protected' % (self.name, name))
40442 * return is_protected == 1
40443 */
40444 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
40445 if (__pyx_t_7) {
40446
40447 /* "rbd.pyx":3519
40448 * ret = rbd_snap_is_protected(self.image, _name, &is_protected)
40449 * if ret != 0:
40450 * raise make_ex(ret, 'error checking if snapshot %s@%s is protected' % (self.name, name)) # <<<<<<<<<<<<<<
40451 * return is_protected == 1
40452 *
40453 */
40454 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__40454; goto __pyx_L1_error;}
40455 __Pyx_GOTREF(__pyx_t_1);
40456 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__40456; goto __pyx_L1_error;}
40457 __Pyx_GOTREF(__pyx_t_2);
40458 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
40459 __Pyx_GIVEREF(__pyx_v_self->name);
40460 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_self
->name)
;
40461 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
40462 __Pyx_GIVEREF(__pyx_v_name);
40463 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_name
)
;
40464 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_checking_if_snapshot_s_s_i, __pyx_t_2)PyString_Format(__pyx_kp_s_error_checking_if_snapshot_s_s_i, __pyx_t_2
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__40464; goto __pyx_L1_error;}
40465 __Pyx_GOTREF(__pyx_t_5);
40466 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40467 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__40467; goto __pyx_L1_error;}
40468 __Pyx_GOTREF(__pyx_t_2);
40469 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
40470 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40471 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
40472 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40473 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__40473; goto __pyx_L1_error;}
40474
40475 /* "rbd.pyx":3518
40476 * with nogil:
40477 * ret = rbd_snap_is_protected(self.image, _name, &is_protected)
40478 * if ret != 0: # <<<<<<<<<<<<<<
40479 * raise make_ex(ret, 'error checking if snapshot %s@%s is protected' % (self.name, name))
40480 * return is_protected == 1
40481 */
40482 }
40483
40484 /* "rbd.pyx":3520
40485 * if ret != 0:
40486 * raise make_ex(ret, 'error checking if snapshot %s@%s is protected' % (self.name, name))
40487 * return is_protected == 1 # <<<<<<<<<<<<<<
40488 *
40489 * def get_snap_limit(self):
40490 */
40491 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
40492 __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_is_protected == 1))(((__pyx_v_is_protected == 1)) ? (( ((PyObject*)(((PyObject *
) &_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &
_Py_TrueStruct)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct
)))->ob_refcnt++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __pyx_clineno = __LINE__40492; goto __pyx_L1_error;}
40493 __Pyx_GOTREF(__pyx_t_2);
40494 __pyx_r = __pyx_t_2;
40495 __pyx_t_2 = 0;
40496 goto __pyx_L0;
40497
40498 /* "rbd.pyx":3503
40499 * raise make_ex(ret, 'error unprotecting snapshot %s@%s' % (self.name, name))
40500 *
40501 * def is_protected_snap(self, name): # <<<<<<<<<<<<<<
40502 * """
40503 * Find out whether a snapshot is protected from deletion.
40504 */
40505
40506 /* function exit code */
40507 __pyx_L1_error:;
40508 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
40509 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
40510 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
40511 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
40512 __Pyx_AddTraceback("rbd.Image.is_protected_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
40513 __pyx_r = NULL((void*)0);
40514 __pyx_L0:;
40515 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
40516 __Pyx_XGIVEREF(__pyx_r);
40517 __Pyx_RefNannyFinishContext();
40518 return __pyx_r;
40519}
40520
40521/* "rbd.pyx":3522
40522 * return is_protected == 1
40523 *
40524 * def get_snap_limit(self): # <<<<<<<<<<<<<<
40525 * """
40526 * Get the snapshot limit for an image.
40527 */
40528
40529/* Python wrapper */
40530static PyObject *__pyx_pw_3rbd_5Image_73get_snap_limit(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
40531static char __pyx_doc_3rbd_5Image_72get_snap_limit[] = "Image.get_snap_limit(self)\n\n Get the snapshot limit for an image.\n\n :returns: int - the snapshot limit for an image\n ";
40532static PyObject *__pyx_pw_3rbd_5Image_73get_snap_limit(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
40533 PyObject *__pyx_r = 0;
40534 __Pyx_RefNannyDeclarations
40535 __Pyx_RefNannySetupContext("get_snap_limit (wrapper)", 0);
40536 __pyx_r = __pyx_pf_3rbd_5Image_72get_snap_limit(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
40537
40538 /* function exit code */
40539 __Pyx_RefNannyFinishContext();
40540 return __pyx_r;
40541}
40542
40543static PyObject *__pyx_pf_3rbd_5Image_72get_snap_limit(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
40544 uint64_t __pyx_v_limit;
40545 int __pyx_v_ret;
40546 PyObject *__pyx_r = NULL((void*)0);
40547 __Pyx_RefNannyDeclarations
40548 int __pyx_t_1;
40549 PyObject *__pyx_t_2 = NULL((void*)0);
40550 PyObject *__pyx_t_3 = NULL((void*)0);
40551 PyObject *__pyx_t_4 = NULL((void*)0);
40552 int __pyx_lineno = 0;
40553 const char *__pyx_filename = NULL((void*)0);
40554 int __pyx_clineno = 0;
40555 __Pyx_RefNannySetupContext("get_snap_limit", 0);
40556
40557 /* "rbd.pyx":3531
40558 * cdef:
40559 * uint64_t limit
40560 * with nogil: # <<<<<<<<<<<<<<
40561 * ret = rbd_snap_get_limit(self.image, &limit)
40562 * if ret != 0:
40563 */
40564 {
40565 #ifdef WITH_THREAD1
40566 PyThreadState *_save;
40567 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
40568 #endif
40569 /*try:*/ {
40570
40571 /* "rbd.pyx":3532
40572 * uint64_t limit
40573 * with nogil:
40574 * ret = rbd_snap_get_limit(self.image, &limit) # <<<<<<<<<<<<<<
40575 * if ret != 0:
40576 * raise make_ex(ret, 'error getting snapshot limit for %s' % self.name)
40577 */
40578 __pyx_v_ret = rbd_snap_get_limit(__pyx_v_self->image, (&__pyx_v_limit));
40579 }
40580
40581 /* "rbd.pyx":3531
40582 * cdef:
40583 * uint64_t limit
40584 * with nogil: # <<<<<<<<<<<<<<
40585 * ret = rbd_snap_get_limit(self.image, &limit)
40586 * if ret != 0:
40587 */
40588 /*finally:*/ {
40589 /*normal exit:*/{
40590 #ifdef WITH_THREAD1
40591 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
40592 #endif
40593 goto __pyx_L5;
40594 }
40595 __pyx_L5:;
40596 }
40597 }
40598
40599 /* "rbd.pyx":3533
40600 * with nogil:
40601 * ret = rbd_snap_get_limit(self.image, &limit)
40602 * if ret != 0: # <<<<<<<<<<<<<<
40603 * raise make_ex(ret, 'error getting snapshot limit for %s' % self.name)
40604 * return limit
40605 */
40606 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
40607 if (__pyx_t_1) {
40608
40609 /* "rbd.pyx":3534
40610 * ret = rbd_snap_get_limit(self.image, &limit)
40611 * if ret != 0:
40612 * raise make_ex(ret, 'error getting snapshot limit for %s' % self.name) # <<<<<<<<<<<<<<
40613 * return limit
40614 *
40615 */
40616 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__40616; goto __pyx_L1_error;}
40617 __Pyx_GOTREF(__pyx_t_2);
40618 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_snapshot_limit_for, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_snapshot_limit_for, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__40618; goto __pyx_L1_error;}
40619 __Pyx_GOTREF(__pyx_t_3);
40620 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__40620; goto __pyx_L1_error;}
40621 __Pyx_GOTREF(__pyx_t_4);
40622 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
40623 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
40624 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
40625 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
40626 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__40626; goto __pyx_L1_error;}
40627
40628 /* "rbd.pyx":3533
40629 * with nogil:
40630 * ret = rbd_snap_get_limit(self.image, &limit)
40631 * if ret != 0: # <<<<<<<<<<<<<<
40632 * raise make_ex(ret, 'error getting snapshot limit for %s' % self.name)
40633 * return limit
40634 */
40635 }
40636
40637 /* "rbd.pyx":3535
40638 * if ret != 0:
40639 * raise make_ex(ret, 'error getting snapshot limit for %s' % self.name)
40640 * return limit # <<<<<<<<<<<<<<
40641 *
40642 * def set_snap_limit(self, limit):
40643 */
40644 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
40645 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_limit); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __pyx_clineno = __LINE__40645; goto __pyx_L1_error;}
40646 __Pyx_GOTREF(__pyx_t_4);
40647 __pyx_r = __pyx_t_4;
40648 __pyx_t_4 = 0;
40649 goto __pyx_L0;
40650
40651 /* "rbd.pyx":3522
40652 * return is_protected == 1
40653 *
40654 * def get_snap_limit(self): # <<<<<<<<<<<<<<
40655 * """
40656 * Get the snapshot limit for an image.
40657 */
40658
40659 /* function exit code */
40660 __pyx_L1_error:;
40661 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
40662 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
40663 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
40664 __Pyx_AddTraceback("rbd.Image.get_snap_limit", __pyx_clineno, __pyx_lineno, __pyx_filename);
40665 __pyx_r = NULL((void*)0);
40666 __pyx_L0:;
40667 __Pyx_XGIVEREF(__pyx_r);
40668 __Pyx_RefNannyFinishContext();
40669 return __pyx_r;
40670}
40671
40672/* "rbd.pyx":3537
40673 * return limit
40674 *
40675 * def set_snap_limit(self, limit): # <<<<<<<<<<<<<<
40676 * """
40677 * Set the snapshot limit for an image.
40678 */
40679
40680/* Python wrapper */
40681static PyObject *__pyx_pw_3rbd_5Image_75set_snap_limit(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
40682static char __pyx_doc_3rbd_5Image_74set_snap_limit[] = "Image.set_snap_limit(self, limit)\n\n Set the snapshot limit for an image.\n\n :param limit: the new limit to set\n ";
40683static PyObject *__pyx_pw_3rbd_5Image_75set_snap_limit(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
40684 PyObject *__pyx_r = 0;
40685 __Pyx_RefNannyDeclarations
40686 __Pyx_RefNannySetupContext("set_snap_limit (wrapper)", 0);
40687 __pyx_r = __pyx_pf_3rbd_5Image_74set_snap_limit(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
40688
40689 /* function exit code */
40690 __Pyx_RefNannyFinishContext();
40691 return __pyx_r;
40692}
40693
40694static PyObject *__pyx_pf_3rbd_5Image_74set_snap_limit(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_limit) {
40695 uint64_t __pyx_v__limit;
40696 int __pyx_v_ret;
40697 PyObject *__pyx_r = NULL((void*)0);
40698 __Pyx_RefNannyDeclarations
40699 uint64_t __pyx_t_1;
40700 int __pyx_t_2;
40701 PyObject *__pyx_t_3 = NULL((void*)0);
40702 PyObject *__pyx_t_4 = NULL((void*)0);
40703 PyObject *__pyx_t_5 = NULL((void*)0);
40704 int __pyx_lineno = 0;
40705 const char *__pyx_filename = NULL((void*)0);
40706 int __pyx_clineno = 0;
40707 __Pyx_RefNannySetupContext("set_snap_limit", 0);
40708
40709 /* "rbd.pyx":3545
40710 *
40711 * cdef:
40712 * uint64_t _limit = limit # <<<<<<<<<<<<<<
40713 * with nogil:
40714 * ret = rbd_snap_set_limit(self.image, _limit)
40715 */
40716 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_limit); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3545; __pyx_clineno = __LINE__40716; goto __pyx_L1_error;}
40717 __pyx_v__limit = __pyx_t_1;
40718
40719 /* "rbd.pyx":3546
40720 * cdef:
40721 * uint64_t _limit = limit
40722 * with nogil: # <<<<<<<<<<<<<<
40723 * ret = rbd_snap_set_limit(self.image, _limit)
40724 * if ret != 0:
40725 */
40726 {
40727 #ifdef WITH_THREAD1
40728 PyThreadState *_save;
40729 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
40730 #endif
40731 /*try:*/ {
40732
40733 /* "rbd.pyx":3547
40734 * uint64_t _limit = limit
40735 * with nogil:
40736 * ret = rbd_snap_set_limit(self.image, _limit) # <<<<<<<<<<<<<<
40737 * if ret != 0:
40738 * raise make_ex(ret, 'error setting snapshot limit for %s' % self.name)
40739 */
40740 __pyx_v_ret = rbd_snap_set_limit(__pyx_v_self->image, __pyx_v__limit);
40741 }
40742
40743 /* "rbd.pyx":3546
40744 * cdef:
40745 * uint64_t _limit = limit
40746 * with nogil: # <<<<<<<<<<<<<<
40747 * ret = rbd_snap_set_limit(self.image, _limit)
40748 * if ret != 0:
40749 */
40750 /*finally:*/ {
40751 /*normal exit:*/{
40752 #ifdef WITH_THREAD1
40753 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
40754 #endif
40755 goto __pyx_L5;
40756 }
40757 __pyx_L5:;
40758 }
40759 }
40760
40761 /* "rbd.pyx":3548
40762 * with nogil:
40763 * ret = rbd_snap_set_limit(self.image, _limit)
40764 * if ret != 0: # <<<<<<<<<<<<<<
40765 * raise make_ex(ret, 'error setting snapshot limit for %s' % self.name)
40766 * return ret
40767 */
40768 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
40769 if (__pyx_t_2) {
40770
40771 /* "rbd.pyx":3549
40772 * ret = rbd_snap_set_limit(self.image, _limit)
40773 * if ret != 0:
40774 * raise make_ex(ret, 'error setting snapshot limit for %s' % self.name) # <<<<<<<<<<<<<<
40775 * return ret
40776 *
40777 */
40778 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3549; __pyx_clineno = __LINE__40778; goto __pyx_L1_error;}
40779 __Pyx_GOTREF(__pyx_t_3);
40780 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_setting_snapshot_limit_for, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_setting_snapshot_limit_for, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3549; __pyx_clineno = __LINE__40780; goto __pyx_L1_error;}
40781 __Pyx_GOTREF(__pyx_t_4);
40782 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3549; __pyx_clineno = __LINE__40782; goto __pyx_L1_error;}
40783 __Pyx_GOTREF(__pyx_t_5);
40784 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
40785 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
40786 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
40787 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40788 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3549; __pyx_clineno = __LINE__40788; goto __pyx_L1_error;}
40789
40790 /* "rbd.pyx":3548
40791 * with nogil:
40792 * ret = rbd_snap_set_limit(self.image, _limit)
40793 * if ret != 0: # <<<<<<<<<<<<<<
40794 * raise make_ex(ret, 'error setting snapshot limit for %s' % self.name)
40795 * return ret
40796 */
40797 }
40798
40799 /* "rbd.pyx":3550
40800 * if ret != 0:
40801 * raise make_ex(ret, 'error setting snapshot limit for %s' % self.name)
40802 * return ret # <<<<<<<<<<<<<<
40803 *
40804 * def get_snap_timestamp(self, snap_id):
40805 */
40806 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
40807 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __pyx_clineno = __LINE__40807; goto __pyx_L1_error;}
40808 __Pyx_GOTREF(__pyx_t_5);
40809 __pyx_r = __pyx_t_5;
40810 __pyx_t_5 = 0;
40811 goto __pyx_L0;
40812
40813 /* "rbd.pyx":3537
40814 * return limit
40815 *
40816 * def set_snap_limit(self, limit): # <<<<<<<<<<<<<<
40817 * """
40818 * Set the snapshot limit for an image.
40819 */
40820
40821 /* function exit code */
40822 __pyx_L1_error:;
40823 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
40824 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
40825 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
40826 __Pyx_AddTraceback("rbd.Image.set_snap_limit", __pyx_clineno, __pyx_lineno, __pyx_filename);
40827 __pyx_r = NULL((void*)0);
40828 __pyx_L0:;
40829 __Pyx_XGIVEREF(__pyx_r);
40830 __Pyx_RefNannyFinishContext();
40831 return __pyx_r;
40832}
40833
40834/* "rbd.pyx":3552
40835 * return ret
40836 *
40837 * def get_snap_timestamp(self, snap_id): # <<<<<<<<<<<<<<
40838 * """
40839 * Get the snapshot timestamp for an image.
40840 */
40841
40842/* Python wrapper */
40843static PyObject *__pyx_pw_3rbd_5Image_77get_snap_timestamp(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id); /*proto*/
40844static char __pyx_doc_3rbd_5Image_76get_snap_timestamp[] = "Image.get_snap_timestamp(self, snap_id)\n\n Get the snapshot timestamp for an image.\n :param snap_id: the snapshot id of a snap shot\n :returns: datetime - the snapshot timestamp for an image\n ";
40845static PyObject *__pyx_pw_3rbd_5Image_77get_snap_timestamp(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id) {
40846 PyObject *__pyx_r = 0;
40847 __Pyx_RefNannyDeclarations
40848 __Pyx_RefNannySetupContext("get_snap_timestamp (wrapper)", 0);
40849 __pyx_r = __pyx_pf_3rbd_5Image_76get_snap_timestamp(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_snap_id));
40850
40851 /* function exit code */
40852 __Pyx_RefNannyFinishContext();
40853 return __pyx_r;
40854}
40855
40856static PyObject *__pyx_pf_3rbd_5Image_76get_snap_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id) {
40857 struct timespec __pyx_v_timestamp;
40858 uint64_t __pyx_v__snap_id;
40859 int __pyx_v_ret;
40860 PyObject *__pyx_r = NULL((void*)0);
40861 __Pyx_RefNannyDeclarations
40862 uint64_t __pyx_t_1;
40863 int __pyx_t_2;
40864 PyObject *__pyx_t_3 = NULL((void*)0);
40865 PyObject *__pyx_t_4 = NULL((void*)0);
40866 PyObject *__pyx_t_5 = NULL((void*)0);
40867 PyObject *__pyx_t_6 = NULL((void*)0);
40868 PyObject *__pyx_t_7 = NULL((void*)0);
40869 int __pyx_lineno = 0;
40870 const char *__pyx_filename = NULL((void*)0);
40871 int __pyx_clineno = 0;
40872 __Pyx_RefNannySetupContext("get_snap_timestamp", 0);
40873
40874 /* "rbd.pyx":3560
40875 * cdef:
40876 * timespec timestamp
40877 * uint64_t _snap_id = snap_id # <<<<<<<<<<<<<<
40878 * with nogil:
40879 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp)
40880 */
40881 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_snap_id); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3560; __pyx_clineno = __LINE__40881; goto __pyx_L1_error;}
40882 __pyx_v__snap_id = __pyx_t_1;
40883
40884 /* "rbd.pyx":3561
40885 * timespec timestamp
40886 * uint64_t _snap_id = snap_id
40887 * with nogil: # <<<<<<<<<<<<<<
40888 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp)
40889 * if ret != 0:
40890 */
40891 {
40892 #ifdef WITH_THREAD1
40893 PyThreadState *_save;
40894 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
40895 #endif
40896 /*try:*/ {
40897
40898 /* "rbd.pyx":3562
40899 * uint64_t _snap_id = snap_id
40900 * with nogil:
40901 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp) # <<<<<<<<<<<<<<
40902 * if ret != 0:
40903 * raise make_ex(ret, 'error getting snapshot timestamp for image: %s, snap_id: %d' % (self.name, snap_id))
40904 */
40905 __pyx_v_ret = rbd_snap_get_timestamp(__pyx_v_self->image, __pyx_v__snap_id, (&__pyx_v_timestamp));
40906 }
40907
40908 /* "rbd.pyx":3561
40909 * timespec timestamp
40910 * uint64_t _snap_id = snap_id
40911 * with nogil: # <<<<<<<<<<<<<<
40912 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp)
40913 * if ret != 0:
40914 */
40915 /*finally:*/ {
40916 /*normal exit:*/{
40917 #ifdef WITH_THREAD1
40918 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
40919 #endif
40920 goto __pyx_L5;
40921 }
40922 __pyx_L5:;
40923 }
40924 }
40925
40926 /* "rbd.pyx":3563
40927 * with nogil:
40928 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp)
40929 * if ret != 0: # <<<<<<<<<<<<<<
40930 * raise make_ex(ret, 'error getting snapshot timestamp for image: %s, snap_id: %d' % (self.name, snap_id))
40931 * return datetime.utcfromtimestamp(timestamp.tv_sec)
40932 */
40933 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
40934 if (__pyx_t_2) {
40935
40936 /* "rbd.pyx":3564
40937 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp)
40938 * if ret != 0:
40939 * raise make_ex(ret, 'error getting snapshot timestamp for image: %s, snap_id: %d' % (self.name, snap_id)) # <<<<<<<<<<<<<<
40940 * return datetime.utcfromtimestamp(timestamp.tv_sec)
40941 *
40942 */
40943 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__40943; goto __pyx_L1_error;}
40944 __Pyx_GOTREF(__pyx_t_3);
40945 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__40945; goto __pyx_L1_error;}
40946 __Pyx_GOTREF(__pyx_t_4);
40947 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
40948 __Pyx_GIVEREF(__pyx_v_self->name);
40949 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_v_self
->name)
;
40950 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
40951 __Pyx_GIVEREF(__pyx_v_snap_id);
40952 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_snap_id)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_v_snap_id
)
;
40953 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_snapshot_timestamp, __pyx_t_4)PyString_Format(__pyx_kp_s_error_getting_snapshot_timestamp, __pyx_t_4
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__40953; goto __pyx_L1_error;}
40954 __Pyx_GOTREF(__pyx_t_5);
40955 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
40956 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__40956; goto __pyx_L1_error;}
40957 __Pyx_GOTREF(__pyx_t_4);
40958 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
40959 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40960 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
40961 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
40962 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__40962; goto __pyx_L1_error;}
40963
40964 /* "rbd.pyx":3563
40965 * with nogil:
40966 * ret = rbd_snap_get_timestamp(self.image, _snap_id, &timestamp)
40967 * if ret != 0: # <<<<<<<<<<<<<<
40968 * raise make_ex(ret, 'error getting snapshot timestamp for image: %s, snap_id: %d' % (self.name, snap_id))
40969 * return datetime.utcfromtimestamp(timestamp.tv_sec)
40970 */
40971 }
40972
40973 /* "rbd.pyx":3565
40974 * if ret != 0:
40975 * raise make_ex(ret, 'error getting snapshot timestamp for image: %s, snap_id: %d' % (self.name, snap_id))
40976 * return datetime.utcfromtimestamp(timestamp.tv_sec) # <<<<<<<<<<<<<<
40977 *
40978 * def remove_snap_limit(self):
40979 */
40980 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
40981 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__40981; goto __pyx_L1_error;}
40982 __Pyx_GOTREF(__pyx_t_5);
40983 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__40983; goto __pyx_L1_error;}
40984 __Pyx_GOTREF(__pyx_t_3);
40985 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
40986 __pyx_t_5 = __Pyx_PyInt_From_time_t(__pyx_v_timestamp.tv_sec); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__40986; goto __pyx_L1_error;}
40987 __Pyx_GOTREF(__pyx_t_5);
40988 __pyx_t_6 = NULL((void*)0);
40989 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
40990 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
40991 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
40992 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
40993 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
40994 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
40995 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
40996 }
40997 }
40998 if (!__pyx_t_6) {
40999 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__40999; goto __pyx_L1_error;}
41000 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
41001 __Pyx_GOTREF(__pyx_t_4);
41002 } else {
41003 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__41003; goto __pyx_L1_error;}
41004 __Pyx_GOTREF(__pyx_t_7);
41005 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
41006 __Pyx_GIVEREF(__pyx_t_5);
41007 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
41008 __pyx_t_5 = 0;
41009 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__41009; goto __pyx_L1_error;}
41010 __Pyx_GOTREF(__pyx_t_4);
41011 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
41012 }
41013 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
41014 __pyx_r = __pyx_t_4;
41015 __pyx_t_4 = 0;
41016 goto __pyx_L0;
41017
41018 /* "rbd.pyx":3552
41019 * return ret
41020 *
41021 * def get_snap_timestamp(self, snap_id): # <<<<<<<<<<<<<<
41022 * """
41023 * Get the snapshot timestamp for an image.
41024 */
41025
41026 /* function exit code */
41027 __pyx_L1_error:;
41028 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
41029 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
41030 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
41031 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
41032 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
41033 __Pyx_AddTraceback("rbd.Image.get_snap_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
41034 __pyx_r = NULL((void*)0);
41035 __pyx_L0:;
41036 __Pyx_XGIVEREF(__pyx_r);
41037 __Pyx_RefNannyFinishContext();
41038 return __pyx_r;
41039}
41040
41041/* "rbd.pyx":3567
41042 * return datetime.utcfromtimestamp(timestamp.tv_sec)
41043 *
41044 * def remove_snap_limit(self): # <<<<<<<<<<<<<<
41045 * """
41046 * Remove the snapshot limit for an image, essentially setting
41047 */
41048
41049/* Python wrapper */
41050static PyObject *__pyx_pw_3rbd_5Image_79remove_snap_limit(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
41051static char __pyx_doc_3rbd_5Image_78remove_snap_limit[] = "Image.remove_snap_limit(self)\n\n Remove the snapshot limit for an image, essentially setting\n the limit to the maximum size allowed by the implementation.\n ";
41052static PyObject *__pyx_pw_3rbd_5Image_79remove_snap_limit(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
41053 PyObject *__pyx_r = 0;
41054 __Pyx_RefNannyDeclarations
41055 __Pyx_RefNannySetupContext("remove_snap_limit (wrapper)", 0);
41056 __pyx_r = __pyx_pf_3rbd_5Image_78remove_snap_limit(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
41057
41058 /* function exit code */
41059 __Pyx_RefNannyFinishContext();
41060 return __pyx_r;
41061}
41062
41063static PyObject *__pyx_pf_3rbd_5Image_78remove_snap_limit(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
41064 int __pyx_v_ret;
41065 PyObject *__pyx_r = NULL((void*)0);
41066 __Pyx_RefNannyDeclarations
41067 int __pyx_t_1;
41068 PyObject *__pyx_t_2 = NULL((void*)0);
41069 PyObject *__pyx_t_3 = NULL((void*)0);
41070 PyObject *__pyx_t_4 = NULL((void*)0);
41071 int __pyx_lineno = 0;
41072 const char *__pyx_filename = NULL((void*)0);
41073 int __pyx_clineno = 0;
41074 __Pyx_RefNannySetupContext("remove_snap_limit", 0);
41075
41076 /* "rbd.pyx":3572
41077 * the limit to the maximum size allowed by the implementation.
41078 * """
41079 * with nogil: # <<<<<<<<<<<<<<
41080 * ret = rbd_snap_set_limit(self.image, UINT64_MAX)
41081 * if ret != 0:
41082 */
41083 {
41084 #ifdef WITH_THREAD1
41085 PyThreadState *_save;
41086 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
41087 #endif
41088 /*try:*/ {
41089
41090 /* "rbd.pyx":3573
41091 * """
41092 * with nogil:
41093 * ret = rbd_snap_set_limit(self.image, UINT64_MAX) # <<<<<<<<<<<<<<
41094 * if ret != 0:
41095 * raise make_ex(ret, 'error removing snapshot limit for %s' % self.name)
41096 */
41097 __pyx_v_ret = rbd_snap_set_limit(__pyx_v_self->image, UINT64_MAX(18446744073709551615UL));
41098 }
41099
41100 /* "rbd.pyx":3572
41101 * the limit to the maximum size allowed by the implementation.
41102 * """
41103 * with nogil: # <<<<<<<<<<<<<<
41104 * ret = rbd_snap_set_limit(self.image, UINT64_MAX)
41105 * if ret != 0:
41106 */
41107 /*finally:*/ {
41108 /*normal exit:*/{
41109 #ifdef WITH_THREAD1
41110 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
41111 #endif
41112 goto __pyx_L5;
41113 }
41114 __pyx_L5:;
41115 }
41116 }
41117
41118 /* "rbd.pyx":3574
41119 * with nogil:
41120 * ret = rbd_snap_set_limit(self.image, UINT64_MAX)
41121 * if ret != 0: # <<<<<<<<<<<<<<
41122 * raise make_ex(ret, 'error removing snapshot limit for %s' % self.name)
41123 * return ret
41124 */
41125 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
41126 if (__pyx_t_1) {
41127
41128 /* "rbd.pyx":3575
41129 * ret = rbd_snap_set_limit(self.image, UINT64_MAX)
41130 * if ret != 0:
41131 * raise make_ex(ret, 'error removing snapshot limit for %s' % self.name) # <<<<<<<<<<<<<<
41132 * return ret
41133 *
41134 */
41135 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__41135; goto __pyx_L1_error;}
41136 __Pyx_GOTREF(__pyx_t_2);
41137 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_removing_snapshot_limit_fo, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_removing_snapshot_limit_fo, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__41137; goto __pyx_L1_error;}
41138 __Pyx_GOTREF(__pyx_t_3);
41139 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__41139; goto __pyx_L1_error;}
41140 __Pyx_GOTREF(__pyx_t_4);
41141 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
41142 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
41143 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
41144 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
41145 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__41145; goto __pyx_L1_error;}
41146
41147 /* "rbd.pyx":3574
41148 * with nogil:
41149 * ret = rbd_snap_set_limit(self.image, UINT64_MAX)
41150 * if ret != 0: # <<<<<<<<<<<<<<
41151 * raise make_ex(ret, 'error removing snapshot limit for %s' % self.name)
41152 * return ret
41153 */
41154 }
41155
41156 /* "rbd.pyx":3576
41157 * if ret != 0:
41158 * raise make_ex(ret, 'error removing snapshot limit for %s' % self.name)
41159 * return ret # <<<<<<<<<<<<<<
41160 *
41161 * def set_snap(self, name):
41162 */
41163 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
41164 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3576; __pyx_clineno = __LINE__41164; goto __pyx_L1_error;}
41165 __Pyx_GOTREF(__pyx_t_4);
41166 __pyx_r = __pyx_t_4;
41167 __pyx_t_4 = 0;
41168 goto __pyx_L0;
41169
41170 /* "rbd.pyx":3567
41171 * return datetime.utcfromtimestamp(timestamp.tv_sec)
41172 *
41173 * def remove_snap_limit(self): # <<<<<<<<<<<<<<
41174 * """
41175 * Remove the snapshot limit for an image, essentially setting
41176 */
41177
41178 /* function exit code */
41179 __pyx_L1_error:;
41180 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
41181 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
41182 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
41183 __Pyx_AddTraceback("rbd.Image.remove_snap_limit", __pyx_clineno, __pyx_lineno, __pyx_filename);
41184 __pyx_r = NULL((void*)0);
41185 __pyx_L0:;
41186 __Pyx_XGIVEREF(__pyx_r);
41187 __Pyx_RefNannyFinishContext();
41188 return __pyx_r;
41189}
41190
41191/* "rbd.pyx":3578
41192 * return ret
41193 *
41194 * def set_snap(self, name): # <<<<<<<<<<<<<<
41195 * """
41196 * Set the snapshot to read from. Writes will raise ReadOnlyImage
41197 */
41198
41199/* Python wrapper */
41200static PyObject *__pyx_pw_3rbd_5Image_81set_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
41201static char __pyx_doc_3rbd_5Image_80set_snap[] = "Image.set_snap(self, name)\n\n Set the snapshot to read from. Writes will raise ReadOnlyImage\n while a snapshot is set. Pass None to unset the snapshot\n (reads come from the current image) , and allow writing again.\n\n :param name: the snapshot to read from, or None to unset the snapshot\n :type name: str or None\n ";
41202static PyObject *__pyx_pw_3rbd_5Image_81set_snap(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
41203 PyObject *__pyx_r = 0;
41204 __Pyx_RefNannyDeclarations
41205 __Pyx_RefNannySetupContext("set_snap (wrapper)", 0);
41206 __pyx_r = __pyx_pf_3rbd_5Image_80set_snap(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_name));
41207
41208 /* function exit code */
41209 __Pyx_RefNannyFinishContext();
41210 return __pyx_r;
41211}
41212
41213static PyObject *__pyx_pf_3rbd_5Image_80set_snap(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_name) {
41214 char *__pyx_v__name;
41215 int __pyx_v_ret;
41216 PyObject *__pyx_r = NULL((void*)0);
41217 __Pyx_RefNannyDeclarations
41218 PyObject *__pyx_t_1 = NULL((void*)0);
41219 PyObject *__pyx_t_2 = NULL((void*)0);
41220 PyObject *__pyx_t_3 = NULL((void*)0);
41221 PyObject *__pyx_t_4 = NULL((void*)0);
41222 char *__pyx_t_5;
41223 int __pyx_t_6;
41224 int __pyx_lineno = 0;
41225 const char *__pyx_filename = NULL((void*)0);
41226 int __pyx_clineno = 0;
41227 __Pyx_RefNannySetupContext("set_snap", 0);
41228 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
41229
41230 /* "rbd.pyx":3587
41231 * :type name: str or None
41232 * """
41233 * name = cstr(name, 'name', opt=True) # <<<<<<<<<<<<<<
41234 * cdef char *_name = opt_str(name)
41235 * with nogil:
41236 */
41237 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3587; __pyx_clineno = __LINE__41237; goto __pyx_L1_error;}
41238 __Pyx_GOTREF(__pyx_t_1);
41239 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3587; __pyx_clineno = __LINE__41239; goto __pyx_L1_error;}
41240 __Pyx_GOTREF(__pyx_t_2);
41241 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
41242 __Pyx_GIVEREF(__pyx_v_name);
41243 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_name
)
;
41244 __Pyx_INCREF(__pyx_n_s_name)( ((PyObject*)(__pyx_n_s_name))->ob_refcnt++);
41245 __Pyx_GIVEREF(__pyx_n_s_name);
41246 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_name
)
;
41247 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3587; __pyx_clineno = __LINE__41247; goto __pyx_L1_error;}
41248 __Pyx_GOTREF(__pyx_t_3);
41249 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3587; __pyx_clineno = __LINE__41249; goto __pyx_L1_error;}
41250 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3587; __pyx_clineno = __LINE__41250; goto __pyx_L1_error;}
41251 __Pyx_GOTREF(__pyx_t_4);
41252 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
41253 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
41254 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
41255 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_name; __pyx_v_name =
__pyx_t_4; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (0); }
while (0)
;
41256 __pyx_t_4 = 0;
41257
41258 /* "rbd.pyx":3588
41259 * """
41260 * name = cstr(name, 'name', opt=True)
41261 * cdef char *_name = opt_str(name) # <<<<<<<<<<<<<<
41262 * with nogil:
41263 * ret = rbd_snap_set(self.image, _name)
41264 */
41265 __pyx_t_5 = __pyx_f_3rbd_opt_str(__pyx_v_name); if (unlikely(__pyx_t_5 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_5 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3588; __pyx_clineno = __LINE__41265; goto __pyx_L1_error;}
41266 __pyx_v__name = __pyx_t_5;
41267
41268 /* "rbd.pyx":3589
41269 * name = cstr(name, 'name', opt=True)
41270 * cdef char *_name = opt_str(name)
41271 * with nogil: # <<<<<<<<<<<<<<
41272 * ret = rbd_snap_set(self.image, _name)
41273 * if ret != 0:
41274 */
41275 {
41276 #ifdef WITH_THREAD1
41277 PyThreadState *_save;
41278 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
41279 #endif
41280 /*try:*/ {
41281
41282 /* "rbd.pyx":3590
41283 * cdef char *_name = opt_str(name)
41284 * with nogil:
41285 * ret = rbd_snap_set(self.image, _name) # <<<<<<<<<<<<<<
41286 * if ret != 0:
41287 * raise make_ex(ret, 'error setting image %s to snapshot %s' % (self.name, name))
41288 */
41289 __pyx_v_ret = rbd_snap_set(__pyx_v_self->image, __pyx_v__name);
41290 }
41291
41292 /* "rbd.pyx":3589
41293 * name = cstr(name, 'name', opt=True)
41294 * cdef char *_name = opt_str(name)
41295 * with nogil: # <<<<<<<<<<<<<<
41296 * ret = rbd_snap_set(self.image, _name)
41297 * if ret != 0:
41298 */
41299 /*finally:*/ {
41300 /*normal exit:*/{
41301 #ifdef WITH_THREAD1
41302 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
41303 #endif
41304 goto __pyx_L5;
41305 }
41306 __pyx_L5:;
41307 }
41308 }
41309
41310 /* "rbd.pyx":3591
41311 * with nogil:
41312 * ret = rbd_snap_set(self.image, _name)
41313 * if ret != 0: # <<<<<<<<<<<<<<
41314 * raise make_ex(ret, 'error setting image %s to snapshot %s' % (self.name, name))
41315 *
41316 */
41317 __pyx_t_6 = ((__pyx_v_ret != 0) != 0);
41318 if (__pyx_t_6) {
41319
41320 /* "rbd.pyx":3592
41321 * ret = rbd_snap_set(self.image, _name)
41322 * if ret != 0:
41323 * raise make_ex(ret, 'error setting image %s to snapshot %s' % (self.name, name)) # <<<<<<<<<<<<<<
41324 *
41325 * def set_snap_by_id(self, snap_id):
41326 */
41327 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __pyx_clineno = __LINE__41327; goto __pyx_L1_error;}
41328 __Pyx_GOTREF(__pyx_t_4);
41329 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __pyx_clineno = __LINE__41329; goto __pyx_L1_error;}
41330 __Pyx_GOTREF(__pyx_t_3);
41331 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
41332 __Pyx_GIVEREF(__pyx_v_self->name);
41333 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_self
->name)
;
41334 __Pyx_INCREF(__pyx_v_name)( ((PyObject*)(__pyx_v_name))->ob_refcnt++);
41335 __Pyx_GIVEREF(__pyx_v_name);
41336 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_name)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_name
)
;
41337 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_error_setting_image_s_to_snapsho, __pyx_t_3)PyString_Format(__pyx_kp_s_error_setting_image_s_to_snapsho, __pyx_t_3
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __pyx_clineno = __LINE__41337; goto __pyx_L1_error;}
41338 __Pyx_GOTREF(__pyx_t_2);
41339 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
41340 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __pyx_clineno = __LINE__41340; goto __pyx_L1_error;}
41341 __Pyx_GOTREF(__pyx_t_3);
41342 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
41343 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
41344 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
41345 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
41346 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __pyx_clineno = __LINE__41346; goto __pyx_L1_error;}
41347
41348 /* "rbd.pyx":3591
41349 * with nogil:
41350 * ret = rbd_snap_set(self.image, _name)
41351 * if ret != 0: # <<<<<<<<<<<<<<
41352 * raise make_ex(ret, 'error setting image %s to snapshot %s' % (self.name, name))
41353 *
41354 */
41355 }
41356
41357 /* "rbd.pyx":3578
41358 * return ret
41359 *
41360 * def set_snap(self, name): # <<<<<<<<<<<<<<
41361 * """
41362 * Set the snapshot to read from. Writes will raise ReadOnlyImage
41363 */
41364
41365 /* function exit code */
41366 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
41367 goto __pyx_L0;
41368 __pyx_L1_error:;
41369 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
41370 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
41371 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
41372 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
41373 __Pyx_AddTraceback("rbd.Image.set_snap", __pyx_clineno, __pyx_lineno, __pyx_filename);
41374 __pyx_r = NULL((void*)0);
41375 __pyx_L0:;
41376 __Pyx_XDECREF(__pyx_v_name)do { if ((__pyx_v_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_name))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_name)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_name)))); } while (0); } while
(0)
;
41377 __Pyx_XGIVEREF(__pyx_r);
41378 __Pyx_RefNannyFinishContext();
41379 return __pyx_r;
41380}
41381
41382/* "rbd.pyx":3594
41383 * raise make_ex(ret, 'error setting image %s to snapshot %s' % (self.name, name))
41384 *
41385 * def set_snap_by_id(self, snap_id): # <<<<<<<<<<<<<<
41386 * """
41387 * Set the snapshot to read from. Writes will raise ReadOnlyImage
41388 */
41389
41390/* Python wrapper */
41391static PyObject *__pyx_pw_3rbd_5Image_83set_snap_by_id(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id); /*proto*/
41392static char __pyx_doc_3rbd_5Image_82set_snap_by_id[] = "Image.set_snap_by_id(self, snap_id)\n\n Set the snapshot to read from. Writes will raise ReadOnlyImage\n while a snapshot is set. Pass None to unset the snapshot\n (reads come from the current image) , and allow writing again.\n\n :param snap_id: the snapshot to read from, or None to unset the snapshot\n :type snap_id: int\n ";
41393static PyObject *__pyx_pw_3rbd_5Image_83set_snap_by_id(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id) {
41394 PyObject *__pyx_r = 0;
41395 __Pyx_RefNannyDeclarations
41396 __Pyx_RefNannySetupContext("set_snap_by_id (wrapper)", 0);
41397 __pyx_r = __pyx_pf_3rbd_5Image_82set_snap_by_id(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_snap_id));
41398
41399 /* function exit code */
41400 __Pyx_RefNannyFinishContext();
41401 return __pyx_r;
41402}
41403
41404static PyObject *__pyx_pf_3rbd_5Image_82set_snap_by_id(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id) {
41405 int64_t __pyx_v__snap_id;
41406 int __pyx_v_ret;
41407 PyObject *__pyx_r = NULL((void*)0);
41408 __Pyx_RefNannyDeclarations
41409 int __pyx_t_1;
41410 int __pyx_t_2;
41411 PyObject *__pyx_t_3 = NULL((void*)0);
41412 int64_t __pyx_t_4;
41413 PyObject *__pyx_t_5 = NULL((void*)0);
41414 PyObject *__pyx_t_6 = NULL((void*)0);
41415 int __pyx_lineno = 0;
41416 const char *__pyx_filename = NULL((void*)0);
41417 int __pyx_clineno = 0;
41418 __Pyx_RefNannySetupContext("set_snap_by_id", 0);
41419 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
41420
41421 /* "rbd.pyx":3603
41422 * :type snap_id: int
41423 * """
41424 * if not snap_id: # <<<<<<<<<<<<<<
41425 * snap_id = _LIBRADOS_SNAP_HEAD
41426 * cdef int64_t _snap_id = snap_id
41427 */
41428 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_snap_id); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __pyx_clineno = __LINE__41428; goto __pyx_L1_error;}
41429 __pyx_t_2 = ((!__pyx_t_1) != 0);
41430 if (__pyx_t_2) {
41431
41432 /* "rbd.pyx":3604
41433 * """
41434 * if not snap_id:
41435 * snap_id = _LIBRADOS_SNAP_HEAD # <<<<<<<<<<<<<<
41436 * cdef int64_t _snap_id = snap_id
41437 * with nogil:
41438 */
41439 __pyx_t_3 = __Pyx_PyInt_From_int(LIBRADOS_SNAP_HEAD((uint64_t)(-2))); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3604; __pyx_clineno = __LINE__41439; goto __pyx_L1_error;}
41440 __Pyx_GOTREF(__pyx_t_3);
41441 __Pyx_DECREF_SET(__pyx_v_snap_id, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_snap_id; __pyx_v_snap_id
= __pyx_t_3; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
41442 __pyx_t_3 = 0;
41443
41444 /* "rbd.pyx":3603
41445 * :type snap_id: int
41446 * """
41447 * if not snap_id: # <<<<<<<<<<<<<<
41448 * snap_id = _LIBRADOS_SNAP_HEAD
41449 * cdef int64_t _snap_id = snap_id
41450 */
41451 }
41452
41453 /* "rbd.pyx":3605
41454 * if not snap_id:
41455 * snap_id = _LIBRADOS_SNAP_HEAD
41456 * cdef int64_t _snap_id = snap_id # <<<<<<<<<<<<<<
41457 * with nogil:
41458 * ret = rbd_snap_set_by_id(self.image, _snap_id)
41459 */
41460 __pyx_t_4 = __Pyx_PyInt_As_int64_t(__pyx_v_snap_id); if (unlikely((__pyx_t_4 == (int64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (int64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__41460; goto __pyx_L1_error;}
41461 __pyx_v__snap_id = __pyx_t_4;
41462
41463 /* "rbd.pyx":3606
41464 * snap_id = _LIBRADOS_SNAP_HEAD
41465 * cdef int64_t _snap_id = snap_id
41466 * with nogil: # <<<<<<<<<<<<<<
41467 * ret = rbd_snap_set_by_id(self.image, _snap_id)
41468 * if ret != 0:
41469 */
41470 {
41471 #ifdef WITH_THREAD1
41472 PyThreadState *_save;
41473 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
41474 #endif
41475 /*try:*/ {
41476
41477 /* "rbd.pyx":3607
41478 * cdef int64_t _snap_id = snap_id
41479 * with nogil:
41480 * ret = rbd_snap_set_by_id(self.image, _snap_id) # <<<<<<<<<<<<<<
41481 * if ret != 0:
41482 * raise make_ex(ret, 'error setting image %s to snapshot %d' % (self.name, snap_id))
41483 */
41484 __pyx_v_ret = rbd_snap_set_by_id(__pyx_v_self->image, __pyx_v__snap_id);
41485 }
41486
41487 /* "rbd.pyx":3606
41488 * snap_id = _LIBRADOS_SNAP_HEAD
41489 * cdef int64_t _snap_id = snap_id
41490 * with nogil: # <<<<<<<<<<<<<<
41491 * ret = rbd_snap_set_by_id(self.image, _snap_id)
41492 * if ret != 0:
41493 */
41494 /*finally:*/ {
41495 /*normal exit:*/{
41496 #ifdef WITH_THREAD1
41497 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
41498 #endif
41499 goto __pyx_L6;
41500 }
41501 __pyx_L6:;
41502 }
41503 }
41504
41505 /* "rbd.pyx":3608
41506 * with nogil:
41507 * ret = rbd_snap_set_by_id(self.image, _snap_id)
41508 * if ret != 0: # <<<<<<<<<<<<<<
41509 * raise make_ex(ret, 'error setting image %s to snapshot %d' % (self.name, snap_id))
41510 *
41511 */
41512 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
41513 if (__pyx_t_2) {
41514
41515 /* "rbd.pyx":3609
41516 * ret = rbd_snap_set_by_id(self.image, _snap_id)
41517 * if ret != 0:
41518 * raise make_ex(ret, 'error setting image %s to snapshot %d' % (self.name, snap_id)) # <<<<<<<<<<<<<<
41519 *
41520 * def read(self, offset, length, fadvise_flags=0):
41521 */
41522 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3609; __pyx_clineno = __LINE__41522; goto __pyx_L1_error;}
41523 __Pyx_GOTREF(__pyx_t_3);
41524 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3609; __pyx_clineno = __LINE__41524; goto __pyx_L1_error;}
41525 __Pyx_GOTREF(__pyx_t_5);
41526 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
41527 __Pyx_GIVEREF(__pyx_v_self->name);
41528 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_self
->name)
;
41529 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
41530 __Pyx_GIVEREF(__pyx_v_snap_id);
41531 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_snap_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_v_snap_id
)
;
41532 __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_error_setting_image_s_to_snapsho_2, __pyx_t_5)PyString_Format(__pyx_kp_s_error_setting_image_s_to_snapsho_2
, __pyx_t_5)
; if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3609; __pyx_clineno = __LINE__41532; goto __pyx_L1_error;}
41533 __Pyx_GOTREF(__pyx_t_6);
41534 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
41535 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3609; __pyx_clineno = __LINE__41535; goto __pyx_L1_error;}
41536 __Pyx_GOTREF(__pyx_t_5);
41537 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
41538 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
41539 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
41540 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
41541 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3609; __pyx_clineno = __LINE__41541; goto __pyx_L1_error;}
41542
41543 /* "rbd.pyx":3608
41544 * with nogil:
41545 * ret = rbd_snap_set_by_id(self.image, _snap_id)
41546 * if ret != 0: # <<<<<<<<<<<<<<
41547 * raise make_ex(ret, 'error setting image %s to snapshot %d' % (self.name, snap_id))
41548 *
41549 */
41550 }
41551
41552 /* "rbd.pyx":3594
41553 * raise make_ex(ret, 'error setting image %s to snapshot %s' % (self.name, name))
41554 *
41555 * def set_snap_by_id(self, snap_id): # <<<<<<<<<<<<<<
41556 * """
41557 * Set the snapshot to read from. Writes will raise ReadOnlyImage
41558 */
41559
41560 /* function exit code */
41561 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
41562 goto __pyx_L0;
41563 __pyx_L1_error:;
41564 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
41565 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
41566 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
41567 __Pyx_AddTraceback("rbd.Image.set_snap_by_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
41568 __pyx_r = NULL((void*)0);
41569 __pyx_L0:;
41570 __Pyx_XDECREF(__pyx_v_snap_id)do { if ((__pyx_v_snap_id) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_snap_id))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_snap_id)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_snap_id)))); } while
(0); } while (0)
;
41571 __Pyx_XGIVEREF(__pyx_r);
41572 __Pyx_RefNannyFinishContext();
41573 return __pyx_r;
41574}
41575
41576/* "rbd.pyx":3611
41577 * raise make_ex(ret, 'error setting image %s to snapshot %d' % (self.name, snap_id))
41578 *
41579 * def read(self, offset, length, fadvise_flags=0): # <<<<<<<<<<<<<<
41580 * """
41581 * Read data from the image. Raises :class:`InvalidArgument` if
41582 */
41583
41584/* Python wrapper */
41585static PyObject *__pyx_pw_3rbd_5Image_85read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
41586static char __pyx_doc_3rbd_5Image_84read[] = "Image.read(self, offset, length, fadvise_flags=0)\n\n Read data from the image. Raises :class:`InvalidArgument` if\n part of the range specified is outside the image.\n\n :param offset: the offset to start reading at\n :type offset: int\n :param length: how many bytes to read\n :type length: int\n :param fadvise_flags: fadvise flags for this read\n :type fadvise_flags: int\n :returns: str - the data read\n :raises: :class:`InvalidArgument`, :class:`IOError`\n ";
41587static PyObject *__pyx_pw_3rbd_5Image_85read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41588 PyObject *__pyx_v_offset = 0;
41589 PyObject *__pyx_v_length = 0;
41590 PyObject *__pyx_v_fadvise_flags = 0;
41591 int __pyx_lineno = 0;
41592 const char *__pyx_filename = NULL((void*)0);
41593 int __pyx_clineno = 0;
41594 PyObject *__pyx_r = 0;
41595 __Pyx_RefNannyDeclarations
41596 __Pyx_RefNannySetupContext("read (wrapper)", 0);
41597 {
41598 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_length,&__pyx_n_s_fadvise_flags,0};
41599 PyObject* values[3] = {0,0,0};
41600 values[2] = ((PyObject *)__pyx_int_0);
41601 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
41602 Py_ssize_t kw_args;
41603 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
41604 switch (pos_args) {
41605 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
41606 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
41607 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
41608 case 0: break;
41609 default: goto __pyx_L5_argtuple_error;
41610 }
41611 kw_args = PyDict_Size(__pyx_kwds);
41612 switch (pos_args) {
41613 case 0:
41614 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
41615 else goto __pyx_L5_argtuple_error;
41616 case 1:
41617 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length
)) != 0), 1)
) kw_args--;
41618 else {
41619 __Pyx_RaiseArgtupleInvalid("read", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3611; __pyx_clineno = __LINE__41619; goto __pyx_L3_error;}
41620 }
41621 case 2:
41622 if (kw_args > 0) {
41623 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fadvise_flags);
41624 if (value) { values[2] = value; kw_args--; }
41625 }
41626 }
41627 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
41628 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "read") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3611; __pyx_clineno = __LINE__41628; goto __pyx_L3_error;}
41629 }
41630 } else {
41631 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
41632 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
41633 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
41634 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
41635 break;
41636 default: goto __pyx_L5_argtuple_error;
41637 }
41638 }
41639 __pyx_v_offset = values[0];
41640 __pyx_v_length = values[1];
41641 __pyx_v_fadvise_flags = values[2];
41642 }
41643 goto __pyx_L4_argument_unpacking_done;
41644 __pyx_L5_argtuple_error:;
41645 __Pyx_RaiseArgtupleInvalid("read", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3611; __pyx_clineno = __LINE__41645; goto __pyx_L3_error;}
41646 __pyx_L3_error:;
41647 __Pyx_AddTraceback("rbd.Image.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
41648 __Pyx_RefNannyFinishContext();
41649 return NULL((void*)0);
41650 __pyx_L4_argument_unpacking_done:;
41651 __pyx_r = __pyx_pf_3rbd_5Image_84read(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_offset, __pyx_v_length, __pyx_v_fadvise_flags);
41652
41653 /* function exit code */
41654 __Pyx_RefNannyFinishContext();
41655 return __pyx_r;
41656}
41657
41658static PyObject *__pyx_pf_3rbd_5Image_84read(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_fadvise_flags) {
41659 char *__pyx_v_ret_buf;
41660 uint64_t __pyx_v__offset;
41661 size_t __pyx_v__length;
41662 int __pyx_v__fadvise_flags;
41663 PyObject *__pyx_v_ret_s;
41664 Py_ssize_t __pyx_v_ret;
41665 PyObject *__pyx_r = NULL((void*)0);
41666 __Pyx_RefNannyDeclarations
41667 uint64_t __pyx_t_1;
41668 size_t __pyx_t_2;
41669 int __pyx_t_3;
41670 Py_ssize_t __pyx_t_4;
41671 PyObject *__pyx_t_5;
41672 char *__pyx_t_6;
41673 int __pyx_t_7;
41674 PyObject *__pyx_t_8 = NULL((void*)0);
41675 PyObject *__pyx_t_9 = NULL((void*)0);
41676 PyObject *__pyx_t_10 = NULL((void*)0);
41677 Py_ssize_t __pyx_t_11;
41678 int __pyx_t_12;
41679 char const *__pyx_t_13;
41680 PyObject *__pyx_t_14 = NULL((void*)0);
41681 PyObject *__pyx_t_15 = NULL((void*)0);
41682 PyObject *__pyx_t_16 = NULL((void*)0);
41683 PyObject *__pyx_t_17 = NULL((void*)0);
41684 PyObject *__pyx_t_18 = NULL((void*)0);
41685 PyObject *__pyx_t_19 = NULL((void*)0);
41686 int __pyx_lineno = 0;
41687 const char *__pyx_filename = NULL((void*)0);
41688 int __pyx_clineno = 0;
41689 __Pyx_RefNannySetupContext("read", 0);
41690
41691 /* "rbd.pyx":3632
41692 * cdef:
41693 * char *ret_buf
41694 * uint64_t _offset = offset # <<<<<<<<<<<<<<
41695 * size_t _length = length
41696 * int _fadvise_flags = fadvise_flags
41697 */
41698 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3632; __pyx_clineno = __LINE__41698; goto __pyx_L1_error;}
41699 __pyx_v__offset = __pyx_t_1;
41700
41701 /* "rbd.pyx":3633
41702 * char *ret_buf
41703 * uint64_t _offset = offset
41704 * size_t _length = length # <<<<<<<<<<<<<<
41705 * int _fadvise_flags = fadvise_flags
41706 * PyObject* ret_s = NULL
41707 */
41708 __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_2 == (size_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3633; __pyx_clineno = __LINE__41708; goto __pyx_L1_error;}
41709 __pyx_v__length = __pyx_t_2;
41710
41711 /* "rbd.pyx":3634
41712 * uint64_t _offset = offset
41713 * size_t _length = length
41714 * int _fadvise_flags = fadvise_flags # <<<<<<<<<<<<<<
41715 * PyObject* ret_s = NULL
41716 * ret_s = PyBytes_FromStringAndSize(NULL, length)
41717 */
41718 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_fadvise_flags); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3634; __pyx_clineno = __LINE__41718; goto __pyx_L1_error;}
41719 __pyx_v__fadvise_flags = __pyx_t_3;
41720
41721 /* "rbd.pyx":3635
41722 * size_t _length = length
41723 * int _fadvise_flags = fadvise_flags
41724 * PyObject* ret_s = NULL # <<<<<<<<<<<<<<
41725 * ret_s = PyBytes_FromStringAndSize(NULL, length)
41726 * try:
41727 */
41728 __pyx_v_ret_s = NULL((void*)0);
41729
41730 /* "rbd.pyx":3636
41731 * int _fadvise_flags = fadvise_flags
41732 * PyObject* ret_s = NULL
41733 * ret_s = PyBytes_FromStringAndSize(NULL, length) # <<<<<<<<<<<<<<
41734 * try:
41735 * ret_buf = PyBytes_AsString(ret_s)
41736 */
41737 __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_length); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3636; __pyx_clineno = __LINE__41737; goto __pyx_L1_error;}
41738 __pyx_t_5 = PyBytes_FromStringAndSizePyString_FromStringAndSize(NULL((void*)0), __pyx_t_4); if (unlikely(__pyx_t_5 == NULL)__builtin_expect(!!(__pyx_t_5 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3636; __pyx_clineno = __LINE__41738; goto __pyx_L1_error;}
41739 __pyx_v_ret_s = __pyx_t_5;
41740
41741 /* "rbd.pyx":3637
41742 * PyObject* ret_s = NULL
41743 * ret_s = PyBytes_FromStringAndSize(NULL, length)
41744 * try: # <<<<<<<<<<<<<<
41745 * ret_buf = PyBytes_AsString(ret_s)
41746 * with nogil:
41747 */
41748 /*try:*/ {
41749
41750 /* "rbd.pyx":3638
41751 * ret_s = PyBytes_FromStringAndSize(NULL, length)
41752 * try:
41753 * ret_buf = PyBytes_AsString(ret_s) # <<<<<<<<<<<<<<
41754 * with nogil:
41755 * ret = rbd_read2(self.image, _offset, _length, ret_buf,
41756 */
41757 __pyx_t_6 = PyBytes_AsStringPyString_AsString(__pyx_v_ret_s); if (unlikely(__pyx_t_6 == NULL)__builtin_expect(!!(__pyx_t_6 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3638; __pyx_clineno = __LINE__41757; goto __pyx_L4_error;}
41758 __pyx_v_ret_buf = __pyx_t_6;
41759
41760 /* "rbd.pyx":3639
41761 * try:
41762 * ret_buf = PyBytes_AsString(ret_s)
41763 * with nogil: # <<<<<<<<<<<<<<
41764 * ret = rbd_read2(self.image, _offset, _length, ret_buf,
41765 * _fadvise_flags)
41766 */
41767 {
41768 #ifdef WITH_THREAD1
41769 PyThreadState *_save;
41770 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
41771 #endif
41772 /*try:*/ {
41773
41774 /* "rbd.pyx":3640
41775 * ret_buf = PyBytes_AsString(ret_s)
41776 * with nogil:
41777 * ret = rbd_read2(self.image, _offset, _length, ret_buf, # <<<<<<<<<<<<<<
41778 * _fadvise_flags)
41779 * if ret < 0:
41780 */
41781 __pyx_v_ret = rbd_read2(__pyx_v_self->image, __pyx_v__offset, __pyx_v__length, __pyx_v_ret_buf, __pyx_v__fadvise_flags);
41782 }
41783
41784 /* "rbd.pyx":3639
41785 * try:
41786 * ret_buf = PyBytes_AsString(ret_s)
41787 * with nogil: # <<<<<<<<<<<<<<
41788 * ret = rbd_read2(self.image, _offset, _length, ret_buf,
41789 * _fadvise_flags)
41790 */
41791 /*finally:*/ {
41792 /*normal exit:*/{
41793 #ifdef WITH_THREAD1
41794 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
41795 #endif
41796 goto __pyx_L8;
41797 }
41798 __pyx_L8:;
41799 }
41800 }
41801
41802 /* "rbd.pyx":3642
41803 * ret = rbd_read2(self.image, _offset, _length, ret_buf,
41804 * _fadvise_flags)
41805 * if ret < 0: # <<<<<<<<<<<<<<
41806 * raise make_ex(ret, 'error reading %s %ld~%ld' % (self.name, offset, length))
41807 *
41808 */
41809 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
41810 if (__pyx_t_7) {
41811
41812 /* "rbd.pyx":3643
41813 * _fadvise_flags)
41814 * if ret < 0:
41815 * raise make_ex(ret, 'error reading %s %ld~%ld' % (self.name, offset, length)) # <<<<<<<<<<<<<<
41816 *
41817 * if ret != <ssize_t>length:
41818 */
41819 __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__41819; goto __pyx_L4_error;}
41820 __Pyx_GOTREF(__pyx_t_8);
41821 __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__41821; goto __pyx_L4_error;}
41822 __Pyx_GOTREF(__pyx_t_9);
41823 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
41824 __Pyx_GIVEREF(__pyx_v_self->name);
41825 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_v_self
->name)
;
41826 __Pyx_INCREF(__pyx_v_offset)( ((PyObject*)(__pyx_v_offset))->ob_refcnt++);
41827 __Pyx_GIVEREF(__pyx_v_offset);
41828 PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_offset)(((PyTupleObject *)(__pyx_t_9))->ob_item[1] = __pyx_v_offset
)
;
41829 __Pyx_INCREF(__pyx_v_length)( ((PyObject*)(__pyx_v_length))->ob_refcnt++);
41830 __Pyx_GIVEREF(__pyx_v_length);
41831 PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_length)(((PyTupleObject *)(__pyx_t_9))->ob_item[2] = __pyx_v_length
)
;
41832 __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_error_reading_s_ld_ld, __pyx_t_9)PyString_Format(__pyx_kp_s_error_reading_s_ld_ld, __pyx_t_9); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__41832; goto __pyx_L4_error;}
41833 __Pyx_GOTREF(__pyx_t_10);
41834 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
41835 __pyx_t_9 = __pyx_f_3rbd_make_ex(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__41835; goto __pyx_L4_error;}
41836 __Pyx_GOTREF(__pyx_t_9);
41837 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
41838 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
41839 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
41840 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
41841 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__41841; goto __pyx_L4_error;}
41842
41843 /* "rbd.pyx":3642
41844 * ret = rbd_read2(self.image, _offset, _length, ret_buf,
41845 * _fadvise_flags)
41846 * if ret < 0: # <<<<<<<<<<<<<<
41847 * raise make_ex(ret, 'error reading %s %ld~%ld' % (self.name, offset, length))
41848 *
41849 */
41850 }
41851
41852 /* "rbd.pyx":3645
41853 * raise make_ex(ret, 'error reading %s %ld~%ld' % (self.name, offset, length))
41854 *
41855 * if ret != <ssize_t>length: # <<<<<<<<<<<<<<
41856 * _PyBytes_Resize(&ret_s, ret)
41857 *
41858 */
41859 __pyx_t_11 = PyInt_AsSsize_t(__pyx_v_length); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_11 == (Py_ssize_t)-1) &&
PyErr_Occurred()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3645; __pyx_clineno = __LINE__41859; goto __pyx_L4_error;}
41860 __pyx_t_7 = ((__pyx_v_ret != ((Py_ssize_t)__pyx_t_11)) != 0);
41861 if (__pyx_t_7) {
41862
41863 /* "rbd.pyx":3646
41864 *
41865 * if ret != <ssize_t>length:
41866 * _PyBytes_Resize(&ret_s, ret) # <<<<<<<<<<<<<<
41867 *
41868 * return <object>ret_s
41869 */
41870 __pyx_t_3 = _PyBytes_Resize_PyString_Resize((&__pyx_v_ret_s), __pyx_v_ret); if (unlikely(__pyx_t_3 == -1)__builtin_expect(!!(__pyx_t_3 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3646; __pyx_clineno = __LINE__41870; goto __pyx_L4_error;}
41871
41872 /* "rbd.pyx":3645
41873 * raise make_ex(ret, 'error reading %s %ld~%ld' % (self.name, offset, length))
41874 *
41875 * if ret != <ssize_t>length: # <<<<<<<<<<<<<<
41876 * _PyBytes_Resize(&ret_s, ret)
41877 *
41878 */
41879 }
41880
41881 /* "rbd.pyx":3648
41882 * _PyBytes_Resize(&ret_s, ret)
41883 *
41884 * return <object>ret_s # <<<<<<<<<<<<<<
41885 * finally:
41886 * # We DECREF unconditionally: the cast to object above will have
41887 */
41888 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
41889 __Pyx_INCREF(((PyObject *)__pyx_v_ret_s))( ((PyObject*)(((PyObject *)__pyx_v_ret_s)))->ob_refcnt++);
41890 __pyx_r = ((PyObject *)__pyx_v_ret_s);
41891 goto __pyx_L3_return;
41892 }
41893
41894 /* "rbd.pyx":3654
41895 * # including if _PyString_Resize fails (that will free the string
41896 * # itself and set ret_s to NULL, hence XDECREF).
41897 * ref.Py_XDECREF(ret_s) # <<<<<<<<<<<<<<
41898 *
41899 * def diff_iterate(self, offset, length, from_snapshot, iterate_cb,
41900 */
41901 /*finally:*/ {
41902 /*exception exit:*/{
41903 __pyx_L4_error:;
41904 __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
41905 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
41906 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
41907 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
41908 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
41909 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_14, &
__pyx_t_15, &__pyx_t_16) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
41910 __Pyx_XGOTREF(__pyx_t_14);
41911 __Pyx_XGOTREF(__pyx_t_15);
41912 __Pyx_XGOTREF(__pyx_t_16);
41913 __Pyx_XGOTREF(__pyx_t_17);
41914 __Pyx_XGOTREF(__pyx_t_18);
41915 __Pyx_XGOTREF(__pyx_t_19);
41916 __pyx_t_3 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
41917 {
41918 Py_XDECREF(__pyx_v_ret_s)do { if ((__pyx_v_ret_s) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_ret_s))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_ret_s)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_ret_s)))); } while (0); }
while (0)
;
41919 }
41920 if (PY_MAJOR_VERSION2 >= 3) {
41921 __Pyx_XGIVEREF(__pyx_t_17);
41922 __Pyx_XGIVEREF(__pyx_t_18);
41923 __Pyx_XGIVEREF(__pyx_t_19);
41924 __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
41925 }
41926 __Pyx_XGIVEREF(__pyx_t_14);
41927 __Pyx_XGIVEREF(__pyx_t_15);
41928 __Pyx_XGIVEREF(__pyx_t_16);
41929 __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
41930 __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
41931 __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
41932 goto __pyx_L1_error;
41933 }
41934 __pyx_L3_return: {
41935 __pyx_t_19 = __pyx_r;
41936 __pyx_r = 0;
41937 Py_XDECREF(__pyx_v_ret_s)do { if ((__pyx_v_ret_s) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_ret_s))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_ret_s)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_ret_s)))); } while (0); }
while (0)
;
41938 __pyx_r = __pyx_t_19;
41939 __pyx_t_19 = 0;
41940 goto __pyx_L0;
41941 }
41942 }
41943
41944 /* "rbd.pyx":3611
41945 * raise make_ex(ret, 'error setting image %s to snapshot %d' % (self.name, snap_id))
41946 *
41947 * def read(self, offset, length, fadvise_flags=0): # <<<<<<<<<<<<<<
41948 * """
41949 * Read data from the image. Raises :class:`InvalidArgument` if
41950 */
41951
41952 /* function exit code */
41953 __pyx_L1_error:;
41954 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
41955 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
41956 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
41957 __Pyx_AddTraceback("rbd.Image.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
41958 __pyx_r = NULL((void*)0);
41959 __pyx_L0:;
41960 __Pyx_XGIVEREF(__pyx_r);
41961 __Pyx_RefNannyFinishContext();
41962 return __pyx_r;
41963}
41964
41965/* "rbd.pyx":3656
41966 * ref.Py_XDECREF(ret_s)
41967 *
41968 * def diff_iterate(self, offset, length, from_snapshot, iterate_cb, # <<<<<<<<<<<<<<
41969 * include_parent = True, whole_object = False):
41970 * """
41971 */
41972
41973/* Python wrapper */
41974static PyObject *__pyx_pw_3rbd_5Image_87diff_iterate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
41975static char __pyx_doc_3rbd_5Image_86diff_iterate[] = "Image.diff_iterate(self, offset, length, from_snapshot, iterate_cb, include_parent=True, whole_object=False)\n\n Iterate over the changed extents of an image.\n\n This will call iterate_cb with three arguments:\n\n (offset, length, exists)\n\n where the changed extent starts at offset bytes, continues for\n length bytes, and is full of data (if exists is True) or zeroes\n (if exists is False).\n\n If from_snapshot is None, it is interpreted as the beginning\n of time and this generates all allocated extents.\n\n The end version is whatever is currently selected (via set_snap)\n for the image.\n\n iterate_cb may raise an exception, which will abort the diff and will be\n propagated to the caller.\n\n Raises :class:`InvalidArgument` if from_snapshot is after\n the currently set snapshot.\n\n Raises :class:`ImageNotFound` if from_snapshot is not the name\n of a snapshot of the image.\n\n :param offset: start offset in bytes\n :type offset: int\n :param length: size of region to report on, in bytes\n :type length: int\n :param from_snapshot: starting snapshot name, or None\n :type from_snapshot: str or None\n :param iterate_cb: function to call for each extent\n :type iterate_cb: function acception arguments for offset,\n length, and exists\n :param include_parent: True if full history diff should include parent\n :type include_parent: bool\n :param whole_object: True if diff extents should cover whole object\n :type whole_object: bool\n :raises: :class:`InvalidArgument`, :class:`IOError`,\n :class:`ImageNotFound`\n ";
41976static PyObject *__pyx_pw_3rbd_5Image_87diff_iterate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41977 PyObject *__pyx_v_offset = 0;
41978 PyObject *__pyx_v_length = 0;
41979 PyObject *__pyx_v_from_snapshot = 0;
41980 PyObject *__pyx_v_iterate_cb = 0;
41981 PyObject *__pyx_v_include_parent = 0;
41982 PyObject *__pyx_v_whole_object = 0;
41983 int __pyx_lineno = 0;
41984 const char *__pyx_filename = NULL((void*)0);
41985 int __pyx_clineno = 0;
41986 PyObject *__pyx_r = 0;
41987 __Pyx_RefNannyDeclarations
41988 __Pyx_RefNannySetupContext("diff_iterate (wrapper)", 0);
41989 {
41990 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_length,&__pyx_n_s_from_snapshot,&__pyx_n_s_iterate_cb,&__pyx_n_s_include_parent,&__pyx_n_s_whole_object,0};
41991 PyObject* values[6] = {0,0,0,0,0,0};
41992
41993 /* "rbd.pyx":3657
41994 *
41995 * def diff_iterate(self, offset, length, from_snapshot, iterate_cb,
41996 * include_parent = True, whole_object = False): # <<<<<<<<<<<<<<
41997 * """
41998 * Iterate over the changed extents of an image.
41999 */
42000 values[4] = ((PyObject *)Py_True((PyObject *) &_Py_TrueStruct));
42001 values[5] = ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct));
42002 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
42003 Py_ssize_t kw_args;
42004 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
42005 switch (pos_args) {
42006 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
42007 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
42008 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
42009 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
42010 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
42011 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
42012 case 0: break;
42013 default: goto __pyx_L5_argtuple_error;
42014 }
42015 kw_args = PyDict_Size(__pyx_kwds);
42016 switch (pos_args) {
42017 case 0:
42018 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
42019 else goto __pyx_L5_argtuple_error;
42020 case 1:
42021 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length
)) != 0), 1)
) kw_args--;
42022 else {
42023 __Pyx_RaiseArgtupleInvalid("diff_iterate", 0, 4, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__42023; goto __pyx_L3_error;}
42024 }
42025 case 2:
42026 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_from_snapshot)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_from_snapshot
)) != 0), 1)
) kw_args--;
42027 else {
42028 __Pyx_RaiseArgtupleInvalid("diff_iterate", 0, 4, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__42028; goto __pyx_L3_error;}
42029 }
42030 case 3:
42031 if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterate_cb)) != 0)__builtin_expect(!!((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterate_cb
)) != 0), 1)
) kw_args--;
42032 else {
42033 __Pyx_RaiseArgtupleInvalid("diff_iterate", 0, 4, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__42033; goto __pyx_L3_error;}
42034 }
42035 case 4:
42036 if (kw_args > 0) {
42037 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_include_parent);
42038 if (value) { values[4] = value; kw_args--; }
42039 }
42040 case 5:
42041 if (kw_args > 0) {
42042 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_whole_object);
42043 if (value) { values[5] = value; kw_args--; }
42044 }
42045 }
42046 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
42047 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "diff_iterate") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "diff_iterate") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__42047; goto __pyx_L3_error;}
42048 }
42049 } else {
42050 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
42051 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5)(((PyTupleObject *)(__pyx_args))->ob_item[5]);
42052 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4)(((PyTupleObject *)(__pyx_args))->ob_item[4]);
42053 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
42054 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
42055 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
42056 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
42057 break;
42058 default: goto __pyx_L5_argtuple_error;
42059 }
42060 }
42061 __pyx_v_offset = values[0];
42062 __pyx_v_length = values[1];
42063 __pyx_v_from_snapshot = values[2];
42064 __pyx_v_iterate_cb = values[3];
42065 __pyx_v_include_parent = values[4];
42066 __pyx_v_whole_object = values[5];
42067 }
42068 goto __pyx_L4_argument_unpacking_done;
42069 __pyx_L5_argtuple_error:;
42070 __Pyx_RaiseArgtupleInvalid("diff_iterate", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__42070; goto __pyx_L3_error;}
42071 __pyx_L3_error:;
42072 __Pyx_AddTraceback("rbd.Image.diff_iterate", __pyx_clineno, __pyx_lineno, __pyx_filename);
42073 __Pyx_RefNannyFinishContext();
42074 return NULL((void*)0);
42075 __pyx_L4_argument_unpacking_done:;
42076 __pyx_r = __pyx_pf_3rbd_5Image_86diff_iterate(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_offset, __pyx_v_length, __pyx_v_from_snapshot, __pyx_v_iterate_cb, __pyx_v_include_parent, __pyx_v_whole_object);
42077
42078 /* "rbd.pyx":3656
42079 * ref.Py_XDECREF(ret_s)
42080 *
42081 * def diff_iterate(self, offset, length, from_snapshot, iterate_cb, # <<<<<<<<<<<<<<
42082 * include_parent = True, whole_object = False):
42083 * """
42084 */
42085
42086 /* function exit code */
42087 __Pyx_RefNannyFinishContext();
42088 return __pyx_r;
42089}
42090
42091static PyObject *__pyx_pf_3rbd_5Image_86diff_iterate(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_from_snapshot, PyObject *__pyx_v_iterate_cb, PyObject *__pyx_v_include_parent, PyObject *__pyx_v_whole_object) {
42092 char *__pyx_v__from_snapshot;
42093 uint64_t __pyx_v__offset;
42094 uint64_t __pyx_v__length;
42095 uint8_t __pyx_v__include_parent;
42096 uint8_t __pyx_v__whole_object;
42097 int __pyx_v_ret;
42098 PyObject *__pyx_v_msg = NULL((void*)0);
42099 PyObject *__pyx_r = NULL((void*)0);
42100 __Pyx_RefNannyDeclarations
42101 PyObject *__pyx_t_1 = NULL((void*)0);
42102 PyObject *__pyx_t_2 = NULL((void*)0);
42103 PyObject *__pyx_t_3 = NULL((void*)0);
42104 PyObject *__pyx_t_4 = NULL((void*)0);
42105 char *__pyx_t_5;
42106 uint64_t __pyx_t_6;
42107 uint8_t __pyx_t_7;
42108 int __pyx_t_8;
42109 int __pyx_t_9;
42110 int __pyx_lineno = 0;
42111 const char *__pyx_filename = NULL((void*)0);
42112 int __pyx_clineno = 0;
42113 __Pyx_RefNannySetupContext("diff_iterate", 0);
42114 __Pyx_INCREF(__pyx_v_from_snapshot)( ((PyObject*)(__pyx_v_from_snapshot))->ob_refcnt++);
42115
42116 /* "rbd.pyx":3700
42117 * :class:`ImageNotFound`
42118 * """
42119 * from_snapshot = cstr(from_snapshot, 'from_snapshot', opt=True) # <<<<<<<<<<<<<<
42120 * cdef:
42121 * char *_from_snapshot = opt_str(from_snapshot)
42122 */
42123 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3700; __pyx_clineno = __LINE__42123; goto __pyx_L1_error;}
42124 __Pyx_GOTREF(__pyx_t_1);
42125 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3700; __pyx_clineno = __LINE__42125; goto __pyx_L1_error;}
42126 __Pyx_GOTREF(__pyx_t_2);
42127 __Pyx_INCREF(__pyx_v_from_snapshot)( ((PyObject*)(__pyx_v_from_snapshot))->ob_refcnt++);
42128 __Pyx_GIVEREF(__pyx_v_from_snapshot);
42129 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_from_snapshot)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_from_snapshot
)
;
42130 __Pyx_INCREF(__pyx_n_s_from_snapshot)( ((PyObject*)(__pyx_n_s_from_snapshot))->ob_refcnt++);
42131 __Pyx_GIVEREF(__pyx_n_s_from_snapshot);
42132 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_from_snapshot)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_n_s_from_snapshot
)
;
42133 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3700; __pyx_clineno = __LINE__42133; goto __pyx_L1_error;}
42134 __Pyx_GOTREF(__pyx_t_3);
42135 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_opt, Py_True((PyObject *) &_Py_TrueStruct)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3700; __pyx_clineno = __LINE__42135; goto __pyx_L1_error;}
42136 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3700; __pyx_clineno = __LINE__42136; goto __pyx_L1_error;}
42137 __Pyx_GOTREF(__pyx_t_4);
42138 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
42139 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
42140 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42141 __Pyx_DECREF_SET(__pyx_v_from_snapshot, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_from_snapshot; __pyx_v_from_snapshot
= __pyx_t_4; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
42142 __pyx_t_4 = 0;
42143
42144 /* "rbd.pyx":3702
42145 * from_snapshot = cstr(from_snapshot, 'from_snapshot', opt=True)
42146 * cdef:
42147 * char *_from_snapshot = opt_str(from_snapshot) # <<<<<<<<<<<<<<
42148 * uint64_t _offset = offset, _length = length
42149 * uint8_t _include_parent = include_parent
42150 */
42151 __pyx_t_5 = __pyx_f_3rbd_opt_str(__pyx_v_from_snapshot); if (unlikely(__pyx_t_5 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_5 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3702; __pyx_clineno = __LINE__42151; goto __pyx_L1_error;}
42152 __pyx_v__from_snapshot = __pyx_t_5;
42153
42154 /* "rbd.pyx":3703
42155 * cdef:
42156 * char *_from_snapshot = opt_str(from_snapshot)
42157 * uint64_t _offset = offset, _length = length # <<<<<<<<<<<<<<
42158 * uint8_t _include_parent = include_parent
42159 * uint8_t _whole_object = whole_object
42160 */
42161 __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_6 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3703; __pyx_clineno = __LINE__42161; goto __pyx_L1_error;}
42162 __pyx_v__offset = __pyx_t_6;
42163 __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_length); if (unlikely((__pyx_t_6 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3703; __pyx_clineno = __LINE__42163; goto __pyx_L1_error;}
42164 __pyx_v__length = __pyx_t_6;
42165
42166 /* "rbd.pyx":3704
42167 * char *_from_snapshot = opt_str(from_snapshot)
42168 * uint64_t _offset = offset, _length = length
42169 * uint8_t _include_parent = include_parent # <<<<<<<<<<<<<<
42170 * uint8_t _whole_object = whole_object
42171 * with nogil:
42172 */
42173 __pyx_t_7 = __Pyx_PyInt_As_uint8_t(__pyx_v_include_parent); if (unlikely((__pyx_t_7 == (uint8_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (uint8_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3704; __pyx_clineno = __LINE__42173; goto __pyx_L1_error;}
42174 __pyx_v__include_parent = __pyx_t_7;
42175
42176 /* "rbd.pyx":3705
42177 * uint64_t _offset = offset, _length = length
42178 * uint8_t _include_parent = include_parent
42179 * uint8_t _whole_object = whole_object # <<<<<<<<<<<<<<
42180 * with nogil:
42181 * ret = rbd_diff_iterate2(self.image, _from_snapshot, _offset,
42182 */
42183 __pyx_t_7 = __Pyx_PyInt_As_uint8_t(__pyx_v_whole_object); if (unlikely((__pyx_t_7 == (uint8_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (uint8_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3705; __pyx_clineno = __LINE__42183; goto __pyx_L1_error;}
42184 __pyx_v__whole_object = __pyx_t_7;
42185
42186 /* "rbd.pyx":3706
42187 * uint8_t _include_parent = include_parent
42188 * uint8_t _whole_object = whole_object
42189 * with nogil: # <<<<<<<<<<<<<<
42190 * ret = rbd_diff_iterate2(self.image, _from_snapshot, _offset,
42191 * _length, _include_parent, _whole_object,
42192 */
42193 {
42194 #ifdef WITH_THREAD1
42195 PyThreadState *_save;
42196 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
42197 #endif
42198 /*try:*/ {
42199
42200 /* "rbd.pyx":3707
42201 * uint8_t _whole_object = whole_object
42202 * with nogil:
42203 * ret = rbd_diff_iterate2(self.image, _from_snapshot, _offset, # <<<<<<<<<<<<<<
42204 * _length, _include_parent, _whole_object,
42205 * &diff_iterate_cb, <void *>iterate_cb)
42206 */
42207 __pyx_t_8 = rbd_diff_iterate2(__pyx_v_self->image, __pyx_v__from_snapshot, __pyx_v__offset, __pyx_v__length, __pyx_v__include_parent, __pyx_v__whole_object, (&__pyx_f_3rbd_diff_iterate_cb), ((void *)__pyx_v_iterate_cb)); if (unlikely(__pyx_t_8 == -9000 && __Pyx_ErrOccurredWithGIL())__builtin_expect(!!(__pyx_t_8 == -9000 && __Pyx_ErrOccurredWithGIL
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3707; __pyx_clineno = __LINE__42207; goto __pyx_L4_error;}
42208 __pyx_v_ret = __pyx_t_8;
42209 }
42210
42211 /* "rbd.pyx":3706
42212 * uint8_t _include_parent = include_parent
42213 * uint8_t _whole_object = whole_object
42214 * with nogil: # <<<<<<<<<<<<<<
42215 * ret = rbd_diff_iterate2(self.image, _from_snapshot, _offset,
42216 * _length, _include_parent, _whole_object,
42217 */
42218 /*finally:*/ {
42219 /*normal exit:*/{
42220 #ifdef WITH_THREAD1
42221 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
42222 #endif
42223 goto __pyx_L5;
42224 }
42225 __pyx_L4_error: {
42226 #ifdef WITH_THREAD1
42227 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
42228 #endif
42229 goto __pyx_L1_error;
42230 }
42231 __pyx_L5:;
42232 }
42233 }
42234
42235 /* "rbd.pyx":3710
42236 * _length, _include_parent, _whole_object,
42237 * &diff_iterate_cb, <void *>iterate_cb)
42238 * if ret < 0: # <<<<<<<<<<<<<<
42239 * msg = 'error generating diff from snapshot %s' % from_snapshot
42240 * raise make_ex(ret, msg)
42241 */
42242 __pyx_t_9 = ((__pyx_v_ret < 0) != 0);
42243 if (__pyx_t_9) {
42244
42245 /* "rbd.pyx":3711
42246 * &diff_iterate_cb, <void *>iterate_cb)
42247 * if ret < 0:
42248 * msg = 'error generating diff from snapshot %s' % from_snapshot # <<<<<<<<<<<<<<
42249 * raise make_ex(ret, msg)
42250 *
42251 */
42252 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_generating_diff_from_snaps, __pyx_v_from_snapshot)PyString_Format(__pyx_kp_s_error_generating_diff_from_snaps, __pyx_v_from_snapshot
)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3711; __pyx_clineno = __LINE__42252; goto __pyx_L1_error;}
42253 __Pyx_GOTREF(__pyx_t_4);
42254 __pyx_v_msg = ((PyObject*)__pyx_t_4);
42255 __pyx_t_4 = 0;
42256
42257 /* "rbd.pyx":3712
42258 * if ret < 0:
42259 * msg = 'error generating diff from snapshot %s' % from_snapshot
42260 * raise make_ex(ret, msg) # <<<<<<<<<<<<<<
42261 *
42262 * def write(self, data, offset, fadvise_flags=0):
42263 */
42264 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3712; __pyx_clineno = __LINE__42264; goto __pyx_L1_error;}
42265 __Pyx_GOTREF(__pyx_t_4);
42266 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_v_msg, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3712; __pyx_clineno = __LINE__42266; goto __pyx_L1_error;}
42267 __Pyx_GOTREF(__pyx_t_3);
42268 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
42269 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
42270 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42271 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3712; __pyx_clineno = __LINE__42271; goto __pyx_L1_error;}
42272
42273 /* "rbd.pyx":3710
42274 * _length, _include_parent, _whole_object,
42275 * &diff_iterate_cb, <void *>iterate_cb)
42276 * if ret < 0: # <<<<<<<<<<<<<<
42277 * msg = 'error generating diff from snapshot %s' % from_snapshot
42278 * raise make_ex(ret, msg)
42279 */
42280 }
42281
42282 /* "rbd.pyx":3656
42283 * ref.Py_XDECREF(ret_s)
42284 *
42285 * def diff_iterate(self, offset, length, from_snapshot, iterate_cb, # <<<<<<<<<<<<<<
42286 * include_parent = True, whole_object = False):
42287 * """
42288 */
42289
42290 /* function exit code */
42291 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
42292 goto __pyx_L0;
42293 __pyx_L1_error:;
42294 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
42295 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
42296 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
42297 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
42298 __Pyx_AddTraceback("rbd.Image.diff_iterate", __pyx_clineno, __pyx_lineno, __pyx_filename);
42299 __pyx_r = NULL((void*)0);
42300 __pyx_L0:;
42301 __Pyx_XDECREF(__pyx_v_msg)do { if ((__pyx_v_msg) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_msg))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_msg)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_msg)))); } while (0); } while (0)
;
42302 __Pyx_XDECREF(__pyx_v_from_snapshot)do { if ((__pyx_v_from_snapshot) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_from_snapshot))->ob_refcnt != 0)
; else ( (*(((PyObject*)((PyObject *)(__pyx_v_from_snapshot)
))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_from_snapshot
)))); } while (0); } while (0)
;
42303 __Pyx_XGIVEREF(__pyx_r);
42304 __Pyx_RefNannyFinishContext();
42305 return __pyx_r;
42306}
42307
42308/* "rbd.pyx":3714
42309 * raise make_ex(ret, msg)
42310 *
42311 * def write(self, data, offset, fadvise_flags=0): # <<<<<<<<<<<<<<
42312 * """
42313 * Write data to the image. Raises :class:`InvalidArgument` if
42314 */
42315
42316/* Python wrapper */
42317static PyObject *__pyx_pw_3rbd_5Image_89write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42318static char __pyx_doc_3rbd_5Image_88write[] = "Image.write(self, data, offset, fadvise_flags=0)\n\n Write data to the image. Raises :class:`InvalidArgument` if\n part of the write would fall outside the image.\n\n :param data: the data to be written\n :type data: bytes\n :param offset: where to start writing data\n :type offset: int\n :param fadvise_flags: fadvise flags for this write\n :type fadvise_flags: int\n :returns: int - the number of bytes written\n :raises: :class:`IncompleteWriteError`, :class:`LogicError`,\n :class:`InvalidArgument`, :class:`IOError`\n ";
42319static PyObject *__pyx_pw_3rbd_5Image_89write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42320 PyObject *__pyx_v_data = 0;
42321 PyObject *__pyx_v_offset = 0;
42322 PyObject *__pyx_v_fadvise_flags = 0;
42323 int __pyx_lineno = 0;
42324 const char *__pyx_filename = NULL((void*)0);
42325 int __pyx_clineno = 0;
42326 PyObject *__pyx_r = 0;
42327 __Pyx_RefNannyDeclarations
42328 __Pyx_RefNannySetupContext("write (wrapper)", 0);
42329 {
42330 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_offset,&__pyx_n_s_fadvise_flags,0};
42331 PyObject* values[3] = {0,0,0};
42332 values[2] = ((PyObject *)__pyx_int_0);
42333 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
42334 Py_ssize_t kw_args;
42335 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
42336 switch (pos_args) {
42337 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
42338 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
42339 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
42340 case 0: break;
42341 default: goto __pyx_L5_argtuple_error;
42342 }
42343 kw_args = PyDict_Size(__pyx_kwds);
42344 switch (pos_args) {
42345 case 0:
42346 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data
)) != 0), 1)
) kw_args--;
42347 else goto __pyx_L5_argtuple_error;
42348 case 1:
42349 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
42350 else {
42351 __Pyx_RaiseArgtupleInvalid("write", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3714; __pyx_clineno = __LINE__42351; goto __pyx_L3_error;}
42352 }
42353 case 2:
42354 if (kw_args > 0) {
42355 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fadvise_flags);
42356 if (value) { values[2] = value; kw_args--; }
42357 }
42358 }
42359 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
42360 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "write") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3714; __pyx_clineno = __LINE__42360; goto __pyx_L3_error;}
42361 }
42362 } else {
42363 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
42364 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
42365 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
42366 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
42367 break;
42368 default: goto __pyx_L5_argtuple_error;
42369 }
42370 }
42371 __pyx_v_data = values[0];
42372 __pyx_v_offset = values[1];
42373 __pyx_v_fadvise_flags = values[2];
42374 }
42375 goto __pyx_L4_argument_unpacking_done;
42376 __pyx_L5_argtuple_error:;
42377 __Pyx_RaiseArgtupleInvalid("write", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3714; __pyx_clineno = __LINE__42377; goto __pyx_L3_error;}
42378 __pyx_L3_error:;
42379 __Pyx_AddTraceback("rbd.Image.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
42380 __Pyx_RefNannyFinishContext();
42381 return NULL((void*)0);
42382 __pyx_L4_argument_unpacking_done:;
42383 __pyx_r = __pyx_pf_3rbd_5Image_88write(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_data, __pyx_v_offset, __pyx_v_fadvise_flags);
42384
42385 /* function exit code */
42386 __Pyx_RefNannyFinishContext();
42387 return __pyx_r;
42388}
42389
42390static PyObject *__pyx_pf_3rbd_5Image_88write(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_offset, PyObject *__pyx_v_fadvise_flags) {
42391 uint64_t __pyx_v__offset;
42392 uint64_t __pyx_v_length;
42393 char *__pyx_v__data;
42394 int __pyx_v__fadvise_flags;
42395 Py_ssize_t __pyx_v_ret;
42396 PyObject *__pyx_r = NULL((void*)0);
42397 __Pyx_RefNannyDeclarations
42398 int __pyx_t_1;
42399 int __pyx_t_2;
42400 PyObject *__pyx_t_3 = NULL((void*)0);
42401 uint64_t __pyx_t_4;
42402 Py_ssize_t __pyx_t_5;
42403 char *__pyx_t_6;
42404 int __pyx_t_7;
42405 PyObject *__pyx_t_8 = NULL((void*)0);
42406 PyObject *__pyx_t_9 = NULL((void*)0);
42407 PyObject *__pyx_t_10 = NULL((void*)0);
42408 PyObject *__pyx_t_11 = NULL((void*)0);
42409 int __pyx_lineno = 0;
42410 const char *__pyx_filename = NULL((void*)0);
42411 int __pyx_clineno = 0;
42412 __Pyx_RefNannySetupContext("write", 0);
42413
42414 /* "rbd.pyx":3729
42415 * :class:`InvalidArgument`, :class:`IOError`
42416 * """
42417 * if not isinstance(data, bytes): # <<<<<<<<<<<<<<
42418 * raise TypeError('data must be a byte string')
42419 * cdef:
42420 */
42421 __pyx_t_1 = PyBytes_Check(__pyx_v_data)((((((PyObject*)(__pyx_v_data))->ob_type))->tp_flags &
((1L<<27))) != 0)
;
42422 __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
42423 if (__pyx_t_2) {
42424
42425 /* "rbd.pyx":3730
42426 * """
42427 * if not isinstance(data, bytes):
42428 * raise TypeError('data must be a byte string') # <<<<<<<<<<<<<<
42429 * cdef:
42430 * uint64_t _offset = offset, length = len(data)
42431 */
42432 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__42432; goto __pyx_L1_error;}
42433 __Pyx_GOTREF(__pyx_t_3);
42434 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
42435 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42436 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__42436; goto __pyx_L1_error;}
42437
42438 /* "rbd.pyx":3729
42439 * :class:`InvalidArgument`, :class:`IOError`
42440 * """
42441 * if not isinstance(data, bytes): # <<<<<<<<<<<<<<
42442 * raise TypeError('data must be a byte string')
42443 * cdef:
42444 */
42445 }
42446
42447 /* "rbd.pyx":3732
42448 * raise TypeError('data must be a byte string')
42449 * cdef:
42450 * uint64_t _offset = offset, length = len(data) # <<<<<<<<<<<<<<
42451 * char *_data = data
42452 * int _fadvise_flags = fadvise_flags
42453 */
42454 __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_4 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3732; __pyx_clineno = __LINE__42454; goto __pyx_L1_error;}
42455 __pyx_v__offset = __pyx_t_4;
42456 __pyx_t_5 = PyObject_LengthPyObject_Size(__pyx_v_data); if (unlikely(__pyx_t_5 == -1)__builtin_expect(!!(__pyx_t_5 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3732; __pyx_clineno = __LINE__42456; goto __pyx_L1_error;}
42457 __pyx_v_length = __pyx_t_5;
42458
42459 /* "rbd.pyx":3733
42460 * cdef:
42461 * uint64_t _offset = offset, length = len(data)
42462 * char *_data = data # <<<<<<<<<<<<<<
42463 * int _fadvise_flags = fadvise_flags
42464 * with nogil:
42465 */
42466 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_data); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3733; __pyx_clineno = __LINE__42466; goto __pyx_L1_error;}
42467 __pyx_v__data = __pyx_t_6;
42468
42469 /* "rbd.pyx":3734
42470 * uint64_t _offset = offset, length = len(data)
42471 * char *_data = data
42472 * int _fadvise_flags = fadvise_flags # <<<<<<<<<<<<<<
42473 * with nogil:
42474 * ret = rbd_write2(self.image, _offset, length, _data, _fadvise_flags)
42475 */
42476 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_fadvise_flags); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_7 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __pyx_clineno = __LINE__42476; goto __pyx_L1_error;}
42477 __pyx_v__fadvise_flags = __pyx_t_7;
42478
42479 /* "rbd.pyx":3735
42480 * char *_data = data
42481 * int _fadvise_flags = fadvise_flags
42482 * with nogil: # <<<<<<<<<<<<<<
42483 * ret = rbd_write2(self.image, _offset, length, _data, _fadvise_flags)
42484 *
42485 */
42486 {
42487 #ifdef WITH_THREAD1
42488 PyThreadState *_save;
42489 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
42490 #endif
42491 /*try:*/ {
42492
42493 /* "rbd.pyx":3736
42494 * int _fadvise_flags = fadvise_flags
42495 * with nogil:
42496 * ret = rbd_write2(self.image, _offset, length, _data, _fadvise_flags) # <<<<<<<<<<<<<<
42497 *
42498 * if ret == <ssize_t>length:
42499 */
42500 __pyx_v_ret = rbd_write2(__pyx_v_self->image, __pyx_v__offset, __pyx_v_length, __pyx_v__data, __pyx_v__fadvise_flags);
42501 }
42502
42503 /* "rbd.pyx":3735
42504 * char *_data = data
42505 * int _fadvise_flags = fadvise_flags
42506 * with nogil: # <<<<<<<<<<<<<<
42507 * ret = rbd_write2(self.image, _offset, length, _data, _fadvise_flags)
42508 *
42509 */
42510 /*finally:*/ {
42511 /*normal exit:*/{
42512 #ifdef WITH_THREAD1
42513 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
42514 #endif
42515 goto __pyx_L6;
42516 }
42517 __pyx_L6:;
42518 }
42519 }
42520
42521 /* "rbd.pyx":3738
42522 * ret = rbd_write2(self.image, _offset, length, _data, _fadvise_flags)
42523 *
42524 * if ret == <ssize_t>length: # <<<<<<<<<<<<<<
42525 * return ret
42526 * elif ret < 0:
42527 */
42528 __pyx_t_2 = ((__pyx_v_ret == ((Py_ssize_t)__pyx_v_length)) != 0);
42529 if (__pyx_t_2) {
42530
42531 /* "rbd.pyx":3739
42532 *
42533 * if ret == <ssize_t>length:
42534 * return ret # <<<<<<<<<<<<<<
42535 * elif ret < 0:
42536 * raise make_ex(ret, "error writing to %s" % self.name)
42537 */
42538 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
42539 __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3739; __pyx_clineno = __LINE__42539; goto __pyx_L1_error;}
42540 __Pyx_GOTREF(__pyx_t_3);
42541 __pyx_r = __pyx_t_3;
42542 __pyx_t_3 = 0;
42543 goto __pyx_L0;
42544
42545 /* "rbd.pyx":3738
42546 * ret = rbd_write2(self.image, _offset, length, _data, _fadvise_flags)
42547 *
42548 * if ret == <ssize_t>length: # <<<<<<<<<<<<<<
42549 * return ret
42550 * elif ret < 0:
42551 */
42552 }
42553
42554 /* "rbd.pyx":3740
42555 * if ret == <ssize_t>length:
42556 * return ret
42557 * elif ret < 0: # <<<<<<<<<<<<<<
42558 * raise make_ex(ret, "error writing to %s" % self.name)
42559 * elif ret < <ssize_t>length:
42560 */
42561 __pyx_t_2 = ((__pyx_v_ret < 0) != 0);
42562 if (__pyx_t_2) {
42563
42564 /* "rbd.pyx":3741
42565 * return ret
42566 * elif ret < 0:
42567 * raise make_ex(ret, "error writing to %s" % self.name) # <<<<<<<<<<<<<<
42568 * elif ret < <ssize_t>length:
42569 * raise IncompleteWriteError("Wrote only %ld out of %ld bytes" % (ret, length))
42570 */
42571 __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3741; __pyx_clineno = __LINE__42571; goto __pyx_L1_error;}
42572 __Pyx_GOTREF(__pyx_t_3);
42573 __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_error_writing_to_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_writing_to_s, __pyx_v_self->
name)
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3741; __pyx_clineno = __LINE__42573; goto __pyx_L1_error;}
42574 __Pyx_GOTREF(__pyx_t_8);
42575 __pyx_t_9 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3741; __pyx_clineno = __LINE__42575; goto __pyx_L1_error;}
42576 __Pyx_GOTREF(__pyx_t_9);
42577 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42578 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
42579 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
42580 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
42581 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3741; __pyx_clineno = __LINE__42581; goto __pyx_L1_error;}
42582
42583 /* "rbd.pyx":3740
42584 * if ret == <ssize_t>length:
42585 * return ret
42586 * elif ret < 0: # <<<<<<<<<<<<<<
42587 * raise make_ex(ret, "error writing to %s" % self.name)
42588 * elif ret < <ssize_t>length:
42589 */
42590 }
42591
42592 /* "rbd.pyx":3742
42593 * elif ret < 0:
42594 * raise make_ex(ret, "error writing to %s" % self.name)
42595 * elif ret < <ssize_t>length: # <<<<<<<<<<<<<<
42596 * raise IncompleteWriteError("Wrote only %ld out of %ld bytes" % (ret, length))
42597 * else:
42598 */
42599 __pyx_t_2 = ((__pyx_v_ret < ((Py_ssize_t)__pyx_v_length)) != 0);
42600 if (__pyx_t_2) {
42601
42602 /* "rbd.pyx":3743
42603 * raise make_ex(ret, "error writing to %s" % self.name)
42604 * elif ret < <ssize_t>length:
42605 * raise IncompleteWriteError("Wrote only %ld out of %ld bytes" % (ret, length)) # <<<<<<<<<<<<<<
42606 * else:
42607 * raise LogicError("logic error: rbd_write(%s) \
42608 */
42609 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_IncompleteWriteError); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42609; goto __pyx_L1_error;}
42610 __Pyx_GOTREF(__pyx_t_8);
42611 __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42611; goto __pyx_L1_error;}
42612 __Pyx_GOTREF(__pyx_t_3);
42613 __pyx_t_10 = __Pyx_PyInt_From_uint64_t(__pyx_v_length); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42613; goto __pyx_L1_error;}
42614 __Pyx_GOTREF(__pyx_t_10);
42615 __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42615; goto __pyx_L1_error;}
42616 __Pyx_GOTREF(__pyx_t_11);
42617 __Pyx_GIVEREF(__pyx_t_3);
42618 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_3);
42619 __Pyx_GIVEREF(__pyx_t_10);
42620 PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[1] = __pyx_t_10);
42621 __pyx_t_3 = 0;
42622 __pyx_t_10 = 0;
42623 __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_Wrote_only_ld_out_of_ld_bytes, __pyx_t_11)PyString_Format(__pyx_kp_s_Wrote_only_ld_out_of_ld_bytes, __pyx_t_11
)
; if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42623; goto __pyx_L1_error;}
42624 __Pyx_GOTREF(__pyx_t_10);
42625 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
42626 __pyx_t_11 = NULL((void*)0);
42627 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
42628 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
42629 if (likely(__pyx_t_11)__builtin_expect(!!(__pyx_t_11), 1)) {
42630 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
42631 __Pyx_INCREF(__pyx_t_11)( ((PyObject*)(__pyx_t_11))->ob_refcnt++);
42632 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
42633 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
42634 }
42635 }
42636 if (!__pyx_t_11) {
42637 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42637; goto __pyx_L1_error;}
42638 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
42639 __Pyx_GOTREF(__pyx_t_9);
42640 } else {
42641 __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42641; goto __pyx_L1_error;}
42642 __Pyx_GOTREF(__pyx_t_3);
42643 __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_11); __pyx_t_11 = NULL((void*)0);
42644 __Pyx_GIVEREF(__pyx_t_10);
42645 PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+1] = __pyx_t_10
)
;
42646 __pyx_t_10 = 0;
42647 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42647; goto __pyx_L1_error;}
42648 __Pyx_GOTREF(__pyx_t_9);
42649 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42650 }
42651 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
42652 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
42653 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
42654 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__42654; goto __pyx_L1_error;}
42655
42656 /* "rbd.pyx":3742
42657 * elif ret < 0:
42658 * raise make_ex(ret, "error writing to %s" % self.name)
42659 * elif ret < <ssize_t>length: # <<<<<<<<<<<<<<
42660 * raise IncompleteWriteError("Wrote only %ld out of %ld bytes" % (ret, length))
42661 * else:
42662 */
42663 }
42664
42665 /* "rbd.pyx":3745
42666 * raise IncompleteWriteError("Wrote only %ld out of %ld bytes" % (ret, length))
42667 * else:
42668 * raise LogicError("logic error: rbd_write(%s) \ # <<<<<<<<<<<<<<
42669 * returned %d, but %d was the maximum number of bytes it could have \
42670 * written." % (self.name, ret, length))
42671 */
42672 /*else*/ {
42673 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_LogicError); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3745; __pyx_clineno = __LINE__42673; goto __pyx_L1_error;}
42674 __Pyx_GOTREF(__pyx_t_8);
42675
42676 /* "rbd.pyx":3747
42677 * raise LogicError("logic error: rbd_write(%s) \
42678 * returned %d, but %d was the maximum number of bytes it could have \
42679 * written." % (self.name, ret, length)) # <<<<<<<<<<<<<<
42680 *
42681 * def discard(self, offset, length):
42682 */
42683 __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3747; __pyx_clineno = __LINE__42683; goto __pyx_L1_error;}
42684 __Pyx_GOTREF(__pyx_t_3);
42685 __pyx_t_10 = __Pyx_PyInt_From_uint64_t(__pyx_v_length); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3747; __pyx_clineno = __LINE__42685; goto __pyx_L1_error;}
42686 __Pyx_GOTREF(__pyx_t_10);
42687 __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3747; __pyx_clineno = __LINE__42687; goto __pyx_L1_error;}
42688 __Pyx_GOTREF(__pyx_t_11);
42689 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
42690 __Pyx_GIVEREF(__pyx_v_self->name);
42691 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_v_self
->name)
;
42692 __Pyx_GIVEREF(__pyx_t_3);
42693 PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_11))->ob_item[1] = __pyx_t_3);
42694 __Pyx_GIVEREF(__pyx_t_10);
42695 PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[2] = __pyx_t_10);
42696 __pyx_t_3 = 0;
42697 __pyx_t_10 = 0;
42698 __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_logic_error_rbd_write_s_returned, __pyx_t_11)PyString_Format(__pyx_kp_s_logic_error_rbd_write_s_returned, __pyx_t_11
)
; if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3747; __pyx_clineno = __LINE__42698; goto __pyx_L1_error;}
42699 __Pyx_GOTREF(__pyx_t_10);
42700 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
42701 __pyx_t_11 = NULL((void*)0);
42702 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
42703 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
42704 if (likely(__pyx_t_11)__builtin_expect(!!(__pyx_t_11), 1)) {
42705 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
42706 __Pyx_INCREF(__pyx_t_11)( ((PyObject*)(__pyx_t_11))->ob_refcnt++);
42707 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
42708 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
42709 }
42710 }
42711 if (!__pyx_t_11) {
42712 __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3745; __pyx_clineno = __LINE__42712; goto __pyx_L1_error;}
42713 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
42714 __Pyx_GOTREF(__pyx_t_9);
42715 } else {
42716 __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3745; __pyx_clineno = __LINE__42716; goto __pyx_L1_error;}
42717 __Pyx_GOTREF(__pyx_t_3);
42718 __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_11); __pyx_t_11 = NULL((void*)0);
42719 __Pyx_GIVEREF(__pyx_t_10);
42720 PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_10)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+1] = __pyx_t_10
)
;
42721 __pyx_t_10 = 0;
42722 __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3745; __pyx_clineno = __LINE__42722; goto __pyx_L1_error;}
42723 __Pyx_GOTREF(__pyx_t_9);
42724 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42725 }
42726 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
42727 __Pyx_Raise(__pyx_t_9, 0, 0, 0);
42728 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
42729 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3745; __pyx_clineno = __LINE__42729; goto __pyx_L1_error;}
42730 }
42731
42732 /* "rbd.pyx":3714
42733 * raise make_ex(ret, msg)
42734 *
42735 * def write(self, data, offset, fadvise_flags=0): # <<<<<<<<<<<<<<
42736 * """
42737 * Write data to the image. Raises :class:`InvalidArgument` if
42738 */
42739
42740 /* function exit code */
42741 __pyx_L1_error:;
42742 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
42743 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
42744 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
42745 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
42746 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
42747 __Pyx_AddTraceback("rbd.Image.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
42748 __pyx_r = NULL((void*)0);
42749 __pyx_L0:;
42750 __Pyx_XGIVEREF(__pyx_r);
42751 __Pyx_RefNannyFinishContext();
42752 return __pyx_r;
42753}
42754
42755/* "rbd.pyx":3749
42756 * written." % (self.name, ret, length))
42757 *
42758 * def discard(self, offset, length): # <<<<<<<<<<<<<<
42759 * """
42760 * Trim the range from the image. It will be logically filled
42761 */
42762
42763/* Python wrapper */
42764static PyObject *__pyx_pw_3rbd_5Image_91discard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42765static char __pyx_doc_3rbd_5Image_90discard[] = "Image.discard(self, offset, length)\n\n Trim the range from the image. It will be logically filled\n with zeroes.\n ";
42766static PyObject *__pyx_pw_3rbd_5Image_91discard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42767 PyObject *__pyx_v_offset = 0;
42768 PyObject *__pyx_v_length = 0;
42769 int __pyx_lineno = 0;
42770 const char *__pyx_filename = NULL((void*)0);
42771 int __pyx_clineno = 0;
42772 PyObject *__pyx_r = 0;
42773 __Pyx_RefNannyDeclarations
42774 __Pyx_RefNannySetupContext("discard (wrapper)", 0);
42775 {
42776 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_length,0};
42777 PyObject* values[2] = {0,0};
42778 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
42779 Py_ssize_t kw_args;
42780 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
42781 switch (pos_args) {
42782 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
42783 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
42784 case 0: break;
42785 default: goto __pyx_L5_argtuple_error;
42786 }
42787 kw_args = PyDict_Size(__pyx_kwds);
42788 switch (pos_args) {
42789 case 0:
42790 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
42791 else goto __pyx_L5_argtuple_error;
42792 case 1:
42793 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length
)) != 0), 1)
) kw_args--;
42794 else {
42795 __Pyx_RaiseArgtupleInvalid("discard", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3749; __pyx_clineno = __LINE__42795; goto __pyx_L3_error;}
42796 }
42797 }
42798 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
42799 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "discard") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "discard") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3749; __pyx_clineno = __LINE__42799; goto __pyx_L3_error;}
42800 }
42801 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
42802 goto __pyx_L5_argtuple_error;
42803 } else {
42804 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
42805 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
42806 }
42807 __pyx_v_offset = values[0];
42808 __pyx_v_length = values[1];
42809 }
42810 goto __pyx_L4_argument_unpacking_done;
42811 __pyx_L5_argtuple_error:;
42812 __Pyx_RaiseArgtupleInvalid("discard", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3749; __pyx_clineno = __LINE__42812; goto __pyx_L3_error;}
42813 __pyx_L3_error:;
42814 __Pyx_AddTraceback("rbd.Image.discard", __pyx_clineno, __pyx_lineno, __pyx_filename);
42815 __Pyx_RefNannyFinishContext();
42816 return NULL((void*)0);
42817 __pyx_L4_argument_unpacking_done:;
42818 __pyx_r = __pyx_pf_3rbd_5Image_90discard(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_offset, __pyx_v_length);
42819
42820 /* function exit code */
42821 __Pyx_RefNannyFinishContext();
42822 return __pyx_r;
42823}
42824
42825static PyObject *__pyx_pf_3rbd_5Image_90discard(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length) {
42826 uint64_t __pyx_v__offset;
42827 uint64_t __pyx_v__length;
42828 int __pyx_v_ret;
42829 PyObject *__pyx_v_msg = NULL((void*)0);
42830 PyObject *__pyx_r = NULL((void*)0);
42831 __Pyx_RefNannyDeclarations
42832 uint64_t __pyx_t_1;
42833 int __pyx_t_2;
42834 PyObject *__pyx_t_3 = NULL((void*)0);
42835 PyObject *__pyx_t_4 = NULL((void*)0);
42836 int __pyx_lineno = 0;
42837 const char *__pyx_filename = NULL((void*)0);
42838 int __pyx_clineno = 0;
42839 __Pyx_RefNannySetupContext("discard", 0);
42840
42841 /* "rbd.pyx":3754
42842 * with zeroes.
42843 * """
42844 * cdef uint64_t _offset = offset, _length = length # <<<<<<<<<<<<<<
42845 * with nogil:
42846 * ret = rbd_discard(self.image, _offset, _length)
42847 */
42848 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__42848; goto __pyx_L1_error;}
42849 __pyx_v__offset = __pyx_t_1;
42850 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_length); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__42850; goto __pyx_L1_error;}
42851 __pyx_v__length = __pyx_t_1;
42852
42853 /* "rbd.pyx":3755
42854 * """
42855 * cdef uint64_t _offset = offset, _length = length
42856 * with nogil: # <<<<<<<<<<<<<<
42857 * ret = rbd_discard(self.image, _offset, _length)
42858 * if ret < 0:
42859 */
42860 {
42861 #ifdef WITH_THREAD1
42862 PyThreadState *_save;
42863 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
42864 #endif
42865 /*try:*/ {
42866
42867 /* "rbd.pyx":3756
42868 * cdef uint64_t _offset = offset, _length = length
42869 * with nogil:
42870 * ret = rbd_discard(self.image, _offset, _length) # <<<<<<<<<<<<<<
42871 * if ret < 0:
42872 * msg = 'error discarding region %d~%d' % (offset, length)
42873 */
42874 __pyx_v_ret = rbd_discard(__pyx_v_self->image, __pyx_v__offset, __pyx_v__length);
42875 }
42876
42877 /* "rbd.pyx":3755
42878 * """
42879 * cdef uint64_t _offset = offset, _length = length
42880 * with nogil: # <<<<<<<<<<<<<<
42881 * ret = rbd_discard(self.image, _offset, _length)
42882 * if ret < 0:
42883 */
42884 /*finally:*/ {
42885 /*normal exit:*/{
42886 #ifdef WITH_THREAD1
42887 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
42888 #endif
42889 goto __pyx_L5;
42890 }
42891 __pyx_L5:;
42892 }
42893 }
42894
42895 /* "rbd.pyx":3757
42896 * with nogil:
42897 * ret = rbd_discard(self.image, _offset, _length)
42898 * if ret < 0: # <<<<<<<<<<<<<<
42899 * msg = 'error discarding region %d~%d' % (offset, length)
42900 * raise make_ex(ret, msg)
42901 */
42902 __pyx_t_2 = ((__pyx_v_ret < 0) != 0);
42903 if (__pyx_t_2) {
42904
42905 /* "rbd.pyx":3758
42906 * ret = rbd_discard(self.image, _offset, _length)
42907 * if ret < 0:
42908 * msg = 'error discarding region %d~%d' % (offset, length) # <<<<<<<<<<<<<<
42909 * raise make_ex(ret, msg)
42910 *
42911 */
42912 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3758; __pyx_clineno = __LINE__42912; goto __pyx_L1_error;}
42913 __Pyx_GOTREF(__pyx_t_3);
42914 __Pyx_INCREF(__pyx_v_offset)( ((PyObject*)(__pyx_v_offset))->ob_refcnt++);
42915 __Pyx_GIVEREF(__pyx_v_offset);
42916 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_offset)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_offset
)
;
42917 __Pyx_INCREF(__pyx_v_length)( ((PyObject*)(__pyx_v_length))->ob_refcnt++);
42918 __Pyx_GIVEREF(__pyx_v_length);
42919 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_length)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_length
)
;
42920 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_discarding_region_d_d, __pyx_t_3)PyString_Format(__pyx_kp_s_error_discarding_region_d_d, __pyx_t_3
)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3758; __pyx_clineno = __LINE__42920; goto __pyx_L1_error;}
42921 __Pyx_GOTREF(__pyx_t_4);
42922 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42923 __pyx_v_msg = ((PyObject*)__pyx_t_4);
42924 __pyx_t_4 = 0;
42925
42926 /* "rbd.pyx":3759
42927 * if ret < 0:
42928 * msg = 'error discarding region %d~%d' % (offset, length)
42929 * raise make_ex(ret, msg) # <<<<<<<<<<<<<<
42930 *
42931 * def flush(self):
42932 */
42933 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3759; __pyx_clineno = __LINE__42933; goto __pyx_L1_error;}
42934 __Pyx_GOTREF(__pyx_t_4);
42935 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_v_msg, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3759; __pyx_clineno = __LINE__42935; goto __pyx_L1_error;}
42936 __Pyx_GOTREF(__pyx_t_3);
42937 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
42938 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
42939 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
42940 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3759; __pyx_clineno = __LINE__42940; goto __pyx_L1_error;}
42941
42942 /* "rbd.pyx":3757
42943 * with nogil:
42944 * ret = rbd_discard(self.image, _offset, _length)
42945 * if ret < 0: # <<<<<<<<<<<<<<
42946 * msg = 'error discarding region %d~%d' % (offset, length)
42947 * raise make_ex(ret, msg)
42948 */
42949 }
42950
42951 /* "rbd.pyx":3749
42952 * written." % (self.name, ret, length))
42953 *
42954 * def discard(self, offset, length): # <<<<<<<<<<<<<<
42955 * """
42956 * Trim the range from the image. It will be logically filled
42957 */
42958
42959 /* function exit code */
42960 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
42961 goto __pyx_L0;
42962 __pyx_L1_error:;
42963 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
42964 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
42965 __Pyx_AddTraceback("rbd.Image.discard", __pyx_clineno, __pyx_lineno, __pyx_filename);
42966 __pyx_r = NULL((void*)0);
42967 __pyx_L0:;
42968 __Pyx_XDECREF(__pyx_v_msg)do { if ((__pyx_v_msg) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_msg))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_msg)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_msg)))); } while (0); } while (0)
;
42969 __Pyx_XGIVEREF(__pyx_r);
42970 __Pyx_RefNannyFinishContext();
42971 return __pyx_r;
42972}
42973
42974/* "rbd.pyx":3761
42975 * raise make_ex(ret, msg)
42976 *
42977 * def flush(self): # <<<<<<<<<<<<<<
42978 * """
42979 * Block until all writes are fully flushed if caching is enabled.
42980 */
42981
42982/* Python wrapper */
42983static PyObject *__pyx_pw_3rbd_5Image_93flush(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
42984static char __pyx_doc_3rbd_5Image_92flush[] = "Image.flush(self)\n\n Block until all writes are fully flushed if caching is enabled.\n ";
42985static PyObject *__pyx_pw_3rbd_5Image_93flush(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
42986 PyObject *__pyx_r = 0;
42987 __Pyx_RefNannyDeclarations
42988 __Pyx_RefNannySetupContext("flush (wrapper)", 0);
42989 __pyx_r = __pyx_pf_3rbd_5Image_92flush(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
42990
42991 /* function exit code */
42992 __Pyx_RefNannyFinishContext();
42993 return __pyx_r;
42994}
42995
42996static PyObject *__pyx_pf_3rbd_5Image_92flush(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
42997 int __pyx_v_ret;
42998 PyObject *__pyx_r = NULL((void*)0);
42999 __Pyx_RefNannyDeclarations
43000 int __pyx_t_1;
43001 PyObject *__pyx_t_2 = NULL((void*)0);
43002 PyObject *__pyx_t_3 = NULL((void*)0);
43003 int __pyx_lineno = 0;
43004 const char *__pyx_filename = NULL((void*)0);
43005 int __pyx_clineno = 0;
43006 __Pyx_RefNannySetupContext("flush", 0);
43007
43008 /* "rbd.pyx":3765
43009 * Block until all writes are fully flushed if caching is enabled.
43010 * """
43011 * with nogil: # <<<<<<<<<<<<<<
43012 * ret = rbd_flush(self.image)
43013 * if ret < 0:
43014 */
43015 {
43016 #ifdef WITH_THREAD1
43017 PyThreadState *_save;
43018 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43019 #endif
43020 /*try:*/ {
43021
43022 /* "rbd.pyx":3766
43023 * """
43024 * with nogil:
43025 * ret = rbd_flush(self.image) # <<<<<<<<<<<<<<
43026 * if ret < 0:
43027 * raise make_ex(ret, 'error flushing image')
43028 */
43029 __pyx_v_ret = rbd_flush(__pyx_v_self->image);
43030 }
43031
43032 /* "rbd.pyx":3765
43033 * Block until all writes are fully flushed if caching is enabled.
43034 * """
43035 * with nogil: # <<<<<<<<<<<<<<
43036 * ret = rbd_flush(self.image)
43037 * if ret < 0:
43038 */
43039 /*finally:*/ {
43040 /*normal exit:*/{
43041 #ifdef WITH_THREAD1
43042 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43043 #endif
43044 goto __pyx_L5;
43045 }
43046 __pyx_L5:;
43047 }
43048 }
43049
43050 /* "rbd.pyx":3767
43051 * with nogil:
43052 * ret = rbd_flush(self.image)
43053 * if ret < 0: # <<<<<<<<<<<<<<
43054 * raise make_ex(ret, 'error flushing image')
43055 *
43056 */
43057 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
43058 if (__pyx_t_1) {
43059
43060 /* "rbd.pyx":3768
43061 * ret = rbd_flush(self.image)
43062 * if ret < 0:
43063 * raise make_ex(ret, 'error flushing image') # <<<<<<<<<<<<<<
43064 *
43065 * def invalidate_cache(self):
43066 */
43067 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3768; __pyx_clineno = __LINE__43067; goto __pyx_L1_error;}
43068 __Pyx_GOTREF(__pyx_t_2);
43069 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_flushing_image, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3768; __pyx_clineno = __LINE__43069; goto __pyx_L1_error;}
43070 __Pyx_GOTREF(__pyx_t_3);
43071 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43072 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
43073 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43074 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3768; __pyx_clineno = __LINE__43074; goto __pyx_L1_error;}
43075
43076 /* "rbd.pyx":3767
43077 * with nogil:
43078 * ret = rbd_flush(self.image)
43079 * if ret < 0: # <<<<<<<<<<<<<<
43080 * raise make_ex(ret, 'error flushing image')
43081 *
43082 */
43083 }
43084
43085 /* "rbd.pyx":3761
43086 * raise make_ex(ret, msg)
43087 *
43088 * def flush(self): # <<<<<<<<<<<<<<
43089 * """
43090 * Block until all writes are fully flushed if caching is enabled.
43091 */
43092
43093 /* function exit code */
43094 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
43095 goto __pyx_L0;
43096 __pyx_L1_error:;
43097 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
43098 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
43099 __Pyx_AddTraceback("rbd.Image.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
43100 __pyx_r = NULL((void*)0);
43101 __pyx_L0:;
43102 __Pyx_XGIVEREF(__pyx_r);
43103 __Pyx_RefNannyFinishContext();
43104 return __pyx_r;
43105}
43106
43107/* "rbd.pyx":3770
43108 * raise make_ex(ret, 'error flushing image')
43109 *
43110 * def invalidate_cache(self): # <<<<<<<<<<<<<<
43111 * """
43112 * Drop any cached data for the image.
43113 */
43114
43115/* Python wrapper */
43116static PyObject *__pyx_pw_3rbd_5Image_95invalidate_cache(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
43117static char __pyx_doc_3rbd_5Image_94invalidate_cache[] = "Image.invalidate_cache(self)\n\n Drop any cached data for the image.\n ";
43118static PyObject *__pyx_pw_3rbd_5Image_95invalidate_cache(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
43119 PyObject *__pyx_r = 0;
43120 __Pyx_RefNannyDeclarations
43121 __Pyx_RefNannySetupContext("invalidate_cache (wrapper)", 0);
43122 __pyx_r = __pyx_pf_3rbd_5Image_94invalidate_cache(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
43123
43124 /* function exit code */
43125 __Pyx_RefNannyFinishContext();
43126 return __pyx_r;
43127}
43128
43129static PyObject *__pyx_pf_3rbd_5Image_94invalidate_cache(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
43130 int __pyx_v_ret;
43131 PyObject *__pyx_r = NULL((void*)0);
43132 __Pyx_RefNannyDeclarations
43133 int __pyx_t_1;
43134 PyObject *__pyx_t_2 = NULL((void*)0);
43135 PyObject *__pyx_t_3 = NULL((void*)0);
43136 int __pyx_lineno = 0;
43137 const char *__pyx_filename = NULL((void*)0);
43138 int __pyx_clineno = 0;
43139 __Pyx_RefNannySetupContext("invalidate_cache", 0);
43140
43141 /* "rbd.pyx":3774
43142 * Drop any cached data for the image.
43143 * """
43144 * with nogil: # <<<<<<<<<<<<<<
43145 * ret = rbd_invalidate_cache(self.image)
43146 * if ret < 0:
43147 */
43148 {
43149 #ifdef WITH_THREAD1
43150 PyThreadState *_save;
43151 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43152 #endif
43153 /*try:*/ {
43154
43155 /* "rbd.pyx":3775
43156 * """
43157 * with nogil:
43158 * ret = rbd_invalidate_cache(self.image) # <<<<<<<<<<<<<<
43159 * if ret < 0:
43160 * raise make_ex(ret, 'error invalidating cache')
43161 */
43162 __pyx_v_ret = rbd_invalidate_cache(__pyx_v_self->image);
43163 }
43164
43165 /* "rbd.pyx":3774
43166 * Drop any cached data for the image.
43167 * """
43168 * with nogil: # <<<<<<<<<<<<<<
43169 * ret = rbd_invalidate_cache(self.image)
43170 * if ret < 0:
43171 */
43172 /*finally:*/ {
43173 /*normal exit:*/{
43174 #ifdef WITH_THREAD1
43175 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43176 #endif
43177 goto __pyx_L5;
43178 }
43179 __pyx_L5:;
43180 }
43181 }
43182
43183 /* "rbd.pyx":3776
43184 * with nogil:
43185 * ret = rbd_invalidate_cache(self.image)
43186 * if ret < 0: # <<<<<<<<<<<<<<
43187 * raise make_ex(ret, 'error invalidating cache')
43188 *
43189 */
43190 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
43191 if (__pyx_t_1) {
43192
43193 /* "rbd.pyx":3777
43194 * ret = rbd_invalidate_cache(self.image)
43195 * if ret < 0:
43196 * raise make_ex(ret, 'error invalidating cache') # <<<<<<<<<<<<<<
43197 *
43198 * def stripe_unit(self):
43199 */
43200 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3777; __pyx_clineno = __LINE__43200; goto __pyx_L1_error;}
43201 __Pyx_GOTREF(__pyx_t_2);
43202 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_invalidating_cache, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3777; __pyx_clineno = __LINE__43202; goto __pyx_L1_error;}
43203 __Pyx_GOTREF(__pyx_t_3);
43204 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43205 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
43206 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43207 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3777; __pyx_clineno = __LINE__43207; goto __pyx_L1_error;}
43208
43209 /* "rbd.pyx":3776
43210 * with nogil:
43211 * ret = rbd_invalidate_cache(self.image)
43212 * if ret < 0: # <<<<<<<<<<<<<<
43213 * raise make_ex(ret, 'error invalidating cache')
43214 *
43215 */
43216 }
43217
43218 /* "rbd.pyx":3770
43219 * raise make_ex(ret, 'error flushing image')
43220 *
43221 * def invalidate_cache(self): # <<<<<<<<<<<<<<
43222 * """
43223 * Drop any cached data for the image.
43224 */
43225
43226 /* function exit code */
43227 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
43228 goto __pyx_L0;
43229 __pyx_L1_error:;
43230 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
43231 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
43232 __Pyx_AddTraceback("rbd.Image.invalidate_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
43233 __pyx_r = NULL((void*)0);
43234 __pyx_L0:;
43235 __Pyx_XGIVEREF(__pyx_r);
43236 __Pyx_RefNannyFinishContext();
43237 return __pyx_r;
43238}
43239
43240/* "rbd.pyx":3779
43241 * raise make_ex(ret, 'error invalidating cache')
43242 *
43243 * def stripe_unit(self): # <<<<<<<<<<<<<<
43244 * """
43245 * Return the stripe unit used for the image.
43246 */
43247
43248/* Python wrapper */
43249static PyObject *__pyx_pw_3rbd_5Image_97stripe_unit(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
43250static char __pyx_doc_3rbd_5Image_96stripe_unit[] = "Image.stripe_unit(self)\n\n Return the stripe unit used for the image.\n ";
43251static PyObject *__pyx_pw_3rbd_5Image_97stripe_unit(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
43252 PyObject *__pyx_r = 0;
43253 __Pyx_RefNannyDeclarations
43254 __Pyx_RefNannySetupContext("stripe_unit (wrapper)", 0);
43255 __pyx_r = __pyx_pf_3rbd_5Image_96stripe_unit(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
43256
43257 /* function exit code */
43258 __Pyx_RefNannyFinishContext();
43259 return __pyx_r;
43260}
43261
43262static PyObject *__pyx_pf_3rbd_5Image_96stripe_unit(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
43263 uint64_t __pyx_v_stripe_unit;
43264 int __pyx_v_ret;
43265 PyObject *__pyx_r = NULL((void*)0);
43266 __Pyx_RefNannyDeclarations
43267 int __pyx_t_1;
43268 PyObject *__pyx_t_2 = NULL((void*)0);
43269 PyObject *__pyx_t_3 = NULL((void*)0);
43270 PyObject *__pyx_t_4 = NULL((void*)0);
43271 int __pyx_lineno = 0;
43272 const char *__pyx_filename = NULL((void*)0);
43273 int __pyx_clineno = 0;
43274 __Pyx_RefNannySetupContext("stripe_unit", 0);
43275
43276 /* "rbd.pyx":3784
43277 * """
43278 * cdef uint64_t stripe_unit
43279 * with nogil: # <<<<<<<<<<<<<<
43280 * ret = rbd_get_stripe_unit(self.image, &stripe_unit)
43281 * if ret != 0:
43282 */
43283 {
43284 #ifdef WITH_THREAD1
43285 PyThreadState *_save;
43286 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43287 #endif
43288 /*try:*/ {
43289
43290 /* "rbd.pyx":3785
43291 * cdef uint64_t stripe_unit
43292 * with nogil:
43293 * ret = rbd_get_stripe_unit(self.image, &stripe_unit) # <<<<<<<<<<<<<<
43294 * if ret != 0:
43295 * raise make_ex(ret, 'error getting stripe unit for image %s' % (self.name))
43296 */
43297 __pyx_v_ret = rbd_get_stripe_unit(__pyx_v_self->image, (&__pyx_v_stripe_unit));
43298 }
43299
43300 /* "rbd.pyx":3784
43301 * """
43302 * cdef uint64_t stripe_unit
43303 * with nogil: # <<<<<<<<<<<<<<
43304 * ret = rbd_get_stripe_unit(self.image, &stripe_unit)
43305 * if ret != 0:
43306 */
43307 /*finally:*/ {
43308 /*normal exit:*/{
43309 #ifdef WITH_THREAD1
43310 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43311 #endif
43312 goto __pyx_L5;
43313 }
43314 __pyx_L5:;
43315 }
43316 }
43317
43318 /* "rbd.pyx":3786
43319 * with nogil:
43320 * ret = rbd_get_stripe_unit(self.image, &stripe_unit)
43321 * if ret != 0: # <<<<<<<<<<<<<<
43322 * raise make_ex(ret, 'error getting stripe unit for image %s' % (self.name))
43323 * return stripe_unit
43324 */
43325 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
43326 if (__pyx_t_1) {
43327
43328 /* "rbd.pyx":3787
43329 * ret = rbd_get_stripe_unit(self.image, &stripe_unit)
43330 * if ret != 0:
43331 * raise make_ex(ret, 'error getting stripe unit for image %s' % (self.name)) # <<<<<<<<<<<<<<
43332 * return stripe_unit
43333 *
43334 */
43335 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__43335; goto __pyx_L1_error;}
43336 __Pyx_GOTREF(__pyx_t_2);
43337 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_stripe_unit_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_stripe_unit_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__43337; goto __pyx_L1_error;}
43338 __Pyx_GOTREF(__pyx_t_3);
43339 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__43339; goto __pyx_L1_error;}
43340 __Pyx_GOTREF(__pyx_t_4);
43341 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43342 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43343 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
43344 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
43345 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__43345; goto __pyx_L1_error;}
43346
43347 /* "rbd.pyx":3786
43348 * with nogil:
43349 * ret = rbd_get_stripe_unit(self.image, &stripe_unit)
43350 * if ret != 0: # <<<<<<<<<<<<<<
43351 * raise make_ex(ret, 'error getting stripe unit for image %s' % (self.name))
43352 * return stripe_unit
43353 */
43354 }
43355
43356 /* "rbd.pyx":3788
43357 * if ret != 0:
43358 * raise make_ex(ret, 'error getting stripe unit for image %s' % (self.name))
43359 * return stripe_unit # <<<<<<<<<<<<<<
43360 *
43361 * def stripe_count(self):
43362 */
43363 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
43364 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_stripe_unit); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3788; __pyx_clineno = __LINE__43364; goto __pyx_L1_error;}
43365 __Pyx_GOTREF(__pyx_t_4);
43366 __pyx_r = __pyx_t_4;
43367 __pyx_t_4 = 0;
43368 goto __pyx_L0;
43369
43370 /* "rbd.pyx":3779
43371 * raise make_ex(ret, 'error invalidating cache')
43372 *
43373 * def stripe_unit(self): # <<<<<<<<<<<<<<
43374 * """
43375 * Return the stripe unit used for the image.
43376 */
43377
43378 /* function exit code */
43379 __pyx_L1_error:;
43380 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
43381 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
43382 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
43383 __Pyx_AddTraceback("rbd.Image.stripe_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
43384 __pyx_r = NULL((void*)0);
43385 __pyx_L0:;
43386 __Pyx_XGIVEREF(__pyx_r);
43387 __Pyx_RefNannyFinishContext();
43388 return __pyx_r;
43389}
43390
43391/* "rbd.pyx":3790
43392 * return stripe_unit
43393 *
43394 * def stripe_count(self): # <<<<<<<<<<<<<<
43395 * """
43396 * Return the stripe count used for the image.
43397 */
43398
43399/* Python wrapper */
43400static PyObject *__pyx_pw_3rbd_5Image_99stripe_count(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
43401static char __pyx_doc_3rbd_5Image_98stripe_count[] = "Image.stripe_count(self)\n\n Return the stripe count used for the image.\n ";
43402static PyObject *__pyx_pw_3rbd_5Image_99stripe_count(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
43403 PyObject *__pyx_r = 0;
43404 __Pyx_RefNannyDeclarations
43405 __Pyx_RefNannySetupContext("stripe_count (wrapper)", 0);
43406 __pyx_r = __pyx_pf_3rbd_5Image_98stripe_count(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
43407
43408 /* function exit code */
43409 __Pyx_RefNannyFinishContext();
43410 return __pyx_r;
43411}
43412
43413static PyObject *__pyx_pf_3rbd_5Image_98stripe_count(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
43414 uint64_t __pyx_v_stripe_count;
43415 int __pyx_v_ret;
43416 PyObject *__pyx_r = NULL((void*)0);
43417 __Pyx_RefNannyDeclarations
43418 int __pyx_t_1;
43419 PyObject *__pyx_t_2 = NULL((void*)0);
43420 PyObject *__pyx_t_3 = NULL((void*)0);
43421 PyObject *__pyx_t_4 = NULL((void*)0);
43422 int __pyx_lineno = 0;
43423 const char *__pyx_filename = NULL((void*)0);
43424 int __pyx_clineno = 0;
43425 __Pyx_RefNannySetupContext("stripe_count", 0);
43426
43427 /* "rbd.pyx":3795
43428 * """
43429 * cdef uint64_t stripe_count
43430 * with nogil: # <<<<<<<<<<<<<<
43431 * ret = rbd_get_stripe_count(self.image, &stripe_count)
43432 * if ret != 0:
43433 */
43434 {
43435 #ifdef WITH_THREAD1
43436 PyThreadState *_save;
43437 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43438 #endif
43439 /*try:*/ {
43440
43441 /* "rbd.pyx":3796
43442 * cdef uint64_t stripe_count
43443 * with nogil:
43444 * ret = rbd_get_stripe_count(self.image, &stripe_count) # <<<<<<<<<<<<<<
43445 * if ret != 0:
43446 * raise make_ex(ret, 'error getting stripe count for image %s' % (self.name))
43447 */
43448 __pyx_v_ret = rbd_get_stripe_count(__pyx_v_self->image, (&__pyx_v_stripe_count));
43449 }
43450
43451 /* "rbd.pyx":3795
43452 * """
43453 * cdef uint64_t stripe_count
43454 * with nogil: # <<<<<<<<<<<<<<
43455 * ret = rbd_get_stripe_count(self.image, &stripe_count)
43456 * if ret != 0:
43457 */
43458 /*finally:*/ {
43459 /*normal exit:*/{
43460 #ifdef WITH_THREAD1
43461 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43462 #endif
43463 goto __pyx_L5;
43464 }
43465 __pyx_L5:;
43466 }
43467 }
43468
43469 /* "rbd.pyx":3797
43470 * with nogil:
43471 * ret = rbd_get_stripe_count(self.image, &stripe_count)
43472 * if ret != 0: # <<<<<<<<<<<<<<
43473 * raise make_ex(ret, 'error getting stripe count for image %s' % (self.name))
43474 * return stripe_count
43475 */
43476 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
43477 if (__pyx_t_1) {
43478
43479 /* "rbd.pyx":3798
43480 * ret = rbd_get_stripe_count(self.image, &stripe_count)
43481 * if ret != 0:
43482 * raise make_ex(ret, 'error getting stripe count for image %s' % (self.name)) # <<<<<<<<<<<<<<
43483 * return stripe_count
43484 *
43485 */
43486 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3798; __pyx_clineno = __LINE__43486; goto __pyx_L1_error;}
43487 __Pyx_GOTREF(__pyx_t_2);
43488 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_stripe_count_for_i, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_stripe_count_for_i, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3798; __pyx_clineno = __LINE__43488; goto __pyx_L1_error;}
43489 __Pyx_GOTREF(__pyx_t_3);
43490 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3798; __pyx_clineno = __LINE__43490; goto __pyx_L1_error;}
43491 __Pyx_GOTREF(__pyx_t_4);
43492 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43493 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43494 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
43495 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
43496 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3798; __pyx_clineno = __LINE__43496; goto __pyx_L1_error;}
43497
43498 /* "rbd.pyx":3797
43499 * with nogil:
43500 * ret = rbd_get_stripe_count(self.image, &stripe_count)
43501 * if ret != 0: # <<<<<<<<<<<<<<
43502 * raise make_ex(ret, 'error getting stripe count for image %s' % (self.name))
43503 * return stripe_count
43504 */
43505 }
43506
43507 /* "rbd.pyx":3799
43508 * if ret != 0:
43509 * raise make_ex(ret, 'error getting stripe count for image %s' % (self.name))
43510 * return stripe_count # <<<<<<<<<<<<<<
43511 *
43512 * def create_timestamp(self):
43513 */
43514 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
43515 __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_stripe_count); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3799; __pyx_clineno = __LINE__43515; goto __pyx_L1_error;}
43516 __Pyx_GOTREF(__pyx_t_4);
43517 __pyx_r = __pyx_t_4;
43518 __pyx_t_4 = 0;
43519 goto __pyx_L0;
43520
43521 /* "rbd.pyx":3790
43522 * return stripe_unit
43523 *
43524 * def stripe_count(self): # <<<<<<<<<<<<<<
43525 * """
43526 * Return the stripe count used for the image.
43527 */
43528
43529 /* function exit code */
43530 __pyx_L1_error:;
43531 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
43532 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
43533 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
43534 __Pyx_AddTraceback("rbd.Image.stripe_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
43535 __pyx_r = NULL((void*)0);
43536 __pyx_L0:;
43537 __Pyx_XGIVEREF(__pyx_r);
43538 __Pyx_RefNannyFinishContext();
43539 return __pyx_r;
43540}
43541
43542/* "rbd.pyx":3801
43543 * return stripe_count
43544 *
43545 * def create_timestamp(self): # <<<<<<<<<<<<<<
43546 * """
43547 * Return the create timestamp for the image.
43548 */
43549
43550/* Python wrapper */
43551static PyObject *__pyx_pw_3rbd_5Image_101create_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
43552static char __pyx_doc_3rbd_5Image_100create_timestamp[] = "Image.create_timestamp(self)\n\n Return the create timestamp for the image.\n ";
43553static PyObject *__pyx_pw_3rbd_5Image_101create_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
43554 PyObject *__pyx_r = 0;
43555 __Pyx_RefNannyDeclarations
43556 __Pyx_RefNannySetupContext("create_timestamp (wrapper)", 0);
43557 __pyx_r = __pyx_pf_3rbd_5Image_100create_timestamp(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
43558
43559 /* function exit code */
43560 __Pyx_RefNannyFinishContext();
43561 return __pyx_r;
43562}
43563
43564static PyObject *__pyx_pf_3rbd_5Image_100create_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
43565 struct timespec __pyx_v_timestamp;
43566 int __pyx_v_ret;
43567 PyObject *__pyx_r = NULL((void*)0);
43568 __Pyx_RefNannyDeclarations
43569 int __pyx_t_1;
43570 PyObject *__pyx_t_2 = NULL((void*)0);
43571 PyObject *__pyx_t_3 = NULL((void*)0);
43572 PyObject *__pyx_t_4 = NULL((void*)0);
43573 PyObject *__pyx_t_5 = NULL((void*)0);
43574 PyObject *__pyx_t_6 = NULL((void*)0);
43575 int __pyx_lineno = 0;
43576 const char *__pyx_filename = NULL((void*)0);
43577 int __pyx_clineno = 0;
43578 __Pyx_RefNannySetupContext("create_timestamp", 0);
43579
43580 /* "rbd.pyx":3807
43581 * cdef:
43582 * timespec timestamp
43583 * with nogil: # <<<<<<<<<<<<<<
43584 * ret = rbd_get_create_timestamp(self.image, &timestamp)
43585 * if ret != 0:
43586 */
43587 {
43588 #ifdef WITH_THREAD1
43589 PyThreadState *_save;
43590 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43591 #endif
43592 /*try:*/ {
43593
43594 /* "rbd.pyx":3808
43595 * timespec timestamp
43596 * with nogil:
43597 * ret = rbd_get_create_timestamp(self.image, &timestamp) # <<<<<<<<<<<<<<
43598 * if ret != 0:
43599 * raise make_ex(ret, 'error getting create timestamp for image: %s' % (self.name))
43600 */
43601 __pyx_v_ret = rbd_get_create_timestamp(__pyx_v_self->image, (&__pyx_v_timestamp));
43602 }
43603
43604 /* "rbd.pyx":3807
43605 * cdef:
43606 * timespec timestamp
43607 * with nogil: # <<<<<<<<<<<<<<
43608 * ret = rbd_get_create_timestamp(self.image, &timestamp)
43609 * if ret != 0:
43610 */
43611 /*finally:*/ {
43612 /*normal exit:*/{
43613 #ifdef WITH_THREAD1
43614 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43615 #endif
43616 goto __pyx_L5;
43617 }
43618 __pyx_L5:;
43619 }
43620 }
43621
43622 /* "rbd.pyx":3809
43623 * with nogil:
43624 * ret = rbd_get_create_timestamp(self.image, &timestamp)
43625 * if ret != 0: # <<<<<<<<<<<<<<
43626 * raise make_ex(ret, 'error getting create timestamp for image: %s' % (self.name))
43627 * return datetime.utcfromtimestamp(timestamp.tv_sec)
43628 */
43629 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
43630 if (__pyx_t_1) {
43631
43632 /* "rbd.pyx":3810
43633 * ret = rbd_get_create_timestamp(self.image, &timestamp)
43634 * if ret != 0:
43635 * raise make_ex(ret, 'error getting create timestamp for image: %s' % (self.name)) # <<<<<<<<<<<<<<
43636 * return datetime.utcfromtimestamp(timestamp.tv_sec)
43637 *
43638 */
43639 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3810; __pyx_clineno = __LINE__43639; goto __pyx_L1_error;}
43640 __Pyx_GOTREF(__pyx_t_2);
43641 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_create_timestamp_f, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_create_timestamp_f, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3810; __pyx_clineno = __LINE__43641; goto __pyx_L1_error;}
43642 __Pyx_GOTREF(__pyx_t_3);
43643 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3810; __pyx_clineno = __LINE__43643; goto __pyx_L1_error;}
43644 __Pyx_GOTREF(__pyx_t_4);
43645 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43646 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43647 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
43648 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
43649 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3810; __pyx_clineno = __LINE__43649; goto __pyx_L1_error;}
43650
43651 /* "rbd.pyx":3809
43652 * with nogil:
43653 * ret = rbd_get_create_timestamp(self.image, &timestamp)
43654 * if ret != 0: # <<<<<<<<<<<<<<
43655 * raise make_ex(ret, 'error getting create timestamp for image: %s' % (self.name))
43656 * return datetime.utcfromtimestamp(timestamp.tv_sec)
43657 */
43658 }
43659
43660 /* "rbd.pyx":3811
43661 * if ret != 0:
43662 * raise make_ex(ret, 'error getting create timestamp for image: %s' % (self.name))
43663 * return datetime.utcfromtimestamp(timestamp.tv_sec) # <<<<<<<<<<<<<<
43664 *
43665 * def access_timestamp(self):
43666 */
43667 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
43668 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3811; __pyx_clineno = __LINE__43668; goto __pyx_L1_error;}
43669 __Pyx_GOTREF(__pyx_t_3);
43670 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3811; __pyx_clineno = __LINE__43670; goto __pyx_L1_error;}
43671 __Pyx_GOTREF(__pyx_t_2);
43672 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43673 __pyx_t_3 = __Pyx_PyInt_From_time_t(__pyx_v_timestamp.tv_sec); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3811; __pyx_clineno = __LINE__43673; goto __pyx_L1_error;}
43674 __Pyx_GOTREF(__pyx_t_3);
43675 __pyx_t_5 = NULL((void*)0);
43676 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
43677 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
43678 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
43679 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
43680 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
43681 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
43682 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
43683 }
43684 }
43685 if (!__pyx_t_5) {
43686 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3811; __pyx_clineno = __LINE__43686; goto __pyx_L1_error;}
43687 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43688 __Pyx_GOTREF(__pyx_t_4);
43689 } else {
43690 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3811; __pyx_clineno = __LINE__43690; goto __pyx_L1_error;}
43691 __Pyx_GOTREF(__pyx_t_6);
43692 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
43693 __Pyx_GIVEREF(__pyx_t_3);
43694 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_3);
43695 __pyx_t_3 = 0;
43696 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3811; __pyx_clineno = __LINE__43696; goto __pyx_L1_error;}
43697 __Pyx_GOTREF(__pyx_t_4);
43698 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
43699 }
43700 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43701 __pyx_r = __pyx_t_4;
43702 __pyx_t_4 = 0;
43703 goto __pyx_L0;
43704
43705 /* "rbd.pyx":3801
43706 * return stripe_count
43707 *
43708 * def create_timestamp(self): # <<<<<<<<<<<<<<
43709 * """
43710 * Return the create timestamp for the image.
43711 */
43712
43713 /* function exit code */
43714 __pyx_L1_error:;
43715 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
43716 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
43717 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
43718 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
43719 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
43720 __Pyx_AddTraceback("rbd.Image.create_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
43721 __pyx_r = NULL((void*)0);
43722 __pyx_L0:;
43723 __Pyx_XGIVEREF(__pyx_r);
43724 __Pyx_RefNannyFinishContext();
43725 return __pyx_r;
43726}
43727
43728/* "rbd.pyx":3813
43729 * return datetime.utcfromtimestamp(timestamp.tv_sec)
43730 *
43731 * def access_timestamp(self): # <<<<<<<<<<<<<<
43732 * """
43733 * Return the access timestamp for the image.
43734 */
43735
43736/* Python wrapper */
43737static PyObject *__pyx_pw_3rbd_5Image_103access_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
43738static char __pyx_doc_3rbd_5Image_102access_timestamp[] = "Image.access_timestamp(self)\n\n Return the access timestamp for the image.\n ";
43739static PyObject *__pyx_pw_3rbd_5Image_103access_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
43740 PyObject *__pyx_r = 0;
43741 __Pyx_RefNannyDeclarations
43742 __Pyx_RefNannySetupContext("access_timestamp (wrapper)", 0);
43743 __pyx_r = __pyx_pf_3rbd_5Image_102access_timestamp(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
43744
43745 /* function exit code */
43746 __Pyx_RefNannyFinishContext();
43747 return __pyx_r;
43748}
43749
43750static PyObject *__pyx_pf_3rbd_5Image_102access_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
43751 struct timespec __pyx_v_timestamp;
43752 int __pyx_v_ret;
43753 PyObject *__pyx_r = NULL((void*)0);
43754 __Pyx_RefNannyDeclarations
43755 int __pyx_t_1;
43756 PyObject *__pyx_t_2 = NULL((void*)0);
43757 PyObject *__pyx_t_3 = NULL((void*)0);
43758 PyObject *__pyx_t_4 = NULL((void*)0);
43759 PyObject *__pyx_t_5 = NULL((void*)0);
43760 PyObject *__pyx_t_6 = NULL((void*)0);
43761 int __pyx_lineno = 0;
43762 const char *__pyx_filename = NULL((void*)0);
43763 int __pyx_clineno = 0;
43764 __Pyx_RefNannySetupContext("access_timestamp", 0);
43765
43766 /* "rbd.pyx":3819
43767 * cdef:
43768 * timespec timestamp
43769 * with nogil: # <<<<<<<<<<<<<<
43770 * ret = rbd_get_access_timestamp(self.image, &timestamp)
43771 * if ret != 0:
43772 */
43773 {
43774 #ifdef WITH_THREAD1
43775 PyThreadState *_save;
43776 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43777 #endif
43778 /*try:*/ {
43779
43780 /* "rbd.pyx":3820
43781 * timespec timestamp
43782 * with nogil:
43783 * ret = rbd_get_access_timestamp(self.image, &timestamp) # <<<<<<<<<<<<<<
43784 * if ret != 0:
43785 * raise make_ex(ret, 'error getting access timestamp for image: %s' % (self.name))
43786 */
43787 __pyx_v_ret = rbd_get_access_timestamp(__pyx_v_self->image, (&__pyx_v_timestamp));
43788 }
43789
43790 /* "rbd.pyx":3819
43791 * cdef:
43792 * timespec timestamp
43793 * with nogil: # <<<<<<<<<<<<<<
43794 * ret = rbd_get_access_timestamp(self.image, &timestamp)
43795 * if ret != 0:
43796 */
43797 /*finally:*/ {
43798 /*normal exit:*/{
43799 #ifdef WITH_THREAD1
43800 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43801 #endif
43802 goto __pyx_L5;
43803 }
43804 __pyx_L5:;
43805 }
43806 }
43807
43808 /* "rbd.pyx":3821
43809 * with nogil:
43810 * ret = rbd_get_access_timestamp(self.image, &timestamp)
43811 * if ret != 0: # <<<<<<<<<<<<<<
43812 * raise make_ex(ret, 'error getting access timestamp for image: %s' % (self.name))
43813 * return datetime.fromtimestamp(timestamp.tv_sec)
43814 */
43815 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
43816 if (__pyx_t_1) {
43817
43818 /* "rbd.pyx":3822
43819 * ret = rbd_get_access_timestamp(self.image, &timestamp)
43820 * if ret != 0:
43821 * raise make_ex(ret, 'error getting access timestamp for image: %s' % (self.name)) # <<<<<<<<<<<<<<
43822 * return datetime.fromtimestamp(timestamp.tv_sec)
43823 *
43824 */
43825 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3822; __pyx_clineno = __LINE__43825; goto __pyx_L1_error;}
43826 __Pyx_GOTREF(__pyx_t_2);
43827 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_access_timestamp_f, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_access_timestamp_f, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3822; __pyx_clineno = __LINE__43827; goto __pyx_L1_error;}
43828 __Pyx_GOTREF(__pyx_t_3);
43829 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3822; __pyx_clineno = __LINE__43829; goto __pyx_L1_error;}
43830 __Pyx_GOTREF(__pyx_t_4);
43831 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43832 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43833 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
43834 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
43835 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3822; __pyx_clineno = __LINE__43835; goto __pyx_L1_error;}
43836
43837 /* "rbd.pyx":3821
43838 * with nogil:
43839 * ret = rbd_get_access_timestamp(self.image, &timestamp)
43840 * if ret != 0: # <<<<<<<<<<<<<<
43841 * raise make_ex(ret, 'error getting access timestamp for image: %s' % (self.name))
43842 * return datetime.fromtimestamp(timestamp.tv_sec)
43843 */
43844 }
43845
43846 /* "rbd.pyx":3823
43847 * if ret != 0:
43848 * raise make_ex(ret, 'error getting access timestamp for image: %s' % (self.name))
43849 * return datetime.fromtimestamp(timestamp.tv_sec) # <<<<<<<<<<<<<<
43850 *
43851 * def modify_timestamp(self):
43852 */
43853 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
43854 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__43854; goto __pyx_L1_error;}
43855 __Pyx_GOTREF(__pyx_t_3);
43856 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__43856; goto __pyx_L1_error;}
43857 __Pyx_GOTREF(__pyx_t_2);
43858 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43859 __pyx_t_3 = __Pyx_PyInt_From_time_t(__pyx_v_timestamp.tv_sec); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__43859; goto __pyx_L1_error;}
43860 __Pyx_GOTREF(__pyx_t_3);
43861 __pyx_t_5 = NULL((void*)0);
43862 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
43863 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
43864 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
43865 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
43866 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
43867 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
43868 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
43869 }
43870 }
43871 if (!__pyx_t_5) {
43872 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__43872; goto __pyx_L1_error;}
43873 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
43874 __Pyx_GOTREF(__pyx_t_4);
43875 } else {
43876 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__43876; goto __pyx_L1_error;}
43877 __Pyx_GOTREF(__pyx_t_6);
43878 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
43879 __Pyx_GIVEREF(__pyx_t_3);
43880 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_3);
43881 __pyx_t_3 = 0;
43882 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__43882; goto __pyx_L1_error;}
43883 __Pyx_GOTREF(__pyx_t_4);
43884 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
43885 }
43886 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
43887 __pyx_r = __pyx_t_4;
43888 __pyx_t_4 = 0;
43889 goto __pyx_L0;
43890
43891 /* "rbd.pyx":3813
43892 * return datetime.utcfromtimestamp(timestamp.tv_sec)
43893 *
43894 * def access_timestamp(self): # <<<<<<<<<<<<<<
43895 * """
43896 * Return the access timestamp for the image.
43897 */
43898
43899 /* function exit code */
43900 __pyx_L1_error:;
43901 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
43902 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
43903 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
43904 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
43905 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
43906 __Pyx_AddTraceback("rbd.Image.access_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
43907 __pyx_r = NULL((void*)0);
43908 __pyx_L0:;
43909 __Pyx_XGIVEREF(__pyx_r);
43910 __Pyx_RefNannyFinishContext();
43911 return __pyx_r;
43912}
43913
43914/* "rbd.pyx":3825
43915 * return datetime.fromtimestamp(timestamp.tv_sec)
43916 *
43917 * def modify_timestamp(self): # <<<<<<<<<<<<<<
43918 * """
43919 * Return the modify timestamp for the image.
43920 */
43921
43922/* Python wrapper */
43923static PyObject *__pyx_pw_3rbd_5Image_105modify_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
43924static char __pyx_doc_3rbd_5Image_104modify_timestamp[] = "Image.modify_timestamp(self)\n\n Return the modify timestamp for the image.\n ";
43925static PyObject *__pyx_pw_3rbd_5Image_105modify_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
43926 PyObject *__pyx_r = 0;
43927 __Pyx_RefNannyDeclarations
43928 __Pyx_RefNannySetupContext("modify_timestamp (wrapper)", 0);
43929 __pyx_r = __pyx_pf_3rbd_5Image_104modify_timestamp(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
43930
43931 /* function exit code */
43932 __Pyx_RefNannyFinishContext();
43933 return __pyx_r;
43934}
43935
43936static PyObject *__pyx_pf_3rbd_5Image_104modify_timestamp(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
43937 struct timespec __pyx_v_timestamp;
43938 int __pyx_v_ret;
43939 PyObject *__pyx_r = NULL((void*)0);
43940 __Pyx_RefNannyDeclarations
43941 int __pyx_t_1;
43942 PyObject *__pyx_t_2 = NULL((void*)0);
43943 PyObject *__pyx_t_3 = NULL((void*)0);
43944 PyObject *__pyx_t_4 = NULL((void*)0);
43945 PyObject *__pyx_t_5 = NULL((void*)0);
43946 PyObject *__pyx_t_6 = NULL((void*)0);
43947 int __pyx_lineno = 0;
43948 const char *__pyx_filename = NULL((void*)0);
43949 int __pyx_clineno = 0;
43950 __Pyx_RefNannySetupContext("modify_timestamp", 0);
43951
43952 /* "rbd.pyx":3831
43953 * cdef:
43954 * timespec timestamp
43955 * with nogil: # <<<<<<<<<<<<<<
43956 * ret = rbd_get_modify_timestamp(self.image, &timestamp)
43957 * if ret != 0:
43958 */
43959 {
43960 #ifdef WITH_THREAD1
43961 PyThreadState *_save;
43962 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
43963 #endif
43964 /*try:*/ {
43965
43966 /* "rbd.pyx":3832
43967 * timespec timestamp
43968 * with nogil:
43969 * ret = rbd_get_modify_timestamp(self.image, &timestamp) # <<<<<<<<<<<<<<
43970 * if ret != 0:
43971 * raise make_ex(ret, 'error getting modify timestamp for image: %s' % (self.name))
43972 */
43973 __pyx_v_ret = rbd_get_modify_timestamp(__pyx_v_self->image, (&__pyx_v_timestamp));
43974 }
43975
43976 /* "rbd.pyx":3831
43977 * cdef:
43978 * timespec timestamp
43979 * with nogil: # <<<<<<<<<<<<<<
43980 * ret = rbd_get_modify_timestamp(self.image, &timestamp)
43981 * if ret != 0:
43982 */
43983 /*finally:*/ {
43984 /*normal exit:*/{
43985 #ifdef WITH_THREAD1
43986 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
43987 #endif
43988 goto __pyx_L5;
43989 }
43990 __pyx_L5:;
43991 }
43992 }
43993
43994 /* "rbd.pyx":3833
43995 * with nogil:
43996 * ret = rbd_get_modify_timestamp(self.image, &timestamp)
43997 * if ret != 0: # <<<<<<<<<<<<<<
43998 * raise make_ex(ret, 'error getting modify timestamp for image: %s' % (self.name))
43999 * return datetime.fromtimestamp(timestamp.tv_sec)
44000 */
44001 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
44002 if (__pyx_t_1) {
44003
44004 /* "rbd.pyx":3834
44005 * ret = rbd_get_modify_timestamp(self.image, &timestamp)
44006 * if ret != 0:
44007 * raise make_ex(ret, 'error getting modify timestamp for image: %s' % (self.name)) # <<<<<<<<<<<<<<
44008 * return datetime.fromtimestamp(timestamp.tv_sec)
44009 *
44010 */
44011 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3834; __pyx_clineno = __LINE__44011; goto __pyx_L1_error;}
44012 __Pyx_GOTREF(__pyx_t_2);
44013 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_modify_timestamp_f, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_modify_timestamp_f, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3834; __pyx_clineno = __LINE__44013; goto __pyx_L1_error;}
44014 __Pyx_GOTREF(__pyx_t_3);
44015 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3834; __pyx_clineno = __LINE__44015; goto __pyx_L1_error;}
44016 __Pyx_GOTREF(__pyx_t_4);
44017 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
44018 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44019 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
44020 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
44021 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3834; __pyx_clineno = __LINE__44021; goto __pyx_L1_error;}
44022
44023 /* "rbd.pyx":3833
44024 * with nogil:
44025 * ret = rbd_get_modify_timestamp(self.image, &timestamp)
44026 * if ret != 0: # <<<<<<<<<<<<<<
44027 * raise make_ex(ret, 'error getting modify timestamp for image: %s' % (self.name))
44028 * return datetime.fromtimestamp(timestamp.tv_sec)
44029 */
44030 }
44031
44032 /* "rbd.pyx":3835
44033 * if ret != 0:
44034 * raise make_ex(ret, 'error getting modify timestamp for image: %s' % (self.name))
44035 * return datetime.fromtimestamp(timestamp.tv_sec) # <<<<<<<<<<<<<<
44036 *
44037 * def flatten(self, on_progress=None):
44038 */
44039 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
44040 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__44040; goto __pyx_L1_error;}
44041 __Pyx_GOTREF(__pyx_t_3);
44042 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fromtimestamp); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__44042; goto __pyx_L1_error;}
44043 __Pyx_GOTREF(__pyx_t_2);
44044 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44045 __pyx_t_3 = __Pyx_PyInt_From_time_t(__pyx_v_timestamp.tv_sec); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__44045; goto __pyx_L1_error;}
44046 __Pyx_GOTREF(__pyx_t_3);
44047 __pyx_t_5 = NULL((void*)0);
44048 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
44049 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
44050 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
44051 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
44052 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
44053 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
44054 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
44055 }
44056 }
44057 if (!__pyx_t_5) {
44058 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__44058; goto __pyx_L1_error;}
44059 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44060 __Pyx_GOTREF(__pyx_t_4);
44061 } else {
44062 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__44062; goto __pyx_L1_error;}
44063 __Pyx_GOTREF(__pyx_t_6);
44064 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
44065 __Pyx_GIVEREF(__pyx_t_3);
44066 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_3);
44067 __pyx_t_3 = 0;
44068 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__44068; goto __pyx_L1_error;}
44069 __Pyx_GOTREF(__pyx_t_4);
44070 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
44071 }
44072 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
44073 __pyx_r = __pyx_t_4;
44074 __pyx_t_4 = 0;
44075 goto __pyx_L0;
44076
44077 /* "rbd.pyx":3825
44078 * return datetime.fromtimestamp(timestamp.tv_sec)
44079 *
44080 * def modify_timestamp(self): # <<<<<<<<<<<<<<
44081 * """
44082 * Return the modify timestamp for the image.
44083 */
44084
44085 /* function exit code */
44086 __pyx_L1_error:;
44087 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
44088 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
44089 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
44090 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
44091 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
44092 __Pyx_AddTraceback("rbd.Image.modify_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
44093 __pyx_r = NULL((void*)0);
44094 __pyx_L0:;
44095 __Pyx_XGIVEREF(__pyx_r);
44096 __Pyx_RefNannyFinishContext();
44097 return __pyx_r;
44098}
44099
44100/* "rbd.pyx":3837
44101 * return datetime.fromtimestamp(timestamp.tv_sec)
44102 *
44103 * def flatten(self, on_progress=None): # <<<<<<<<<<<<<<
44104 * """
44105 * Flatten clone image (copy all blocks from parent to child)
44106 */
44107
44108/* Python wrapper */
44109static PyObject *__pyx_pw_3rbd_5Image_107flatten(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
44110static char __pyx_doc_3rbd_5Image_106flatten[] = "Image.flatten(self, on_progress=None)\n\n Flatten clone image (copy all blocks from parent to child)\n :param on_progress: optional progress callback function\n :type on_progress: callback function\n ";
44111static PyObject *__pyx_pw_3rbd_5Image_107flatten(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44112 PyObject *__pyx_v_on_progress = 0;
44113 int __pyx_lineno = 0;
44114 const char *__pyx_filename = NULL((void*)0);
44115 int __pyx_clineno = 0;
44116 PyObject *__pyx_r = 0;
44117 __Pyx_RefNannyDeclarations
44118 __Pyx_RefNannySetupContext("flatten (wrapper)", 0);
44119 {
44120 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_on_progress,0};
44121 PyObject* values[1] = {0};
44122 values[0] = ((PyObject *)Py_None(&_Py_NoneStruct));
44123 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
44124 Py_ssize_t kw_args;
44125 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
44126 switch (pos_args) {
44127 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
44128 case 0: break;
44129 default: goto __pyx_L5_argtuple_error;
44130 }
44131 kw_args = PyDict_Size(__pyx_kwds);
44132 switch (pos_args) {
44133 case 0:
44134 if (kw_args > 0) {
44135 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_on_progress);
44136 if (value) { values[0] = value; kw_args--; }
44137 }
44138 }
44139 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
44140 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "flatten") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "flatten") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__44140; goto __pyx_L3_error;}
44141 }
44142 } else {
44143 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
44144 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
44145 case 0: break;
44146 default: goto __pyx_L5_argtuple_error;
44147 }
44148 }
44149 __pyx_v_on_progress = values[0];
44150 }
44151 goto __pyx_L4_argument_unpacking_done;
44152 __pyx_L5_argtuple_error:;
44153 __Pyx_RaiseArgtupleInvalid("flatten", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__44153; goto __pyx_L3_error;}
44154 __pyx_L3_error:;
44155 __Pyx_AddTraceback("rbd.Image.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
44156 __Pyx_RefNannyFinishContext();
44157 return NULL((void*)0);
44158 __pyx_L4_argument_unpacking_done:;
44159 __pyx_r = __pyx_pf_3rbd_5Image_106flatten(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_on_progress);
44160
44161 /* function exit code */
44162 __Pyx_RefNannyFinishContext();
44163 return __pyx_r;
44164}
44165
44166static PyObject *__pyx_pf_3rbd_5Image_106flatten(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_on_progress) {
44167 librbd_progress_fn_t __pyx_v__prog_cb;
44168 void *__pyx_v__prog_arg;
44169 int __pyx_v_ret;
44170 PyObject *__pyx_r = NULL((void*)0);
44171 __Pyx_RefNannyDeclarations
44172 int __pyx_t_1;
44173 PyObject *__pyx_t_2 = NULL((void*)0);
44174 PyObject *__pyx_t_3 = NULL((void*)0);
44175 PyObject *__pyx_t_4 = NULL((void*)0);
44176 int __pyx_lineno = 0;
44177 const char *__pyx_filename = NULL((void*)0);
44178 int __pyx_clineno = 0;
44179 __Pyx_RefNannySetupContext("flatten", 0);
44180
44181 /* "rbd.pyx":3844
44182 * """
44183 * cdef:
44184 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
44185 * void *_prog_arg = NULL
44186 * if on_progress:
44187 */
44188 __pyx_v__prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
44189
44190 /* "rbd.pyx":3845
44191 * cdef:
44192 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
44193 * void *_prog_arg = NULL # <<<<<<<<<<<<<<
44194 * if on_progress:
44195 * _prog_cb = &progress_callback
44196 */
44197 __pyx_v__prog_arg = NULL((void*)0);
44198
44199 /* "rbd.pyx":3846
44200 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
44201 * void *_prog_arg = NULL
44202 * if on_progress: # <<<<<<<<<<<<<<
44203 * _prog_cb = &progress_callback
44204 * _prog_arg = <void *>on_progress
44205 */
44206 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on_progress); if (unlikely(__pyx_t_1 < 0)__builtin_expect(!!(__pyx_t_1 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3846; __pyx_clineno = __LINE__44206; goto __pyx_L1_error;}
44207 if (__pyx_t_1) {
44208
44209 /* "rbd.pyx":3847
44210 * void *_prog_arg = NULL
44211 * if on_progress:
44212 * _prog_cb = &progress_callback # <<<<<<<<<<<<<<
44213 * _prog_arg = <void *>on_progress
44214 * with nogil:
44215 */
44216 __pyx_v__prog_cb = (&__pyx_f_3rbd_progress_callback);
44217
44218 /* "rbd.pyx":3848
44219 * if on_progress:
44220 * _prog_cb = &progress_callback
44221 * _prog_arg = <void *>on_progress # <<<<<<<<<<<<<<
44222 * with nogil:
44223 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg)
44224 */
44225 __pyx_v__prog_arg = ((void *)__pyx_v_on_progress);
44226
44227 /* "rbd.pyx":3846
44228 * librbd_progress_fn_t _prog_cb = &no_op_progress_callback
44229 * void *_prog_arg = NULL
44230 * if on_progress: # <<<<<<<<<<<<<<
44231 * _prog_cb = &progress_callback
44232 * _prog_arg = <void *>on_progress
44233 */
44234 }
44235
44236 /* "rbd.pyx":3849
44237 * _prog_cb = &progress_callback
44238 * _prog_arg = <void *>on_progress
44239 * with nogil: # <<<<<<<<<<<<<<
44240 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg)
44241 * if ret < 0:
44242 */
44243 {
44244 #ifdef WITH_THREAD1
44245 PyThreadState *_save;
44246 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
44247 #endif
44248 /*try:*/ {
44249
44250 /* "rbd.pyx":3850
44251 * _prog_arg = <void *>on_progress
44252 * with nogil:
44253 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg) # <<<<<<<<<<<<<<
44254 * if ret < 0:
44255 * raise make_ex(ret, "error flattening %s" % self.name)
44256 */
44257 __pyx_v_ret = rbd_flatten_with_progress(__pyx_v_self->image, __pyx_v__prog_cb, __pyx_v__prog_arg);
44258 }
44259
44260 /* "rbd.pyx":3849
44261 * _prog_cb = &progress_callback
44262 * _prog_arg = <void *>on_progress
44263 * with nogil: # <<<<<<<<<<<<<<
44264 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg)
44265 * if ret < 0:
44266 */
44267 /*finally:*/ {
44268 /*normal exit:*/{
44269 #ifdef WITH_THREAD1
44270 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
44271 #endif
44272 goto __pyx_L6;
44273 }
44274 __pyx_L6:;
44275 }
44276 }
44277
44278 /* "rbd.pyx":3851
44279 * with nogil:
44280 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg)
44281 * if ret < 0: # <<<<<<<<<<<<<<
44282 * raise make_ex(ret, "error flattening %s" % self.name)
44283 *
44284 */
44285 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
44286 if (__pyx_t_1) {
44287
44288 /* "rbd.pyx":3852
44289 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg)
44290 * if ret < 0:
44291 * raise make_ex(ret, "error flattening %s" % self.name) # <<<<<<<<<<<<<<
44292 *
44293 * def sparsify(self, sparse_size):
44294 */
44295 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__44295; goto __pyx_L1_error;}
44296 __Pyx_GOTREF(__pyx_t_2);
44297 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_flattening_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_flattening_s, __pyx_v_self->
name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__44297; goto __pyx_L1_error;}
44298 __Pyx_GOTREF(__pyx_t_3);
44299 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__44299; goto __pyx_L1_error;}
44300 __Pyx_GOTREF(__pyx_t_4);
44301 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
44302 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44303 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
44304 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
44305 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__44305; goto __pyx_L1_error;}
44306
44307 /* "rbd.pyx":3851
44308 * with nogil:
44309 * ret = rbd_flatten_with_progress(self.image, _prog_cb, _prog_arg)
44310 * if ret < 0: # <<<<<<<<<<<<<<
44311 * raise make_ex(ret, "error flattening %s" % self.name)
44312 *
44313 */
44314 }
44315
44316 /* "rbd.pyx":3837
44317 * return datetime.fromtimestamp(timestamp.tv_sec)
44318 *
44319 * def flatten(self, on_progress=None): # <<<<<<<<<<<<<<
44320 * """
44321 * Flatten clone image (copy all blocks from parent to child)
44322 */
44323
44324 /* function exit code */
44325 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
44326 goto __pyx_L0;
44327 __pyx_L1_error:;
44328 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
44329 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
44330 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
44331 __Pyx_AddTraceback("rbd.Image.flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
44332 __pyx_r = NULL((void*)0);
44333 __pyx_L0:;
44334 __Pyx_XGIVEREF(__pyx_r);
44335 __Pyx_RefNannyFinishContext();
44336 return __pyx_r;
44337}
44338
44339/* "rbd.pyx":3854
44340 * raise make_ex(ret, "error flattening %s" % self.name)
44341 *
44342 * def sparsify(self, sparse_size): # <<<<<<<<<<<<<<
44343 * """
44344 * Reclaim space for zeroed image extents
44345 */
44346
44347/* Python wrapper */
44348static PyObject *__pyx_pw_3rbd_5Image_109sparsify(PyObject *__pyx_v_self, PyObject *__pyx_v_sparse_size); /*proto*/
44349static char __pyx_doc_3rbd_5Image_108sparsify[] = "Image.sparsify(self, sparse_size)\n\n Reclaim space for zeroed image extents\n ";
44350static PyObject *__pyx_pw_3rbd_5Image_109sparsify(PyObject *__pyx_v_self, PyObject *__pyx_v_sparse_size) {
44351 PyObject *__pyx_r = 0;
44352 __Pyx_RefNannyDeclarations
44353 __Pyx_RefNannySetupContext("sparsify (wrapper)", 0);
44354 __pyx_r = __pyx_pf_3rbd_5Image_108sparsify(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_sparse_size));
44355
44356 /* function exit code */
44357 __Pyx_RefNannyFinishContext();
44358 return __pyx_r;
44359}
44360
44361static PyObject *__pyx_pf_3rbd_5Image_108sparsify(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_sparse_size) {
44362 size_t __pyx_v__sparse_size;
44363 int __pyx_v_ret;
44364 PyObject *__pyx_r = NULL((void*)0);
44365 __Pyx_RefNannyDeclarations
44366 size_t __pyx_t_1;
44367 int __pyx_t_2;
44368 PyObject *__pyx_t_3 = NULL((void*)0);
44369 PyObject *__pyx_t_4 = NULL((void*)0);
44370 PyObject *__pyx_t_5 = NULL((void*)0);
44371 int __pyx_lineno = 0;
44372 const char *__pyx_filename = NULL((void*)0);
44373 int __pyx_clineno = 0;
44374 __Pyx_RefNannySetupContext("sparsify", 0);
44375
44376 /* "rbd.pyx":3859
44377 * """
44378 * cdef:
44379 * size_t _sparse_size = sparse_size # <<<<<<<<<<<<<<
44380 * with nogil:
44381 * ret = rbd_sparsify(self.image, _sparse_size)
44382 */
44383 __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_sparse_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (size_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3859; __pyx_clineno = __LINE__44383; goto __pyx_L1_error;}
44384 __pyx_v__sparse_size = __pyx_t_1;
44385
44386 /* "rbd.pyx":3860
44387 * cdef:
44388 * size_t _sparse_size = sparse_size
44389 * with nogil: # <<<<<<<<<<<<<<
44390 * ret = rbd_sparsify(self.image, _sparse_size)
44391 * if ret < 0:
44392 */
44393 {
44394 #ifdef WITH_THREAD1
44395 PyThreadState *_save;
44396 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
44397 #endif
44398 /*try:*/ {
44399
44400 /* "rbd.pyx":3861
44401 * size_t _sparse_size = sparse_size
44402 * with nogil:
44403 * ret = rbd_sparsify(self.image, _sparse_size) # <<<<<<<<<<<<<<
44404 * if ret < 0:
44405 * raise make_ex(ret, "error sparsifying %s" % self.name)
44406 */
44407 __pyx_v_ret = rbd_sparsify(__pyx_v_self->image, __pyx_v__sparse_size);
44408 }
44409
44410 /* "rbd.pyx":3860
44411 * cdef:
44412 * size_t _sparse_size = sparse_size
44413 * with nogil: # <<<<<<<<<<<<<<
44414 * ret = rbd_sparsify(self.image, _sparse_size)
44415 * if ret < 0:
44416 */
44417 /*finally:*/ {
44418 /*normal exit:*/{
44419 #ifdef WITH_THREAD1
44420 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
44421 #endif
44422 goto __pyx_L5;
44423 }
44424 __pyx_L5:;
44425 }
44426 }
44427
44428 /* "rbd.pyx":3862
44429 * with nogil:
44430 * ret = rbd_sparsify(self.image, _sparse_size)
44431 * if ret < 0: # <<<<<<<<<<<<<<
44432 * raise make_ex(ret, "error sparsifying %s" % self.name)
44433 *
44434 */
44435 __pyx_t_2 = ((__pyx_v_ret < 0) != 0);
44436 if (__pyx_t_2) {
44437
44438 /* "rbd.pyx":3863
44439 * ret = rbd_sparsify(self.image, _sparse_size)
44440 * if ret < 0:
44441 * raise make_ex(ret, "error sparsifying %s" % self.name) # <<<<<<<<<<<<<<
44442 *
44443 * def rebuild_object_map(self):
44444 */
44445 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3863; __pyx_clineno = __LINE__44445; goto __pyx_L1_error;}
44446 __Pyx_GOTREF(__pyx_t_3);
44447 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_sparsifying_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_sparsifying_s, __pyx_v_self->
name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3863; __pyx_clineno = __LINE__44447; goto __pyx_L1_error;}
44448 __Pyx_GOTREF(__pyx_t_4);
44449 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3863; __pyx_clineno = __LINE__44449; goto __pyx_L1_error;}
44450 __Pyx_GOTREF(__pyx_t_5);
44451 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44452 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
44453 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
44454 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
44455 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3863; __pyx_clineno = __LINE__44455; goto __pyx_L1_error;}
44456
44457 /* "rbd.pyx":3862
44458 * with nogil:
44459 * ret = rbd_sparsify(self.image, _sparse_size)
44460 * if ret < 0: # <<<<<<<<<<<<<<
44461 * raise make_ex(ret, "error sparsifying %s" % self.name)
44462 *
44463 */
44464 }
44465
44466 /* "rbd.pyx":3854
44467 * raise make_ex(ret, "error flattening %s" % self.name)
44468 *
44469 * def sparsify(self, sparse_size): # <<<<<<<<<<<<<<
44470 * """
44471 * Reclaim space for zeroed image extents
44472 */
44473
44474 /* function exit code */
44475 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
44476 goto __pyx_L0;
44477 __pyx_L1_error:;
44478 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
44479 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
44480 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
44481 __Pyx_AddTraceback("rbd.Image.sparsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
44482 __pyx_r = NULL((void*)0);
44483 __pyx_L0:;
44484 __Pyx_XGIVEREF(__pyx_r);
44485 __Pyx_RefNannyFinishContext();
44486 return __pyx_r;
44487}
44488
44489/* "rbd.pyx":3865
44490 * raise make_ex(ret, "error sparsifying %s" % self.name)
44491 *
44492 * def rebuild_object_map(self): # <<<<<<<<<<<<<<
44493 * """
44494 * Rebuild the object map for the image HEAD or currently set snapshot
44495 */
44496
44497/* Python wrapper */
44498static PyObject *__pyx_pw_3rbd_5Image_111rebuild_object_map(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
44499static char __pyx_doc_3rbd_5Image_110rebuild_object_map[] = "Image.rebuild_object_map(self)\n\n Rebuild the object map for the image HEAD or currently set snapshot\n ";
44500static PyObject *__pyx_pw_3rbd_5Image_111rebuild_object_map(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
44501 PyObject *__pyx_r = 0;
44502 __Pyx_RefNannyDeclarations
44503 __Pyx_RefNannySetupContext("rebuild_object_map (wrapper)", 0);
44504 __pyx_r = __pyx_pf_3rbd_5Image_110rebuild_object_map(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
44505
44506 /* function exit code */
44507 __Pyx_RefNannyFinishContext();
44508 return __pyx_r;
44509}
44510
44511static PyObject *__pyx_pf_3rbd_5Image_110rebuild_object_map(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
44512 librbd_progress_fn_t __pyx_v_prog_cb;
44513 int __pyx_v_ret;
44514 PyObject *__pyx_r = NULL((void*)0);
44515 __Pyx_RefNannyDeclarations
44516 int __pyx_t_1;
44517 PyObject *__pyx_t_2 = NULL((void*)0);
44518 PyObject *__pyx_t_3 = NULL((void*)0);
44519 PyObject *__pyx_t_4 = NULL((void*)0);
44520 int __pyx_lineno = 0;
44521 const char *__pyx_filename = NULL((void*)0);
44522 int __pyx_clineno = 0;
44523 __Pyx_RefNannySetupContext("rebuild_object_map", 0);
44524
44525 /* "rbd.pyx":3869
44526 * Rebuild the object map for the image HEAD or currently set snapshot
44527 * """
44528 * cdef librbd_progress_fn_t prog_cb = &no_op_progress_callback # <<<<<<<<<<<<<<
44529 * with nogil:
44530 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL)
44531 */
44532 __pyx_v_prog_cb = (&__pyx_f_3rbd_no_op_progress_callback);
44533
44534 /* "rbd.pyx":3870
44535 * """
44536 * cdef librbd_progress_fn_t prog_cb = &no_op_progress_callback
44537 * with nogil: # <<<<<<<<<<<<<<
44538 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL)
44539 * if ret < 0:
44540 */
44541 {
44542 #ifdef WITH_THREAD1
44543 PyThreadState *_save;
44544 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
44545 #endif
44546 /*try:*/ {
44547
44548 /* "rbd.pyx":3871
44549 * cdef librbd_progress_fn_t prog_cb = &no_op_progress_callback
44550 * with nogil:
44551 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL) # <<<<<<<<<<<<<<
44552 * if ret < 0:
44553 * raise make_ex(ret, "error rebuilding object map %s" % self.name)
44554 */
44555 __pyx_v_ret = rbd_rebuild_object_map(__pyx_v_self->image, __pyx_v_prog_cb, NULL((void*)0));
44556 }
44557
44558 /* "rbd.pyx":3870
44559 * """
44560 * cdef librbd_progress_fn_t prog_cb = &no_op_progress_callback
44561 * with nogil: # <<<<<<<<<<<<<<
44562 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL)
44563 * if ret < 0:
44564 */
44565 /*finally:*/ {
44566 /*normal exit:*/{
44567 #ifdef WITH_THREAD1
44568 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
44569 #endif
44570 goto __pyx_L5;
44571 }
44572 __pyx_L5:;
44573 }
44574 }
44575
44576 /* "rbd.pyx":3872
44577 * with nogil:
44578 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL)
44579 * if ret < 0: # <<<<<<<<<<<<<<
44580 * raise make_ex(ret, "error rebuilding object map %s" % self.name)
44581 *
44582 */
44583 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
44584 if (__pyx_t_1) {
44585
44586 /* "rbd.pyx":3873
44587 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL)
44588 * if ret < 0:
44589 * raise make_ex(ret, "error rebuilding object map %s" % self.name) # <<<<<<<<<<<<<<
44590 *
44591 * def list_children(self):
44592 */
44593 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__44593; goto __pyx_L1_error;}
44594 __Pyx_GOTREF(__pyx_t_2);
44595 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_rebuilding_object_map_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_rebuilding_object_map_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__44595; goto __pyx_L1_error;}
44596 __Pyx_GOTREF(__pyx_t_3);
44597 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__44597; goto __pyx_L1_error;}
44598 __Pyx_GOTREF(__pyx_t_4);
44599 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
44600 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44601 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
44602 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
44603 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__44603; goto __pyx_L1_error;}
44604
44605 /* "rbd.pyx":3872
44606 * with nogil:
44607 * ret = rbd_rebuild_object_map(self.image, prog_cb, NULL)
44608 * if ret < 0: # <<<<<<<<<<<<<<
44609 * raise make_ex(ret, "error rebuilding object map %s" % self.name)
44610 *
44611 */
44612 }
44613
44614 /* "rbd.pyx":3865
44615 * raise make_ex(ret, "error sparsifying %s" % self.name)
44616 *
44617 * def rebuild_object_map(self): # <<<<<<<<<<<<<<
44618 * """
44619 * Rebuild the object map for the image HEAD or currently set snapshot
44620 */
44621
44622 /* function exit code */
44623 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
44624 goto __pyx_L0;
44625 __pyx_L1_error:;
44626 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
44627 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
44628 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
44629 __Pyx_AddTraceback("rbd.Image.rebuild_object_map", __pyx_clineno, __pyx_lineno, __pyx_filename);
44630 __pyx_r = NULL((void*)0);
44631 __pyx_L0:;
44632 __Pyx_XGIVEREF(__pyx_r);
44633 __Pyx_RefNannyFinishContext();
44634 return __pyx_r;
44635}
44636
44637/* "rbd.pyx":3875
44638 * raise make_ex(ret, "error rebuilding object map %s" % self.name)
44639 *
44640 * def list_children(self): # <<<<<<<<<<<<<<
44641 * """
44642 * List children of the currently set snapshot (set via set_snap()).
44643 */
44644
44645/* Python wrapper */
44646static PyObject *__pyx_pw_3rbd_5Image_113list_children(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
44647static char __pyx_doc_3rbd_5Image_112list_children[] = "Image.list_children(self)\n\n List children of the currently set snapshot (set via set_snap()).\n\n :returns: list - a list of (pool name, image name) tuples\n ";
44648static PyObject *__pyx_pw_3rbd_5Image_113list_children(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
44649 PyObject *__pyx_r = 0;
44650 __Pyx_RefNannyDeclarations
44651 __Pyx_RefNannySetupContext("list_children (wrapper)", 0);
44652 __pyx_r = __pyx_pf_3rbd_5Image_112list_children(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
44653
44654 /* function exit code */
44655 __Pyx_RefNannyFinishContext();
44656 return __pyx_r;
44657}
44658
44659static PyObject *__pyx_pf_3rbd_5Image_112list_children(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
44660 rbd_linked_image_spec_t *__pyx_v_children;
44661 size_t __pyx_v_num_children;
44662 int __pyx_v_ret;
44663 rbd_linked_image_spec_t __pyx_v_x;
44664 PyObject *__pyx_r = NULL((void*)0);
44665 __Pyx_RefNannyDeclarations
44666 void *__pyx_t_1;
44667 int __pyx_t_2;
44668 PyObject *__pyx_t_3 = NULL((void*)0);
44669 PyObject *__pyx_t_4 = NULL((void*)0);
44670 rbd_linked_image_spec_t *__pyx_t_5;
44671 rbd_linked_image_spec_t *__pyx_t_6;
44672 rbd_linked_image_spec_t *__pyx_t_7;
44673 PyObject *__pyx_t_8 = NULL((void*)0);
44674 PyObject *__pyx_t_9 = NULL((void*)0);
44675 PyObject *__pyx_t_10 = NULL((void*)0);
44676 PyObject *__pyx_t_11 = NULL((void*)0);
44677 PyObject *__pyx_t_12 = NULL((void*)0);
44678 int __pyx_t_13;
44679 int __pyx_t_14;
44680 char const *__pyx_t_15;
44681 PyObject *__pyx_t_16 = NULL((void*)0);
44682 PyObject *__pyx_t_17 = NULL((void*)0);
44683 PyObject *__pyx_t_18 = NULL((void*)0);
44684 PyObject *__pyx_t_19 = NULL((void*)0);
44685 PyObject *__pyx_t_20 = NULL((void*)0);
44686 PyObject *__pyx_t_21 = NULL((void*)0);
44687 int __pyx_lineno = 0;
44688 const char *__pyx_filename = NULL((void*)0);
44689 int __pyx_clineno = 0;
44690 __Pyx_RefNannySetupContext("list_children", 0);
44691
44692 /* "rbd.pyx":3882
44693 * """
44694 * cdef:
44695 * rbd_linked_image_spec_t *children = NULL # <<<<<<<<<<<<<<
44696 * size_t num_children = 10
44697 *
44698 */
44699 __pyx_v_children = NULL((void*)0);
44700
44701 /* "rbd.pyx":3883
44702 * cdef:
44703 * rbd_linked_image_spec_t *children = NULL
44704 * size_t num_children = 10 # <<<<<<<<<<<<<<
44705 *
44706 * try:
44707 */
44708 __pyx_v_num_children = 10;
44709
44710 /* "rbd.pyx":3885
44711 * size_t num_children = 10
44712 *
44713 * try: # <<<<<<<<<<<<<<
44714 * while True:
44715 * children = <rbd_linked_image_spec_t*>realloc_chk(
44716 */
44717 /*try:*/ {
44718
44719 /* "rbd.pyx":3886
44720 *
44721 * try:
44722 * while True: # <<<<<<<<<<<<<<
44723 * children = <rbd_linked_image_spec_t*>realloc_chk(
44724 * children, num_children * sizeof(rbd_linked_image_spec_t))
44725 */
44726 while (1) {
44727
44728 /* "rbd.pyx":3887
44729 * try:
44730 * while True:
44731 * children = <rbd_linked_image_spec_t*>realloc_chk( # <<<<<<<<<<<<<<
44732 * children, num_children * sizeof(rbd_linked_image_spec_t))
44733 * with nogil:
44734 */
44735 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_children, (__pyx_v_num_children * (sizeof(rbd_linked_image_spec_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3887; __pyx_clineno = __LINE__44735; goto __pyx_L4_error;}
44736 __pyx_v_children = ((rbd_linked_image_spec_t *)__pyx_t_1);
44737
44738 /* "rbd.pyx":3889
44739 * children = <rbd_linked_image_spec_t*>realloc_chk(
44740 * children, num_children * sizeof(rbd_linked_image_spec_t))
44741 * with nogil: # <<<<<<<<<<<<<<
44742 * ret = rbd_list_children3(self.image, children,
44743 * &num_children)
44744 */
44745 {
44746 #ifdef WITH_THREAD1
44747 PyThreadState *_save;
44748 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
44749 #endif
44750 /*try:*/ {
44751
44752 /* "rbd.pyx":3890
44753 * children, num_children * sizeof(rbd_linked_image_spec_t))
44754 * with nogil:
44755 * ret = rbd_list_children3(self.image, children, # <<<<<<<<<<<<<<
44756 * &num_children)
44757 * if ret >= 0:
44758 */
44759 __pyx_v_ret = rbd_list_children3(__pyx_v_self->image, __pyx_v_children, (&__pyx_v_num_children));
44760 }
44761
44762 /* "rbd.pyx":3889
44763 * children = <rbd_linked_image_spec_t*>realloc_chk(
44764 * children, num_children * sizeof(rbd_linked_image_spec_t))
44765 * with nogil: # <<<<<<<<<<<<<<
44766 * ret = rbd_list_children3(self.image, children,
44767 * &num_children)
44768 */
44769 /*finally:*/ {
44770 /*normal exit:*/{
44771 #ifdef WITH_THREAD1
44772 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
44773 #endif
44774 goto __pyx_L12;
44775 }
44776 __pyx_L12:;
44777 }
44778 }
44779
44780 /* "rbd.pyx":3892
44781 * ret = rbd_list_children3(self.image, children,
44782 * &num_children)
44783 * if ret >= 0: # <<<<<<<<<<<<<<
44784 * break
44785 * elif ret != -errno.ERANGE:
44786 */
44787 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
44788 if (__pyx_t_2) {
44789
44790 /* "rbd.pyx":3893
44791 * &num_children)
44792 * if ret >= 0:
44793 * break # <<<<<<<<<<<<<<
44794 * elif ret != -errno.ERANGE:
44795 * raise make_ex(ret, 'error listing children.')
44796 */
44797 goto __pyx_L7_break;
44798
44799 /* "rbd.pyx":3892
44800 * ret = rbd_list_children3(self.image, children,
44801 * &num_children)
44802 * if ret >= 0: # <<<<<<<<<<<<<<
44803 * break
44804 * elif ret != -errno.ERANGE:
44805 */
44806 }
44807
44808 /* "rbd.pyx":3894
44809 * if ret >= 0:
44810 * break
44811 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
44812 * raise make_ex(ret, 'error listing children.')
44813 *
44814 */
44815 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
44816 if (__pyx_t_2) {
44817
44818 /* "rbd.pyx":3895
44819 * break
44820 * elif ret != -errno.ERANGE:
44821 * raise make_ex(ret, 'error listing children.') # <<<<<<<<<<<<<<
44822 *
44823 * return [(decode_cstr(x.pool_name), decode_cstr(x.image_name)) for x
44824 */
44825 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3895; __pyx_clineno = __LINE__44825; goto __pyx_L4_error;}
44826 __Pyx_GOTREF(__pyx_t_3);
44827 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_listing_children, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3895; __pyx_clineno = __LINE__44827; goto __pyx_L4_error;}
44828 __Pyx_GOTREF(__pyx_t_4);
44829 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
44830 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
44831 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
44832 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3895; __pyx_clineno = __LINE__44832; goto __pyx_L4_error;}
44833
44834 /* "rbd.pyx":3894
44835 * if ret >= 0:
44836 * break
44837 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
44838 * raise make_ex(ret, 'error listing children.')
44839 *
44840 */
44841 }
44842 }
44843 __pyx_L7_break:;
44844
44845 /* "rbd.pyx":3897
44846 * raise make_ex(ret, 'error listing children.')
44847 *
44848 * return [(decode_cstr(x.pool_name), decode_cstr(x.image_name)) for x # <<<<<<<<<<<<<<
44849 * in children[:num_children] if not x.trash]
44850 * finally:
44851 */
44852 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
44853 __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44853; goto __pyx_L4_error;}
44854 __Pyx_GOTREF(__pyx_t_4);
44855
44856 /* "rbd.pyx":3898
44857 *
44858 * return [(decode_cstr(x.pool_name), decode_cstr(x.image_name)) for x
44859 * in children[:num_children] if not x.trash] # <<<<<<<<<<<<<<
44860 * finally:
44861 * if children:
44862 */
44863 __pyx_t_6 = (__pyx_v_children + __pyx_v_num_children);
44864 for (__pyx_t_7 = __pyx_v_children; __pyx_t_7 < __pyx_t_6; __pyx_t_7++) {
44865 __pyx_t_5 = __pyx_t_7;
44866 __pyx_v_x = (__pyx_t_5[0]);
44867 __pyx_t_2 = ((!(__pyx_v_x.trash != 0)) != 0);
44868 if (__pyx_t_2) {
44869
44870 /* "rbd.pyx":3897
44871 * raise make_ex(ret, 'error listing children.')
44872 *
44873 * return [(decode_cstr(x.pool_name), decode_cstr(x.image_name)) for x # <<<<<<<<<<<<<<
44874 * in children[:num_children] if not x.trash]
44875 * finally:
44876 */
44877 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44877; goto __pyx_L4_error;}
44878 __Pyx_GOTREF(__pyx_t_8);
44879 __pyx_t_9 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_x.pool_name); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44879; goto __pyx_L4_error;}
44880 __Pyx_GOTREF(__pyx_t_9);
44881 __pyx_t_10 = NULL((void*)0);
44882 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
44883 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
44884 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
44885 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
44886 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
44887 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
44888 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
44889 }
44890 }
44891 if (!__pyx_t_10) {
44892 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44892; goto __pyx_L4_error;}
44893 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
44894 __Pyx_GOTREF(__pyx_t_3);
44895 } else {
44896 __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44896; goto __pyx_L4_error;}
44897 __Pyx_GOTREF(__pyx_t_11);
44898 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
44899 __Pyx_GIVEREF(__pyx_t_9);
44900 PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_11))->ob_item[0+1] = __pyx_t_9
)
;
44901 __pyx_t_9 = 0;
44902 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44902; goto __pyx_L4_error;}
44903 __Pyx_GOTREF(__pyx_t_3);
44904 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
44905 }
44906 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
44907 __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44907; goto __pyx_L4_error;}
44908 __Pyx_GOTREF(__pyx_t_11);
44909 __pyx_t_9 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_x.image_name); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44909; goto __pyx_L4_error;}
44910 __Pyx_GOTREF(__pyx_t_9);
44911 __pyx_t_10 = NULL((void*)0);
44912 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_11))__builtin_expect(!!(((__pyx_t_11)->ob_type == &PyMethod_Type
)), 0)
) {
44913 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11)(((PyMethodObject *)__pyx_t_11) -> im_self);
44914 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
44915 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11)(((PyMethodObject *)__pyx_t_11) -> im_func);
44916 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
44917 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
44918 __Pyx_DECREF_SET(__pyx_t_11, function)do { PyObject *tmp = (PyObject *) __pyx_t_11; __pyx_t_11 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
44919 }
44920 }
44921 if (!__pyx_t_10) {
44922 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44922; goto __pyx_L4_error;}
44923 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
44924 __Pyx_GOTREF(__pyx_t_8);
44925 } else {
44926 __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)__builtin_expect(!!(!__pyx_t_12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44926; goto __pyx_L4_error;}
44927 __Pyx_GOTREF(__pyx_t_12);
44928 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_12))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
44929 __Pyx_GIVEREF(__pyx_t_9);
44930 PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_9)(((PyTupleObject *)(__pyx_t_12))->ob_item[0+1] = __pyx_t_9
)
;
44931 __pyx_t_9 = 0;
44932 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44932; goto __pyx_L4_error;}
44933 __Pyx_GOTREF(__pyx_t_8);
44934 __Pyx_DECREF(__pyx_t_12)do { if ( --((PyObject*)(__pyx_t_12))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_12)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_12)))); } while
(0)
; __pyx_t_12 = 0;
44935 }
44936 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
44937 __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)__builtin_expect(!!(!__pyx_t_11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44937; goto __pyx_L4_error;}
44938 __Pyx_GOTREF(__pyx_t_11);
44939 __Pyx_GIVEREF(__pyx_t_3);
44940 PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_11))->ob_item[0] = __pyx_t_3);
44941 __Pyx_GIVEREF(__pyx_t_8);
44942 PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_11))->ob_item[1] = __pyx_t_8);
44943 __pyx_t_3 = 0;
44944 __pyx_t_8 = 0;
44945 if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_11))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_4, (PyObject
*)__pyx_t_11)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__44945; goto __pyx_L4_error;}
44946 __Pyx_DECREF(__pyx_t_11)do { if ( --((PyObject*)(__pyx_t_11))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_11)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_11)))); } while
(0)
; __pyx_t_11 = 0;
44947
44948 /* "rbd.pyx":3898
44949 *
44950 * return [(decode_cstr(x.pool_name), decode_cstr(x.image_name)) for x
44951 * in children[:num_children] if not x.trash] # <<<<<<<<<<<<<<
44952 * finally:
44953 * if children:
44954 */
44955 }
44956 }
44957 __pyx_r = __pyx_t_4;
44958 __pyx_t_4 = 0;
44959 goto __pyx_L3_return;
44960 }
44961
44962 /* "rbd.pyx":3900
44963 * in children[:num_children] if not x.trash]
44964 * finally:
44965 * if children: # <<<<<<<<<<<<<<
44966 * rbd_linked_image_spec_list_cleanup(children, num_children)
44967 * free(children)
44968 */
44969 /*finally:*/ {
44970 /*exception exit:*/{
44971 __pyx_L4_error:;
44972 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
44973 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
44974 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
44975 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
; __pyx_t_12 = 0;
44976 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
44977 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
44978 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
44979 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
44980 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
44981 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_16, &
__pyx_t_17, &__pyx_t_18) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
44982 __Pyx_XGOTREF(__pyx_t_16);
44983 __Pyx_XGOTREF(__pyx_t_17);
44984 __Pyx_XGOTREF(__pyx_t_18);
44985 __Pyx_XGOTREF(__pyx_t_19);
44986 __Pyx_XGOTREF(__pyx_t_20);
44987 __Pyx_XGOTREF(__pyx_t_21);
44988 __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
44989 {
44990 __pyx_t_2 = (__pyx_v_children != 0);
44991 if (__pyx_t_2) {
44992
44993 /* "rbd.pyx":3901
44994 * finally:
44995 * if children:
44996 * rbd_linked_image_spec_list_cleanup(children, num_children) # <<<<<<<<<<<<<<
44997 * free(children)
44998 *
44999 */
45000 rbd_linked_image_spec_list_cleanup(__pyx_v_children, __pyx_v_num_children);
45001
45002 /* "rbd.pyx":3902
45003 * if children:
45004 * rbd_linked_image_spec_list_cleanup(children, num_children)
45005 * free(children) # <<<<<<<<<<<<<<
45006 *
45007 * def list_children2(self):
45008 */
45009 free(__pyx_v_children);
45010
45011 /* "rbd.pyx":3900
45012 * in children[:num_children] if not x.trash]
45013 * finally:
45014 * if children: # <<<<<<<<<<<<<<
45015 * rbd_linked_image_spec_list_cleanup(children, num_children)
45016 * free(children)
45017 */
45018 }
45019 }
45020 if (PY_MAJOR_VERSION2 >= 3) {
45021 __Pyx_XGIVEREF(__pyx_t_19);
45022 __Pyx_XGIVEREF(__pyx_t_20);
45023 __Pyx_XGIVEREF(__pyx_t_21);
45024 __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
45025 }
45026 __Pyx_XGIVEREF(__pyx_t_16);
45027 __Pyx_XGIVEREF(__pyx_t_17);
45028 __Pyx_XGIVEREF(__pyx_t_18);
45029 __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
45030 __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
45031 __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
45032 goto __pyx_L1_error;
45033 }
45034 __pyx_L3_return: {
45035 __pyx_t_21 = __pyx_r;
45036 __pyx_r = 0;
45037 __pyx_t_2 = (__pyx_v_children != 0);
45038 if (__pyx_t_2) {
45039
45040 /* "rbd.pyx":3901
45041 * finally:
45042 * if children:
45043 * rbd_linked_image_spec_list_cleanup(children, num_children) # <<<<<<<<<<<<<<
45044 * free(children)
45045 *
45046 */
45047 rbd_linked_image_spec_list_cleanup(__pyx_v_children, __pyx_v_num_children);
45048
45049 /* "rbd.pyx":3902
45050 * if children:
45051 * rbd_linked_image_spec_list_cleanup(children, num_children)
45052 * free(children) # <<<<<<<<<<<<<<
45053 *
45054 * def list_children2(self):
45055 */
45056 free(__pyx_v_children);
45057
45058 /* "rbd.pyx":3900
45059 * in children[:num_children] if not x.trash]
45060 * finally:
45061 * if children: # <<<<<<<<<<<<<<
45062 * rbd_linked_image_spec_list_cleanup(children, num_children)
45063 * free(children)
45064 */
45065 }
45066 __pyx_r = __pyx_t_21;
45067 __pyx_t_21 = 0;
45068 goto __pyx_L0;
45069 }
45070 }
45071
45072 /* "rbd.pyx":3875
45073 * raise make_ex(ret, "error rebuilding object map %s" % self.name)
45074 *
45075 * def list_children(self): # <<<<<<<<<<<<<<
45076 * """
45077 * List children of the currently set snapshot (set via set_snap()).
45078 */
45079
45080 /* function exit code */
45081 __pyx_L1_error:;
45082 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
45083 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
45084 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
45085 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
45086 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
45087 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
;
45088 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
;
45089 __Pyx_AddTraceback("rbd.Image.list_children", __pyx_clineno, __pyx_lineno, __pyx_filename);
45090 __pyx_r = NULL((void*)0);
45091 __pyx_L0:;
45092 __Pyx_XGIVEREF(__pyx_r);
45093 __Pyx_RefNannyFinishContext();
45094 return __pyx_r;
45095}
45096
45097/* "rbd.pyx":3904
45098 * free(children)
45099 *
45100 * def list_children2(self): # <<<<<<<<<<<<<<
45101 * """
45102 * Iterate over the children of the image or its snapshot.
45103 */
45104
45105/* Python wrapper */
45106static PyObject *__pyx_pw_3rbd_5Image_115list_children2(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
45107static char __pyx_doc_3rbd_5Image_114list_children2[] = "Image.list_children2(self)\n\n Iterate over the children of the image or its snapshot.\n\n :returns: :class:`ChildIterator`\n ";
45108static PyObject *__pyx_pw_3rbd_5Image_115list_children2(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
45109 PyObject *__pyx_r = 0;
45110 __Pyx_RefNannyDeclarations
45111 __Pyx_RefNannySetupContext("list_children2 (wrapper)", 0);
45112 __pyx_r = __pyx_pf_3rbd_5Image_114list_children2(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
45113
45114 /* function exit code */
45115 __Pyx_RefNannyFinishContext();
45116 return __pyx_r;
45117}
45118
45119static PyObject *__pyx_pf_3rbd_5Image_114list_children2(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
45120 PyObject *__pyx_r = NULL((void*)0);
45121 __Pyx_RefNannyDeclarations
45122 PyObject *__pyx_t_1 = NULL((void*)0);
45123 PyObject *__pyx_t_2 = NULL((void*)0);
45124 int __pyx_lineno = 0;
45125 const char *__pyx_filename = NULL((void*)0);
45126 int __pyx_clineno = 0;
45127 __Pyx_RefNannySetupContext("list_children2", 0);
45128
45129 /* "rbd.pyx":3910
45130 * :returns: :class:`ChildIterator`
45131 * """
45132 * return ChildIterator(self) # <<<<<<<<<<<<<<
45133 *
45134 * def list_descendants(self):
45135 */
45136 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
45137 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__45137; goto __pyx_L1_error;}
45138 __Pyx_GOTREF(__pyx_t_1);
45139 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
45140 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
45141 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
45142 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_ChildIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__45142; goto __pyx_L1_error;}
45143 __Pyx_GOTREF(__pyx_t_2);
45144 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
45145 __pyx_r = __pyx_t_2;
45146 __pyx_t_2 = 0;
45147 goto __pyx_L0;
45148
45149 /* "rbd.pyx":3904
45150 * free(children)
45151 *
45152 * def list_children2(self): # <<<<<<<<<<<<<<
45153 * """
45154 * Iterate over the children of the image or its snapshot.
45155 */
45156
45157 /* function exit code */
45158 __pyx_L1_error:;
45159 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
45160 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
45161 __Pyx_AddTraceback("rbd.Image.list_children2", __pyx_clineno, __pyx_lineno, __pyx_filename);
45162 __pyx_r = NULL((void*)0);
45163 __pyx_L0:;
45164 __Pyx_XGIVEREF(__pyx_r);
45165 __Pyx_RefNannyFinishContext();
45166 return __pyx_r;
45167}
45168
45169/* "rbd.pyx":3912
45170 * return ChildIterator(self)
45171 *
45172 * def list_descendants(self): # <<<<<<<<<<<<<<
45173 * """
45174 * Iterate over the descendants of the image.
45175 */
45176
45177/* Python wrapper */
45178static PyObject *__pyx_pw_3rbd_5Image_117list_descendants(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
45179static char __pyx_doc_3rbd_5Image_116list_descendants[] = "Image.list_descendants(self)\n\n Iterate over the descendants of the image.\n\n :returns: :class:`ChildIterator`\n ";
45180static PyObject *__pyx_pw_3rbd_5Image_117list_descendants(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
45181 PyObject *__pyx_r = 0;
45182 __Pyx_RefNannyDeclarations
45183 __Pyx_RefNannySetupContext("list_descendants (wrapper)", 0);
45184 __pyx_r = __pyx_pf_3rbd_5Image_116list_descendants(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
45185
45186 /* function exit code */
45187 __Pyx_RefNannyFinishContext();
45188 return __pyx_r;
45189}
45190
45191static PyObject *__pyx_pf_3rbd_5Image_116list_descendants(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
45192 PyObject *__pyx_r = NULL((void*)0);
45193 __Pyx_RefNannyDeclarations
45194 PyObject *__pyx_t_1 = NULL((void*)0);
45195 PyObject *__pyx_t_2 = NULL((void*)0);
45196 int __pyx_lineno = 0;
45197 const char *__pyx_filename = NULL((void*)0);
45198 int __pyx_clineno = 0;
45199 __Pyx_RefNannySetupContext("list_descendants", 0);
45200
45201 /* "rbd.pyx":3918
45202 * :returns: :class:`ChildIterator`
45203 * """
45204 * return ChildIterator(self, True) # <<<<<<<<<<<<<<
45205 *
45206 * def list_lockers(self):
45207 */
45208 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
45209 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3918; __pyx_clineno = __LINE__45209; goto __pyx_L1_error;}
45210 __Pyx_GOTREF(__pyx_t_1);
45211 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
45212 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
45213 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
45214 __Pyx_INCREF(Py_True)( ((PyObject*)(((PyObject *) &_Py_TrueStruct)))->ob_refcnt
++)
;
45215 __Pyx_GIVEREF(Py_True);
45216 PyTuple_SET_ITEM(__pyx_t_1, 1, Py_True)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = ((PyObject *
) &_Py_TrueStruct))
;
45217 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_ChildIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3918; __pyx_clineno = __LINE__45217; goto __pyx_L1_error;}
45218 __Pyx_GOTREF(__pyx_t_2);
45219 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
45220 __pyx_r = __pyx_t_2;
45221 __pyx_t_2 = 0;
45222 goto __pyx_L0;
45223
45224 /* "rbd.pyx":3912
45225 * return ChildIterator(self)
45226 *
45227 * def list_descendants(self): # <<<<<<<<<<<<<<
45228 * """
45229 * Iterate over the descendants of the image.
45230 */
45231
45232 /* function exit code */
45233 __pyx_L1_error:;
45234 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
45235 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
45236 __Pyx_AddTraceback("rbd.Image.list_descendants", __pyx_clineno, __pyx_lineno, __pyx_filename);
45237 __pyx_r = NULL((void*)0);
45238 __pyx_L0:;
45239 __Pyx_XGIVEREF(__pyx_r);
45240 __Pyx_RefNannyFinishContext();
45241 return __pyx_r;
45242}
45243
45244/* "rbd.pyx":3920
45245 * return ChildIterator(self, True)
45246 *
45247 * def list_lockers(self): # <<<<<<<<<<<<<<
45248 * """
45249 * List clients that have locked the image and information
45250 */
45251
45252/* Python wrapper */
45253static PyObject *__pyx_pw_3rbd_5Image_119list_lockers(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
45254static char __pyx_doc_3rbd_5Image_118list_lockers[] = "Image.list_lockers(self)\n\n List clients that have locked the image and information\n about the lock.\n\n :returns: dict - contains the following keys:\n\n * ``tag`` - the tag associated with the lock (every\n additional locker must use the same tag)\n * ``exclusive`` - boolean indicating whether the\n lock is exclusive or shared\n * ``lockers`` - a list of (client, cookie, address)\n tuples\n ";
45255static PyObject *__pyx_pw_3rbd_5Image_119list_lockers(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
45256 PyObject *__pyx_r = 0;
45257 __Pyx_RefNannyDeclarations
45258 __Pyx_RefNannySetupContext("list_lockers (wrapper)", 0);
45259 __pyx_r = __pyx_pf_3rbd_5Image_118list_lockers(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
45260
45261 /* function exit code */
45262 __Pyx_RefNannyFinishContext();
45263 return __pyx_r;
45264}
45265
45266static PyObject *__pyx_pf_3rbd_5Image_118list_lockers(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
45267 size_t __pyx_v_clients_size;
45268 size_t __pyx_v_cookies_size;
45269 size_t __pyx_v_addrs_size;
45270 size_t __pyx_v_tag_size;
45271 int __pyx_v_exclusive;
45272 char *__pyx_v_c_clients;
45273 char *__pyx_v_c_cookies;
45274 char *__pyx_v_c_addrs;
45275 char *__pyx_v_c_tag;
45276 Py_ssize_t __pyx_v_ret;
45277 PyObject *__pyx_v_clients = NULL((void*)0);
45278 PyObject *__pyx_v_cookies = NULL((void*)0);
45279 PyObject *__pyx_v_addrs = NULL((void*)0);
45280 PyObject *__pyx_r = NULL((void*)0);
45281 __Pyx_RefNannyDeclarations
45282 void *__pyx_t_1;
45283 int __pyx_t_2;
45284 PyObject *__pyx_t_3 = NULL((void*)0);
45285 PyObject *__pyx_t_4 = NULL((void*)0);
45286 PyObject *__pyx_t_5 = NULL((void*)0);
45287 PyObject *__pyx_t_6 = NULL((void*)0);
45288 PyObject *__pyx_t_7 = NULL((void*)0);
45289 PyObject *__pyx_t_8 = NULL((void*)0);
45290 int __pyx_t_9;
45291 int __pyx_t_10;
45292 char const *__pyx_t_11;
45293 PyObject *__pyx_t_12 = NULL((void*)0);
45294 PyObject *__pyx_t_13 = NULL((void*)0);
45295 PyObject *__pyx_t_14 = NULL((void*)0);
45296 PyObject *__pyx_t_15 = NULL((void*)0);
45297 PyObject *__pyx_t_16 = NULL((void*)0);
45298 PyObject *__pyx_t_17 = NULL((void*)0);
45299 int __pyx_lineno = 0;
45300 const char *__pyx_filename = NULL((void*)0);
45301 int __pyx_clineno = 0;
45302 __Pyx_RefNannySetupContext("list_lockers", 0);
45303
45304 /* "rbd.pyx":3935
45305 * """
45306 * cdef:
45307 * size_t clients_size = 512, cookies_size = 512 # <<<<<<<<<<<<<<
45308 * size_t addrs_size = 512, tag_size = 512
45309 * int exclusive = 0
45310 */
45311 __pyx_v_clients_size = 0x200;
45312 __pyx_v_cookies_size = 0x200;
45313
45314 /* "rbd.pyx":3936
45315 * cdef:
45316 * size_t clients_size = 512, cookies_size = 512
45317 * size_t addrs_size = 512, tag_size = 512 # <<<<<<<<<<<<<<
45318 * int exclusive = 0
45319 * char *c_clients = NULL
45320 */
45321 __pyx_v_addrs_size = 0x200;
45322 __pyx_v_tag_size = 0x200;
45323
45324 /* "rbd.pyx":3937
45325 * size_t clients_size = 512, cookies_size = 512
45326 * size_t addrs_size = 512, tag_size = 512
45327 * int exclusive = 0 # <<<<<<<<<<<<<<
45328 * char *c_clients = NULL
45329 * char *c_cookies = NULL
45330 */
45331 __pyx_v_exclusive = 0;
45332
45333 /* "rbd.pyx":3938
45334 * size_t addrs_size = 512, tag_size = 512
45335 * int exclusive = 0
45336 * char *c_clients = NULL # <<<<<<<<<<<<<<
45337 * char *c_cookies = NULL
45338 * char *c_addrs = NULL
45339 */
45340 __pyx_v_c_clients = NULL((void*)0);
45341
45342 /* "rbd.pyx":3939
45343 * int exclusive = 0
45344 * char *c_clients = NULL
45345 * char *c_cookies = NULL # <<<<<<<<<<<<<<
45346 * char *c_addrs = NULL
45347 * char *c_tag = NULL
45348 */
45349 __pyx_v_c_cookies = NULL((void*)0);
45350
45351 /* "rbd.pyx":3940
45352 * char *c_clients = NULL
45353 * char *c_cookies = NULL
45354 * char *c_addrs = NULL # <<<<<<<<<<<<<<
45355 * char *c_tag = NULL
45356 *
45357 */
45358 __pyx_v_c_addrs = NULL((void*)0);
45359
45360 /* "rbd.pyx":3941
45361 * char *c_cookies = NULL
45362 * char *c_addrs = NULL
45363 * char *c_tag = NULL # <<<<<<<<<<<<<<
45364 *
45365 * try:
45366 */
45367 __pyx_v_c_tag = NULL((void*)0);
45368
45369 /* "rbd.pyx":3943
45370 * char *c_tag = NULL
45371 *
45372 * try: # <<<<<<<<<<<<<<
45373 * while True:
45374 * c_clients = <char *>realloc_chk(c_clients, clients_size)
45375 */
45376 /*try:*/ {
45377
45378 /* "rbd.pyx":3944
45379 *
45380 * try:
45381 * while True: # <<<<<<<<<<<<<<
45382 * c_clients = <char *>realloc_chk(c_clients, clients_size)
45383 * c_cookies = <char *>realloc_chk(c_cookies, cookies_size)
45384 */
45385 while (1) {
45386
45387 /* "rbd.pyx":3945
45388 * try:
45389 * while True:
45390 * c_clients = <char *>realloc_chk(c_clients, clients_size) # <<<<<<<<<<<<<<
45391 * c_cookies = <char *>realloc_chk(c_cookies, cookies_size)
45392 * c_addrs = <char *>realloc_chk(c_addrs, addrs_size)
45393 */
45394 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_clients, __pyx_v_clients_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __pyx_clineno = __LINE__45394; goto __pyx_L4_error;}
45395 __pyx_v_c_clients = ((char *)__pyx_t_1);
45396
45397 /* "rbd.pyx":3946
45398 * while True:
45399 * c_clients = <char *>realloc_chk(c_clients, clients_size)
45400 * c_cookies = <char *>realloc_chk(c_cookies, cookies_size) # <<<<<<<<<<<<<<
45401 * c_addrs = <char *>realloc_chk(c_addrs, addrs_size)
45402 * c_tag = <char *>realloc_chk(c_tag, tag_size)
45403 */
45404 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_cookies, __pyx_v_cookies_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3946; __pyx_clineno = __LINE__45404; goto __pyx_L4_error;}
45405 __pyx_v_c_cookies = ((char *)__pyx_t_1);
45406
45407 /* "rbd.pyx":3947
45408 * c_clients = <char *>realloc_chk(c_clients, clients_size)
45409 * c_cookies = <char *>realloc_chk(c_cookies, cookies_size)
45410 * c_addrs = <char *>realloc_chk(c_addrs, addrs_size) # <<<<<<<<<<<<<<
45411 * c_tag = <char *>realloc_chk(c_tag, tag_size)
45412 * with nogil:
45413 */
45414 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_addrs, __pyx_v_addrs_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3947; __pyx_clineno = __LINE__45414; goto __pyx_L4_error;}
45415 __pyx_v_c_addrs = ((char *)__pyx_t_1);
45416
45417 /* "rbd.pyx":3948
45418 * c_cookies = <char *>realloc_chk(c_cookies, cookies_size)
45419 * c_addrs = <char *>realloc_chk(c_addrs, addrs_size)
45420 * c_tag = <char *>realloc_chk(c_tag, tag_size) # <<<<<<<<<<<<<<
45421 * with nogil:
45422 * ret = rbd_list_lockers(self.image, &exclusive,
45423 */
45424 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_tag, __pyx_v_tag_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3948; __pyx_clineno = __LINE__45424; goto __pyx_L4_error;}
45425 __pyx_v_c_tag = ((char *)__pyx_t_1);
45426
45427 /* "rbd.pyx":3949
45428 * c_addrs = <char *>realloc_chk(c_addrs, addrs_size)
45429 * c_tag = <char *>realloc_chk(c_tag, tag_size)
45430 * with nogil: # <<<<<<<<<<<<<<
45431 * ret = rbd_list_lockers(self.image, &exclusive,
45432 * c_tag, &tag_size,
45433 */
45434 {
45435 #ifdef WITH_THREAD1
45436 PyThreadState *_save;
45437 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
45438 #endif
45439 /*try:*/ {
45440
45441 /* "rbd.pyx":3950
45442 * c_tag = <char *>realloc_chk(c_tag, tag_size)
45443 * with nogil:
45444 * ret = rbd_list_lockers(self.image, &exclusive, # <<<<<<<<<<<<<<
45445 * c_tag, &tag_size,
45446 * c_clients, &clients_size,
45447 */
45448 __pyx_v_ret = rbd_list_lockers(__pyx_v_self->image, (&__pyx_v_exclusive), __pyx_v_c_tag, (&__pyx_v_tag_size), __pyx_v_c_clients, (&__pyx_v_clients_size), __pyx_v_c_cookies, (&__pyx_v_cookies_size), __pyx_v_c_addrs, (&__pyx_v_addrs_size));
45449 }
45450
45451 /* "rbd.pyx":3949
45452 * c_addrs = <char *>realloc_chk(c_addrs, addrs_size)
45453 * c_tag = <char *>realloc_chk(c_tag, tag_size)
45454 * with nogil: # <<<<<<<<<<<<<<
45455 * ret = rbd_list_lockers(self.image, &exclusive,
45456 * c_tag, &tag_size,
45457 */
45458 /*finally:*/ {
45459 /*normal exit:*/{
45460 #ifdef WITH_THREAD1
45461 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
45462 #endif
45463 goto __pyx_L12;
45464 }
45465 __pyx_L12:;
45466 }
45467 }
45468
45469 /* "rbd.pyx":3955
45470 * c_cookies, &cookies_size,
45471 * c_addrs, &addrs_size)
45472 * if ret >= 0: # <<<<<<<<<<<<<<
45473 * break
45474 * elif ret != -errno.ERANGE:
45475 */
45476 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
45477 if (__pyx_t_2) {
45478
45479 /* "rbd.pyx":3956
45480 * c_addrs, &addrs_size)
45481 * if ret >= 0:
45482 * break # <<<<<<<<<<<<<<
45483 * elif ret != -errno.ERANGE:
45484 * raise make_ex(ret, 'error listing images')
45485 */
45486 goto __pyx_L7_break;
45487
45488 /* "rbd.pyx":3955
45489 * c_cookies, &cookies_size,
45490 * c_addrs, &addrs_size)
45491 * if ret >= 0: # <<<<<<<<<<<<<<
45492 * break
45493 * elif ret != -errno.ERANGE:
45494 */
45495 }
45496
45497 /* "rbd.pyx":3957
45498 * if ret >= 0:
45499 * break
45500 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
45501 * raise make_ex(ret, 'error listing images')
45502 * if ret == 0:
45503 */
45504 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
45505 if (__pyx_t_2) {
45506
45507 /* "rbd.pyx":3958
45508 * break
45509 * elif ret != -errno.ERANGE:
45510 * raise make_ex(ret, 'error listing images') # <<<<<<<<<<<<<<
45511 * if ret == 0:
45512 * return []
45513 */
45514 __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3958; __pyx_clineno = __LINE__45514; goto __pyx_L4_error;}
45515 __Pyx_GOTREF(__pyx_t_3);
45516 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_listing_images, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3958; __pyx_clineno = __LINE__45516; goto __pyx_L4_error;}
45517 __Pyx_GOTREF(__pyx_t_4);
45518 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45519 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
45520 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
45521 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3958; __pyx_clineno = __LINE__45521; goto __pyx_L4_error;}
45522
45523 /* "rbd.pyx":3957
45524 * if ret >= 0:
45525 * break
45526 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
45527 * raise make_ex(ret, 'error listing images')
45528 * if ret == 0:
45529 */
45530 }
45531 }
45532 __pyx_L7_break:;
45533
45534 /* "rbd.pyx":3959
45535 * elif ret != -errno.ERANGE:
45536 * raise make_ex(ret, 'error listing images')
45537 * if ret == 0: # <<<<<<<<<<<<<<
45538 * return []
45539 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
45540 */
45541 __pyx_t_2 = ((__pyx_v_ret == 0) != 0);
45542 if (__pyx_t_2) {
45543
45544 /* "rbd.pyx":3960
45545 * raise make_ex(ret, 'error listing images')
45546 * if ret == 0:
45547 * return [] # <<<<<<<<<<<<<<
45548 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
45549 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
45550 */
45551 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
45552 __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3960; __pyx_clineno = __LINE__45552; goto __pyx_L4_error;}
45553 __Pyx_GOTREF(__pyx_t_4);
45554 __pyx_r = __pyx_t_4;
45555 __pyx_t_4 = 0;
45556 goto __pyx_L3_return;
45557
45558 /* "rbd.pyx":3959
45559 * elif ret != -errno.ERANGE:
45560 * raise make_ex(ret, 'error listing images')
45561 * if ret == 0: # <<<<<<<<<<<<<<
45562 * return []
45563 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
45564 */
45565 }
45566
45567 /* "rbd.pyx":3961
45568 * if ret == 0:
45569 * return []
45570 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0')) # <<<<<<<<<<<<<<
45571 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
45572 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
45573 */
45574 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__45574; goto __pyx_L4_error;}
45575 __Pyx_GOTREF(__pyx_t_4);
45576 __pyx_t_3 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_clients + 0, (__pyx_v_clients_size - 1) - 0); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__45576; goto __pyx_L4_error;}
45577 __Pyx_GOTREF(__pyx_t_3);
45578 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__45578; goto __pyx_L4_error;}
45579 __Pyx_GOTREF(__pyx_t_5);
45580 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45581 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__20, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__45581; goto __pyx_L4_error;}
45582 __Pyx_GOTREF(__pyx_t_3);
45583 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
45584 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__45584; goto __pyx_L4_error;}
45585 __Pyx_GOTREF(__pyx_t_5);
45586 __Pyx_GIVEREF(__pyx_t_4);
45587 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_4);
45588 __Pyx_GIVEREF(__pyx_t_3);
45589 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_t_3);
45590 __pyx_t_4 = 0;
45591 __pyx_t_3 = 0;
45592 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__45592; goto __pyx_L4_error;}
45593 __Pyx_GOTREF(__pyx_t_3);
45594 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
45595 __pyx_v_clients = __pyx_t_3;
45596 __pyx_t_3 = 0;
45597
45598 /* "rbd.pyx":3962
45599 * return []
45600 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
45601 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0')) # <<<<<<<<<<<<<<
45602 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
45603 * return {
45604 */
45605 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__45605; goto __pyx_L4_error;}
45606 __Pyx_GOTREF(__pyx_t_3);
45607 __pyx_t_5 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_cookies + 0, (__pyx_v_cookies_size - 1) - 0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__45607; goto __pyx_L4_error;}
45608 __Pyx_GOTREF(__pyx_t_5);
45609 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__45609; goto __pyx_L4_error;}
45610 __Pyx_GOTREF(__pyx_t_4);
45611 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
45612 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__21, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__45612; goto __pyx_L4_error;}
45613 __Pyx_GOTREF(__pyx_t_5);
45614 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
45615 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__45615; goto __pyx_L4_error;}
45616 __Pyx_GOTREF(__pyx_t_4);
45617 __Pyx_GIVEREF(__pyx_t_3);
45618 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_3);
45619 __Pyx_GIVEREF(__pyx_t_5);
45620 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_t_5);
45621 __pyx_t_3 = 0;
45622 __pyx_t_5 = 0;
45623 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__45623; goto __pyx_L4_error;}
45624 __Pyx_GOTREF(__pyx_t_5);
45625 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
45626 __pyx_v_cookies = __pyx_t_5;
45627 __pyx_t_5 = 0;
45628
45629 /* "rbd.pyx":3963
45630 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
45631 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
45632 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0')) # <<<<<<<<<<<<<<
45633 * return {
45634 * 'tag' : decode_cstr(c_tag),
45635 */
45636 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__45636; goto __pyx_L4_error;}
45637 __Pyx_GOTREF(__pyx_t_5);
45638 __pyx_t_4 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_addrs + 0, (__pyx_v_addrs_size - 1) - 0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__45638; goto __pyx_L4_error;}
45639 __Pyx_GOTREF(__pyx_t_4);
45640 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__45640; goto __pyx_L4_error;}
45641 __Pyx_GOTREF(__pyx_t_3);
45642 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
45643 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__22, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__45643; goto __pyx_L4_error;}
45644 __Pyx_GOTREF(__pyx_t_4);
45645 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45646 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__45646; goto __pyx_L4_error;}
45647 __Pyx_GOTREF(__pyx_t_3);
45648 __Pyx_GIVEREF(__pyx_t_5);
45649 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5);
45650 __Pyx_GIVEREF(__pyx_t_4);
45651 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_t_4);
45652 __pyx_t_5 = 0;
45653 __pyx_t_4 = 0;
45654 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__45654; goto __pyx_L4_error;}
45655 __Pyx_GOTREF(__pyx_t_4);
45656 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45657 __pyx_v_addrs = __pyx_t_4;
45658 __pyx_t_4 = 0;
45659
45660 /* "rbd.pyx":3964
45661 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
45662 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
45663 * return { # <<<<<<<<<<<<<<
45664 * 'tag' : decode_cstr(c_tag),
45665 * 'exclusive' : exclusive == 1,
45666 */
45667 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
45668
45669 /* "rbd.pyx":3965
45670 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
45671 * return {
45672 * 'tag' : decode_cstr(c_tag), # <<<<<<<<<<<<<<
45673 * 'exclusive' : exclusive == 1,
45674 * 'lockers' : list(zip(clients, cookies, addrs)),
45675 */
45676 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45676; goto __pyx_L4_error;}
45677 __Pyx_GOTREF(__pyx_t_4);
45678 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45678; goto __pyx_L4_error;}
45679 __Pyx_GOTREF(__pyx_t_5);
45680 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_tag); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45680; goto __pyx_L4_error;}
45681 __Pyx_GOTREF(__pyx_t_6);
45682 __pyx_t_7 = NULL((void*)0);
45683 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
45684 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
45685 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
45686 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
45687 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
45688 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
45689 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
45690 }
45691 }
45692 if (!__pyx_t_7) {
45693 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45693; goto __pyx_L4_error;}
45694 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
45695 __Pyx_GOTREF(__pyx_t_3);
45696 } else {
45697 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45697; goto __pyx_L4_error;}
45698 __Pyx_GOTREF(__pyx_t_8);
45699 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
45700 __Pyx_GIVEREF(__pyx_t_6);
45701 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
45702 __pyx_t_6 = 0;
45703 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45703; goto __pyx_L4_error;}
45704 __Pyx_GOTREF(__pyx_t_3);
45705 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
45706 }
45707 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
45708 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tag, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45708; goto __pyx_L4_error;}
45709 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45710
45711 /* "rbd.pyx":3966
45712 * return {
45713 * 'tag' : decode_cstr(c_tag),
45714 * 'exclusive' : exclusive == 1, # <<<<<<<<<<<<<<
45715 * 'lockers' : list(zip(clients, cookies, addrs)),
45716 * }
45717 */
45718 __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_exclusive == 1))(((__pyx_v_exclusive == 1)) ? (( ((PyObject*)(((PyObject *) &
_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct
)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->
ob_refcnt++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3966; __pyx_clineno = __LINE__45718; goto __pyx_L4_error;}
45719 __Pyx_GOTREF(__pyx_t_3);
45720 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_exclusive, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45720; goto __pyx_L4_error;}
45721 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45722
45723 /* "rbd.pyx":3967
45724 * 'tag' : decode_cstr(c_tag),
45725 * 'exclusive' : exclusive == 1,
45726 * 'lockers' : list(zip(clients, cookies, addrs)), # <<<<<<<<<<<<<<
45727 * }
45728 * finally:
45729 */
45730 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3967; __pyx_clineno = __LINE__45730; goto __pyx_L4_error;}
45731 __Pyx_GOTREF(__pyx_t_3);
45732 __Pyx_INCREF(__pyx_v_clients)( ((PyObject*)(__pyx_v_clients))->ob_refcnt++);
45733 __Pyx_GIVEREF(__pyx_v_clients);
45734 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_clients)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_v_clients
)
;
45735 __Pyx_INCREF(__pyx_v_cookies)( ((PyObject*)(__pyx_v_cookies))->ob_refcnt++);
45736 __Pyx_GIVEREF(__pyx_v_cookies);
45737 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cookies)(((PyTupleObject *)(__pyx_t_3))->ob_item[1] = __pyx_v_cookies
)
;
45738 __Pyx_INCREF(__pyx_v_addrs)( ((PyObject*)(__pyx_v_addrs))->ob_refcnt++);
45739 __Pyx_GIVEREF(__pyx_v_addrs);
45740 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_addrs)(((PyTupleObject *)(__pyx_t_3))->ob_item[2] = __pyx_v_addrs
)
;
45741 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3967; __pyx_clineno = __LINE__45741; goto __pyx_L4_error;}
45742 __Pyx_GOTREF(__pyx_t_5);
45743 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45744 __pyx_t_3 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3967; __pyx_clineno = __LINE__45744; goto __pyx_L4_error;}
45745 __Pyx_GOTREF(__pyx_t_3);
45746 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
45747 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_lockers, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3965; __pyx_clineno = __LINE__45747; goto __pyx_L4_error;}
45748 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
45749 __pyx_r = __pyx_t_4;
45750 __pyx_t_4 = 0;
45751 goto __pyx_L3_return;
45752 }
45753
45754 /* "rbd.pyx":3970
45755 * }
45756 * finally:
45757 * free(c_clients) # <<<<<<<<<<<<<<
45758 * free(c_cookies)
45759 * free(c_addrs)
45760 */
45761 /*finally:*/ {
45762 /*exception exit:*/{
45763 __pyx_L4_error:;
45764 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
45765 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
45766 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
45767 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
45768 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
45769 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
45770 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
45771 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
45772 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_12, &
__pyx_t_13, &__pyx_t_14) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
45773 __Pyx_XGOTREF(__pyx_t_12);
45774 __Pyx_XGOTREF(__pyx_t_13);
45775 __Pyx_XGOTREF(__pyx_t_14);
45776 __Pyx_XGOTREF(__pyx_t_15);
45777 __Pyx_XGOTREF(__pyx_t_16);
45778 __Pyx_XGOTREF(__pyx_t_17);
45779 __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
45780 {
45781 free(__pyx_v_c_clients);
45782
45783 /* "rbd.pyx":3971
45784 * finally:
45785 * free(c_clients)
45786 * free(c_cookies) # <<<<<<<<<<<<<<
45787 * free(c_addrs)
45788 * free(c_tag)
45789 */
45790 free(__pyx_v_c_cookies);
45791
45792 /* "rbd.pyx":3972
45793 * free(c_clients)
45794 * free(c_cookies)
45795 * free(c_addrs) # <<<<<<<<<<<<<<
45796 * free(c_tag)
45797 *
45798 */
45799 free(__pyx_v_c_addrs);
45800
45801 /* "rbd.pyx":3973
45802 * free(c_cookies)
45803 * free(c_addrs)
45804 * free(c_tag) # <<<<<<<<<<<<<<
45805 *
45806 * def lock_acquire(self, lock_mode):
45807 */
45808 free(__pyx_v_c_tag);
45809 }
45810 if (PY_MAJOR_VERSION2 >= 3) {
45811 __Pyx_XGIVEREF(__pyx_t_15);
45812 __Pyx_XGIVEREF(__pyx_t_16);
45813 __Pyx_XGIVEREF(__pyx_t_17);
45814 __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
45815 }
45816 __Pyx_XGIVEREF(__pyx_t_12);
45817 __Pyx_XGIVEREF(__pyx_t_13);
45818 __Pyx_XGIVEREF(__pyx_t_14);
45819 __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
45820 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
45821 __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
45822 goto __pyx_L1_error;
45823 }
45824 __pyx_L3_return: {
45825 __pyx_t_17 = __pyx_r;
45826 __pyx_r = 0;
45827
45828 /* "rbd.pyx":3970
45829 * }
45830 * finally:
45831 * free(c_clients) # <<<<<<<<<<<<<<
45832 * free(c_cookies)
45833 * free(c_addrs)
45834 */
45835 free(__pyx_v_c_clients);
45836
45837 /* "rbd.pyx":3971
45838 * finally:
45839 * free(c_clients)
45840 * free(c_cookies) # <<<<<<<<<<<<<<
45841 * free(c_addrs)
45842 * free(c_tag)
45843 */
45844 free(__pyx_v_c_cookies);
45845
45846 /* "rbd.pyx":3972
45847 * free(c_clients)
45848 * free(c_cookies)
45849 * free(c_addrs) # <<<<<<<<<<<<<<
45850 * free(c_tag)
45851 *
45852 */
45853 free(__pyx_v_c_addrs);
45854
45855 /* "rbd.pyx":3973
45856 * free(c_cookies)
45857 * free(c_addrs)
45858 * free(c_tag) # <<<<<<<<<<<<<<
45859 *
45860 * def lock_acquire(self, lock_mode):
45861 */
45862 free(__pyx_v_c_tag);
45863 __pyx_r = __pyx_t_17;
45864 __pyx_t_17 = 0;
45865 goto __pyx_L0;
45866 }
45867 }
45868
45869 /* "rbd.pyx":3920
45870 * return ChildIterator(self, True)
45871 *
45872 * def list_lockers(self): # <<<<<<<<<<<<<<
45873 * """
45874 * List clients that have locked the image and information
45875 */
45876
45877 /* function exit code */
45878 __pyx_L1_error:;
45879 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
45880 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
45881 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
45882 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
45883 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
45884 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
45885 __Pyx_AddTraceback("rbd.Image.list_lockers", __pyx_clineno, __pyx_lineno, __pyx_filename);
45886 __pyx_r = NULL((void*)0);
45887 __pyx_L0:;
45888 __Pyx_XDECREF(__pyx_v_clients)do { if ((__pyx_v_clients) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_clients))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_clients)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_clients)))); } while
(0); } while (0)
;
45889 __Pyx_XDECREF(__pyx_v_cookies)do { if ((__pyx_v_cookies) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_cookies))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(__pyx_v_cookies)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cookies)))); } while
(0); } while (0)
;
45890 __Pyx_XDECREF(__pyx_v_addrs)do { if ((__pyx_v_addrs) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_addrs))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_addrs)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_addrs)))); } while (0); }
while (0)
;
45891 __Pyx_XGIVEREF(__pyx_r);
45892 __Pyx_RefNannyFinishContext();
45893 return __pyx_r;
45894}
45895
45896/* "rbd.pyx":3975
45897 * free(c_tag)
45898 *
45899 * def lock_acquire(self, lock_mode): # <<<<<<<<<<<<<<
45900 * """
45901 * Acquire a managed lock on the image.
45902 */
45903
45904/* Python wrapper */
45905static PyObject *__pyx_pw_3rbd_5Image_121lock_acquire(PyObject *__pyx_v_self, PyObject *__pyx_v_lock_mode); /*proto*/
45906static char __pyx_doc_3rbd_5Image_120lock_acquire[] = "Image.lock_acquire(self, lock_mode)\n\n Acquire a managed lock on the image.\n\n :param lock_mode: lock mode to set\n :type lock_mode: int\n :raises: :class:`ImageBusy` if the lock could not be acquired\n ";
45907static PyObject *__pyx_pw_3rbd_5Image_121lock_acquire(PyObject *__pyx_v_self, PyObject *__pyx_v_lock_mode) {
45908 PyObject *__pyx_r = 0;
45909 __Pyx_RefNannyDeclarations
45910 __Pyx_RefNannySetupContext("lock_acquire (wrapper)", 0);
45911 __pyx_r = __pyx_pf_3rbd_5Image_120lock_acquire(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_lock_mode));
45912
45913 /* function exit code */
45914 __Pyx_RefNannyFinishContext();
45915 return __pyx_r;
45916}
45917
45918static PyObject *__pyx_pf_3rbd_5Image_120lock_acquire(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_lock_mode) {
45919 rbd_lock_mode_t __pyx_v__lock_mode;
45920 int __pyx_v_ret;
45921 PyObject *__pyx_r = NULL((void*)0);
45922 __Pyx_RefNannyDeclarations
45923 rbd_lock_mode_t __pyx_t_1;
45924 int __pyx_t_2;
45925 PyObject *__pyx_t_3 = NULL((void*)0);
45926 PyObject *__pyx_t_4 = NULL((void*)0);
45927 int __pyx_lineno = 0;
45928 const char *__pyx_filename = NULL((void*)0);
45929 int __pyx_clineno = 0;
45930 __Pyx_RefNannySetupContext("lock_acquire", 0);
45931
45932 /* "rbd.pyx":3984
45933 * """
45934 * cdef:
45935 * rbd_lock_mode_t _lock_mode = lock_mode # <<<<<<<<<<<<<<
45936 * with nogil:
45937 * ret = rbd_lock_acquire(self.image, _lock_mode)
45938 */
45939 __pyx_t_1 = ((rbd_lock_mode_t)__Pyx_PyInt_As_rbd_lock_mode_t(__pyx_v_lock_mode)); if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3984; __pyx_clineno = __LINE__45939; goto __pyx_L1_error;}
45940 __pyx_v__lock_mode = __pyx_t_1;
45941
45942 /* "rbd.pyx":3985
45943 * cdef:
45944 * rbd_lock_mode_t _lock_mode = lock_mode
45945 * with nogil: # <<<<<<<<<<<<<<
45946 * ret = rbd_lock_acquire(self.image, _lock_mode)
45947 * if ret < 0:
45948 */
45949 {
45950 #ifdef WITH_THREAD1
45951 PyThreadState *_save;
45952 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
45953 #endif
45954 /*try:*/ {
45955
45956 /* "rbd.pyx":3986
45957 * rbd_lock_mode_t _lock_mode = lock_mode
45958 * with nogil:
45959 * ret = rbd_lock_acquire(self.image, _lock_mode) # <<<<<<<<<<<<<<
45960 * if ret < 0:
45961 * raise make_ex(ret, 'error acquiring lock on image')
45962 */
45963 __pyx_v_ret = rbd_lock_acquire(__pyx_v_self->image, __pyx_v__lock_mode);
45964 }
45965
45966 /* "rbd.pyx":3985
45967 * cdef:
45968 * rbd_lock_mode_t _lock_mode = lock_mode
45969 * with nogil: # <<<<<<<<<<<<<<
45970 * ret = rbd_lock_acquire(self.image, _lock_mode)
45971 * if ret < 0:
45972 */
45973 /*finally:*/ {
45974 /*normal exit:*/{
45975 #ifdef WITH_THREAD1
45976 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
45977 #endif
45978 goto __pyx_L5;
45979 }
45980 __pyx_L5:;
45981 }
45982 }
45983
45984 /* "rbd.pyx":3987
45985 * with nogil:
45986 * ret = rbd_lock_acquire(self.image, _lock_mode)
45987 * if ret < 0: # <<<<<<<<<<<<<<
45988 * raise make_ex(ret, 'error acquiring lock on image')
45989 *
45990 */
45991 __pyx_t_2 = ((__pyx_v_ret < 0) != 0);
45992 if (__pyx_t_2) {
45993
45994 /* "rbd.pyx":3988
45995 * ret = rbd_lock_acquire(self.image, _lock_mode)
45996 * if ret < 0:
45997 * raise make_ex(ret, 'error acquiring lock on image') # <<<<<<<<<<<<<<
45998 *
45999 * def lock_release(self):
46000 */
46001 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__46001; goto __pyx_L1_error;}
46002 __Pyx_GOTREF(__pyx_t_3);
46003 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_acquiring_lock_on_image, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__46003; goto __pyx_L1_error;}
46004 __Pyx_GOTREF(__pyx_t_4);
46005 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
46006 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
46007 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
46008 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__46008; goto __pyx_L1_error;}
46009
46010 /* "rbd.pyx":3987
46011 * with nogil:
46012 * ret = rbd_lock_acquire(self.image, _lock_mode)
46013 * if ret < 0: # <<<<<<<<<<<<<<
46014 * raise make_ex(ret, 'error acquiring lock on image')
46015 *
46016 */
46017 }
46018
46019 /* "rbd.pyx":3975
46020 * free(c_tag)
46021 *
46022 * def lock_acquire(self, lock_mode): # <<<<<<<<<<<<<<
46023 * """
46024 * Acquire a managed lock on the image.
46025 */
46026
46027 /* function exit code */
46028 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
46029 goto __pyx_L0;
46030 __pyx_L1_error:;
46031 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
46032 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
46033 __Pyx_AddTraceback("rbd.Image.lock_acquire", __pyx_clineno, __pyx_lineno, __pyx_filename);
46034 __pyx_r = NULL((void*)0);
46035 __pyx_L0:;
46036 __Pyx_XGIVEREF(__pyx_r);
46037 __Pyx_RefNannyFinishContext();
46038 return __pyx_r;
46039}
46040
46041/* "rbd.pyx":3990
46042 * raise make_ex(ret, 'error acquiring lock on image')
46043 *
46044 * def lock_release(self): # <<<<<<<<<<<<<<
46045 * """
46046 * Release a managed lock on the image that was previously acquired.
46047 */
46048
46049/* Python wrapper */
46050static PyObject *__pyx_pw_3rbd_5Image_123lock_release(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
46051static char __pyx_doc_3rbd_5Image_122lock_release[] = "Image.lock_release(self)\n\n Release a managed lock on the image that was previously acquired.\n ";
46052static PyObject *__pyx_pw_3rbd_5Image_123lock_release(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
46053 PyObject *__pyx_r = 0;
46054 __Pyx_RefNannyDeclarations
46055 __Pyx_RefNannySetupContext("lock_release (wrapper)", 0);
46056 __pyx_r = __pyx_pf_3rbd_5Image_122lock_release(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
46057
46058 /* function exit code */
46059 __Pyx_RefNannyFinishContext();
46060 return __pyx_r;
46061}
46062
46063static PyObject *__pyx_pf_3rbd_5Image_122lock_release(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
46064 int __pyx_v_ret;
46065 PyObject *__pyx_r = NULL((void*)0);
46066 __Pyx_RefNannyDeclarations
46067 int __pyx_t_1;
46068 PyObject *__pyx_t_2 = NULL((void*)0);
46069 PyObject *__pyx_t_3 = NULL((void*)0);
46070 int __pyx_lineno = 0;
46071 const char *__pyx_filename = NULL((void*)0);
46072 int __pyx_clineno = 0;
46073 __Pyx_RefNannySetupContext("lock_release", 0);
46074
46075 /* "rbd.pyx":3994
46076 * Release a managed lock on the image that was previously acquired.
46077 * """
46078 * with nogil: # <<<<<<<<<<<<<<
46079 * ret = rbd_lock_release(self.image)
46080 * if ret < 0:
46081 */
46082 {
46083 #ifdef WITH_THREAD1
46084 PyThreadState *_save;
46085 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
46086 #endif
46087 /*try:*/ {
46088
46089 /* "rbd.pyx":3995
46090 * """
46091 * with nogil:
46092 * ret = rbd_lock_release(self.image) # <<<<<<<<<<<<<<
46093 * if ret < 0:
46094 * raise make_ex(ret, 'error releasing lock on image')
46095 */
46096 __pyx_v_ret = rbd_lock_release(__pyx_v_self->image);
46097 }
46098
46099 /* "rbd.pyx":3994
46100 * Release a managed lock on the image that was previously acquired.
46101 * """
46102 * with nogil: # <<<<<<<<<<<<<<
46103 * ret = rbd_lock_release(self.image)
46104 * if ret < 0:
46105 */
46106 /*finally:*/ {
46107 /*normal exit:*/{
46108 #ifdef WITH_THREAD1
46109 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
46110 #endif
46111 goto __pyx_L5;
46112 }
46113 __pyx_L5:;
46114 }
46115 }
46116
46117 /* "rbd.pyx":3996
46118 * with nogil:
46119 * ret = rbd_lock_release(self.image)
46120 * if ret < 0: # <<<<<<<<<<<<<<
46121 * raise make_ex(ret, 'error releasing lock on image')
46122 *
46123 */
46124 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
46125 if (__pyx_t_1) {
46126
46127 /* "rbd.pyx":3997
46128 * ret = rbd_lock_release(self.image)
46129 * if ret < 0:
46130 * raise make_ex(ret, 'error releasing lock on image') # <<<<<<<<<<<<<<
46131 *
46132 * def lock_get_owners(self):
46133 */
46134 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3997; __pyx_clineno = __LINE__46134; goto __pyx_L1_error;}
46135 __Pyx_GOTREF(__pyx_t_2);
46136 __pyx_t_3 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_kp_s_error_releasing_lock_on_image, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3997; __pyx_clineno = __LINE__46136; goto __pyx_L1_error;}
46137 __Pyx_GOTREF(__pyx_t_3);
46138 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46139 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
46140 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
46141 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3997; __pyx_clineno = __LINE__46141; goto __pyx_L1_error;}
46142
46143 /* "rbd.pyx":3996
46144 * with nogil:
46145 * ret = rbd_lock_release(self.image)
46146 * if ret < 0: # <<<<<<<<<<<<<<
46147 * raise make_ex(ret, 'error releasing lock on image')
46148 *
46149 */
46150 }
46151
46152 /* "rbd.pyx":3990
46153 * raise make_ex(ret, 'error acquiring lock on image')
46154 *
46155 * def lock_release(self): # <<<<<<<<<<<<<<
46156 * """
46157 * Release a managed lock on the image that was previously acquired.
46158 */
46159
46160 /* function exit code */
46161 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
46162 goto __pyx_L0;
46163 __pyx_L1_error:;
46164 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
46165 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
46166 __Pyx_AddTraceback("rbd.Image.lock_release", __pyx_clineno, __pyx_lineno, __pyx_filename);
46167 __pyx_r = NULL((void*)0);
46168 __pyx_L0:;
46169 __Pyx_XGIVEREF(__pyx_r);
46170 __Pyx_RefNannyFinishContext();
46171 return __pyx_r;
46172}
46173
46174/* "rbd.pyx":3999
46175 * raise make_ex(ret, 'error releasing lock on image')
46176 *
46177 * def lock_get_owners(self): # <<<<<<<<<<<<<<
46178 * """
46179 * Iterate over the lock owners of an image.
46180 */
46181
46182/* Python wrapper */
46183static PyObject *__pyx_pw_3rbd_5Image_125lock_get_owners(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
46184static char __pyx_doc_3rbd_5Image_124lock_get_owners[] = "Image.lock_get_owners(self)\n\n Iterate over the lock owners of an image.\n\n :returns: :class:`LockOwnerIterator`\n ";
46185static PyObject *__pyx_pw_3rbd_5Image_125lock_get_owners(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
46186 PyObject *__pyx_r = 0;
46187 __Pyx_RefNannyDeclarations
46188 __Pyx_RefNannySetupContext("lock_get_owners (wrapper)", 0);
46189 __pyx_r = __pyx_pf_3rbd_5Image_124lock_get_owners(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
46190
46191 /* function exit code */
46192 __Pyx_RefNannyFinishContext();
46193 return __pyx_r;
46194}
46195
46196static PyObject *__pyx_pf_3rbd_5Image_124lock_get_owners(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
46197 PyObject *__pyx_r = NULL((void*)0);
46198 __Pyx_RefNannyDeclarations
46199 PyObject *__pyx_t_1 = NULL((void*)0);
46200 PyObject *__pyx_t_2 = NULL((void*)0);
46201 int __pyx_lineno = 0;
46202 const char *__pyx_filename = NULL((void*)0);
46203 int __pyx_clineno = 0;
46204 __Pyx_RefNannySetupContext("lock_get_owners", 0);
46205
46206 /* "rbd.pyx":4005
46207 * :returns: :class:`LockOwnerIterator`
46208 * """
46209 * return LockOwnerIterator(self) # <<<<<<<<<<<<<<
46210 *
46211 * def lock_break(self, lock_mode, lock_owner):
46212 */
46213 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
46214 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __pyx_clineno = __LINE__46214; goto __pyx_L1_error;}
46215 __Pyx_GOTREF(__pyx_t_1);
46216 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
46217 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
46218 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
46219 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_LockOwnerIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __pyx_clineno = __LINE__46219; goto __pyx_L1_error;}
46220 __Pyx_GOTREF(__pyx_t_2);
46221 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
46222 __pyx_r = __pyx_t_2;
46223 __pyx_t_2 = 0;
46224 goto __pyx_L0;
46225
46226 /* "rbd.pyx":3999
46227 * raise make_ex(ret, 'error releasing lock on image')
46228 *
46229 * def lock_get_owners(self): # <<<<<<<<<<<<<<
46230 * """
46231 * Iterate over the lock owners of an image.
46232 */
46233
46234 /* function exit code */
46235 __pyx_L1_error:;
46236 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
46237 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
46238 __Pyx_AddTraceback("rbd.Image.lock_get_owners", __pyx_clineno, __pyx_lineno, __pyx_filename);
46239 __pyx_r = NULL((void*)0);
46240 __pyx_L0:;
46241 __Pyx_XGIVEREF(__pyx_r);
46242 __Pyx_RefNannyFinishContext();
46243 return __pyx_r;
46244}
46245
46246/* "rbd.pyx":4007
46247 * return LockOwnerIterator(self)
46248 *
46249 * def lock_break(self, lock_mode, lock_owner): # <<<<<<<<<<<<<<
46250 * """
46251 * Break the image lock held by a another client.
46252 */
46253
46254/* Python wrapper */
46255static PyObject *__pyx_pw_3rbd_5Image_127lock_break(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
46256static char __pyx_doc_3rbd_5Image_126lock_break[] = "Image.lock_break(self, lock_mode, lock_owner)\n\n Break the image lock held by a another client.\n\n :param lock_owner: the owner of the lock to break\n :type lock_owner: str\n ";
46257static PyObject *__pyx_pw_3rbd_5Image_127lock_break(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
46258 PyObject *__pyx_v_lock_mode = 0;
46259 PyObject *__pyx_v_lock_owner = 0;
46260 int __pyx_lineno = 0;
46261 const char *__pyx_filename = NULL((void*)0);
46262 int __pyx_clineno = 0;
46263 PyObject *__pyx_r = 0;
46264 __Pyx_RefNannyDeclarations
46265 __Pyx_RefNannySetupContext("lock_break (wrapper)", 0);
46266 {
46267 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lock_mode,&__pyx_n_s_lock_owner,0};
46268 PyObject* values[2] = {0,0};
46269 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
46270 Py_ssize_t kw_args;
46271 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
46272 switch (pos_args) {
46273 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
46274 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
46275 case 0: break;
46276 default: goto __pyx_L5_argtuple_error;
46277 }
46278 kw_args = PyDict_Size(__pyx_kwds);
46279 switch (pos_args) {
46280 case 0:
46281 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lock_mode)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lock_mode
)) != 0), 1)
) kw_args--;
46282 else goto __pyx_L5_argtuple_error;
46283 case 1:
46284 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lock_owner)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lock_owner
)) != 0), 1)
) kw_args--;
46285 else {
46286 __Pyx_RaiseArgtupleInvalid("lock_break", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__46286; goto __pyx_L3_error;}
46287 }
46288 }
46289 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
46290 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lock_break") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "lock_break") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__46290; goto __pyx_L3_error;}
46291 }
46292 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
46293 goto __pyx_L5_argtuple_error;
46294 } else {
46295 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
46296 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
46297 }
46298 __pyx_v_lock_mode = values[0];
46299 __pyx_v_lock_owner = values[1];
46300 }
46301 goto __pyx_L4_argument_unpacking_done;
46302 __pyx_L5_argtuple_error:;
46303 __Pyx_RaiseArgtupleInvalid("lock_break", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__46303; goto __pyx_L3_error;}
46304 __pyx_L3_error:;
46305 __Pyx_AddTraceback("rbd.Image.lock_break", __pyx_clineno, __pyx_lineno, __pyx_filename);
46306 __Pyx_RefNannyFinishContext();
46307 return NULL((void*)0);
46308 __pyx_L4_argument_unpacking_done:;
46309 __pyx_r = __pyx_pf_3rbd_5Image_126lock_break(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_lock_mode, __pyx_v_lock_owner);
46310
46311 /* function exit code */
46312 __Pyx_RefNannyFinishContext();
46313 return __pyx_r;
46314}
46315
46316static PyObject *__pyx_pf_3rbd_5Image_126lock_break(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_lock_mode, PyObject *__pyx_v_lock_owner) {
46317 rbd_lock_mode_t __pyx_v__lock_mode;
46318 char *__pyx_v__lock_owner;
46319 int __pyx_v_ret;
46320 PyObject *__pyx_r = NULL((void*)0);
46321 __Pyx_RefNannyDeclarations
46322 PyObject *__pyx_t_1 = NULL((void*)0);
46323 PyObject *__pyx_t_2 = NULL((void*)0);
46324 PyObject *__pyx_t_3 = NULL((void*)0);
46325 Py_ssize_t __pyx_t_4;
46326 PyObject *__pyx_t_5 = NULL((void*)0);
46327 rbd_lock_mode_t __pyx_t_6;
46328 char *__pyx_t_7;
46329 int __pyx_t_8;
46330 int __pyx_lineno = 0;
46331 const char *__pyx_filename = NULL((void*)0);
46332 int __pyx_clineno = 0;
46333 __Pyx_RefNannySetupContext("lock_break", 0);
46334 __Pyx_INCREF(__pyx_v_lock_owner)( ((PyObject*)(__pyx_v_lock_owner))->ob_refcnt++);
46335
46336 /* "rbd.pyx":4014
46337 * :type lock_owner: str
46338 * """
46339 * lock_owner = cstr(lock_owner, 'lock_owner') # <<<<<<<<<<<<<<
46340 * cdef:
46341 * rbd_lock_mode_t _lock_mode = lock_mode
46342 */
46343 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4014; __pyx_clineno = __LINE__46343; goto __pyx_L1_error;}
46344 __Pyx_GOTREF(__pyx_t_2);
46345 __pyx_t_3 = NULL((void*)0);
46346 __pyx_t_4 = 0;
46347 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
46348 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
46349 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
46350 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
46351 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
46352 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
46353 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
46354 __pyx_t_4 = 1;
46355 }
46356 }
46357 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4014; __pyx_clineno = __LINE__46357; goto __pyx_L1_error;}
46358 __Pyx_GOTREF(__pyx_t_5);
46359 if (__pyx_t_3) {
46360 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
46361 }
46362 __Pyx_INCREF(__pyx_v_lock_owner)( ((PyObject*)(__pyx_v_lock_owner))->ob_refcnt++);
46363 __Pyx_GIVEREF(__pyx_v_lock_owner);
46364 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_lock_owner)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_lock_owner
)
;
46365 __Pyx_INCREF(__pyx_n_s_lock_owner)( ((PyObject*)(__pyx_n_s_lock_owner))->ob_refcnt++);
46366 __Pyx_GIVEREF(__pyx_n_s_lock_owner);
46367 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_lock_owner)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_lock_owner
)
;
46368 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4014; __pyx_clineno = __LINE__46368; goto __pyx_L1_error;}
46369 __Pyx_GOTREF(__pyx_t_1);
46370 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
46371 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46372 __Pyx_DECREF_SET(__pyx_v_lock_owner, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_lock_owner; __pyx_v_lock_owner
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
46373 __pyx_t_1 = 0;
46374
46375 /* "rbd.pyx":4016
46376 * lock_owner = cstr(lock_owner, 'lock_owner')
46377 * cdef:
46378 * rbd_lock_mode_t _lock_mode = lock_mode # <<<<<<<<<<<<<<
46379 * char *_lock_owner = lock_owner
46380 * with nogil:
46381 */
46382 __pyx_t_6 = ((rbd_lock_mode_t)__Pyx_PyInt_As_rbd_lock_mode_t(__pyx_v_lock_mode)); if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4016; __pyx_clineno = __LINE__46382; goto __pyx_L1_error;}
46383 __pyx_v__lock_mode = __pyx_t_6;
46384
46385 /* "rbd.pyx":4017
46386 * cdef:
46387 * rbd_lock_mode_t _lock_mode = lock_mode
46388 * char *_lock_owner = lock_owner # <<<<<<<<<<<<<<
46389 * with nogil:
46390 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner)
46391 */
46392 __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_lock_owner); if (unlikely((!__pyx_t_7) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_7) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4017; __pyx_clineno = __LINE__46392; goto __pyx_L1_error;}
46393 __pyx_v__lock_owner = __pyx_t_7;
46394
46395 /* "rbd.pyx":4018
46396 * rbd_lock_mode_t _lock_mode = lock_mode
46397 * char *_lock_owner = lock_owner
46398 * with nogil: # <<<<<<<<<<<<<<
46399 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner)
46400 * if ret < 0:
46401 */
46402 {
46403 #ifdef WITH_THREAD1
46404 PyThreadState *_save;
46405 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
46406 #endif
46407 /*try:*/ {
46408
46409 /* "rbd.pyx":4019
46410 * char *_lock_owner = lock_owner
46411 * with nogil:
46412 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner) # <<<<<<<<<<<<<<
46413 * if ret < 0:
46414 * raise make_ex(ret, 'error breaking lock on image')
46415 */
46416 __pyx_v_ret = rbd_lock_break(__pyx_v_self->image, __pyx_v__lock_mode, __pyx_v__lock_owner);
46417 }
46418
46419 /* "rbd.pyx":4018
46420 * rbd_lock_mode_t _lock_mode = lock_mode
46421 * char *_lock_owner = lock_owner
46422 * with nogil: # <<<<<<<<<<<<<<
46423 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner)
46424 * if ret < 0:
46425 */
46426 /*finally:*/ {
46427 /*normal exit:*/{
46428 #ifdef WITH_THREAD1
46429 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
46430 #endif
46431 goto __pyx_L5;
46432 }
46433 __pyx_L5:;
46434 }
46435 }
46436
46437 /* "rbd.pyx":4020
46438 * with nogil:
46439 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner)
46440 * if ret < 0: # <<<<<<<<<<<<<<
46441 * raise make_ex(ret, 'error breaking lock on image')
46442 *
46443 */
46444 __pyx_t_8 = ((__pyx_v_ret < 0) != 0);
46445 if (__pyx_t_8) {
46446
46447 /* "rbd.pyx":4021
46448 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner)
46449 * if ret < 0:
46450 * raise make_ex(ret, 'error breaking lock on image') # <<<<<<<<<<<<<<
46451 *
46452 * def lock_exclusive(self, cookie):
46453 */
46454 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__46454; goto __pyx_L1_error;}
46455 __Pyx_GOTREF(__pyx_t_1);
46456 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_breaking_lock_on_image, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__46456; goto __pyx_L1_error;}
46457 __Pyx_GOTREF(__pyx_t_2);
46458 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
46459 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
46460 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46461 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__46461; goto __pyx_L1_error;}
46462
46463 /* "rbd.pyx":4020
46464 * with nogil:
46465 * ret = rbd_lock_break(self.image, _lock_mode, _lock_owner)
46466 * if ret < 0: # <<<<<<<<<<<<<<
46467 * raise make_ex(ret, 'error breaking lock on image')
46468 *
46469 */
46470 }
46471
46472 /* "rbd.pyx":4007
46473 * return LockOwnerIterator(self)
46474 *
46475 * def lock_break(self, lock_mode, lock_owner): # <<<<<<<<<<<<<<
46476 * """
46477 * Break the image lock held by a another client.
46478 */
46479
46480 /* function exit code */
46481 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
46482 goto __pyx_L0;
46483 __pyx_L1_error:;
46484 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
46485 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
46486 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
46487 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
46488 __Pyx_AddTraceback("rbd.Image.lock_break", __pyx_clineno, __pyx_lineno, __pyx_filename);
46489 __pyx_r = NULL((void*)0);
46490 __pyx_L0:;
46491 __Pyx_XDECREF(__pyx_v_lock_owner)do { if ((__pyx_v_lock_owner) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_lock_owner))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_lock_owner)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_lock_owner
)))); } while (0); } while (0)
;
46492 __Pyx_XGIVEREF(__pyx_r);
46493 __Pyx_RefNannyFinishContext();
46494 return __pyx_r;
46495}
46496
46497/* "rbd.pyx":4023
46498 * raise make_ex(ret, 'error breaking lock on image')
46499 *
46500 * def lock_exclusive(self, cookie): # <<<<<<<<<<<<<<
46501 * """
46502 * Take an exclusive lock on the image.
46503 */
46504
46505/* Python wrapper */
46506static PyObject *__pyx_pw_3rbd_5Image_129lock_exclusive(PyObject *__pyx_v_self, PyObject *__pyx_v_cookie); /*proto*/
46507static char __pyx_doc_3rbd_5Image_128lock_exclusive[] = "Image.lock_exclusive(self, cookie)\n\n Take an exclusive lock on the image.\n\n :raises: :class:`ImageBusy` if a different client or cookie locked it\n :class:`ImageExists` if the same client and cookie locked it\n ";
46508static PyObject *__pyx_pw_3rbd_5Image_129lock_exclusive(PyObject *__pyx_v_self, PyObject *__pyx_v_cookie) {
46509 PyObject *__pyx_r = 0;
46510 __Pyx_RefNannyDeclarations
46511 __Pyx_RefNannySetupContext("lock_exclusive (wrapper)", 0);
46512 __pyx_r = __pyx_pf_3rbd_5Image_128lock_exclusive(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_cookie));
46513
46514 /* function exit code */
46515 __Pyx_RefNannyFinishContext();
46516 return __pyx_r;
46517}
46518
46519static PyObject *__pyx_pf_3rbd_5Image_128lock_exclusive(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_cookie) {
46520 char *__pyx_v__cookie;
46521 int __pyx_v_ret;
46522 PyObject *__pyx_r = NULL((void*)0);
46523 __Pyx_RefNannyDeclarations
46524 PyObject *__pyx_t_1 = NULL((void*)0);
46525 PyObject *__pyx_t_2 = NULL((void*)0);
46526 PyObject *__pyx_t_3 = NULL((void*)0);
46527 Py_ssize_t __pyx_t_4;
46528 PyObject *__pyx_t_5 = NULL((void*)0);
46529 char *__pyx_t_6;
46530 int __pyx_t_7;
46531 int __pyx_lineno = 0;
46532 const char *__pyx_filename = NULL((void*)0);
46533 int __pyx_clineno = 0;
46534 __Pyx_RefNannySetupContext("lock_exclusive", 0);
46535 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
46536
46537 /* "rbd.pyx":4030
46538 * :class:`ImageExists` if the same client and cookie locked it
46539 * """
46540 * cookie = cstr(cookie, 'cookie') # <<<<<<<<<<<<<<
46541 * cdef char *_cookie = cookie
46542 * with nogil:
46543 */
46544 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4030; __pyx_clineno = __LINE__46544; goto __pyx_L1_error;}
46545 __Pyx_GOTREF(__pyx_t_2);
46546 __pyx_t_3 = NULL((void*)0);
46547 __pyx_t_4 = 0;
46548 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
46549 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
46550 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
46551 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
46552 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
46553 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
46554 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
46555 __pyx_t_4 = 1;
46556 }
46557 }
46558 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4030; __pyx_clineno = __LINE__46558; goto __pyx_L1_error;}
46559 __Pyx_GOTREF(__pyx_t_5);
46560 if (__pyx_t_3) {
46561 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
46562 }
46563 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
46564 __Pyx_GIVEREF(__pyx_v_cookie);
46565 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_cookie)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_cookie
)
;
46566 __Pyx_INCREF(__pyx_n_s_cookie)( ((PyObject*)(__pyx_n_s_cookie))->ob_refcnt++);
46567 __Pyx_GIVEREF(__pyx_n_s_cookie);
46568 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_cookie)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_cookie
)
;
46569 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4030; __pyx_clineno = __LINE__46569; goto __pyx_L1_error;}
46570 __Pyx_GOTREF(__pyx_t_1);
46571 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
46572 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46573 __Pyx_DECREF_SET(__pyx_v_cookie, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cookie; __pyx_v_cookie
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
46574 __pyx_t_1 = 0;
46575
46576 /* "rbd.pyx":4031
46577 * """
46578 * cookie = cstr(cookie, 'cookie')
46579 * cdef char *_cookie = cookie # <<<<<<<<<<<<<<
46580 * with nogil:
46581 * ret = rbd_lock_exclusive(self.image, _cookie)
46582 */
46583 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_cookie); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4031; __pyx_clineno = __LINE__46583; goto __pyx_L1_error;}
46584 __pyx_v__cookie = __pyx_t_6;
46585
46586 /* "rbd.pyx":4032
46587 * cookie = cstr(cookie, 'cookie')
46588 * cdef char *_cookie = cookie
46589 * with nogil: # <<<<<<<<<<<<<<
46590 * ret = rbd_lock_exclusive(self.image, _cookie)
46591 * if ret < 0:
46592 */
46593 {
46594 #ifdef WITH_THREAD1
46595 PyThreadState *_save;
46596 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
46597 #endif
46598 /*try:*/ {
46599
46600 /* "rbd.pyx":4033
46601 * cdef char *_cookie = cookie
46602 * with nogil:
46603 * ret = rbd_lock_exclusive(self.image, _cookie) # <<<<<<<<<<<<<<
46604 * if ret < 0:
46605 * raise make_ex(ret, 'error acquiring exclusive lock on image')
46606 */
46607 __pyx_v_ret = rbd_lock_exclusive(__pyx_v_self->image, __pyx_v__cookie);
46608 }
46609
46610 /* "rbd.pyx":4032
46611 * cookie = cstr(cookie, 'cookie')
46612 * cdef char *_cookie = cookie
46613 * with nogil: # <<<<<<<<<<<<<<
46614 * ret = rbd_lock_exclusive(self.image, _cookie)
46615 * if ret < 0:
46616 */
46617 /*finally:*/ {
46618 /*normal exit:*/{
46619 #ifdef WITH_THREAD1
46620 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
46621 #endif
46622 goto __pyx_L5;
46623 }
46624 __pyx_L5:;
46625 }
46626 }
46627
46628 /* "rbd.pyx":4034
46629 * with nogil:
46630 * ret = rbd_lock_exclusive(self.image, _cookie)
46631 * if ret < 0: # <<<<<<<<<<<<<<
46632 * raise make_ex(ret, 'error acquiring exclusive lock on image')
46633 *
46634 */
46635 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
46636 if (__pyx_t_7) {
46637
46638 /* "rbd.pyx":4035
46639 * ret = rbd_lock_exclusive(self.image, _cookie)
46640 * if ret < 0:
46641 * raise make_ex(ret, 'error acquiring exclusive lock on image') # <<<<<<<<<<<<<<
46642 *
46643 * def lock_shared(self, cookie, tag):
46644 */
46645 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4035; __pyx_clineno = __LINE__46645; goto __pyx_L1_error;}
46646 __Pyx_GOTREF(__pyx_t_1);
46647 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_acquiring_exclusive_lock_o, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4035; __pyx_clineno = __LINE__46647; goto __pyx_L1_error;}
46648 __Pyx_GOTREF(__pyx_t_2);
46649 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
46650 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
46651 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46652 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4035; __pyx_clineno = __LINE__46652; goto __pyx_L1_error;}
46653
46654 /* "rbd.pyx":4034
46655 * with nogil:
46656 * ret = rbd_lock_exclusive(self.image, _cookie)
46657 * if ret < 0: # <<<<<<<<<<<<<<
46658 * raise make_ex(ret, 'error acquiring exclusive lock on image')
46659 *
46660 */
46661 }
46662
46663 /* "rbd.pyx":4023
46664 * raise make_ex(ret, 'error breaking lock on image')
46665 *
46666 * def lock_exclusive(self, cookie): # <<<<<<<<<<<<<<
46667 * """
46668 * Take an exclusive lock on the image.
46669 */
46670
46671 /* function exit code */
46672 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
46673 goto __pyx_L0;
46674 __pyx_L1_error:;
46675 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
46676 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
46677 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
46678 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
46679 __Pyx_AddTraceback("rbd.Image.lock_exclusive", __pyx_clineno, __pyx_lineno, __pyx_filename);
46680 __pyx_r = NULL((void*)0);
46681 __pyx_L0:;
46682 __Pyx_XDECREF(__pyx_v_cookie)do { if ((__pyx_v_cookie) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_cookie))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_cookie)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cookie)))); } while
(0); } while (0)
;
46683 __Pyx_XGIVEREF(__pyx_r);
46684 __Pyx_RefNannyFinishContext();
46685 return __pyx_r;
46686}
46687
46688/* "rbd.pyx":4037
46689 * raise make_ex(ret, 'error acquiring exclusive lock on image')
46690 *
46691 * def lock_shared(self, cookie, tag): # <<<<<<<<<<<<<<
46692 * """
46693 * Take a shared lock on the image. The tag must match
46694 */
46695
46696/* Python wrapper */
46697static PyObject *__pyx_pw_3rbd_5Image_131lock_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
46698static char __pyx_doc_3rbd_5Image_130lock_shared[] = "Image.lock_shared(self, cookie, tag)\n\n Take a shared lock on the image. The tag must match\n that of the existing lockers, if any.\n\n :raises: :class:`ImageBusy` if a different client or cookie locked it\n :class:`ImageExists` if the same client and cookie locked it\n ";
46699static PyObject *__pyx_pw_3rbd_5Image_131lock_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
46700 PyObject *__pyx_v_cookie = 0;
46701 PyObject *__pyx_v_tag = 0;
46702 int __pyx_lineno = 0;
46703 const char *__pyx_filename = NULL((void*)0);
46704 int __pyx_clineno = 0;
46705 PyObject *__pyx_r = 0;
46706 __Pyx_RefNannyDeclarations
46707 __Pyx_RefNannySetupContext("lock_shared (wrapper)", 0);
46708 {
46709 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cookie,&__pyx_n_s_tag,0};
46710 PyObject* values[2] = {0,0};
46711 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
46712 Py_ssize_t kw_args;
46713 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
46714 switch (pos_args) {
46715 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
46716 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
46717 case 0: break;
46718 default: goto __pyx_L5_argtuple_error;
46719 }
46720 kw_args = PyDict_Size(__pyx_kwds);
46721 switch (pos_args) {
46722 case 0:
46723 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cookie)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cookie
)) != 0), 1)
) kw_args--;
46724 else goto __pyx_L5_argtuple_error;
46725 case 1:
46726 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tag)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tag
)) != 0), 1)
) kw_args--;
46727 else {
46728 __Pyx_RaiseArgtupleInvalid("lock_shared", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __pyx_clineno = __LINE__46728; goto __pyx_L3_error;}
46729 }
46730 }
46731 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
46732 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lock_shared") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "lock_shared") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __pyx_clineno = __LINE__46732; goto __pyx_L3_error;}
46733 }
46734 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
46735 goto __pyx_L5_argtuple_error;
46736 } else {
46737 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
46738 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
46739 }
46740 __pyx_v_cookie = values[0];
46741 __pyx_v_tag = values[1];
46742 }
46743 goto __pyx_L4_argument_unpacking_done;
46744 __pyx_L5_argtuple_error:;
46745 __Pyx_RaiseArgtupleInvalid("lock_shared", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __pyx_clineno = __LINE__46745; goto __pyx_L3_error;}
46746 __pyx_L3_error:;
46747 __Pyx_AddTraceback("rbd.Image.lock_shared", __pyx_clineno, __pyx_lineno, __pyx_filename);
46748 __Pyx_RefNannyFinishContext();
46749 return NULL((void*)0);
46750 __pyx_L4_argument_unpacking_done:;
46751 __pyx_r = __pyx_pf_3rbd_5Image_130lock_shared(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_cookie, __pyx_v_tag);
46752
46753 /* function exit code */
46754 __Pyx_RefNannyFinishContext();
46755 return __pyx_r;
46756}
46757
46758static PyObject *__pyx_pf_3rbd_5Image_130lock_shared(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_cookie, PyObject *__pyx_v_tag) {
46759 char *__pyx_v__cookie;
46760 char *__pyx_v__tag;
46761 int __pyx_v_ret;
46762 PyObject *__pyx_r = NULL((void*)0);
46763 __Pyx_RefNannyDeclarations
46764 PyObject *__pyx_t_1 = NULL((void*)0);
46765 PyObject *__pyx_t_2 = NULL((void*)0);
46766 PyObject *__pyx_t_3 = NULL((void*)0);
46767 Py_ssize_t __pyx_t_4;
46768 PyObject *__pyx_t_5 = NULL((void*)0);
46769 char *__pyx_t_6;
46770 int __pyx_t_7;
46771 int __pyx_lineno = 0;
46772 const char *__pyx_filename = NULL((void*)0);
46773 int __pyx_clineno = 0;
46774 __Pyx_RefNannySetupContext("lock_shared", 0);
46775 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
46776 __Pyx_INCREF(__pyx_v_tag)( ((PyObject*)(__pyx_v_tag))->ob_refcnt++);
46777
46778 /* "rbd.pyx":4045
46779 * :class:`ImageExists` if the same client and cookie locked it
46780 * """
46781 * cookie = cstr(cookie, 'cookie') # <<<<<<<<<<<<<<
46782 * tag = cstr(tag, 'tag')
46783 * cdef:
46784 */
46785 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4045; __pyx_clineno = __LINE__46785; goto __pyx_L1_error;}
46786 __Pyx_GOTREF(__pyx_t_2);
46787 __pyx_t_3 = NULL((void*)0);
46788 __pyx_t_4 = 0;
46789 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
46790 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
46791 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
46792 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
46793 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
46794 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
46795 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
46796 __pyx_t_4 = 1;
46797 }
46798 }
46799 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4045; __pyx_clineno = __LINE__46799; goto __pyx_L1_error;}
46800 __Pyx_GOTREF(__pyx_t_5);
46801 if (__pyx_t_3) {
46802 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
46803 }
46804 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
46805 __Pyx_GIVEREF(__pyx_v_cookie);
46806 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_cookie)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_cookie
)
;
46807 __Pyx_INCREF(__pyx_n_s_cookie)( ((PyObject*)(__pyx_n_s_cookie))->ob_refcnt++);
46808 __Pyx_GIVEREF(__pyx_n_s_cookie);
46809 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_cookie)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_cookie
)
;
46810 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4045; __pyx_clineno = __LINE__46810; goto __pyx_L1_error;}
46811 __Pyx_GOTREF(__pyx_t_1);
46812 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
46813 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46814 __Pyx_DECREF_SET(__pyx_v_cookie, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cookie; __pyx_v_cookie
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
46815 __pyx_t_1 = 0;
46816
46817 /* "rbd.pyx":4046
46818 * """
46819 * cookie = cstr(cookie, 'cookie')
46820 * tag = cstr(tag, 'tag') # <<<<<<<<<<<<<<
46821 * cdef:
46822 * char *_cookie = cookie
46823 */
46824 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4046; __pyx_clineno = __LINE__46824; goto __pyx_L1_error;}
46825 __Pyx_GOTREF(__pyx_t_2);
46826 __pyx_t_5 = NULL((void*)0);
46827 __pyx_t_4 = 0;
46828 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
46829 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
46830 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
46831 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
46832 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
46833 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
46834 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
46835 __pyx_t_4 = 1;
46836 }
46837 }
46838 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4046; __pyx_clineno = __LINE__46838; goto __pyx_L1_error;}
46839 __Pyx_GOTREF(__pyx_t_3);
46840 if (__pyx_t_5) {
46841 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
46842 }
46843 __Pyx_INCREF(__pyx_v_tag)( ((PyObject*)(__pyx_v_tag))->ob_refcnt++);
46844 __Pyx_GIVEREF(__pyx_v_tag);
46845 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_tag)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_tag
)
;
46846 __Pyx_INCREF(__pyx_n_s_tag)( ((PyObject*)(__pyx_n_s_tag))->ob_refcnt++);
46847 __Pyx_GIVEREF(__pyx_n_s_tag);
46848 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_tag)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_tag
)
;
46849 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4046; __pyx_clineno = __LINE__46849; goto __pyx_L1_error;}
46850 __Pyx_GOTREF(__pyx_t_1);
46851 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
46852 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46853 __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_tag; __pyx_v_tag = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
46854 __pyx_t_1 = 0;
46855
46856 /* "rbd.pyx":4048
46857 * tag = cstr(tag, 'tag')
46858 * cdef:
46859 * char *_cookie = cookie # <<<<<<<<<<<<<<
46860 * char *_tag = tag
46861 * with nogil:
46862 */
46863 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_cookie); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4048; __pyx_clineno = __LINE__46863; goto __pyx_L1_error;}
46864 __pyx_v__cookie = __pyx_t_6;
46865
46866 /* "rbd.pyx":4049
46867 * cdef:
46868 * char *_cookie = cookie
46869 * char *_tag = tag # <<<<<<<<<<<<<<
46870 * with nogil:
46871 * ret = rbd_lock_shared(self.image, _cookie, _tag)
46872 */
46873 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_tag); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__46873; goto __pyx_L1_error;}
46874 __pyx_v__tag = __pyx_t_6;
46875
46876 /* "rbd.pyx":4050
46877 * char *_cookie = cookie
46878 * char *_tag = tag
46879 * with nogil: # <<<<<<<<<<<<<<
46880 * ret = rbd_lock_shared(self.image, _cookie, _tag)
46881 * if ret < 0:
46882 */
46883 {
46884 #ifdef WITH_THREAD1
46885 PyThreadState *_save;
46886 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
46887 #endif
46888 /*try:*/ {
46889
46890 /* "rbd.pyx":4051
46891 * char *_tag = tag
46892 * with nogil:
46893 * ret = rbd_lock_shared(self.image, _cookie, _tag) # <<<<<<<<<<<<<<
46894 * if ret < 0:
46895 * raise make_ex(ret, 'error acquiring shared lock on image')
46896 */
46897 __pyx_v_ret = rbd_lock_shared(__pyx_v_self->image, __pyx_v__cookie, __pyx_v__tag);
46898 }
46899
46900 /* "rbd.pyx":4050
46901 * char *_cookie = cookie
46902 * char *_tag = tag
46903 * with nogil: # <<<<<<<<<<<<<<
46904 * ret = rbd_lock_shared(self.image, _cookie, _tag)
46905 * if ret < 0:
46906 */
46907 /*finally:*/ {
46908 /*normal exit:*/{
46909 #ifdef WITH_THREAD1
46910 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
46911 #endif
46912 goto __pyx_L5;
46913 }
46914 __pyx_L5:;
46915 }
46916 }
46917
46918 /* "rbd.pyx":4052
46919 * with nogil:
46920 * ret = rbd_lock_shared(self.image, _cookie, _tag)
46921 * if ret < 0: # <<<<<<<<<<<<<<
46922 * raise make_ex(ret, 'error acquiring shared lock on image')
46923 *
46924 */
46925 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
46926 if (__pyx_t_7) {
46927
46928 /* "rbd.pyx":4053
46929 * ret = rbd_lock_shared(self.image, _cookie, _tag)
46930 * if ret < 0:
46931 * raise make_ex(ret, 'error acquiring shared lock on image') # <<<<<<<<<<<<<<
46932 *
46933 * def unlock(self, cookie):
46934 */
46935 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4053; __pyx_clineno = __LINE__46935; goto __pyx_L1_error;}
46936 __Pyx_GOTREF(__pyx_t_1);
46937 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_acquiring_shared_lock_on_i, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4053; __pyx_clineno = __LINE__46937; goto __pyx_L1_error;}
46938 __Pyx_GOTREF(__pyx_t_2);
46939 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
46940 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
46941 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
46942 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4053; __pyx_clineno = __LINE__46942; goto __pyx_L1_error;}
46943
46944 /* "rbd.pyx":4052
46945 * with nogil:
46946 * ret = rbd_lock_shared(self.image, _cookie, _tag)
46947 * if ret < 0: # <<<<<<<<<<<<<<
46948 * raise make_ex(ret, 'error acquiring shared lock on image')
46949 *
46950 */
46951 }
46952
46953 /* "rbd.pyx":4037
46954 * raise make_ex(ret, 'error acquiring exclusive lock on image')
46955 *
46956 * def lock_shared(self, cookie, tag): # <<<<<<<<<<<<<<
46957 * """
46958 * Take a shared lock on the image. The tag must match
46959 */
46960
46961 /* function exit code */
46962 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
46963 goto __pyx_L0;
46964 __pyx_L1_error:;
46965 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
46966 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
46967 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
46968 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
46969 __Pyx_AddTraceback("rbd.Image.lock_shared", __pyx_clineno, __pyx_lineno, __pyx_filename);
46970 __pyx_r = NULL((void*)0);
46971 __pyx_L0:;
46972 __Pyx_XDECREF(__pyx_v_cookie)do { if ((__pyx_v_cookie) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_cookie))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_cookie)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cookie)))); } while
(0); } while (0)
;
46973 __Pyx_XDECREF(__pyx_v_tag)do { if ((__pyx_v_tag) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_tag))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_tag)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_tag)))); } while (0); } while (0)
;
46974 __Pyx_XGIVEREF(__pyx_r);
46975 __Pyx_RefNannyFinishContext();
46976 return __pyx_r;
46977}
46978
46979/* "rbd.pyx":4055
46980 * raise make_ex(ret, 'error acquiring shared lock on image')
46981 *
46982 * def unlock(self, cookie): # <<<<<<<<<<<<<<
46983 * """
46984 * Release a lock on the image that was locked by this rados client.
46985 */
46986
46987/* Python wrapper */
46988static PyObject *__pyx_pw_3rbd_5Image_133unlock(PyObject *__pyx_v_self, PyObject *__pyx_v_cookie); /*proto*/
46989static char __pyx_doc_3rbd_5Image_132unlock[] = "Image.unlock(self, cookie)\n\n Release a lock on the image that was locked by this rados client.\n ";
46990static PyObject *__pyx_pw_3rbd_5Image_133unlock(PyObject *__pyx_v_self, PyObject *__pyx_v_cookie) {
46991 PyObject *__pyx_r = 0;
46992 __Pyx_RefNannyDeclarations
46993 __Pyx_RefNannySetupContext("unlock (wrapper)", 0);
46994 __pyx_r = __pyx_pf_3rbd_5Image_132unlock(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_cookie));
46995
46996 /* function exit code */
46997 __Pyx_RefNannyFinishContext();
46998 return __pyx_r;
46999}
47000
47001static PyObject *__pyx_pf_3rbd_5Image_132unlock(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_cookie) {
47002 char *__pyx_v__cookie;
47003 int __pyx_v_ret;
47004 PyObject *__pyx_r = NULL((void*)0);
47005 __Pyx_RefNannyDeclarations
47006 PyObject *__pyx_t_1 = NULL((void*)0);
47007 PyObject *__pyx_t_2 = NULL((void*)0);
47008 PyObject *__pyx_t_3 = NULL((void*)0);
47009 Py_ssize_t __pyx_t_4;
47010 PyObject *__pyx_t_5 = NULL((void*)0);
47011 char *__pyx_t_6;
47012 int __pyx_t_7;
47013 int __pyx_lineno = 0;
47014 const char *__pyx_filename = NULL((void*)0);
47015 int __pyx_clineno = 0;
47016 __Pyx_RefNannySetupContext("unlock", 0);
47017 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
47018
47019 /* "rbd.pyx":4059
47020 * Release a lock on the image that was locked by this rados client.
47021 * """
47022 * cookie = cstr(cookie, 'cookie') # <<<<<<<<<<<<<<
47023 * cdef char *_cookie = cookie
47024 * with nogil:
47025 */
47026 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4059; __pyx_clineno = __LINE__47026; goto __pyx_L1_error;}
47027 __Pyx_GOTREF(__pyx_t_2);
47028 __pyx_t_3 = NULL((void*)0);
47029 __pyx_t_4 = 0;
47030 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
47031 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
47032 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
47033 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
47034 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
47035 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
47036 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
47037 __pyx_t_4 = 1;
47038 }
47039 }
47040 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4059; __pyx_clineno = __LINE__47040; goto __pyx_L1_error;}
47041 __Pyx_GOTREF(__pyx_t_5);
47042 if (__pyx_t_3) {
47043 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
47044 }
47045 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
47046 __Pyx_GIVEREF(__pyx_v_cookie);
47047 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_cookie)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_cookie
)
;
47048 __Pyx_INCREF(__pyx_n_s_cookie)( ((PyObject*)(__pyx_n_s_cookie))->ob_refcnt++);
47049 __Pyx_GIVEREF(__pyx_n_s_cookie);
47050 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_cookie)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_cookie
)
;
47051 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4059; __pyx_clineno = __LINE__47051; goto __pyx_L1_error;}
47052 __Pyx_GOTREF(__pyx_t_1);
47053 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
47054 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47055 __Pyx_DECREF_SET(__pyx_v_cookie, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cookie; __pyx_v_cookie
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
47056 __pyx_t_1 = 0;
47057
47058 /* "rbd.pyx":4060
47059 * """
47060 * cookie = cstr(cookie, 'cookie')
47061 * cdef char *_cookie = cookie # <<<<<<<<<<<<<<
47062 * with nogil:
47063 * ret = rbd_unlock(self.image, _cookie)
47064 */
47065 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_cookie); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__47065; goto __pyx_L1_error;}
47066 __pyx_v__cookie = __pyx_t_6;
47067
47068 /* "rbd.pyx":4061
47069 * cookie = cstr(cookie, 'cookie')
47070 * cdef char *_cookie = cookie
47071 * with nogil: # <<<<<<<<<<<<<<
47072 * ret = rbd_unlock(self.image, _cookie)
47073 * if ret < 0:
47074 */
47075 {
47076 #ifdef WITH_THREAD1
47077 PyThreadState *_save;
47078 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
47079 #endif
47080 /*try:*/ {
47081
47082 /* "rbd.pyx":4062
47083 * cdef char *_cookie = cookie
47084 * with nogil:
47085 * ret = rbd_unlock(self.image, _cookie) # <<<<<<<<<<<<<<
47086 * if ret < 0:
47087 * raise make_ex(ret, 'error unlocking image')
47088 */
47089 __pyx_v_ret = rbd_unlock(__pyx_v_self->image, __pyx_v__cookie);
47090 }
47091
47092 /* "rbd.pyx":4061
47093 * cookie = cstr(cookie, 'cookie')
47094 * cdef char *_cookie = cookie
47095 * with nogil: # <<<<<<<<<<<<<<
47096 * ret = rbd_unlock(self.image, _cookie)
47097 * if ret < 0:
47098 */
47099 /*finally:*/ {
47100 /*normal exit:*/{
47101 #ifdef WITH_THREAD1
47102 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
47103 #endif
47104 goto __pyx_L5;
47105 }
47106 __pyx_L5:;
47107 }
47108 }
47109
47110 /* "rbd.pyx":4063
47111 * with nogil:
47112 * ret = rbd_unlock(self.image, _cookie)
47113 * if ret < 0: # <<<<<<<<<<<<<<
47114 * raise make_ex(ret, 'error unlocking image')
47115 *
47116 */
47117 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
47118 if (__pyx_t_7) {
47119
47120 /* "rbd.pyx":4064
47121 * ret = rbd_unlock(self.image, _cookie)
47122 * if ret < 0:
47123 * raise make_ex(ret, 'error unlocking image') # <<<<<<<<<<<<<<
47124 *
47125 * def break_lock(self, client, cookie):
47126 */
47127 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4064; __pyx_clineno = __LINE__47127; goto __pyx_L1_error;}
47128 __Pyx_GOTREF(__pyx_t_1);
47129 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_unlocking_image, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4064; __pyx_clineno = __LINE__47129; goto __pyx_L1_error;}
47130 __Pyx_GOTREF(__pyx_t_2);
47131 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
47132 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
47133 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47134 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4064; __pyx_clineno = __LINE__47134; goto __pyx_L1_error;}
47135
47136 /* "rbd.pyx":4063
47137 * with nogil:
47138 * ret = rbd_unlock(self.image, _cookie)
47139 * if ret < 0: # <<<<<<<<<<<<<<
47140 * raise make_ex(ret, 'error unlocking image')
47141 *
47142 */
47143 }
47144
47145 /* "rbd.pyx":4055
47146 * raise make_ex(ret, 'error acquiring shared lock on image')
47147 *
47148 * def unlock(self, cookie): # <<<<<<<<<<<<<<
47149 * """
47150 * Release a lock on the image that was locked by this rados client.
47151 */
47152
47153 /* function exit code */
47154 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
47155 goto __pyx_L0;
47156 __pyx_L1_error:;
47157 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
47158 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
47159 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
47160 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
47161 __Pyx_AddTraceback("rbd.Image.unlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
47162 __pyx_r = NULL((void*)0);
47163 __pyx_L0:;
47164 __Pyx_XDECREF(__pyx_v_cookie)do { if ((__pyx_v_cookie) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_cookie))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_cookie)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cookie)))); } while
(0); } while (0)
;
47165 __Pyx_XGIVEREF(__pyx_r);
47166 __Pyx_RefNannyFinishContext();
47167 return __pyx_r;
47168}
47169
47170/* "rbd.pyx":4066
47171 * raise make_ex(ret, 'error unlocking image')
47172 *
47173 * def break_lock(self, client, cookie): # <<<<<<<<<<<<<<
47174 * """
47175 * Release a lock held by another rados client.
47176 */
47177
47178/* Python wrapper */
47179static PyObject *__pyx_pw_3rbd_5Image_135break_lock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
47180static char __pyx_doc_3rbd_5Image_134break_lock[] = "Image.break_lock(self, client, cookie)\n\n Release a lock held by another rados client.\n ";
47181static PyObject *__pyx_pw_3rbd_5Image_135break_lock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
47182 PyObject *__pyx_v_client = 0;
47183 PyObject *__pyx_v_cookie = 0;
47184 int __pyx_lineno = 0;
47185 const char *__pyx_filename = NULL((void*)0);
47186 int __pyx_clineno = 0;
47187 PyObject *__pyx_r = 0;
47188 __Pyx_RefNannyDeclarations
47189 __Pyx_RefNannySetupContext("break_lock (wrapper)", 0);
47190 {
47191 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_client,&__pyx_n_s_cookie,0};
47192 PyObject* values[2] = {0,0};
47193 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
47194 Py_ssize_t kw_args;
47195 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
47196 switch (pos_args) {
47197 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
47198 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
47199 case 0: break;
47200 default: goto __pyx_L5_argtuple_error;
47201 }
47202 kw_args = PyDict_Size(__pyx_kwds);
47203 switch (pos_args) {
47204 case 0:
47205 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_client)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_client
)) != 0), 1)
) kw_args--;
47206 else goto __pyx_L5_argtuple_error;
47207 case 1:
47208 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cookie)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cookie
)) != 0), 1)
) kw_args--;
47209 else {
47210 __Pyx_RaiseArgtupleInvalid("break_lock", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4066; __pyx_clineno = __LINE__47210; goto __pyx_L3_error;}
47211 }
47212 }
47213 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
47214 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "break_lock") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "break_lock") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4066; __pyx_clineno = __LINE__47214; goto __pyx_L3_error;}
47215 }
47216 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
47217 goto __pyx_L5_argtuple_error;
47218 } else {
47219 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
47220 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
47221 }
47222 __pyx_v_client = values[0];
47223 __pyx_v_cookie = values[1];
47224 }
47225 goto __pyx_L4_argument_unpacking_done;
47226 __pyx_L5_argtuple_error:;
47227 __Pyx_RaiseArgtupleInvalid("break_lock", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4066; __pyx_clineno = __LINE__47227; goto __pyx_L3_error;}
47228 __pyx_L3_error:;
47229 __Pyx_AddTraceback("rbd.Image.break_lock", __pyx_clineno, __pyx_lineno, __pyx_filename);
47230 __Pyx_RefNannyFinishContext();
47231 return NULL((void*)0);
47232 __pyx_L4_argument_unpacking_done:;
47233 __pyx_r = __pyx_pf_3rbd_5Image_134break_lock(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_client, __pyx_v_cookie);
47234
47235 /* function exit code */
47236 __Pyx_RefNannyFinishContext();
47237 return __pyx_r;
47238}
47239
47240static PyObject *__pyx_pf_3rbd_5Image_134break_lock(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_client, PyObject *__pyx_v_cookie) {
47241 char *__pyx_v__client;
47242 char *__pyx_v__cookie;
47243 int __pyx_v_ret;
47244 PyObject *__pyx_r = NULL((void*)0);
47245 __Pyx_RefNannyDeclarations
47246 PyObject *__pyx_t_1 = NULL((void*)0);
47247 PyObject *__pyx_t_2 = NULL((void*)0);
47248 PyObject *__pyx_t_3 = NULL((void*)0);
47249 Py_ssize_t __pyx_t_4;
47250 PyObject *__pyx_t_5 = NULL((void*)0);
47251 char *__pyx_t_6;
47252 int __pyx_t_7;
47253 int __pyx_lineno = 0;
47254 const char *__pyx_filename = NULL((void*)0);
47255 int __pyx_clineno = 0;
47256 __Pyx_RefNannySetupContext("break_lock", 0);
47257 __Pyx_INCREF(__pyx_v_client)( ((PyObject*)(__pyx_v_client))->ob_refcnt++);
47258 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
47259
47260 /* "rbd.pyx":4070
47261 * Release a lock held by another rados client.
47262 * """
47263 * client = cstr(client, 'client') # <<<<<<<<<<<<<<
47264 * cookie = cstr(cookie, 'cookie')
47265 * cdef:
47266 */
47267 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4070; __pyx_clineno = __LINE__47267; goto __pyx_L1_error;}
47268 __Pyx_GOTREF(__pyx_t_2);
47269 __pyx_t_3 = NULL((void*)0);
47270 __pyx_t_4 = 0;
47271 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
47272 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
47273 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
47274 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
47275 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
47276 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
47277 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
47278 __pyx_t_4 = 1;
47279 }
47280 }
47281 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4070; __pyx_clineno = __LINE__47281; goto __pyx_L1_error;}
47282 __Pyx_GOTREF(__pyx_t_5);
47283 if (__pyx_t_3) {
47284 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
47285 }
47286 __Pyx_INCREF(__pyx_v_client)( ((PyObject*)(__pyx_v_client))->ob_refcnt++);
47287 __Pyx_GIVEREF(__pyx_v_client);
47288 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_client)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_client
)
;
47289 __Pyx_INCREF(__pyx_n_s_client)( ((PyObject*)(__pyx_n_s_client))->ob_refcnt++);
47290 __Pyx_GIVEREF(__pyx_n_s_client);
47291 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_client)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_client
)
;
47292 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4070; __pyx_clineno = __LINE__47292; goto __pyx_L1_error;}
47293 __Pyx_GOTREF(__pyx_t_1);
47294 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
47295 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47296 __Pyx_DECREF_SET(__pyx_v_client, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_client; __pyx_v_client
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
47297 __pyx_t_1 = 0;
47298
47299 /* "rbd.pyx":4071
47300 * """
47301 * client = cstr(client, 'client')
47302 * cookie = cstr(cookie, 'cookie') # <<<<<<<<<<<<<<
47303 * cdef:
47304 * char *_client = client
47305 */
47306 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4071; __pyx_clineno = __LINE__47306; goto __pyx_L1_error;}
47307 __Pyx_GOTREF(__pyx_t_2);
47308 __pyx_t_5 = NULL((void*)0);
47309 __pyx_t_4 = 0;
47310 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
47311 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
47312 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
47313 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
47314 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
47315 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
47316 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
47317 __pyx_t_4 = 1;
47318 }
47319 }
47320 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4071; __pyx_clineno = __LINE__47320; goto __pyx_L1_error;}
47321 __Pyx_GOTREF(__pyx_t_3);
47322 if (__pyx_t_5) {
47323 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
47324 }
47325 __Pyx_INCREF(__pyx_v_cookie)( ((PyObject*)(__pyx_v_cookie))->ob_refcnt++);
47326 __Pyx_GIVEREF(__pyx_v_cookie);
47327 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_cookie)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_cookie
)
;
47328 __Pyx_INCREF(__pyx_n_s_cookie)( ((PyObject*)(__pyx_n_s_cookie))->ob_refcnt++);
47329 __Pyx_GIVEREF(__pyx_n_s_cookie);
47330 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_cookie)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_cookie
)
;
47331 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4071; __pyx_clineno = __LINE__47331; goto __pyx_L1_error;}
47332 __Pyx_GOTREF(__pyx_t_1);
47333 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
47334 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47335 __Pyx_DECREF_SET(__pyx_v_cookie, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_cookie; __pyx_v_cookie
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
47336 __pyx_t_1 = 0;
47337
47338 /* "rbd.pyx":4073
47339 * cookie = cstr(cookie, 'cookie')
47340 * cdef:
47341 * char *_client = client # <<<<<<<<<<<<<<
47342 * char *_cookie = cookie
47343 * with nogil:
47344 */
47345 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_client); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4073; __pyx_clineno = __LINE__47345; goto __pyx_L1_error;}
47346 __pyx_v__client = __pyx_t_6;
47347
47348 /* "rbd.pyx":4074
47349 * cdef:
47350 * char *_client = client
47351 * char *_cookie = cookie # <<<<<<<<<<<<<<
47352 * with nogil:
47353 * ret = rbd_break_lock(self.image, _client, _cookie)
47354 */
47355 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_cookie); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__47355; goto __pyx_L1_error;}
47356 __pyx_v__cookie = __pyx_t_6;
47357
47358 /* "rbd.pyx":4075
47359 * char *_client = client
47360 * char *_cookie = cookie
47361 * with nogil: # <<<<<<<<<<<<<<
47362 * ret = rbd_break_lock(self.image, _client, _cookie)
47363 * if ret < 0:
47364 */
47365 {
47366 #ifdef WITH_THREAD1
47367 PyThreadState *_save;
47368 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
47369 #endif
47370 /*try:*/ {
47371
47372 /* "rbd.pyx":4076
47373 * char *_cookie = cookie
47374 * with nogil:
47375 * ret = rbd_break_lock(self.image, _client, _cookie) # <<<<<<<<<<<<<<
47376 * if ret < 0:
47377 * raise make_ex(ret, 'error unlocking image')
47378 */
47379 __pyx_v_ret = rbd_break_lock(__pyx_v_self->image, __pyx_v__client, __pyx_v__cookie);
47380 }
47381
47382 /* "rbd.pyx":4075
47383 * char *_client = client
47384 * char *_cookie = cookie
47385 * with nogil: # <<<<<<<<<<<<<<
47386 * ret = rbd_break_lock(self.image, _client, _cookie)
47387 * if ret < 0:
47388 */
47389 /*finally:*/ {
47390 /*normal exit:*/{
47391 #ifdef WITH_THREAD1
47392 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
47393 #endif
47394 goto __pyx_L5;
47395 }
47396 __pyx_L5:;
47397 }
47398 }
47399
47400 /* "rbd.pyx":4077
47401 * with nogil:
47402 * ret = rbd_break_lock(self.image, _client, _cookie)
47403 * if ret < 0: # <<<<<<<<<<<<<<
47404 * raise make_ex(ret, 'error unlocking image')
47405 *
47406 */
47407 __pyx_t_7 = ((__pyx_v_ret < 0) != 0);
47408 if (__pyx_t_7) {
47409
47410 /* "rbd.pyx":4078
47411 * ret = rbd_break_lock(self.image, _client, _cookie)
47412 * if ret < 0:
47413 * raise make_ex(ret, 'error unlocking image') # <<<<<<<<<<<<<<
47414 *
47415 * def mirror_image_enable(self):
47416 */
47417 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4078; __pyx_clineno = __LINE__47417; goto __pyx_L1_error;}
47418 __Pyx_GOTREF(__pyx_t_1);
47419 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_unlocking_image, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4078; __pyx_clineno = __LINE__47419; goto __pyx_L1_error;}
47420 __Pyx_GOTREF(__pyx_t_2);
47421 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
47422 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
47423 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47424 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4078; __pyx_clineno = __LINE__47424; goto __pyx_L1_error;}
47425
47426 /* "rbd.pyx":4077
47427 * with nogil:
47428 * ret = rbd_break_lock(self.image, _client, _cookie)
47429 * if ret < 0: # <<<<<<<<<<<<<<
47430 * raise make_ex(ret, 'error unlocking image')
47431 *
47432 */
47433 }
47434
47435 /* "rbd.pyx":4066
47436 * raise make_ex(ret, 'error unlocking image')
47437 *
47438 * def break_lock(self, client, cookie): # <<<<<<<<<<<<<<
47439 * """
47440 * Release a lock held by another rados client.
47441 */
47442
47443 /* function exit code */
47444 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
47445 goto __pyx_L0;
47446 __pyx_L1_error:;
47447 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
47448 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
47449 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
47450 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
47451 __Pyx_AddTraceback("rbd.Image.break_lock", __pyx_clineno, __pyx_lineno, __pyx_filename);
47452 __pyx_r = NULL((void*)0);
47453 __pyx_L0:;
47454 __Pyx_XDECREF(__pyx_v_client)do { if ((__pyx_v_client) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_client))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_client)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_client)))); } while
(0); } while (0)
;
47455 __Pyx_XDECREF(__pyx_v_cookie)do { if ((__pyx_v_cookie) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_cookie))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_cookie)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_cookie)))); } while
(0); } while (0)
;
47456 __Pyx_XGIVEREF(__pyx_r);
47457 __Pyx_RefNannyFinishContext();
47458 return __pyx_r;
47459}
47460
47461/* "rbd.pyx":4080
47462 * raise make_ex(ret, 'error unlocking image')
47463 *
47464 * def mirror_image_enable(self): # <<<<<<<<<<<<<<
47465 * """
47466 * Enable mirroring for the image.
47467 */
47468
47469/* Python wrapper */
47470static PyObject *__pyx_pw_3rbd_5Image_137mirror_image_enable(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
47471static char __pyx_doc_3rbd_5Image_136mirror_image_enable[] = "Image.mirror_image_enable(self)\n\n Enable mirroring for the image.\n ";
47472static PyObject *__pyx_pw_3rbd_5Image_137mirror_image_enable(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
47473 PyObject *__pyx_r = 0;
47474 __Pyx_RefNannyDeclarations
47475 __Pyx_RefNannySetupContext("mirror_image_enable (wrapper)", 0);
47476 __pyx_r = __pyx_pf_3rbd_5Image_136mirror_image_enable(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
47477
47478 /* function exit code */
47479 __Pyx_RefNannyFinishContext();
47480 return __pyx_r;
47481}
47482
47483static PyObject *__pyx_pf_3rbd_5Image_136mirror_image_enable(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
47484 int __pyx_v_ret;
47485 PyObject *__pyx_r = NULL((void*)0);
47486 __Pyx_RefNannyDeclarations
47487 int __pyx_t_1;
47488 PyObject *__pyx_t_2 = NULL((void*)0);
47489 PyObject *__pyx_t_3 = NULL((void*)0);
47490 PyObject *__pyx_t_4 = NULL((void*)0);
47491 int __pyx_lineno = 0;
47492 const char *__pyx_filename = NULL((void*)0);
47493 int __pyx_clineno = 0;
47494 __Pyx_RefNannySetupContext("mirror_image_enable", 0);
47495
47496 /* "rbd.pyx":4084
47497 * Enable mirroring for the image.
47498 * """
47499 * with nogil: # <<<<<<<<<<<<<<
47500 * ret = rbd_mirror_image_enable(self.image)
47501 * if ret < 0:
47502 */
47503 {
47504 #ifdef WITH_THREAD1
47505 PyThreadState *_save;
47506 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
47507 #endif
47508 /*try:*/ {
47509
47510 /* "rbd.pyx":4085
47511 * """
47512 * with nogil:
47513 * ret = rbd_mirror_image_enable(self.image) # <<<<<<<<<<<<<<
47514 * if ret < 0:
47515 * raise make_ex(ret, 'error enabling mirroring for image %s' % self.name)
47516 */
47517 __pyx_v_ret = rbd_mirror_image_enable(__pyx_v_self->image);
47518 }
47519
47520 /* "rbd.pyx":4084
47521 * Enable mirroring for the image.
47522 * """
47523 * with nogil: # <<<<<<<<<<<<<<
47524 * ret = rbd_mirror_image_enable(self.image)
47525 * if ret < 0:
47526 */
47527 /*finally:*/ {
47528 /*normal exit:*/{
47529 #ifdef WITH_THREAD1
47530 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
47531 #endif
47532 goto __pyx_L5;
47533 }
47534 __pyx_L5:;
47535 }
47536 }
47537
47538 /* "rbd.pyx":4086
47539 * with nogil:
47540 * ret = rbd_mirror_image_enable(self.image)
47541 * if ret < 0: # <<<<<<<<<<<<<<
47542 * raise make_ex(ret, 'error enabling mirroring for image %s' % self.name)
47543 *
47544 */
47545 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
47546 if (__pyx_t_1) {
47547
47548 /* "rbd.pyx":4087
47549 * ret = rbd_mirror_image_enable(self.image)
47550 * if ret < 0:
47551 * raise make_ex(ret, 'error enabling mirroring for image %s' % self.name) # <<<<<<<<<<<<<<
47552 *
47553 * def mirror_image_disable(self, force):
47554 */
47555 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4087; __pyx_clineno = __LINE__47555; goto __pyx_L1_error;}
47556 __Pyx_GOTREF(__pyx_t_2);
47557 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_enabling_mirroring_for_ima, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_enabling_mirroring_for_ima, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4087; __pyx_clineno = __LINE__47557; goto __pyx_L1_error;}
47558 __Pyx_GOTREF(__pyx_t_3);
47559 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4087; __pyx_clineno = __LINE__47559; goto __pyx_L1_error;}
47560 __Pyx_GOTREF(__pyx_t_4);
47561 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47562 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
47563 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
47564 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
47565 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4087; __pyx_clineno = __LINE__47565; goto __pyx_L1_error;}
47566
47567 /* "rbd.pyx":4086
47568 * with nogil:
47569 * ret = rbd_mirror_image_enable(self.image)
47570 * if ret < 0: # <<<<<<<<<<<<<<
47571 * raise make_ex(ret, 'error enabling mirroring for image %s' % self.name)
47572 *
47573 */
47574 }
47575
47576 /* "rbd.pyx":4080
47577 * raise make_ex(ret, 'error unlocking image')
47578 *
47579 * def mirror_image_enable(self): # <<<<<<<<<<<<<<
47580 * """
47581 * Enable mirroring for the image.
47582 */
47583
47584 /* function exit code */
47585 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
47586 goto __pyx_L0;
47587 __pyx_L1_error:;
47588 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
47589 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
47590 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
47591 __Pyx_AddTraceback("rbd.Image.mirror_image_enable", __pyx_clineno, __pyx_lineno, __pyx_filename);
47592 __pyx_r = NULL((void*)0);
47593 __pyx_L0:;
47594 __Pyx_XGIVEREF(__pyx_r);
47595 __Pyx_RefNannyFinishContext();
47596 return __pyx_r;
47597}
47598
47599/* "rbd.pyx":4089
47600 * raise make_ex(ret, 'error enabling mirroring for image %s' % self.name)
47601 *
47602 * def mirror_image_disable(self, force): # <<<<<<<<<<<<<<
47603 * """
47604 * Disable mirroring for the image.
47605 */
47606
47607/* Python wrapper */
47608static PyObject *__pyx_pw_3rbd_5Image_139mirror_image_disable(PyObject *__pyx_v_self, PyObject *__pyx_v_force); /*proto*/
47609static char __pyx_doc_3rbd_5Image_138mirror_image_disable[] = "Image.mirror_image_disable(self, force)\n\n Disable mirroring for the image.\n\n :param force: force disabling\n :type force: bool\n ";
47610static PyObject *__pyx_pw_3rbd_5Image_139mirror_image_disable(PyObject *__pyx_v_self, PyObject *__pyx_v_force) {
47611 PyObject *__pyx_r = 0;
47612 __Pyx_RefNannyDeclarations
47613 __Pyx_RefNannySetupContext("mirror_image_disable (wrapper)", 0);
47614 __pyx_r = __pyx_pf_3rbd_5Image_138mirror_image_disable(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_force));
47615
47616 /* function exit code */
47617 __Pyx_RefNannyFinishContext();
47618 return __pyx_r;
47619}
47620
47621static PyObject *__pyx_pf_3rbd_5Image_138mirror_image_disable(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_force) {
47622 int __pyx_v_c_force;
47623 int __pyx_v_ret;
47624 PyObject *__pyx_r = NULL((void*)0);
47625 __Pyx_RefNannyDeclarations
47626 int __pyx_t_1;
47627 PyObject *__pyx_t_2 = NULL((void*)0);
47628 PyObject *__pyx_t_3 = NULL((void*)0);
47629 PyObject *__pyx_t_4 = NULL((void*)0);
47630 int __pyx_lineno = 0;
47631 const char *__pyx_filename = NULL((void*)0);
47632 int __pyx_clineno = 0;
47633 __Pyx_RefNannySetupContext("mirror_image_disable", 0);
47634
47635 /* "rbd.pyx":4096
47636 * :type force: bool
47637 * """
47638 * cdef bint c_force = force # <<<<<<<<<<<<<<
47639 * with nogil:
47640 * ret = rbd_mirror_image_disable(self.image, c_force)
47641 */
47642 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__47642; goto __pyx_L1_error;}
47643 __pyx_v_c_force = __pyx_t_1;
47644
47645 /* "rbd.pyx":4097
47646 * """
47647 * cdef bint c_force = force
47648 * with nogil: # <<<<<<<<<<<<<<
47649 * ret = rbd_mirror_image_disable(self.image, c_force)
47650 * if ret < 0:
47651 */
47652 {
47653 #ifdef WITH_THREAD1
47654 PyThreadState *_save;
47655 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
47656 #endif
47657 /*try:*/ {
47658
47659 /* "rbd.pyx":4098
47660 * cdef bint c_force = force
47661 * with nogil:
47662 * ret = rbd_mirror_image_disable(self.image, c_force) # <<<<<<<<<<<<<<
47663 * if ret < 0:
47664 * raise make_ex(ret, 'error disabling mirroring for image %s' % self.name)
47665 */
47666 __pyx_v_ret = rbd_mirror_image_disable(__pyx_v_self->image, __pyx_v_c_force);
47667 }
47668
47669 /* "rbd.pyx":4097
47670 * """
47671 * cdef bint c_force = force
47672 * with nogil: # <<<<<<<<<<<<<<
47673 * ret = rbd_mirror_image_disable(self.image, c_force)
47674 * if ret < 0:
47675 */
47676 /*finally:*/ {
47677 /*normal exit:*/{
47678 #ifdef WITH_THREAD1
47679 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
47680 #endif
47681 goto __pyx_L5;
47682 }
47683 __pyx_L5:;
47684 }
47685 }
47686
47687 /* "rbd.pyx":4099
47688 * with nogil:
47689 * ret = rbd_mirror_image_disable(self.image, c_force)
47690 * if ret < 0: # <<<<<<<<<<<<<<
47691 * raise make_ex(ret, 'error disabling mirroring for image %s' % self.name)
47692 *
47693 */
47694 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
47695 if (__pyx_t_1) {
47696
47697 /* "rbd.pyx":4100
47698 * ret = rbd_mirror_image_disable(self.image, c_force)
47699 * if ret < 0:
47700 * raise make_ex(ret, 'error disabling mirroring for image %s' % self.name) # <<<<<<<<<<<<<<
47701 *
47702 * def mirror_image_promote(self, force):
47703 */
47704 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__47704; goto __pyx_L1_error;}
47705 __Pyx_GOTREF(__pyx_t_2);
47706 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_disabling_mirroring_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_disabling_mirroring_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__47706; goto __pyx_L1_error;}
47707 __Pyx_GOTREF(__pyx_t_3);
47708 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__47708; goto __pyx_L1_error;}
47709 __Pyx_GOTREF(__pyx_t_4);
47710 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47711 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
47712 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
47713 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
47714 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__47714; goto __pyx_L1_error;}
47715
47716 /* "rbd.pyx":4099
47717 * with nogil:
47718 * ret = rbd_mirror_image_disable(self.image, c_force)
47719 * if ret < 0: # <<<<<<<<<<<<<<
47720 * raise make_ex(ret, 'error disabling mirroring for image %s' % self.name)
47721 *
47722 */
47723 }
47724
47725 /* "rbd.pyx":4089
47726 * raise make_ex(ret, 'error enabling mirroring for image %s' % self.name)
47727 *
47728 * def mirror_image_disable(self, force): # <<<<<<<<<<<<<<
47729 * """
47730 * Disable mirroring for the image.
47731 */
47732
47733 /* function exit code */
47734 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
47735 goto __pyx_L0;
47736 __pyx_L1_error:;
47737 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
47738 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
47739 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
47740 __Pyx_AddTraceback("rbd.Image.mirror_image_disable", __pyx_clineno, __pyx_lineno, __pyx_filename);
47741 __pyx_r = NULL((void*)0);
47742 __pyx_L0:;
47743 __Pyx_XGIVEREF(__pyx_r);
47744 __Pyx_RefNannyFinishContext();
47745 return __pyx_r;
47746}
47747
47748/* "rbd.pyx":4102
47749 * raise make_ex(ret, 'error disabling mirroring for image %s' % self.name)
47750 *
47751 * def mirror_image_promote(self, force): # <<<<<<<<<<<<<<
47752 * """
47753 * Promote the image to primary for mirroring.
47754 */
47755
47756/* Python wrapper */
47757static PyObject *__pyx_pw_3rbd_5Image_141mirror_image_promote(PyObject *__pyx_v_self, PyObject *__pyx_v_force); /*proto*/
47758static char __pyx_doc_3rbd_5Image_140mirror_image_promote[] = "Image.mirror_image_promote(self, force)\n\n Promote the image to primary for mirroring.\n\n :param force: force promoting\n :type force: bool\n ";
47759static PyObject *__pyx_pw_3rbd_5Image_141mirror_image_promote(PyObject *__pyx_v_self, PyObject *__pyx_v_force) {
47760 PyObject *__pyx_r = 0;
47761 __Pyx_RefNannyDeclarations
47762 __Pyx_RefNannySetupContext("mirror_image_promote (wrapper)", 0);
47763 __pyx_r = __pyx_pf_3rbd_5Image_140mirror_image_promote(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_force));
47764
47765 /* function exit code */
47766 __Pyx_RefNannyFinishContext();
47767 return __pyx_r;
47768}
47769
47770static PyObject *__pyx_pf_3rbd_5Image_140mirror_image_promote(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_force) {
47771 int __pyx_v_c_force;
47772 int __pyx_v_ret;
47773 PyObject *__pyx_r = NULL((void*)0);
47774 __Pyx_RefNannyDeclarations
47775 int __pyx_t_1;
47776 PyObject *__pyx_t_2 = NULL((void*)0);
47777 PyObject *__pyx_t_3 = NULL((void*)0);
47778 PyObject *__pyx_t_4 = NULL((void*)0);
47779 int __pyx_lineno = 0;
47780 const char *__pyx_filename = NULL((void*)0);
47781 int __pyx_clineno = 0;
47782 __Pyx_RefNannySetupContext("mirror_image_promote", 0);
47783
47784 /* "rbd.pyx":4109
47785 * :type force: bool
47786 * """
47787 * cdef bint c_force = force # <<<<<<<<<<<<<<
47788 * with nogil:
47789 * ret = rbd_mirror_image_promote(self.image, c_force)
47790 */
47791 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4109; __pyx_clineno = __LINE__47791; goto __pyx_L1_error;}
47792 __pyx_v_c_force = __pyx_t_1;
47793
47794 /* "rbd.pyx":4110
47795 * """
47796 * cdef bint c_force = force
47797 * with nogil: # <<<<<<<<<<<<<<
47798 * ret = rbd_mirror_image_promote(self.image, c_force)
47799 * if ret < 0:
47800 */
47801 {
47802 #ifdef WITH_THREAD1
47803 PyThreadState *_save;
47804 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
47805 #endif
47806 /*try:*/ {
47807
47808 /* "rbd.pyx":4111
47809 * cdef bint c_force = force
47810 * with nogil:
47811 * ret = rbd_mirror_image_promote(self.image, c_force) # <<<<<<<<<<<<<<
47812 * if ret < 0:
47813 * raise make_ex(ret, 'error promoting image %s to primary' % self.name)
47814 */
47815 __pyx_v_ret = rbd_mirror_image_promote(__pyx_v_self->image, __pyx_v_c_force);
47816 }
47817
47818 /* "rbd.pyx":4110
47819 * """
47820 * cdef bint c_force = force
47821 * with nogil: # <<<<<<<<<<<<<<
47822 * ret = rbd_mirror_image_promote(self.image, c_force)
47823 * if ret < 0:
47824 */
47825 /*finally:*/ {
47826 /*normal exit:*/{
47827 #ifdef WITH_THREAD1
47828 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
47829 #endif
47830 goto __pyx_L5;
47831 }
47832 __pyx_L5:;
47833 }
47834 }
47835
47836 /* "rbd.pyx":4112
47837 * with nogil:
47838 * ret = rbd_mirror_image_promote(self.image, c_force)
47839 * if ret < 0: # <<<<<<<<<<<<<<
47840 * raise make_ex(ret, 'error promoting image %s to primary' % self.name)
47841 *
47842 */
47843 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
47844 if (__pyx_t_1) {
47845
47846 /* "rbd.pyx":4113
47847 * ret = rbd_mirror_image_promote(self.image, c_force)
47848 * if ret < 0:
47849 * raise make_ex(ret, 'error promoting image %s to primary' % self.name) # <<<<<<<<<<<<<<
47850 *
47851 * def mirror_image_demote(self):
47852 */
47853 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4113; __pyx_clineno = __LINE__47853; goto __pyx_L1_error;}
47854 __Pyx_GOTREF(__pyx_t_2);
47855 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_promoting_image_s_to_prima, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_promoting_image_s_to_prima, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4113; __pyx_clineno = __LINE__47855; goto __pyx_L1_error;}
47856 __Pyx_GOTREF(__pyx_t_3);
47857 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4113; __pyx_clineno = __LINE__47857; goto __pyx_L1_error;}
47858 __Pyx_GOTREF(__pyx_t_4);
47859 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47860 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
47861 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
47862 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
47863 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4113; __pyx_clineno = __LINE__47863; goto __pyx_L1_error;}
47864
47865 /* "rbd.pyx":4112
47866 * with nogil:
47867 * ret = rbd_mirror_image_promote(self.image, c_force)
47868 * if ret < 0: # <<<<<<<<<<<<<<
47869 * raise make_ex(ret, 'error promoting image %s to primary' % self.name)
47870 *
47871 */
47872 }
47873
47874 /* "rbd.pyx":4102
47875 * raise make_ex(ret, 'error disabling mirroring for image %s' % self.name)
47876 *
47877 * def mirror_image_promote(self, force): # <<<<<<<<<<<<<<
47878 * """
47879 * Promote the image to primary for mirroring.
47880 */
47881
47882 /* function exit code */
47883 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
47884 goto __pyx_L0;
47885 __pyx_L1_error:;
47886 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
47887 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
47888 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
47889 __Pyx_AddTraceback("rbd.Image.mirror_image_promote", __pyx_clineno, __pyx_lineno, __pyx_filename);
47890 __pyx_r = NULL((void*)0);
47891 __pyx_L0:;
47892 __Pyx_XGIVEREF(__pyx_r);
47893 __Pyx_RefNannyFinishContext();
47894 return __pyx_r;
47895}
47896
47897/* "rbd.pyx":4115
47898 * raise make_ex(ret, 'error promoting image %s to primary' % self.name)
47899 *
47900 * def mirror_image_demote(self): # <<<<<<<<<<<<<<
47901 * """
47902 * Demote the image to secondary for mirroring.
47903 */
47904
47905/* Python wrapper */
47906static PyObject *__pyx_pw_3rbd_5Image_143mirror_image_demote(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
47907static char __pyx_doc_3rbd_5Image_142mirror_image_demote[] = "Image.mirror_image_demote(self)\n\n Demote the image to secondary for mirroring.\n ";
47908static PyObject *__pyx_pw_3rbd_5Image_143mirror_image_demote(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
47909 PyObject *__pyx_r = 0;
47910 __Pyx_RefNannyDeclarations
47911 __Pyx_RefNannySetupContext("mirror_image_demote (wrapper)", 0);
47912 __pyx_r = __pyx_pf_3rbd_5Image_142mirror_image_demote(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
47913
47914 /* function exit code */
47915 __Pyx_RefNannyFinishContext();
47916 return __pyx_r;
47917}
47918
47919static PyObject *__pyx_pf_3rbd_5Image_142mirror_image_demote(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
47920 int __pyx_v_ret;
47921 PyObject *__pyx_r = NULL((void*)0);
47922 __Pyx_RefNannyDeclarations
47923 int __pyx_t_1;
47924 PyObject *__pyx_t_2 = NULL((void*)0);
47925 PyObject *__pyx_t_3 = NULL((void*)0);
47926 PyObject *__pyx_t_4 = NULL((void*)0);
47927 int __pyx_lineno = 0;
47928 const char *__pyx_filename = NULL((void*)0);
47929 int __pyx_clineno = 0;
47930 __Pyx_RefNannySetupContext("mirror_image_demote", 0);
47931
47932 /* "rbd.pyx":4119
47933 * Demote the image to secondary for mirroring.
47934 * """
47935 * with nogil: # <<<<<<<<<<<<<<
47936 * ret = rbd_mirror_image_demote(self.image)
47937 * if ret < 0:
47938 */
47939 {
47940 #ifdef WITH_THREAD1
47941 PyThreadState *_save;
47942 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
47943 #endif
47944 /*try:*/ {
47945
47946 /* "rbd.pyx":4120
47947 * """
47948 * with nogil:
47949 * ret = rbd_mirror_image_demote(self.image) # <<<<<<<<<<<<<<
47950 * if ret < 0:
47951 * raise make_ex(ret, 'error demoting image %s to secondary' % self.name)
47952 */
47953 __pyx_v_ret = rbd_mirror_image_demote(__pyx_v_self->image);
47954 }
47955
47956 /* "rbd.pyx":4119
47957 * Demote the image to secondary for mirroring.
47958 * """
47959 * with nogil: # <<<<<<<<<<<<<<
47960 * ret = rbd_mirror_image_demote(self.image)
47961 * if ret < 0:
47962 */
47963 /*finally:*/ {
47964 /*normal exit:*/{
47965 #ifdef WITH_THREAD1
47966 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
47967 #endif
47968 goto __pyx_L5;
47969 }
47970 __pyx_L5:;
47971 }
47972 }
47973
47974 /* "rbd.pyx":4121
47975 * with nogil:
47976 * ret = rbd_mirror_image_demote(self.image)
47977 * if ret < 0: # <<<<<<<<<<<<<<
47978 * raise make_ex(ret, 'error demoting image %s to secondary' % self.name)
47979 *
47980 */
47981 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
47982 if (__pyx_t_1) {
47983
47984 /* "rbd.pyx":4122
47985 * ret = rbd_mirror_image_demote(self.image)
47986 * if ret < 0:
47987 * raise make_ex(ret, 'error demoting image %s to secondary' % self.name) # <<<<<<<<<<<<<<
47988 *
47989 * def mirror_image_resync(self):
47990 */
47991 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4122; __pyx_clineno = __LINE__47991; goto __pyx_L1_error;}
47992 __Pyx_GOTREF(__pyx_t_2);
47993 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_demoting_image_s_to_second, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_demoting_image_s_to_second, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4122; __pyx_clineno = __LINE__47993; goto __pyx_L1_error;}
47994 __Pyx_GOTREF(__pyx_t_3);
47995 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4122; __pyx_clineno = __LINE__47995; goto __pyx_L1_error;}
47996 __Pyx_GOTREF(__pyx_t_4);
47997 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
47998 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
47999 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
48000 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
48001 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4122; __pyx_clineno = __LINE__48001; goto __pyx_L1_error;}
48002
48003 /* "rbd.pyx":4121
48004 * with nogil:
48005 * ret = rbd_mirror_image_demote(self.image)
48006 * if ret < 0: # <<<<<<<<<<<<<<
48007 * raise make_ex(ret, 'error demoting image %s to secondary' % self.name)
48008 *
48009 */
48010 }
48011
48012 /* "rbd.pyx":4115
48013 * raise make_ex(ret, 'error promoting image %s to primary' % self.name)
48014 *
48015 * def mirror_image_demote(self): # <<<<<<<<<<<<<<
48016 * """
48017 * Demote the image to secondary for mirroring.
48018 */
48019
48020 /* function exit code */
48021 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
48022 goto __pyx_L0;
48023 __pyx_L1_error:;
48024 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
48025 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
48026 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
48027 __Pyx_AddTraceback("rbd.Image.mirror_image_demote", __pyx_clineno, __pyx_lineno, __pyx_filename);
48028 __pyx_r = NULL((void*)0);
48029 __pyx_L0:;
48030 __Pyx_XGIVEREF(__pyx_r);
48031 __Pyx_RefNannyFinishContext();
48032 return __pyx_r;
48033}
48034
48035/* "rbd.pyx":4124
48036 * raise make_ex(ret, 'error demoting image %s to secondary' % self.name)
48037 *
48038 * def mirror_image_resync(self): # <<<<<<<<<<<<<<
48039 * """
48040 * Flag the image to resync.
48041 */
48042
48043/* Python wrapper */
48044static PyObject *__pyx_pw_3rbd_5Image_145mirror_image_resync(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
48045static char __pyx_doc_3rbd_5Image_144mirror_image_resync[] = "Image.mirror_image_resync(self)\n\n Flag the image to resync.\n ";
48046static PyObject *__pyx_pw_3rbd_5Image_145mirror_image_resync(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
48047 PyObject *__pyx_r = 0;
48048 __Pyx_RefNannyDeclarations
48049 __Pyx_RefNannySetupContext("mirror_image_resync (wrapper)", 0);
48050 __pyx_r = __pyx_pf_3rbd_5Image_144mirror_image_resync(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
48051
48052 /* function exit code */
48053 __Pyx_RefNannyFinishContext();
48054 return __pyx_r;
48055}
48056
48057static PyObject *__pyx_pf_3rbd_5Image_144mirror_image_resync(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
48058 int __pyx_v_ret;
48059 PyObject *__pyx_r = NULL((void*)0);
48060 __Pyx_RefNannyDeclarations
48061 int __pyx_t_1;
48062 PyObject *__pyx_t_2 = NULL((void*)0);
48063 PyObject *__pyx_t_3 = NULL((void*)0);
48064 PyObject *__pyx_t_4 = NULL((void*)0);
48065 int __pyx_lineno = 0;
48066 const char *__pyx_filename = NULL((void*)0);
48067 int __pyx_clineno = 0;
48068 __Pyx_RefNannySetupContext("mirror_image_resync", 0);
48069
48070 /* "rbd.pyx":4128
48071 * Flag the image to resync.
48072 * """
48073 * with nogil: # <<<<<<<<<<<<<<
48074 * ret = rbd_mirror_image_resync(self.image)
48075 * if ret < 0:
48076 */
48077 {
48078 #ifdef WITH_THREAD1
48079 PyThreadState *_save;
48080 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
48081 #endif
48082 /*try:*/ {
48083
48084 /* "rbd.pyx":4129
48085 * """
48086 * with nogil:
48087 * ret = rbd_mirror_image_resync(self.image) # <<<<<<<<<<<<<<
48088 * if ret < 0:
48089 * raise make_ex(ret, 'error to resync image %s' % self.name)
48090 */
48091 __pyx_v_ret = rbd_mirror_image_resync(__pyx_v_self->image);
48092 }
48093
48094 /* "rbd.pyx":4128
48095 * Flag the image to resync.
48096 * """
48097 * with nogil: # <<<<<<<<<<<<<<
48098 * ret = rbd_mirror_image_resync(self.image)
48099 * if ret < 0:
48100 */
48101 /*finally:*/ {
48102 /*normal exit:*/{
48103 #ifdef WITH_THREAD1
48104 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
48105 #endif
48106 goto __pyx_L5;
48107 }
48108 __pyx_L5:;
48109 }
48110 }
48111
48112 /* "rbd.pyx":4130
48113 * with nogil:
48114 * ret = rbd_mirror_image_resync(self.image)
48115 * if ret < 0: # <<<<<<<<<<<<<<
48116 * raise make_ex(ret, 'error to resync image %s' % self.name)
48117 *
48118 */
48119 __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
48120 if (__pyx_t_1) {
48121
48122 /* "rbd.pyx":4131
48123 * ret = rbd_mirror_image_resync(self.image)
48124 * if ret < 0:
48125 * raise make_ex(ret, 'error to resync image %s' % self.name) # <<<<<<<<<<<<<<
48126 *
48127 * def mirror_image_get_info(self):
48128 */
48129 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4131; __pyx_clineno = __LINE__48129; goto __pyx_L1_error;}
48130 __Pyx_GOTREF(__pyx_t_2);
48131 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_to_resync_image_s, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_to_resync_image_s, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4131; __pyx_clineno = __LINE__48131; goto __pyx_L1_error;}
48132 __Pyx_GOTREF(__pyx_t_3);
48133 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4131; __pyx_clineno = __LINE__48133; goto __pyx_L1_error;}
48134 __Pyx_GOTREF(__pyx_t_4);
48135 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48136 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48137 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
48138 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
48139 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4131; __pyx_clineno = __LINE__48139; goto __pyx_L1_error;}
48140
48141 /* "rbd.pyx":4130
48142 * with nogil:
48143 * ret = rbd_mirror_image_resync(self.image)
48144 * if ret < 0: # <<<<<<<<<<<<<<
48145 * raise make_ex(ret, 'error to resync image %s' % self.name)
48146 *
48147 */
48148 }
48149
48150 /* "rbd.pyx":4124
48151 * raise make_ex(ret, 'error demoting image %s to secondary' % self.name)
48152 *
48153 * def mirror_image_resync(self): # <<<<<<<<<<<<<<
48154 * """
48155 * Flag the image to resync.
48156 */
48157
48158 /* function exit code */
48159 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
48160 goto __pyx_L0;
48161 __pyx_L1_error:;
48162 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
48163 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
48164 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
48165 __Pyx_AddTraceback("rbd.Image.mirror_image_resync", __pyx_clineno, __pyx_lineno, __pyx_filename);
48166 __pyx_r = NULL((void*)0);
48167 __pyx_L0:;
48168 __Pyx_XGIVEREF(__pyx_r);
48169 __Pyx_RefNannyFinishContext();
48170 return __pyx_r;
48171}
48172
48173/* "rbd.pyx":4133
48174 * raise make_ex(ret, 'error to resync image %s' % self.name)
48175 *
48176 * def mirror_image_get_info(self): # <<<<<<<<<<<<<<
48177 * """
48178 * Get mirror info for the image.
48179 */
48180
48181/* Python wrapper */
48182static PyObject *__pyx_pw_3rbd_5Image_147mirror_image_get_info(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
48183static char __pyx_doc_3rbd_5Image_146mirror_image_get_info[] = "Image.mirror_image_get_info(self)\n\n Get mirror info for the image.\n\n :returns: dict - contains the following keys:\n\n * ``global_id`` (str) - image global id\n\n * ``state`` (int) - mirror state\n\n * ``primary`` (bool) - is image primary\n ";
48184static PyObject *__pyx_pw_3rbd_5Image_147mirror_image_get_info(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
48185 PyObject *__pyx_r = 0;
48186 __Pyx_RefNannyDeclarations
48187 __Pyx_RefNannySetupContext("mirror_image_get_info (wrapper)", 0);
48188 __pyx_r = __pyx_pf_3rbd_5Image_146mirror_image_get_info(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
48189
48190 /* function exit code */
48191 __Pyx_RefNannyFinishContext();
48192 return __pyx_r;
48193}
48194
48195static PyObject *__pyx_pf_3rbd_5Image_146mirror_image_get_info(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
48196 rbd_mirror_image_info_t __pyx_v_c_info;
48197 int __pyx_v_ret;
48198 PyObject *__pyx_v_info = NULL((void*)0);
48199 PyObject *__pyx_r = NULL((void*)0);
48200 __Pyx_RefNannyDeclarations
48201 int __pyx_t_1;
48202 PyObject *__pyx_t_2 = NULL((void*)0);
48203 PyObject *__pyx_t_3 = NULL((void*)0);
48204 PyObject *__pyx_t_4 = NULL((void*)0);
48205 PyObject *__pyx_t_5 = NULL((void*)0);
48206 PyObject *__pyx_t_6 = NULL((void*)0);
48207 PyObject *__pyx_t_7 = NULL((void*)0);
48208 int __pyx_lineno = 0;
48209 const char *__pyx_filename = NULL((void*)0);
48210 int __pyx_clineno = 0;
48211 __Pyx_RefNannySetupContext("mirror_image_get_info", 0);
48212
48213 /* "rbd.pyx":4146
48214 * """
48215 * cdef rbd_mirror_image_info_t c_info
48216 * with nogil: # <<<<<<<<<<<<<<
48217 * ret = rbd_mirror_image_get_info(self.image, &c_info, sizeof(c_info))
48218 * if ret != 0:
48219 */
48220 {
48221 #ifdef WITH_THREAD1
48222 PyThreadState *_save;
48223 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
48224 #endif
48225 /*try:*/ {
48226
48227 /* "rbd.pyx":4147
48228 * cdef rbd_mirror_image_info_t c_info
48229 * with nogil:
48230 * ret = rbd_mirror_image_get_info(self.image, &c_info, sizeof(c_info)) # <<<<<<<<<<<<<<
48231 * if ret != 0:
48232 * raise make_ex(ret, 'error getting mirror info for image %s' % self.name)
48233 */
48234 __pyx_v_ret = rbd_mirror_image_get_info(__pyx_v_self->image, (&__pyx_v_c_info), (sizeof(__pyx_v_c_info)));
48235 }
48236
48237 /* "rbd.pyx":4146
48238 * """
48239 * cdef rbd_mirror_image_info_t c_info
48240 * with nogil: # <<<<<<<<<<<<<<
48241 * ret = rbd_mirror_image_get_info(self.image, &c_info, sizeof(c_info))
48242 * if ret != 0:
48243 */
48244 /*finally:*/ {
48245 /*normal exit:*/{
48246 #ifdef WITH_THREAD1
48247 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
48248 #endif
48249 goto __pyx_L5;
48250 }
48251 __pyx_L5:;
48252 }
48253 }
48254
48255 /* "rbd.pyx":4148
48256 * with nogil:
48257 * ret = rbd_mirror_image_get_info(self.image, &c_info, sizeof(c_info))
48258 * if ret != 0: # <<<<<<<<<<<<<<
48259 * raise make_ex(ret, 'error getting mirror info for image %s' % self.name)
48260 * info = {
48261 */
48262 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
48263 if (__pyx_t_1) {
48264
48265 /* "rbd.pyx":4149
48266 * ret = rbd_mirror_image_get_info(self.image, &c_info, sizeof(c_info))
48267 * if ret != 0:
48268 * raise make_ex(ret, 'error getting mirror info for image %s' % self.name) # <<<<<<<<<<<<<<
48269 * info = {
48270 * 'global_id' : decode_cstr(c_info.global_id),
48271 */
48272 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4149; __pyx_clineno = __LINE__48272; goto __pyx_L1_error;}
48273 __Pyx_GOTREF(__pyx_t_2);
48274 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_mirror_info_for_im, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_mirror_info_for_im, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4149; __pyx_clineno = __LINE__48274; goto __pyx_L1_error;}
48275 __Pyx_GOTREF(__pyx_t_3);
48276 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4149; __pyx_clineno = __LINE__48276; goto __pyx_L1_error;}
48277 __Pyx_GOTREF(__pyx_t_4);
48278 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48279 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48280 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
48281 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
48282 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4149; __pyx_clineno = __LINE__48282; goto __pyx_L1_error;}
48283
48284 /* "rbd.pyx":4148
48285 * with nogil:
48286 * ret = rbd_mirror_image_get_info(self.image, &c_info, sizeof(c_info))
48287 * if ret != 0: # <<<<<<<<<<<<<<
48288 * raise make_ex(ret, 'error getting mirror info for image %s' % self.name)
48289 * info = {
48290 */
48291 }
48292
48293 /* "rbd.pyx":4151
48294 * raise make_ex(ret, 'error getting mirror info for image %s' % self.name)
48295 * info = {
48296 * 'global_id' : decode_cstr(c_info.global_id), # <<<<<<<<<<<<<<
48297 * 'state' : int(c_info.state),
48298 * 'primary' : c_info.primary,
48299 */
48300 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48300; goto __pyx_L1_error;}
48301 __Pyx_GOTREF(__pyx_t_4);
48302 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48302; goto __pyx_L1_error;}
48303 __Pyx_GOTREF(__pyx_t_2);
48304 __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_info.global_id); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48304; goto __pyx_L1_error;}
48305 __Pyx_GOTREF(__pyx_t_5);
48306 __pyx_t_6 = NULL((void*)0);
48307 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
48308 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
48309 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
48310 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
48311 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
48312 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
48313 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
48314 }
48315 }
48316 if (!__pyx_t_6) {
48317 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48317; goto __pyx_L1_error;}
48318 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
48319 __Pyx_GOTREF(__pyx_t_3);
48320 } else {
48321 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48321; goto __pyx_L1_error;}
48322 __Pyx_GOTREF(__pyx_t_7);
48323 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
48324 __Pyx_GIVEREF(__pyx_t_5);
48325 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
48326 __pyx_t_5 = 0;
48327 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48327; goto __pyx_L1_error;}
48328 __Pyx_GOTREF(__pyx_t_3);
48329 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
48330 }
48331 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48332 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_global_id, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48332; goto __pyx_L1_error;}
48333 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48334
48335 /* "rbd.pyx":4152
48336 * info = {
48337 * 'global_id' : decode_cstr(c_info.global_id),
48338 * 'state' : int(c_info.state), # <<<<<<<<<<<<<<
48339 * 'primary' : c_info.primary,
48340 * }
48341 */
48342 __pyx_t_3 = __Pyx_PyInt_From_rbd_mirror_image_state_t(__pyx_v_c_info.state); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4152; __pyx_clineno = __LINE__48342; goto __pyx_L1_error;}
48343 __Pyx_GOTREF(__pyx_t_3);
48344 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4152; __pyx_clineno = __LINE__48344; goto __pyx_L1_error;}
48345 __Pyx_GOTREF(__pyx_t_2);
48346 __Pyx_GIVEREF(__pyx_t_3);
48347 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_t_3);
48348 __pyx_t_3 = 0;
48349 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_2, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4152; __pyx_clineno = __LINE__48349; goto __pyx_L1_error;}
48350 __Pyx_GOTREF(__pyx_t_3);
48351 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48352 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_state, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48352; goto __pyx_L1_error;}
48353 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48354
48355 /* "rbd.pyx":4153
48356 * 'global_id' : decode_cstr(c_info.global_id),
48357 * 'state' : int(c_info.state),
48358 * 'primary' : c_info.primary, # <<<<<<<<<<<<<<
48359 * }
48360 * free(c_info.global_id)
48361 */
48362 __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_c_info.primary)((__pyx_v_c_info.primary) ? (( ((PyObject*)(((PyObject *) &
_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct
)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->
ob_refcnt++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4153; __pyx_clineno = __LINE__48362; goto __pyx_L1_error;}
48363 __Pyx_GOTREF(__pyx_t_3);
48364 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_primary, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4151; __pyx_clineno = __LINE__48364; goto __pyx_L1_error;}
48365 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48366 __pyx_v_info = ((PyObject*)__pyx_t_4);
48367 __pyx_t_4 = 0;
48368
48369 /* "rbd.pyx":4155
48370 * 'primary' : c_info.primary,
48371 * }
48372 * free(c_info.global_id) # <<<<<<<<<<<<<<
48373 * return info
48374 *
48375 */
48376 free(__pyx_v_c_info.global_id);
48377
48378 /* "rbd.pyx":4156
48379 * }
48380 * free(c_info.global_id)
48381 * return info # <<<<<<<<<<<<<<
48382 *
48383 * def mirror_image_get_status(self):
48384 */
48385 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
48386 __Pyx_INCREF(__pyx_v_info)( ((PyObject*)(__pyx_v_info))->ob_refcnt++);
48387 __pyx_r = __pyx_v_info;
48388 goto __pyx_L0;
48389
48390 /* "rbd.pyx":4133
48391 * raise make_ex(ret, 'error to resync image %s' % self.name)
48392 *
48393 * def mirror_image_get_info(self): # <<<<<<<<<<<<<<
48394 * """
48395 * Get mirror info for the image.
48396 */
48397
48398 /* function exit code */
48399 __pyx_L1_error:;
48400 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
48401 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
48402 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
48403 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
48404 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
48405 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
48406 __Pyx_AddTraceback("rbd.Image.mirror_image_get_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
48407 __pyx_r = NULL((void*)0);
48408 __pyx_L0:;
48409 __Pyx_XDECREF(__pyx_v_info)do { if ((__pyx_v_info) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_info))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_info)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_info)))); } while (0); } while
(0)
;
48410 __Pyx_XGIVEREF(__pyx_r);
48411 __Pyx_RefNannyFinishContext();
48412 return __pyx_r;
48413}
48414
48415/* "rbd.pyx":4158
48416 * return info
48417 *
48418 * def mirror_image_get_status(self): # <<<<<<<<<<<<<<
48419 * """
48420 * Get mirror status for the image.
48421 */
48422
48423/* Python wrapper */
48424static PyObject *__pyx_pw_3rbd_5Image_149mirror_image_get_status(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
48425static char __pyx_doc_3rbd_5Image_148mirror_image_get_status[] = "Image.mirror_image_get_status(self)\n\n Get mirror status for the image.\n\n :returns: dict - contains the following keys:\n\n * ``name`` (str) - mirror image name\n\n * ``id`` (str) - mirror image id\n\n * `info` (dict) - mirror image info\n\n * ``state`` (int) - status mirror state\n\n * ``description`` (str) - status description\n\n * ``last_update`` (datetime) - last status update time\n\n * ``up`` (bool) - is mirroring agent up\n ";
48426static PyObject *__pyx_pw_3rbd_5Image_149mirror_image_get_status(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
48427 PyObject *__pyx_r = 0;
48428 __Pyx_RefNannyDeclarations
48429 __Pyx_RefNannySetupContext("mirror_image_get_status (wrapper)", 0);
48430 __pyx_r = __pyx_pf_3rbd_5Image_148mirror_image_get_status(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
48431
48432 /* function exit code */
48433 __Pyx_RefNannyFinishContext();
48434 return __pyx_r;
48435}
48436
48437static PyObject *__pyx_pf_3rbd_5Image_148mirror_image_get_status(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
48438 rbd_mirror_image_status_t __pyx_v_c_status;
48439 int __pyx_v_ret;
48440 PyObject *__pyx_v_status = NULL((void*)0);
48441 PyObject *__pyx_r = NULL((void*)0);
48442 __Pyx_RefNannyDeclarations
48443 int __pyx_t_1;
48444 PyObject *__pyx_t_2 = NULL((void*)0);
48445 PyObject *__pyx_t_3 = NULL((void*)0);
48446 PyObject *__pyx_t_4 = NULL((void*)0);
48447 PyObject *__pyx_t_5 = NULL((void*)0);
48448 PyObject *__pyx_t_6 = NULL((void*)0);
48449 PyObject *__pyx_t_7 = NULL((void*)0);
48450 PyObject *__pyx_t_8 = NULL((void*)0);
48451 int __pyx_lineno = 0;
48452 const char *__pyx_filename = NULL((void*)0);
48453 int __pyx_clineno = 0;
48454 __Pyx_RefNannySetupContext("mirror_image_get_status", 0);
48455
48456 /* "rbd.pyx":4179
48457 * """
48458 * cdef rbd_mirror_image_status_t c_status
48459 * with nogil: # <<<<<<<<<<<<<<
48460 * ret = rbd_mirror_image_get_status(self.image, &c_status,
48461 * sizeof(c_status))
48462 */
48463 {
48464 #ifdef WITH_THREAD1
48465 PyThreadState *_save;
48466 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
48467 #endif
48468 /*try:*/ {
48469
48470 /* "rbd.pyx":4180
48471 * cdef rbd_mirror_image_status_t c_status
48472 * with nogil:
48473 * ret = rbd_mirror_image_get_status(self.image, &c_status, # <<<<<<<<<<<<<<
48474 * sizeof(c_status))
48475 * if ret != 0:
48476 */
48477 __pyx_v_ret = rbd_mirror_image_get_status(__pyx_v_self->image, (&__pyx_v_c_status), (sizeof(__pyx_v_c_status)));
48478 }
48479
48480 /* "rbd.pyx":4179
48481 * """
48482 * cdef rbd_mirror_image_status_t c_status
48483 * with nogil: # <<<<<<<<<<<<<<
48484 * ret = rbd_mirror_image_get_status(self.image, &c_status,
48485 * sizeof(c_status))
48486 */
48487 /*finally:*/ {
48488 /*normal exit:*/{
48489 #ifdef WITH_THREAD1
48490 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
48491 #endif
48492 goto __pyx_L5;
48493 }
48494 __pyx_L5:;
48495 }
48496 }
48497
48498 /* "rbd.pyx":4182
48499 * ret = rbd_mirror_image_get_status(self.image, &c_status,
48500 * sizeof(c_status))
48501 * if ret != 0: # <<<<<<<<<<<<<<
48502 * raise make_ex(ret, 'error getting mirror status for image %s' % self.name)
48503 * status = {
48504 */
48505 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
48506 if (__pyx_t_1) {
48507
48508 /* "rbd.pyx":4183
48509 * sizeof(c_status))
48510 * if ret != 0:
48511 * raise make_ex(ret, 'error getting mirror status for image %s' % self.name) # <<<<<<<<<<<<<<
48512 * status = {
48513 * 'name' : decode_cstr(c_status.name),
48514 */
48515 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4183; __pyx_clineno = __LINE__48515; goto __pyx_L1_error;}
48516 __Pyx_GOTREF(__pyx_t_2);
48517 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_mirror_status_for, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_mirror_status_for, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4183; __pyx_clineno = __LINE__48517; goto __pyx_L1_error;}
48518 __Pyx_GOTREF(__pyx_t_3);
48519 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4183; __pyx_clineno = __LINE__48519; goto __pyx_L1_error;}
48520 __Pyx_GOTREF(__pyx_t_4);
48521 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48522 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48523 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
48524 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
48525 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4183; __pyx_clineno = __LINE__48525; goto __pyx_L1_error;}
48526
48527 /* "rbd.pyx":4182
48528 * ret = rbd_mirror_image_get_status(self.image, &c_status,
48529 * sizeof(c_status))
48530 * if ret != 0: # <<<<<<<<<<<<<<
48531 * raise make_ex(ret, 'error getting mirror status for image %s' % self.name)
48532 * status = {
48533 */
48534 }
48535
48536 /* "rbd.pyx":4185
48537 * raise make_ex(ret, 'error getting mirror status for image %s' % self.name)
48538 * status = {
48539 * 'name' : decode_cstr(c_status.name), # <<<<<<<<<<<<<<
48540 * 'id' : self.id(),
48541 * 'info' : {
48542 */
48543 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48543; goto __pyx_L1_error;}
48544 __Pyx_GOTREF(__pyx_t_4);
48545 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48545; goto __pyx_L1_error;}
48546 __Pyx_GOTREF(__pyx_t_2);
48547 __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.name); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48547; goto __pyx_L1_error;}
48548 __Pyx_GOTREF(__pyx_t_5);
48549 __pyx_t_6 = NULL((void*)0);
48550 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
48551 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
48552 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
48553 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
48554 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
48555 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
48556 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
48557 }
48558 }
48559 if (!__pyx_t_6) {
48560 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48560; goto __pyx_L1_error;}
48561 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
48562 __Pyx_GOTREF(__pyx_t_3);
48563 } else {
48564 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48564; goto __pyx_L1_error;}
48565 __Pyx_GOTREF(__pyx_t_7);
48566 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
48567 __Pyx_GIVEREF(__pyx_t_5);
48568 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_5);
48569 __pyx_t_5 = 0;
48570 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48570; goto __pyx_L1_error;}
48571 __Pyx_GOTREF(__pyx_t_3);
48572 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
48573 }
48574 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48575 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48575; goto __pyx_L1_error;}
48576 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48577
48578 /* "rbd.pyx":4186
48579 * status = {
48580 * 'name' : decode_cstr(c_status.name),
48581 * 'id' : self.id(), # <<<<<<<<<<<<<<
48582 * 'info' : {
48583 * 'global_id' : decode_cstr(c_status.info.global_id),
48584 */
48585 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4186; __pyx_clineno = __LINE__48585; goto __pyx_L1_error;}
48586 __Pyx_GOTREF(__pyx_t_2);
48587 __pyx_t_7 = NULL((void*)0);
48588 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
48589 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
48590 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
48591 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
48592 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
48593 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
48594 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
48595 }
48596 }
48597 if (__pyx_t_7) {
48598 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4186; __pyx_clineno = __LINE__48598; goto __pyx_L1_error;}
48599 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
48600 } else {
48601 __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4186; __pyx_clineno = __LINE__48601; goto __pyx_L1_error;}
48602 }
48603 __Pyx_GOTREF(__pyx_t_3);
48604 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48605 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_id, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48605; goto __pyx_L1_error;}
48606 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48607
48608 /* "rbd.pyx":4188
48609 * 'id' : self.id(),
48610 * 'info' : {
48611 * 'global_id' : decode_cstr(c_status.info.global_id), # <<<<<<<<<<<<<<
48612 * 'state' : int(c_status.info.state),
48613 * 'primary' : c_status.info.primary,
48614 */
48615 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48615; goto __pyx_L1_error;}
48616 __Pyx_GOTREF(__pyx_t_3);
48617 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48617; goto __pyx_L1_error;}
48618 __Pyx_GOTREF(__pyx_t_7);
48619 __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.info.global_id); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48619; goto __pyx_L1_error;}
48620 __Pyx_GOTREF(__pyx_t_5);
48621 __pyx_t_6 = NULL((void*)0);
48622 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_7))__builtin_expect(!!(((__pyx_t_7)->ob_type == &PyMethod_Type
)), 0)
) {
48623 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7)(((PyMethodObject *)__pyx_t_7) -> im_self);
48624 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
48625 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7)(((PyMethodObject *)__pyx_t_7) -> im_func);
48626 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
48627 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
48628 __Pyx_DECREF_SET(__pyx_t_7, function)do { PyObject *tmp = (PyObject *) __pyx_t_7; __pyx_t_7 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
48629 }
48630 }
48631 if (!__pyx_t_6) {
48632 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48632; goto __pyx_L1_error;}
48633 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
48634 __Pyx_GOTREF(__pyx_t_2);
48635 } else {
48636 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48636; goto __pyx_L1_error;}
48637 __Pyx_GOTREF(__pyx_t_8);
48638 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
48639 __Pyx_GIVEREF(__pyx_t_5);
48640 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_5);
48641 __pyx_t_5 = 0;
48642 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48642; goto __pyx_L1_error;}
48643 __Pyx_GOTREF(__pyx_t_2);
48644 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
48645 }
48646 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
48647 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_global_id, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48647; goto __pyx_L1_error;}
48648 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48649
48650 /* "rbd.pyx":4189
48651 * 'info' : {
48652 * 'global_id' : decode_cstr(c_status.info.global_id),
48653 * 'state' : int(c_status.info.state), # <<<<<<<<<<<<<<
48654 * 'primary' : c_status.info.primary,
48655 * },
48656 */
48657 __pyx_t_2 = __Pyx_PyInt_From_rbd_mirror_image_state_t(__pyx_v_c_status.info.state); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4189; __pyx_clineno = __LINE__48657; goto __pyx_L1_error;}
48658 __Pyx_GOTREF(__pyx_t_2);
48659 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4189; __pyx_clineno = __LINE__48659; goto __pyx_L1_error;}
48660 __Pyx_GOTREF(__pyx_t_7);
48661 __Pyx_GIVEREF(__pyx_t_2);
48662 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_2);
48663 __pyx_t_2 = 0;
48664 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4189; __pyx_clineno = __LINE__48664; goto __pyx_L1_error;}
48665 __Pyx_GOTREF(__pyx_t_2);
48666 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
48667 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_state, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48667; goto __pyx_L1_error;}
48668 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48669
48670 /* "rbd.pyx":4190
48671 * 'global_id' : decode_cstr(c_status.info.global_id),
48672 * 'state' : int(c_status.info.state),
48673 * 'primary' : c_status.info.primary, # <<<<<<<<<<<<<<
48674 * },
48675 * 'state' : c_status.state,
48676 */
48677 __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_c_status.info.primary)((__pyx_v_c_status.info.primary) ? (( ((PyObject*)(((PyObject
*) &_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &
_Py_TrueStruct)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct
)))->ob_refcnt++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4190; __pyx_clineno = __LINE__48677; goto __pyx_L1_error;}
48678 __Pyx_GOTREF(__pyx_t_2);
48679 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_primary, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4188; __pyx_clineno = __LINE__48679; goto __pyx_L1_error;}
48680 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48681 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_info, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48681; goto __pyx_L1_error;}
48682 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48683
48684 /* "rbd.pyx":4192
48685 * 'primary' : c_status.info.primary,
48686 * },
48687 * 'state' : c_status.state, # <<<<<<<<<<<<<<
48688 * 'description' : decode_cstr(c_status.description),
48689 * 'last_update' : datetime.utcfromtimestamp(c_status.last_update),
48690 */
48691 __pyx_t_3 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(__pyx_v_c_status.state); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4192; __pyx_clineno = __LINE__48691; goto __pyx_L1_error;}
48692 __Pyx_GOTREF(__pyx_t_3);
48693 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_state, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48693; goto __pyx_L1_error;}
48694 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48695
48696 /* "rbd.pyx":4193
48697 * },
48698 * 'state' : c_status.state,
48699 * 'description' : decode_cstr(c_status.description), # <<<<<<<<<<<<<<
48700 * 'last_update' : datetime.utcfromtimestamp(c_status.last_update),
48701 * 'up' : c_status.up,
48702 */
48703 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4193; __pyx_clineno = __LINE__48703; goto __pyx_L1_error;}
48704 __Pyx_GOTREF(__pyx_t_2);
48705 __pyx_t_7 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_c_status.description); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4193; __pyx_clineno = __LINE__48705; goto __pyx_L1_error;}
48706 __Pyx_GOTREF(__pyx_t_7);
48707 __pyx_t_8 = NULL((void*)0);
48708 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
48709 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
48710 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
48711 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
48712 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
48713 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
48714 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
48715 }
48716 }
48717 if (!__pyx_t_8) {
48718 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4193; __pyx_clineno = __LINE__48718; goto __pyx_L1_error;}
48719 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
48720 __Pyx_GOTREF(__pyx_t_3);
48721 } else {
48722 __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4193; __pyx_clineno = __LINE__48722; goto __pyx_L1_error;}
48723 __Pyx_GOTREF(__pyx_t_5);
48724 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
48725 __Pyx_GIVEREF(__pyx_t_7);
48726 PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+1] = __pyx_t_7);
48727 __pyx_t_7 = 0;
48728 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4193; __pyx_clineno = __LINE__48728; goto __pyx_L1_error;}
48729 __Pyx_GOTREF(__pyx_t_3);
48730 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
48731 }
48732 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48733 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_description, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48733; goto __pyx_L1_error;}
48734 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48735
48736 /* "rbd.pyx":4194
48737 * 'state' : c_status.state,
48738 * 'description' : decode_cstr(c_status.description),
48739 * 'last_update' : datetime.utcfromtimestamp(c_status.last_update), # <<<<<<<<<<<<<<
48740 * 'up' : c_status.up,
48741 * }
48742 */
48743 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4194; __pyx_clineno = __LINE__48743; goto __pyx_L1_error;}
48744 __Pyx_GOTREF(__pyx_t_2);
48745 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4194; __pyx_clineno = __LINE__48745; goto __pyx_L1_error;}
48746 __Pyx_GOTREF(__pyx_t_5);
48747 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48748 __pyx_t_2 = __Pyx_PyInt_From_time_t(__pyx_v_c_status.last_update); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4194; __pyx_clineno = __LINE__48748; goto __pyx_L1_error;}
48749 __Pyx_GOTREF(__pyx_t_2);
48750 __pyx_t_7 = NULL((void*)0);
48751 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
48752 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
48753 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
48754 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
48755 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
48756 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
48757 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
48758 }
48759 }
48760 if (!__pyx_t_7) {
48761 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4194; __pyx_clineno = __LINE__48761; goto __pyx_L1_error;}
48762 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
48763 __Pyx_GOTREF(__pyx_t_3);
48764 } else {
48765 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4194; __pyx_clineno = __LINE__48765; goto __pyx_L1_error;}
48766 __Pyx_GOTREF(__pyx_t_8);
48767 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
48768 __Pyx_GIVEREF(__pyx_t_2);
48769 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_2);
48770 __pyx_t_2 = 0;
48771 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4194; __pyx_clineno = __LINE__48771; goto __pyx_L1_error;}
48772 __Pyx_GOTREF(__pyx_t_3);
48773 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
48774 }
48775 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
48776 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_last_update, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48776; goto __pyx_L1_error;}
48777 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48778
48779 /* "rbd.pyx":4195
48780 * 'description' : decode_cstr(c_status.description),
48781 * 'last_update' : datetime.utcfromtimestamp(c_status.last_update),
48782 * 'up' : c_status.up, # <<<<<<<<<<<<<<
48783 * }
48784 * free(c_status.name)
48785 */
48786 __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_c_status.up)((__pyx_v_c_status.up) ? (( ((PyObject*)(((PyObject *) &_Py_TrueStruct
)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct)) : (
( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->ob_refcnt
++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4195; __pyx_clineno = __LINE__48786; goto __pyx_L1_error;}
48787 __Pyx_GOTREF(__pyx_t_3);
48788 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_up, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__48788; goto __pyx_L1_error;}
48789 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
48790 __pyx_v_status = ((PyObject*)__pyx_t_4);
48791 __pyx_t_4 = 0;
48792
48793 /* "rbd.pyx":4197
48794 * 'up' : c_status.up,
48795 * }
48796 * free(c_status.name) # <<<<<<<<<<<<<<
48797 * free(c_status.info.global_id)
48798 * free(c_status.description)
48799 */
48800 free(__pyx_v_c_status.name);
48801
48802 /* "rbd.pyx":4198
48803 * }
48804 * free(c_status.name)
48805 * free(c_status.info.global_id) # <<<<<<<<<<<<<<
48806 * free(c_status.description)
48807 * return status
48808 */
48809 free(__pyx_v_c_status.info.global_id);
48810
48811 /* "rbd.pyx":4199
48812 * free(c_status.name)
48813 * free(c_status.info.global_id)
48814 * free(c_status.description) # <<<<<<<<<<<<<<
48815 * return status
48816 *
48817 */
48818 free(__pyx_v_c_status.description);
48819
48820 /* "rbd.pyx":4200
48821 * free(c_status.info.global_id)
48822 * free(c_status.description)
48823 * return status # <<<<<<<<<<<<<<
48824 *
48825 * def mirror_image_get_instance_id(self):
48826 */
48827 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
48828 __Pyx_INCREF(__pyx_v_status)( ((PyObject*)(__pyx_v_status))->ob_refcnt++);
48829 __pyx_r = __pyx_v_status;
48830 goto __pyx_L0;
48831
48832 /* "rbd.pyx":4158
48833 * return info
48834 *
48835 * def mirror_image_get_status(self): # <<<<<<<<<<<<<<
48836 * """
48837 * Get mirror status for the image.
48838 */
48839
48840 /* function exit code */
48841 __pyx_L1_error:;
48842 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
48843 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
48844 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
48845 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
48846 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
48847 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
48848 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
48849 __Pyx_AddTraceback("rbd.Image.mirror_image_get_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
48850 __pyx_r = NULL((void*)0);
48851 __pyx_L0:;
48852 __Pyx_XDECREF(__pyx_v_status)do { if ((__pyx_v_status) == ((void*)0)) ; else do { if ( --(
(PyObject*)(__pyx_v_status))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(__pyx_v_status)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_status)))); } while
(0); } while (0)
;
48853 __Pyx_XGIVEREF(__pyx_r);
48854 __Pyx_RefNannyFinishContext();
48855 return __pyx_r;
48856}
48857
48858/* "rbd.pyx":4202
48859 * return status
48860 *
48861 * def mirror_image_get_instance_id(self): # <<<<<<<<<<<<<<
48862 * """
48863 * Get mirror instance id for the image.
48864 */
48865
48866/* Python wrapper */
48867static PyObject *__pyx_pw_3rbd_5Image_151mirror_image_get_instance_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
48868static char __pyx_doc_3rbd_5Image_150mirror_image_get_instance_id[] = "Image.mirror_image_get_instance_id(self)\n\n Get mirror instance id for the image.\n\n :returns: str - instance id\n ";
48869static PyObject *__pyx_pw_3rbd_5Image_151mirror_image_get_instance_id(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
48870 PyObject *__pyx_r = 0;
48871 __Pyx_RefNannyDeclarations
48872 __Pyx_RefNannySetupContext("mirror_image_get_instance_id (wrapper)", 0);
48873 __pyx_r = __pyx_pf_3rbd_5Image_150mirror_image_get_instance_id(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
48874
48875 /* function exit code */
48876 __Pyx_RefNannyFinishContext();
48877 return __pyx_r;
48878}
48879
48880static PyObject *__pyx_pf_3rbd_5Image_150mirror_image_get_instance_id(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
48881 int __pyx_v_ret;
48882 size_t __pyx_v_size;
48883 char *__pyx_v_instance_id;
48884 PyObject *__pyx_r = NULL((void*)0);
48885 __Pyx_RefNannyDeclarations
48886 int __pyx_t_1;
48887 int __pyx_t_2;
48888 void *__pyx_t_3;
48889 PyObject *__pyx_t_4 = NULL((void*)0);
48890 PyObject *__pyx_t_5 = NULL((void*)0);
48891 PyObject *__pyx_t_6 = NULL((void*)0);
48892 PyObject *__pyx_t_7 = NULL((void*)0);
48893 PyObject *__pyx_t_8 = NULL((void*)0);
48894 int __pyx_t_9;
48895 int __pyx_t_10;
48896 char const *__pyx_t_11;
48897 PyObject *__pyx_t_12 = NULL((void*)0);
48898 PyObject *__pyx_t_13 = NULL((void*)0);
48899 PyObject *__pyx_t_14 = NULL((void*)0);
48900 PyObject *__pyx_t_15 = NULL((void*)0);
48901 PyObject *__pyx_t_16 = NULL((void*)0);
48902 PyObject *__pyx_t_17 = NULL((void*)0);
48903 int __pyx_lineno = 0;
48904 const char *__pyx_filename = NULL((void*)0);
48905 int __pyx_clineno = 0;
48906 __Pyx_RefNannySetupContext("mirror_image_get_instance_id", 0);
48907
48908 /* "rbd.pyx":4209
48909 * """
48910 * cdef:
48911 * int ret = -errno.ERANGE # <<<<<<<<<<<<<<
48912 * size_t size = 32
48913 * char *instance_id = NULL
48914 */
48915 __pyx_v_ret = (-ERANGE34);
48916
48917 /* "rbd.pyx":4210
48918 * cdef:
48919 * int ret = -errno.ERANGE
48920 * size_t size = 32 # <<<<<<<<<<<<<<
48921 * char *instance_id = NULL
48922 * try:
48923 */
48924 __pyx_v_size = 32;
48925
48926 /* "rbd.pyx":4211
48927 * int ret = -errno.ERANGE
48928 * size_t size = 32
48929 * char *instance_id = NULL # <<<<<<<<<<<<<<
48930 * try:
48931 * while ret == -errno.ERANGE and size <= 4096:
48932 */
48933 __pyx_v_instance_id = NULL((void*)0);
48934
48935 /* "rbd.pyx":4212
48936 * size_t size = 32
48937 * char *instance_id = NULL
48938 * try: # <<<<<<<<<<<<<<
48939 * while ret == -errno.ERANGE and size <= 4096:
48940 * instance_id = <char *>realloc_chk(instance_id, size)
48941 */
48942 /*try:*/ {
48943
48944 /* "rbd.pyx":4213
48945 * char *instance_id = NULL
48946 * try:
48947 * while ret == -errno.ERANGE and size <= 4096: # <<<<<<<<<<<<<<
48948 * instance_id = <char *>realloc_chk(instance_id, size)
48949 * with nogil:
48950 */
48951 while (1) {
48952 __pyx_t_2 = ((__pyx_v_ret == (-ERANGE34)) != 0);
48953 if (__pyx_t_2) {
48954 } else {
48955 __pyx_t_1 = __pyx_t_2;
48956 goto __pyx_L8_bool_binop_done;
48957 }
48958 __pyx_t_2 = ((__pyx_v_size <= 0x1000) != 0);
48959 __pyx_t_1 = __pyx_t_2;
48960 __pyx_L8_bool_binop_done:;
48961 if (!__pyx_t_1) break;
48962
48963 /* "rbd.pyx":4214
48964 * try:
48965 * while ret == -errno.ERANGE and size <= 4096:
48966 * instance_id = <char *>realloc_chk(instance_id, size) # <<<<<<<<<<<<<<
48967 * with nogil:
48968 * ret = rbd_mirror_image_get_instance_id(self.image,
48969 */
48970 __pyx_t_3 = __pyx_f_3rbd_realloc_chk(__pyx_v_instance_id, __pyx_v_size); if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4214; __pyx_clineno = __LINE__48970; goto __pyx_L4_error;}
48971 __pyx_v_instance_id = ((char *)__pyx_t_3);
48972
48973 /* "rbd.pyx":4215
48974 * while ret == -errno.ERANGE and size <= 4096:
48975 * instance_id = <char *>realloc_chk(instance_id, size)
48976 * with nogil: # <<<<<<<<<<<<<<
48977 * ret = rbd_mirror_image_get_instance_id(self.image,
48978 * instance_id, &size)
48979 */
48980 {
48981 #ifdef WITH_THREAD1
48982 PyThreadState *_save;
48983 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
48984 #endif
48985 /*try:*/ {
48986
48987 /* "rbd.pyx":4216
48988 * instance_id = <char *>realloc_chk(instance_id, size)
48989 * with nogil:
48990 * ret = rbd_mirror_image_get_instance_id(self.image, # <<<<<<<<<<<<<<
48991 * instance_id, &size)
48992 * if ret != 0:
48993 */
48994 __pyx_v_ret = rbd_mirror_image_get_instance_id(__pyx_v_self->image, __pyx_v_instance_id, (&__pyx_v_size));
48995 }
48996
48997 /* "rbd.pyx":4215
48998 * while ret == -errno.ERANGE and size <= 4096:
48999 * instance_id = <char *>realloc_chk(instance_id, size)
49000 * with nogil: # <<<<<<<<<<<<<<
49001 * ret = rbd_mirror_image_get_instance_id(self.image,
49002 * instance_id, &size)
49003 */
49004 /*finally:*/ {
49005 /*normal exit:*/{
49006 #ifdef WITH_THREAD1
49007 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
49008 #endif
49009 goto __pyx_L14;
49010 }
49011 __pyx_L14:;
49012 }
49013 }
49014 }
49015
49016 /* "rbd.pyx":4218
49017 * ret = rbd_mirror_image_get_instance_id(self.image,
49018 * instance_id, &size)
49019 * if ret != 0: # <<<<<<<<<<<<<<
49020 * raise make_ex(ret,
49021 * 'error getting mirror instance id for image %s' %
49022 */
49023 __pyx_t_1 = ((__pyx_v_ret != 0) != 0);
49024 if (__pyx_t_1) {
49025
49026 /* "rbd.pyx":4219
49027 * instance_id, &size)
49028 * if ret != 0:
49029 * raise make_ex(ret, # <<<<<<<<<<<<<<
49030 * 'error getting mirror instance id for image %s' %
49031 * self.name)
49032 */
49033 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4219; __pyx_clineno = __LINE__49033; goto __pyx_L4_error;}
49034 __Pyx_GOTREF(__pyx_t_4);
49035
49036 /* "rbd.pyx":4220
49037 * if ret != 0:
49038 * raise make_ex(ret,
49039 * 'error getting mirror instance id for image %s' % # <<<<<<<<<<<<<<
49040 * self.name)
49041 * return decode_cstr(instance_id)
49042 */
49043 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_mirror_instance_id, __pyx_v_self->name)PyString_Format(__pyx_kp_s_error_getting_mirror_instance_id, __pyx_v_self
->name)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4220; __pyx_clineno = __LINE__49043; goto __pyx_L4_error;}
49044 __Pyx_GOTREF(__pyx_t_5);
49045
49046 /* "rbd.pyx":4219
49047 * instance_id, &size)
49048 * if ret != 0:
49049 * raise make_ex(ret, # <<<<<<<<<<<<<<
49050 * 'error getting mirror instance id for image %s' %
49051 * self.name)
49052 */
49053 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4219; __pyx_clineno = __LINE__49053; goto __pyx_L4_error;}
49054 __Pyx_GOTREF(__pyx_t_6);
49055 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
49056 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
49057 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
49058 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
49059 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4219; __pyx_clineno = __LINE__49059; goto __pyx_L4_error;}
49060
49061 /* "rbd.pyx":4218
49062 * ret = rbd_mirror_image_get_instance_id(self.image,
49063 * instance_id, &size)
49064 * if ret != 0: # <<<<<<<<<<<<<<
49065 * raise make_ex(ret,
49066 * 'error getting mirror instance id for image %s' %
49067 */
49068 }
49069
49070 /* "rbd.pyx":4222
49071 * 'error getting mirror instance id for image %s' %
49072 * self.name)
49073 * return decode_cstr(instance_id) # <<<<<<<<<<<<<<
49074 * finally:
49075 * free(instance_id)
49076 */
49077 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
49078 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4222; __pyx_clineno = __LINE__49078; goto __pyx_L4_error;}
49079 __Pyx_GOTREF(__pyx_t_5);
49080 __pyx_t_4 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_instance_id); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4222; __pyx_clineno = __LINE__49080; goto __pyx_L4_error;}
49081 __Pyx_GOTREF(__pyx_t_4);
49082 __pyx_t_7 = NULL((void*)0);
49083 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
49084 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
49085 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
49086 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
49087 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
49088 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
49089 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
49090 }
49091 }
49092 if (!__pyx_t_7) {
49093 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4222; __pyx_clineno = __LINE__49093; goto __pyx_L4_error;}
49094 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
49095 __Pyx_GOTREF(__pyx_t_6);
49096 } else {
49097 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4222; __pyx_clineno = __LINE__49097; goto __pyx_L4_error;}
49098 __Pyx_GOTREF(__pyx_t_8);
49099 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
49100 __Pyx_GIVEREF(__pyx_t_4);
49101 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_4);
49102 __pyx_t_4 = 0;
49103 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4222; __pyx_clineno = __LINE__49103; goto __pyx_L4_error;}
49104 __Pyx_GOTREF(__pyx_t_6);
49105 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
49106 }
49107 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
49108 __pyx_r = __pyx_t_6;
49109 __pyx_t_6 = 0;
49110 goto __pyx_L3_return;
49111 }
49112
49113 /* "rbd.pyx":4224
49114 * return decode_cstr(instance_id)
49115 * finally:
49116 * free(instance_id) # <<<<<<<<<<<<<<
49117 *
49118 * def aio_read(self, offset, length, oncomplete, fadvise_flags=0):
49119 */
49120 /*finally:*/ {
49121 /*exception exit:*/{
49122 __pyx_L4_error:;
49123 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
49124 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
49125 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
49126 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
49127 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
49128 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
49129 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
49130 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_12, &
__pyx_t_13, &__pyx_t_14) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
49131 __Pyx_XGOTREF(__pyx_t_12);
49132 __Pyx_XGOTREF(__pyx_t_13);
49133 __Pyx_XGOTREF(__pyx_t_14);
49134 __Pyx_XGOTREF(__pyx_t_15);
49135 __Pyx_XGOTREF(__pyx_t_16);
49136 __Pyx_XGOTREF(__pyx_t_17);
49137 __pyx_t_9 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
49138 {
49139 free(__pyx_v_instance_id);
49140 }
49141 if (PY_MAJOR_VERSION2 >= 3) {
49142 __Pyx_XGIVEREF(__pyx_t_15);
49143 __Pyx_XGIVEREF(__pyx_t_16);
49144 __Pyx_XGIVEREF(__pyx_t_17);
49145 __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
49146 }
49147 __Pyx_XGIVEREF(__pyx_t_12);
49148 __Pyx_XGIVEREF(__pyx_t_13);
49149 __Pyx_XGIVEREF(__pyx_t_14);
49150 __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
49151 __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
49152 __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
49153 goto __pyx_L1_error;
49154 }
49155 __pyx_L3_return: {
49156 __pyx_t_17 = __pyx_r;
49157 __pyx_r = 0;
49158 free(__pyx_v_instance_id);
49159 __pyx_r = __pyx_t_17;
49160 __pyx_t_17 = 0;
49161 goto __pyx_L0;
49162 }
49163 }
49164
49165 /* "rbd.pyx":4202
49166 * return status
49167 *
49168 * def mirror_image_get_instance_id(self): # <<<<<<<<<<<<<<
49169 * """
49170 * Get mirror instance id for the image.
49171 */
49172
49173 /* function exit code */
49174 __pyx_L1_error:;
49175 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
49176 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
49177 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
49178 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
49179 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
49180 __Pyx_AddTraceback("rbd.Image.mirror_image_get_instance_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
49181 __pyx_r = NULL((void*)0);
49182 __pyx_L0:;
49183 __Pyx_XGIVEREF(__pyx_r);
49184 __Pyx_RefNannyFinishContext();
49185 return __pyx_r;
49186}
49187
49188/* "rbd.pyx":4226
49189 * free(instance_id)
49190 *
49191 * def aio_read(self, offset, length, oncomplete, fadvise_flags=0): # <<<<<<<<<<<<<<
49192 * """
49193 * Asynchronously read data from the image
49194 */
49195
49196/* Python wrapper */
49197static PyObject *__pyx_pw_3rbd_5Image_153aio_read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
49198static char __pyx_doc_3rbd_5Image_152aio_read[] = "Image.aio_read(self, offset, length, oncomplete, fadvise_flags=0)\n\n Asynchronously read data from the image\n\n Raises :class:`InvalidArgument` if part of the range specified is\n outside the image.\n\n oncomplete will be called with the returned read value as\n well as the completion:\n\n oncomplete(completion, data_read)\n\n :param offset: the offset to start reading at\n :type offset: int\n :param length: how many bytes to read\n :type length: int\n :param oncomplete: what to do when the read is complete\n :type oncomplete: completion\n :param fadvise_flags: fadvise flags for this read\n :type fadvise_flags: int\n :returns: :class:`Completion` - the completion object\n :raises: :class:`InvalidArgument`, :class:`IOError`\n ";
49199static PyObject *__pyx_pw_3rbd_5Image_153aio_read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
49200 PyObject *__pyx_v_offset = 0;
49201 PyObject *__pyx_v_length = 0;
49202 PyObject *__pyx_v_oncomplete = 0;
49203 PyObject *__pyx_v_fadvise_flags = 0;
49204 int __pyx_lineno = 0;
49205 const char *__pyx_filename = NULL((void*)0);
49206 int __pyx_clineno = 0;
49207 PyObject *__pyx_r = 0;
49208 __Pyx_RefNannyDeclarations
49209 __Pyx_RefNannySetupContext("aio_read (wrapper)", 0);
49210 {
49211 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_length,&__pyx_n_s_oncomplete,&__pyx_n_s_fadvise_flags,0};
49212 PyObject* values[4] = {0,0,0,0};
49213 values[3] = ((PyObject *)__pyx_int_0);
49214 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
49215 Py_ssize_t kw_args;
49216 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
49217 switch (pos_args) {
49218 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
49219 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
49220 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
49221 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
49222 case 0: break;
49223 default: goto __pyx_L5_argtuple_error;
49224 }
49225 kw_args = PyDict_Size(__pyx_kwds);
49226 switch (pos_args) {
49227 case 0:
49228 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
49229 else goto __pyx_L5_argtuple_error;
49230 case 1:
49231 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length
)) != 0), 1)
) kw_args--;
49232 else {
49233 __Pyx_RaiseArgtupleInvalid("aio_read", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4226; __pyx_clineno = __LINE__49233; goto __pyx_L3_error;}
49234 }
49235 case 2:
49236 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete
)) != 0), 1)
) kw_args--;
49237 else {
49238 __Pyx_RaiseArgtupleInvalid("aio_read", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4226; __pyx_clineno = __LINE__49238; goto __pyx_L3_error;}
49239 }
49240 case 3:
49241 if (kw_args > 0) {
49242 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fadvise_flags);
49243 if (value) { values[3] = value; kw_args--; }
49244 }
49245 }
49246 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
49247 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "aio_read") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "aio_read") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4226; __pyx_clineno = __LINE__49247; goto __pyx_L3_error;}
49248 }
49249 } else {
49250 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
49251 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
49252 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
49253 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
49254 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
49255 break;
49256 default: goto __pyx_L5_argtuple_error;
49257 }
49258 }
49259 __pyx_v_offset = values[0];
49260 __pyx_v_length = values[1];
49261 __pyx_v_oncomplete = values[2];
49262 __pyx_v_fadvise_flags = values[3];
49263 }
49264 goto __pyx_L4_argument_unpacking_done;
49265 __pyx_L5_argtuple_error:;
49266 __Pyx_RaiseArgtupleInvalid("aio_read", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4226; __pyx_clineno = __LINE__49266; goto __pyx_L3_error;}
49267 __pyx_L3_error:;
49268 __Pyx_AddTraceback("rbd.Image.aio_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
49269 __Pyx_RefNannyFinishContext();
49270 return NULL((void*)0);
49271 __pyx_L4_argument_unpacking_done:;
49272 __pyx_r = __pyx_pf_3rbd_5Image_152aio_read(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_offset, __pyx_v_length, __pyx_v_oncomplete, __pyx_v_fadvise_flags);
49273
49274 /* function exit code */
49275 __Pyx_RefNannyFinishContext();
49276 return __pyx_r;
49277}
49278
49279/* "rbd.pyx":4257
49280 * Completion completion
49281 *
49282 * def oncomplete_(completion_v): # <<<<<<<<<<<<<<
49283 * cdef Completion _completion_v = completion_v
49284 * return_value = _completion_v.get_return_value()
49285 */
49286
49287/* Python wrapper */
49288static PyObject *__pyx_pw_3rbd_5Image_8aio_read_1oncomplete_(PyObject *__pyx_self, PyObject *__pyx_v_completion_v); /*proto*/
49289static PyMethodDef __pyx_mdef_3rbd_5Image_8aio_read_1oncomplete_ = {"oncomplete_", (PyCFunction)__pyx_pw_3rbd_5Image_8aio_read_1oncomplete_, METH_O0x0008, 0};
49290static PyObject *__pyx_pw_3rbd_5Image_8aio_read_1oncomplete_(PyObject *__pyx_self, PyObject *__pyx_v_completion_v) {
49291 PyObject *__pyx_r = 0;
49292 __Pyx_RefNannyDeclarations
49293 __Pyx_RefNannySetupContext("oncomplete_ (wrapper)", 0);
49294 __pyx_r = __pyx_pf_3rbd_5Image_8aio_read_oncomplete_(__pyx_self, ((PyObject *)__pyx_v_completion_v));
49295
49296 /* function exit code */
49297 __Pyx_RefNannyFinishContext();
49298 return __pyx_r;
49299}
49300
49301static PyObject *__pyx_pf_3rbd_5Image_8aio_read_oncomplete_(PyObject *__pyx_self, PyObject *__pyx_v_completion_v) {
49302 struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *__pyx_cur_scope;
49303 struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *__pyx_outer_scope;
49304 struct __pyx_obj_3rbd_Completion *__pyx_v__completion_v = 0;
49305 PyObject *__pyx_v_return_value = NULL((void*)0);
49306 PyObject *__pyx_r = NULL((void*)0);
49307 __Pyx_RefNannyDeclarations
49308 PyObject *__pyx_t_1 = NULL((void*)0);
49309 PyObject *__pyx_t_2 = NULL((void*)0);
49310 PyObject *__pyx_t_3 = NULL((void*)0);
49311 int __pyx_t_4;
49312 int __pyx_t_5;
49313 Py_ssize_t __pyx_t_6;
49314 int __pyx_t_7;
49315 PyObject *__pyx_t_8 = NULL((void*)0);
49316 PyObject *__pyx_t_9 = NULL((void*)0);
49317 int __pyx_lineno = 0;
49318 const char *__pyx_filename = NULL((void*)0);
49319 int __pyx_clineno = 0;
49320 __Pyx_RefNannySetupContext("oncomplete_", 0);
49321 __pyx_outer_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *) __Pyx_CyFunction_GetClosure(__pyx_self)(((__pyx_CyFunctionObject *) (__pyx_self))->func_closure);
49322 __pyx_cur_scope = __pyx_outer_scope;
49323
49324 /* "rbd.pyx":4258
49325 *
49326 * def oncomplete_(completion_v):
49327 * cdef Completion _completion_v = completion_v # <<<<<<<<<<<<<<
49328 * return_value = _completion_v.get_return_value()
49329 * if return_value > 0 and return_value != length:
49330 */
49331 if (!(likely(((__pyx_v_completion_v) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_completion_v, __pyx_ptype_3rbd_Completion)))__builtin_expect(!!(((__pyx_v_completion_v) == (&_Py_NoneStruct
)) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_completion_v
, __pyx_ptype_3rbd_Completion)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4258; __pyx_clineno = __LINE__49331; goto __pyx_L1_error;}
49332 __pyx_t_1 = __pyx_v_completion_v;
49333 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
49334 __pyx_v__completion_v = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_1);
49335 __pyx_t_1 = 0;
49336
49337 /* "rbd.pyx":4259
49338 * def oncomplete_(completion_v):
49339 * cdef Completion _completion_v = completion_v
49340 * return_value = _completion_v.get_return_value() # <<<<<<<<<<<<<<
49341 * if return_value > 0 and return_value != length:
49342 * _PyBytes_Resize(&_completion_v.buf, return_value)
49343 */
49344 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__completion_v), __pyx_n_s_get_return_value); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4259; __pyx_clineno = __LINE__49344; goto __pyx_L1_error;}
49345 __Pyx_GOTREF(__pyx_t_2);
49346 __pyx_t_3 = NULL((void*)0);
49347 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
49348 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
49349 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
49350 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
49351 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
49352 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
49353 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
49354 }
49355 }
49356 if (__pyx_t_3) {
49357 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4259; __pyx_clineno = __LINE__49357; goto __pyx_L1_error;}
49358 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
49359 } else {
49360 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4259; __pyx_clineno = __LINE__49360; goto __pyx_L1_error;}
49361 }
49362 __Pyx_GOTREF(__pyx_t_1);
49363 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
49364 __pyx_v_return_value = __pyx_t_1;
49365 __pyx_t_1 = 0;
49366
49367 /* "rbd.pyx":4260
49368 * cdef Completion _completion_v = completion_v
49369 * return_value = _completion_v.get_return_value()
49370 * if return_value > 0 and return_value != length: # <<<<<<<<<<<<<<
49371 * _PyBytes_Resize(&_completion_v.buf, return_value)
49372 * return oncomplete(_completion_v, <object>_completion_v.buf if return_value >= 0 else None)
49373 */
49374 __pyx_t_1 = PyObject_RichCompare(__pyx_v_return_value, __pyx_int_0, Py_GT4); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4260; __pyx_clineno = __LINE__49374; goto __pyx_L1_error;}
49375 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)__builtin_expect(!!(__pyx_t_5 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4260; __pyx_clineno = __LINE__49375; goto __pyx_L1_error;}
49376 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
49377 if (__pyx_t_5) {
49378 } else {
49379 __pyx_t_4 = __pyx_t_5;
49380 goto __pyx_L4_bool_binop_done;
49381 }
49382 if (unlikely(!__pyx_cur_scope->__pyx_v_length)__builtin_expect(!!(!__pyx_cur_scope->__pyx_v_length), 0)) { __Pyx_RaiseClosureNameError("length"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4260; __pyx_clineno = __LINE__49382; goto __pyx_L1_error;} }
49383 __pyx_t_1 = PyObject_RichCompare(__pyx_v_return_value, __pyx_cur_scope->__pyx_v_length, Py_NE3); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4260; __pyx_clineno = __LINE__49383; goto __pyx_L1_error;}
49384 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)__builtin_expect(!!(__pyx_t_5 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4260; __pyx_clineno = __LINE__49384; goto __pyx_L1_error;}
49385 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
49386 __pyx_t_4 = __pyx_t_5;
49387 __pyx_L4_bool_binop_done:;
49388 if (__pyx_t_4) {
49389
49390 /* "rbd.pyx":4261
49391 * return_value = _completion_v.get_return_value()
49392 * if return_value > 0 and return_value != length:
49393 * _PyBytes_Resize(&_completion_v.buf, return_value) # <<<<<<<<<<<<<<
49394 * return oncomplete(_completion_v, <object>_completion_v.buf if return_value >= 0 else None)
49395 *
49396 */
49397 __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_return_value); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4261; __pyx_clineno = __LINE__49397; goto __pyx_L1_error;}
49398 __pyx_t_7 = _PyBytes_Resize_PyString_Resize((&__pyx_v__completion_v->buf), __pyx_t_6); if (unlikely(__pyx_t_7 == -1)__builtin_expect(!!(__pyx_t_7 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4261; __pyx_clineno = __LINE__49398; goto __pyx_L1_error;}
49399
49400 /* "rbd.pyx":4260
49401 * cdef Completion _completion_v = completion_v
49402 * return_value = _completion_v.get_return_value()
49403 * if return_value > 0 and return_value != length: # <<<<<<<<<<<<<<
49404 * _PyBytes_Resize(&_completion_v.buf, return_value)
49405 * return oncomplete(_completion_v, <object>_completion_v.buf if return_value >= 0 else None)
49406 */
49407 }
49408
49409 /* "rbd.pyx":4262
49410 * if return_value > 0 and return_value != length:
49411 * _PyBytes_Resize(&_completion_v.buf, return_value)
49412 * return oncomplete(_completion_v, <object>_completion_v.buf if return_value >= 0 else None) # <<<<<<<<<<<<<<
49413 *
49414 * completion = self.__get_completion(oncomplete_)
49415 */
49416 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
49417 if (unlikely(!__pyx_cur_scope->__pyx_v_oncomplete)__builtin_expect(!!(!__pyx_cur_scope->__pyx_v_oncomplete),
0)
) { __Pyx_RaiseClosureNameError("oncomplete"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__49417; goto __pyx_L1_error;} }
49418 __pyx_t_3 = PyObject_RichCompare(__pyx_v_return_value, __pyx_int_0, Py_GE5); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__49418; goto __pyx_L1_error;}
49419 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)__builtin_expect(!!(__pyx_t_4 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__49419; goto __pyx_L1_error;}
49420 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
49421 if (__pyx_t_4) {
49422 __Pyx_INCREF(((PyObject *)__pyx_v__completion_v->buf))( ((PyObject*)(((PyObject *)__pyx_v__completion_v->buf)))->
ob_refcnt++)
;
49423 __pyx_t_2 = ((PyObject *)__pyx_v__completion_v->buf);
49424 } else {
49425 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
49426 __pyx_t_2 = Py_None(&_Py_NoneStruct);
49427 }
49428 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_oncomplete)( ((PyObject*)(__pyx_cur_scope->__pyx_v_oncomplete))->ob_refcnt
++)
;
49429 __pyx_t_3 = __pyx_cur_scope->__pyx_v_oncomplete; __pyx_t_8 = NULL((void*)0);
49430 __pyx_t_6 = 0;
49431 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
49432 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
49433 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
49434 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
49435 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
49436 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
49437 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
49438 __pyx_t_6 = 1;
49439 }
49440 }
49441 __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__49441; goto __pyx_L1_error;}
49442 __Pyx_GOTREF(__pyx_t_9);
49443 if (__pyx_t_8) {
49444 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
49445 }
49446 __Pyx_INCREF(((PyObject *)__pyx_v__completion_v))( ((PyObject*)(((PyObject *)__pyx_v__completion_v)))->ob_refcnt
++)
;
49447 __Pyx_GIVEREF(((PyObject *)__pyx_v__completion_v));
49448 PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, ((PyObject *)__pyx_v__completion_v))(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_6] = ((
PyObject *)__pyx_v__completion_v))
;
49449 __Pyx_GIVEREF(__pyx_t_2);
49450 PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_2)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_6] = __pyx_t_2
)
;
49451 __pyx_t_2 = 0;
49452 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__49452; goto __pyx_L1_error;}
49453 __Pyx_GOTREF(__pyx_t_1);
49454 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
49455 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
49456 __pyx_r = __pyx_t_1;
49457 __pyx_t_1 = 0;
49458 goto __pyx_L0;
49459
49460 /* "rbd.pyx":4257
49461 * Completion completion
49462 *
49463 * def oncomplete_(completion_v): # <<<<<<<<<<<<<<
49464 * cdef Completion _completion_v = completion_v
49465 * return_value = _completion_v.get_return_value()
49466 */
49467
49468 /* function exit code */
49469 __pyx_L1_error:;
49470 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
49471 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
49472 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
49473 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
49474 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
49475 __Pyx_AddTraceback("rbd.Image.aio_read.oncomplete_", __pyx_clineno, __pyx_lineno, __pyx_filename);
49476 __pyx_r = NULL((void*)0);
49477 __pyx_L0:;
49478 __Pyx_XDECREF((PyObject *)__pyx_v__completion_v)do { if (((PyObject *)__pyx_v__completion_v) == ((void*)0)) ;
else do { if ( --((PyObject*)((PyObject *)__pyx_v__completion_v
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
(PyObject *)__pyx_v__completion_v)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)((PyObject *)__pyx_v__completion_v
)))); } while (0); } while (0)
;
49479 __Pyx_XDECREF(__pyx_v_return_value)do { if ((__pyx_v_return_value) == ((void*)0)) ; else do { if
( --((PyObject*)(__pyx_v_return_value))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(__pyx_v_return_value)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_return_value
)))); } while (0); } while (0)
;
49480 __Pyx_XGIVEREF(__pyx_r);
49481 __Pyx_RefNannyFinishContext();
49482 return __pyx_r;
49483}
49484
49485/* "rbd.pyx":4226
49486 * free(instance_id)
49487 *
49488 * def aio_read(self, offset, length, oncomplete, fadvise_flags=0): # <<<<<<<<<<<<<<
49489 * """
49490 * Asynchronously read data from the image
49491 */
49492
49493static PyObject *__pyx_pf_3rbd_5Image_152aio_read(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_oncomplete, PyObject *__pyx_v_fadvise_flags) {
49494 struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *__pyx_cur_scope;
49495 char *__pyx_v_ret_buf;
49496 uint64_t __pyx_v__offset;
49497 size_t __pyx_v__length;
49498 int __pyx_v__fadvise_flags;
49499 struct __pyx_obj_3rbd_Completion *__pyx_v_completion = 0;
49500 PyObject *__pyx_v_oncomplete_ = 0;
49501 int __pyx_v_ret;
49502 PyObject *__pyx_r = NULL((void*)0);
49503 __Pyx_RefNannyDeclarations
49504 uint64_t __pyx_t_1;
49505 size_t __pyx_t_2;
49506 int __pyx_t_3;
49507 PyObject *__pyx_t_4 = NULL((void*)0);
49508 PyObject *__pyx_t_5 = NULL((void*)0);
49509 PyObject *__pyx_t_6 = NULL((void*)0);
49510 PyObject *__pyx_t_7 = NULL((void*)0);
49511 Py_ssize_t __pyx_t_8;
49512 PyObject *__pyx_t_9;
49513 char *__pyx_t_10;
49514 PyObject *__pyx_t_11 = NULL((void*)0);
49515 PyObject *__pyx_t_12 = NULL((void*)0);
49516 PyObject *__pyx_t_13 = NULL((void*)0);
49517 int __pyx_t_14;
49518 int __pyx_lineno = 0;
49519 const char *__pyx_filename = NULL((void*)0);
49520 int __pyx_clineno = 0;
49521 __Pyx_RefNannySetupContext("aio_read", 0);
49522 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *)__pyx_tp_new_3rbd___pyx_scope_struct_5_aio_read(__pyx_ptype_3rbd___pyx_scope_struct_5_aio_read, __pyx_empty_tuple, NULL((void*)0));
49523 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
49524 __Pyx_RefNannyFinishContext();
49525 return NULL((void*)0);
49526 }
49527 __Pyx_GOTREF(__pyx_cur_scope);
49528 __pyx_cur_scope->__pyx_v_length = __pyx_v_length;
49529 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_length)( ((PyObject*)(__pyx_cur_scope->__pyx_v_length))->ob_refcnt
++)
;
49530 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_length);
49531 __pyx_cur_scope->__pyx_v_oncomplete = __pyx_v_oncomplete;
49532 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_oncomplete)( ((PyObject*)(__pyx_cur_scope->__pyx_v_oncomplete))->ob_refcnt
++)
;
49533 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_oncomplete);
49534
49535 /* "rbd.pyx":4252
49536 * cdef:
49537 * char *ret_buf
49538 * uint64_t _offset = offset # <<<<<<<<<<<<<<
49539 * size_t _length = length
49540 * int _fadvise_flags = fadvise_flags
49541 */
49542 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4252; __pyx_clineno = __LINE__49542; goto __pyx_L1_error;}
49543 __pyx_v__offset = __pyx_t_1;
49544
49545 /* "rbd.pyx":4253
49546 * char *ret_buf
49547 * uint64_t _offset = offset
49548 * size_t _length = length # <<<<<<<<<<<<<<
49549 * int _fadvise_flags = fadvise_flags
49550 * Completion completion
49551 */
49552 __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_length); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_2 == (size_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4253; __pyx_clineno = __LINE__49552; goto __pyx_L1_error;}
49553 __pyx_v__length = __pyx_t_2;
49554
49555 /* "rbd.pyx":4254
49556 * uint64_t _offset = offset
49557 * size_t _length = length
49558 * int _fadvise_flags = fadvise_flags # <<<<<<<<<<<<<<
49559 * Completion completion
49560 *
49561 */
49562 __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_fadvise_flags); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_3 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4254; __pyx_clineno = __LINE__49562; goto __pyx_L1_error;}
49563 __pyx_v__fadvise_flags = __pyx_t_3;
49564
49565 /* "rbd.pyx":4257
49566 * Completion completion
49567 *
49568 * def oncomplete_(completion_v): # <<<<<<<<<<<<<<
49569 * cdef Completion _completion_v = completion_v
49570 * return_value = _completion_v.get_return_value()
49571 */
49572 __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_5Image_8aio_read_1oncomplete_, 0, __pyx_n_s_aio_read_locals_oncomplete, ((PyObject*)__pyx_cur_scope), __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__24))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_5Image_8aio_read_1oncomplete_
, 0, __pyx_n_s_aio_read_locals_oncomplete, ((PyObject*)__pyx_cur_scope
), __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__24))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4257; __pyx_clineno = __LINE__49572; goto __pyx_L1_error;}
49573 __Pyx_GOTREF(__pyx_t_4);
49574 __pyx_v_oncomplete_ = __pyx_t_4;
49575 __pyx_t_4 = 0;
49576
49577 /* "rbd.pyx":4264
49578 * return oncomplete(_completion_v, <object>_completion_v.buf if return_value >= 0 else None)
49579 *
49580 * completion = self.__get_completion(oncomplete_) # <<<<<<<<<<<<<<
49581 * completion.buf = PyBytes_FromStringAndSize(NULL, length)
49582 * ret_buf = PyBytes_AsString(completion.buf)
49583 */
49584 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_completion); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __pyx_clineno = __LINE__49584; goto __pyx_L1_error;}
49585 __Pyx_GOTREF(__pyx_t_5);
49586 __pyx_t_6 = NULL((void*)0);
49587 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
49588 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
49589 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
49590 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
49591 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
49592 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
49593 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
49594 }
49595 }
49596 if (!__pyx_t_6) {
49597 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_oncomplete_); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __pyx_clineno = __LINE__49597; goto __pyx_L1_error;}
49598 __Pyx_GOTREF(__pyx_t_4);
49599 } else {
49600 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __pyx_clineno = __LINE__49600; goto __pyx_L1_error;}
49601 __Pyx_GOTREF(__pyx_t_7);
49602 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
49603 __Pyx_INCREF(__pyx_v_oncomplete_)( ((PyObject*)(__pyx_v_oncomplete_))->ob_refcnt++);
49604 __Pyx_GIVEREF(__pyx_v_oncomplete_);
49605 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_oncomplete_)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_v_oncomplete_
)
;
49606 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __pyx_clineno = __LINE__49606; goto __pyx_L1_error;}
49607 __Pyx_GOTREF(__pyx_t_4);
49608 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
49609 }
49610 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
49611 if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_3rbd_Completion)))__builtin_expect(!!(((__pyx_t_4) == (&_Py_NoneStruct)) ||
__builtin_expect(!!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_3rbd_Completion
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __pyx_clineno = __LINE__49611; goto __pyx_L1_error;}
49612 __pyx_v_completion = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_4);
49613 __pyx_t_4 = 0;
49614
49615 /* "rbd.pyx":4265
49616 *
49617 * completion = self.__get_completion(oncomplete_)
49618 * completion.buf = PyBytes_FromStringAndSize(NULL, length) # <<<<<<<<<<<<<<
49619 * ret_buf = PyBytes_AsString(completion.buf)
49620 * try:
49621 */
49622 __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_cur_scope->__pyx_v_length); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4265; __pyx_clineno = __LINE__49622; goto __pyx_L1_error;}
49623 __pyx_t_9 = PyBytes_FromStringAndSizePyString_FromStringAndSize(NULL((void*)0), __pyx_t_8); if (unlikely(__pyx_t_9 == NULL)__builtin_expect(!!(__pyx_t_9 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4265; __pyx_clineno = __LINE__49623; goto __pyx_L1_error;}
49624 __pyx_v_completion->buf = __pyx_t_9;
49625
49626 /* "rbd.pyx":4266
49627 * completion = self.__get_completion(oncomplete_)
49628 * completion.buf = PyBytes_FromStringAndSize(NULL, length)
49629 * ret_buf = PyBytes_AsString(completion.buf) # <<<<<<<<<<<<<<
49630 * try:
49631 * completion.__persist()
49632 */
49633 __pyx_t_10 = PyBytes_AsStringPyString_AsString(__pyx_v_completion->buf); if (unlikely(__pyx_t_10 == NULL)__builtin_expect(!!(__pyx_t_10 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4266; __pyx_clineno = __LINE__49633; goto __pyx_L1_error;}
49634 __pyx_v_ret_buf = __pyx_t_10;
49635
49636 /* "rbd.pyx":4267
49637 * completion.buf = PyBytes_FromStringAndSize(NULL, length)
49638 * ret_buf = PyBytes_AsString(completion.buf)
49639 * try: # <<<<<<<<<<<<<<
49640 * completion.__persist()
49641 * with nogil:
49642 */
49643 {
49644 __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
49645 __Pyx_XGOTREF(__pyx_t_11);
49646 __Pyx_XGOTREF(__pyx_t_12);
49647 __Pyx_XGOTREF(__pyx_t_13);
49648 /*try:*/ {
49649
49650 /* "rbd.pyx":4268
49651 * ret_buf = PyBytes_AsString(completion.buf)
49652 * try:
49653 * completion.__persist() # <<<<<<<<<<<<<<
49654 * with nogil:
49655 * ret = rbd_aio_read2(self.image, _offset, _length, ret_buf,
49656 */
49657 __pyx_t_4 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___persist(__pyx_v_completion); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4268; __pyx_clineno = __LINE__49657; goto __pyx_L3_error;}
49658 __Pyx_GOTREF(__pyx_t_4);
49659 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
49660
49661 /* "rbd.pyx":4269
49662 * try:
49663 * completion.__persist()
49664 * with nogil: # <<<<<<<<<<<<<<
49665 * ret = rbd_aio_read2(self.image, _offset, _length, ret_buf,
49666 * completion.rbd_comp, _fadvise_flags)
49667 */
49668 {
49669 #ifdef WITH_THREAD1
49670 PyThreadState *_save;
49671 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
49672 #endif
49673 /*try:*/ {
49674
49675 /* "rbd.pyx":4270
49676 * completion.__persist()
49677 * with nogil:
49678 * ret = rbd_aio_read2(self.image, _offset, _length, ret_buf, # <<<<<<<<<<<<<<
49679 * completion.rbd_comp, _fadvise_flags)
49680 * if ret < 0:
49681 */
49682 __pyx_v_ret = rbd_aio_read2(__pyx_v_self->image, __pyx_v__offset, __pyx_v__length, __pyx_v_ret_buf, __pyx_v_completion->rbd_comp, __pyx_v__fadvise_flags);
49683 }
49684
49685 /* "rbd.pyx":4269
49686 * try:
49687 * completion.__persist()
49688 * with nogil: # <<<<<<<<<<<<<<
49689 * ret = rbd_aio_read2(self.image, _offset, _length, ret_buf,
49690 * completion.rbd_comp, _fadvise_flags)
49691 */
49692 /*finally:*/ {
49693 /*normal exit:*/{
49694 #ifdef WITH_THREAD1
49695 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
49696 #endif
49697 goto __pyx_L15;
49698 }
49699 __pyx_L15:;
49700 }
49701 }
49702
49703 /* "rbd.pyx":4272
49704 * ret = rbd_aio_read2(self.image, _offset, _length, ret_buf,
49705 * completion.rbd_comp, _fadvise_flags)
49706 * if ret < 0: # <<<<<<<<<<<<<<
49707 * raise make_ex(ret, 'error reading %s %ld~%ld' %
49708 * (self.name, offset, length))
49709 */
49710 __pyx_t_14 = ((__pyx_v_ret < 0) != 0);
49711 if (__pyx_t_14) {
49712
49713 /* "rbd.pyx":4273
49714 * completion.rbd_comp, _fadvise_flags)
49715 * if ret < 0:
49716 * raise make_ex(ret, 'error reading %s %ld~%ld' % # <<<<<<<<<<<<<<
49717 * (self.name, offset, length))
49718 * except:
49719 */
49720 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4273; __pyx_clineno = __LINE__49720; goto __pyx_L3_error;}
49721 __Pyx_GOTREF(__pyx_t_4);
49722
49723 /* "rbd.pyx":4274
49724 * if ret < 0:
49725 * raise make_ex(ret, 'error reading %s %ld~%ld' %
49726 * (self.name, offset, length)) # <<<<<<<<<<<<<<
49727 * except:
49728 * completion.__unpersist()
49729 */
49730 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4274; __pyx_clineno = __LINE__49730; goto __pyx_L3_error;}
49731 __Pyx_GOTREF(__pyx_t_5);
49732 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
49733 __Pyx_GIVEREF(__pyx_v_self->name);
49734 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_self
->name)
;
49735 __Pyx_INCREF(__pyx_v_offset)( ((PyObject*)(__pyx_v_offset))->ob_refcnt++);
49736 __Pyx_GIVEREF(__pyx_v_offset);
49737 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_offset)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_v_offset
)
;
49738 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_length)( ((PyObject*)(__pyx_cur_scope->__pyx_v_length))->ob_refcnt
++)
;
49739 __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_length);
49740 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_cur_scope->__pyx_v_length)(((PyTupleObject *)(__pyx_t_5))->ob_item[2] = __pyx_cur_scope
->__pyx_v_length)
;
49741
49742 /* "rbd.pyx":4273
49743 * completion.rbd_comp, _fadvise_flags)
49744 * if ret < 0:
49745 * raise make_ex(ret, 'error reading %s %ld~%ld' % # <<<<<<<<<<<<<<
49746 * (self.name, offset, length))
49747 * except:
49748 */
49749 __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_error_reading_s_ld_ld, __pyx_t_5)PyString_Format(__pyx_kp_s_error_reading_s_ld_ld, __pyx_t_5); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4273; __pyx_clineno = __LINE__49749; goto __pyx_L3_error;}
49750 __Pyx_GOTREF(__pyx_t_7);
49751 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
49752 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4273; __pyx_clineno = __LINE__49752; goto __pyx_L3_error;}
49753 __Pyx_GOTREF(__pyx_t_5);
49754 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
49755 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
49756 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
49757 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
49758 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4273; __pyx_clineno = __LINE__49758; goto __pyx_L3_error;}
49759
49760 /* "rbd.pyx":4272
49761 * ret = rbd_aio_read2(self.image, _offset, _length, ret_buf,
49762 * completion.rbd_comp, _fadvise_flags)
49763 * if ret < 0: # <<<<<<<<<<<<<<
49764 * raise make_ex(ret, 'error reading %s %ld~%ld' %
49765 * (self.name, offset, length))
49766 */
49767 }
49768
49769 /* "rbd.pyx":4267
49770 * completion.buf = PyBytes_FromStringAndSize(NULL, length)
49771 * ret_buf = PyBytes_AsString(completion.buf)
49772 * try: # <<<<<<<<<<<<<<
49773 * completion.__persist()
49774 * with nogil:
49775 */
49776 }
49777 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
49778 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
; __pyx_t_12 = 0;
49779 __Pyx_XDECREF(__pyx_t_13)do { if ((__pyx_t_13) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_13))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_13)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_13)))); } while (0); } while (0)
; __pyx_t_13 = 0;
49780 goto __pyx_L10_try_end;
49781 __pyx_L3_error:;
49782 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
49783 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
49784 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
49785 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
49786
49787 /* "rbd.pyx":4275
49788 * raise make_ex(ret, 'error reading %s %ld~%ld' %
49789 * (self.name, offset, length))
49790 * except: # <<<<<<<<<<<<<<
49791 * completion.__unpersist()
49792 * raise
49793 */
49794 /*except:*/ {
49795 __Pyx_AddTraceback("rbd.Image.aio_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
49796 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4275; __pyx_clineno = __LINE__49796; goto __pyx_L5_except_error;}
49797 __Pyx_GOTREF(__pyx_t_5);
49798 __Pyx_GOTREF(__pyx_t_7);
49799 __Pyx_GOTREF(__pyx_t_4);
49800
49801 /* "rbd.pyx":4276
49802 * (self.name, offset, length))
49803 * except:
49804 * completion.__unpersist() # <<<<<<<<<<<<<<
49805 * raise
49806 *
49807 */
49808 __pyx_t_6 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___unpersist(__pyx_v_completion); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4276; __pyx_clineno = __LINE__49808; goto __pyx_L5_except_error;}
49809 __Pyx_GOTREF(__pyx_t_6);
49810 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
49811
49812 /* "rbd.pyx":4277
49813 * except:
49814 * completion.__unpersist()
49815 * raise # <<<<<<<<<<<<<<
49816 *
49817 * return completion
49818 */
49819 __Pyx_GIVEREF(__pyx_t_5);
49820 __Pyx_GIVEREF(__pyx_t_7);
49821 __Pyx_XGIVEREF(__pyx_t_4);
49822 __Pyx_ErrRestore(__pyx_t_5, __pyx_t_7, __pyx_t_4);
49823 __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_4 = 0;
49824 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4277; __pyx_clineno = __LINE__49824; goto __pyx_L5_except_error;}
49825 }
49826 __pyx_L5_except_error:;
49827
49828 /* "rbd.pyx":4267
49829 * completion.buf = PyBytes_FromStringAndSize(NULL, length)
49830 * ret_buf = PyBytes_AsString(completion.buf)
49831 * try: # <<<<<<<<<<<<<<
49832 * completion.__persist()
49833 * with nogil:
49834 */
49835 __Pyx_XGIVEREF(__pyx_t_11);
49836 __Pyx_XGIVEREF(__pyx_t_12);
49837 __Pyx_XGIVEREF(__pyx_t_13);
49838 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
49839 goto __pyx_L1_error;
49840 __pyx_L10_try_end:;
49841 }
49842
49843 /* "rbd.pyx":4279
49844 * raise
49845 *
49846 * return completion # <<<<<<<<<<<<<<
49847 *
49848 * def aio_write(self, data, offset, oncomplete, fadvise_flags=0):
49849 */
49850 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
49851 __Pyx_INCREF(((PyObject *)__pyx_v_completion))( ((PyObject*)(((PyObject *)__pyx_v_completion)))->ob_refcnt
++)
;
49852 __pyx_r = ((PyObject *)__pyx_v_completion);
49853 goto __pyx_L0;
49854
49855 /* "rbd.pyx":4226
49856 * free(instance_id)
49857 *
49858 * def aio_read(self, offset, length, oncomplete, fadvise_flags=0): # <<<<<<<<<<<<<<
49859 * """
49860 * Asynchronously read data from the image
49861 */
49862
49863 /* function exit code */
49864 __pyx_L1_error:;
49865 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
49866 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
49867 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
49868 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
49869 __Pyx_AddTraceback("rbd.Image.aio_read", __pyx_clineno, __pyx_lineno, __pyx_filename);
49870 __pyx_r = NULL((void*)0);
49871 __pyx_L0:;
49872 __Pyx_XDECREF((PyObject *)__pyx_v_completion)do { if (((PyObject *)__pyx_v_completion) == ((void*)0)) ; else
do { if ( --((PyObject*)((PyObject *)__pyx_v_completion))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject
*)__pyx_v_completion)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)((PyObject *)__pyx_v_completion)))); } while (
0); } while (0)
;
49873 __Pyx_XDECREF(__pyx_v_oncomplete_)do { if ((__pyx_v_oncomplete_) == ((void*)0)) ; else do { if (
--((PyObject*)(__pyx_v_oncomplete_))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_v_oncomplete_)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_oncomplete_
)))); } while (0); } while (0)
;
49874 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
49875 __Pyx_XGIVEREF(__pyx_r);
49876 __Pyx_RefNannyFinishContext();
49877 return __pyx_r;
49878}
49879
49880/* "rbd.pyx":4281
49881 * return completion
49882 *
49883 * def aio_write(self, data, offset, oncomplete, fadvise_flags=0): # <<<<<<<<<<<<<<
49884 * """
49885 * Asynchronously write data to the image
49886 */
49887
49888/* Python wrapper */
49889static PyObject *__pyx_pw_3rbd_5Image_155aio_write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
49890static char __pyx_doc_3rbd_5Image_154aio_write[] = "Image.aio_write(self, data, offset, oncomplete, fadvise_flags=0)\n\n Asynchronously write data to the image\n\n Raises :class:`InvalidArgument` if part of the write would fall outside\n the image.\n\n oncomplete will be called with the completion:\n\n oncomplete(completion)\n\n :param data: the data to be written\n :type data: bytes\n :param offset: the offset to start writing at\n :type offset: int\n :param oncomplete: what to do when the write is complete\n :type oncomplete: completion\n :param fadvise_flags: fadvise flags for this write\n :type fadvise_flags: int\n :returns: :class:`Completion` - the completion object\n :raises: :class:`InvalidArgument`, :class:`IOError`\n ";
49891static PyObject *__pyx_pw_3rbd_5Image_155aio_write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
49892 PyObject *__pyx_v_data = 0;
49893 PyObject *__pyx_v_offset = 0;
49894 PyObject *__pyx_v_oncomplete = 0;
49895 PyObject *__pyx_v_fadvise_flags = 0;
49896 int __pyx_lineno = 0;
49897 const char *__pyx_filename = NULL((void*)0);
49898 int __pyx_clineno = 0;
49899 PyObject *__pyx_r = 0;
49900 __Pyx_RefNannyDeclarations
49901 __Pyx_RefNannySetupContext("aio_write (wrapper)", 0);
49902 {
49903 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_offset,&__pyx_n_s_oncomplete,&__pyx_n_s_fadvise_flags,0};
49904 PyObject* values[4] = {0,0,0,0};
49905 values[3] = ((PyObject *)__pyx_int_0);
49906 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
49907 Py_ssize_t kw_args;
49908 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
49909 switch (pos_args) {
49910 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
49911 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
49912 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
49913 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
49914 case 0: break;
49915 default: goto __pyx_L5_argtuple_error;
49916 }
49917 kw_args = PyDict_Size(__pyx_kwds);
49918 switch (pos_args) {
49919 case 0:
49920 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data
)) != 0), 1)
) kw_args--;
49921 else goto __pyx_L5_argtuple_error;
49922 case 1:
49923 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
49924 else {
49925 __Pyx_RaiseArgtupleInvalid("aio_write", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4281; __pyx_clineno = __LINE__49925; goto __pyx_L3_error;}
49926 }
49927 case 2:
49928 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete
)) != 0), 1)
) kw_args--;
49929 else {
49930 __Pyx_RaiseArgtupleInvalid("aio_write", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4281; __pyx_clineno = __LINE__49930; goto __pyx_L3_error;}
49931 }
49932 case 3:
49933 if (kw_args > 0) {
49934 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fadvise_flags);
49935 if (value) { values[3] = value; kw_args--; }
49936 }
49937 }
49938 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
49939 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "aio_write") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "aio_write") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4281; __pyx_clineno = __LINE__49939; goto __pyx_L3_error;}
49940 }
49941 } else {
49942 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
49943 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3)(((PyTupleObject *)(__pyx_args))->ob_item[3]);
49944 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
49945 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
49946 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
49947 break;
49948 default: goto __pyx_L5_argtuple_error;
49949 }
49950 }
49951 __pyx_v_data = values[0];
49952 __pyx_v_offset = values[1];
49953 __pyx_v_oncomplete = values[2];
49954 __pyx_v_fadvise_flags = values[3];
49955 }
49956 goto __pyx_L4_argument_unpacking_done;
49957 __pyx_L5_argtuple_error:;
49958 __Pyx_RaiseArgtupleInvalid("aio_write", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4281; __pyx_clineno = __LINE__49958; goto __pyx_L3_error;}
49959 __pyx_L3_error:;
49960 __Pyx_AddTraceback("rbd.Image.aio_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
49961 __Pyx_RefNannyFinishContext();
49962 return NULL((void*)0);
49963 __pyx_L4_argument_unpacking_done:;
49964 __pyx_r = __pyx_pf_3rbd_5Image_154aio_write(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_data, __pyx_v_offset, __pyx_v_oncomplete, __pyx_v_fadvise_flags);
49965
49966 /* function exit code */
49967 __Pyx_RefNannyFinishContext();
49968 return __pyx_r;
49969}
49970
49971static PyObject *__pyx_pf_3rbd_5Image_154aio_write(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_offset, PyObject *__pyx_v_oncomplete, PyObject *__pyx_v_fadvise_flags) {
49972 uint64_t __pyx_v__offset;
49973 char *__pyx_v__data;
49974 size_t __pyx_v__length;
49975 int __pyx_v__fadvise_flags;
49976 struct __pyx_obj_3rbd_Completion *__pyx_v_completion = 0;
49977 int __pyx_v_ret;
49978 PyObject *__pyx_r = NULL((void*)0);
49979 __Pyx_RefNannyDeclarations
49980 uint64_t __pyx_t_1;
49981 char *__pyx_t_2;
49982 Py_ssize_t __pyx_t_3;
49983 int __pyx_t_4;
49984 PyObject *__pyx_t_5 = NULL((void*)0);
49985 PyObject *__pyx_t_6 = NULL((void*)0);
49986 PyObject *__pyx_t_7 = NULL((void*)0);
49987 PyObject *__pyx_t_8 = NULL((void*)0);
49988 PyObject *__pyx_t_9 = NULL((void*)0);
49989 PyObject *__pyx_t_10 = NULL((void*)0);
49990 PyObject *__pyx_t_11 = NULL((void*)0);
49991 int __pyx_t_12;
49992 int __pyx_lineno = 0;
49993 const char *__pyx_filename = NULL((void*)0);
49994 int __pyx_clineno = 0;
49995 __Pyx_RefNannySetupContext("aio_write", 0);
49996
49997 /* "rbd.pyx":4305
49998 *
49999 * cdef:
50000 * uint64_t _offset = offset # <<<<<<<<<<<<<<
50001 * char *_data = data
50002 * size_t _length = len(data)
50003 */
50004 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4305; __pyx_clineno = __LINE__50004; goto __pyx_L1_error;}
50005 __pyx_v__offset = __pyx_t_1;
50006
50007 /* "rbd.pyx":4306
50008 * cdef:
50009 * uint64_t _offset = offset
50010 * char *_data = data # <<<<<<<<<<<<<<
50011 * size_t _length = len(data)
50012 * int _fadvise_flags = fadvise_flags
50013 */
50014 __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_2) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4306; __pyx_clineno = __LINE__50014; goto __pyx_L1_error;}
50015 __pyx_v__data = __pyx_t_2;
50016
50017 /* "rbd.pyx":4307
50018 * uint64_t _offset = offset
50019 * char *_data = data
50020 * size_t _length = len(data) # <<<<<<<<<<<<<<
50021 * int _fadvise_flags = fadvise_flags
50022 * Completion completion
50023 */
50024 __pyx_t_3 = PyObject_LengthPyObject_Size(__pyx_v_data); if (unlikely(__pyx_t_3 == -1)__builtin_expect(!!(__pyx_t_3 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4307; __pyx_clineno = __LINE__50024; goto __pyx_L1_error;}
50025 __pyx_v__length = __pyx_t_3;
50026
50027 /* "rbd.pyx":4308
50028 * char *_data = data
50029 * size_t _length = len(data)
50030 * int _fadvise_flags = fadvise_flags # <<<<<<<<<<<<<<
50031 * Completion completion
50032 *
50033 */
50034 __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_fadvise_flags); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_4 == (int)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4308; __pyx_clineno = __LINE__50034; goto __pyx_L1_error;}
50035 __pyx_v__fadvise_flags = __pyx_t_4;
50036
50037 /* "rbd.pyx":4311
50038 * Completion completion
50039 *
50040 * completion = self.__get_completion(oncomplete) # <<<<<<<<<<<<<<
50041 * try:
50042 * completion.__persist()
50043 */
50044 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_completion); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4311; __pyx_clineno = __LINE__50044; goto __pyx_L1_error;}
50045 __Pyx_GOTREF(__pyx_t_6);
50046 __pyx_t_7 = NULL((void*)0);
50047 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 1)
) {
50048 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
50049 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
50050 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
50051 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
50052 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
50053 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
50054 }
50055 }
50056 if (!__pyx_t_7) {
50057 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_oncomplete); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4311; __pyx_clineno = __LINE__50057; goto __pyx_L1_error;}
50058 __Pyx_GOTREF(__pyx_t_5);
50059 } else {
50060 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4311; __pyx_clineno = __LINE__50060; goto __pyx_L1_error;}
50061 __Pyx_GOTREF(__pyx_t_8);
50062 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
50063 __Pyx_INCREF(__pyx_v_oncomplete)( ((PyObject*)(__pyx_v_oncomplete))->ob_refcnt++);
50064 __Pyx_GIVEREF(__pyx_v_oncomplete);
50065 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_oncomplete)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_v_oncomplete
)
;
50066 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4311; __pyx_clineno = __LINE__50066; goto __pyx_L1_error;}
50067 __Pyx_GOTREF(__pyx_t_5);
50068 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
50069 }
50070 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
50071 if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_3rbd_Completion)))__builtin_expect(!!(((__pyx_t_5) == (&_Py_NoneStruct)) ||
__builtin_expect(!!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_3rbd_Completion
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4311; __pyx_clineno = __LINE__50071; goto __pyx_L1_error;}
50072 __pyx_v_completion = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_5);
50073 __pyx_t_5 = 0;
50074
50075 /* "rbd.pyx":4312
50076 *
50077 * completion = self.__get_completion(oncomplete)
50078 * try: # <<<<<<<<<<<<<<
50079 * completion.__persist()
50080 * with nogil:
50081 */
50082 {
50083 __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
50084 __Pyx_XGOTREF(__pyx_t_9);
50085 __Pyx_XGOTREF(__pyx_t_10);
50086 __Pyx_XGOTREF(__pyx_t_11);
50087 /*try:*/ {
50088
50089 /* "rbd.pyx":4313
50090 * completion = self.__get_completion(oncomplete)
50091 * try:
50092 * completion.__persist() # <<<<<<<<<<<<<<
50093 * with nogil:
50094 * ret = rbd_aio_write2(self.image, _offset, _length, _data,
50095 */
50096 __pyx_t_5 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___persist(__pyx_v_completion); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4313; __pyx_clineno = __LINE__50096; goto __pyx_L3_error;}
50097 __Pyx_GOTREF(__pyx_t_5);
50098 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
50099
50100 /* "rbd.pyx":4314
50101 * try:
50102 * completion.__persist()
50103 * with nogil: # <<<<<<<<<<<<<<
50104 * ret = rbd_aio_write2(self.image, _offset, _length, _data,
50105 * completion.rbd_comp, _fadvise_flags)
50106 */
50107 {
50108 #ifdef WITH_THREAD1
50109 PyThreadState *_save;
50110 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
50111 #endif
50112 /*try:*/ {
50113
50114 /* "rbd.pyx":4315
50115 * completion.__persist()
50116 * with nogil:
50117 * ret = rbd_aio_write2(self.image, _offset, _length, _data, # <<<<<<<<<<<<<<
50118 * completion.rbd_comp, _fadvise_flags)
50119 * if ret < 0:
50120 */
50121 __pyx_v_ret = rbd_aio_write2(__pyx_v_self->image, __pyx_v__offset, __pyx_v__length, __pyx_v__data, __pyx_v_completion->rbd_comp, __pyx_v__fadvise_flags);
50122 }
50123
50124 /* "rbd.pyx":4314
50125 * try:
50126 * completion.__persist()
50127 * with nogil: # <<<<<<<<<<<<<<
50128 * ret = rbd_aio_write2(self.image, _offset, _length, _data,
50129 * completion.rbd_comp, _fadvise_flags)
50130 */
50131 /*finally:*/ {
50132 /*normal exit:*/{
50133 #ifdef WITH_THREAD1
50134 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
50135 #endif
50136 goto __pyx_L15;
50137 }
50138 __pyx_L15:;
50139 }
50140 }
50141
50142 /* "rbd.pyx":4317
50143 * ret = rbd_aio_write2(self.image, _offset, _length, _data,
50144 * completion.rbd_comp, _fadvise_flags)
50145 * if ret < 0: # <<<<<<<<<<<<<<
50146 * raise make_ex(ret, 'error writing %s %ld~%ld' %
50147 * (self.name, offset, _length))
50148 */
50149 __pyx_t_12 = ((__pyx_v_ret < 0) != 0);
50150 if (__pyx_t_12) {
50151
50152 /* "rbd.pyx":4318
50153 * completion.rbd_comp, _fadvise_flags)
50154 * if ret < 0:
50155 * raise make_ex(ret, 'error writing %s %ld~%ld' % # <<<<<<<<<<<<<<
50156 * (self.name, offset, _length))
50157 * except:
50158 */
50159 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __pyx_clineno = __LINE__50159; goto __pyx_L3_error;}
50160 __Pyx_GOTREF(__pyx_t_5);
50161
50162 /* "rbd.pyx":4319
50163 * if ret < 0:
50164 * raise make_ex(ret, 'error writing %s %ld~%ld' %
50165 * (self.name, offset, _length)) # <<<<<<<<<<<<<<
50166 * except:
50167 * completion.__unpersist()
50168 */
50169 __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v__length); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4319; __pyx_clineno = __LINE__50169; goto __pyx_L3_error;}
50170 __Pyx_GOTREF(__pyx_t_6);
50171 __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4319; __pyx_clineno = __LINE__50171; goto __pyx_L3_error;}
50172 __Pyx_GOTREF(__pyx_t_8);
50173 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
50174 __Pyx_GIVEREF(__pyx_v_self->name);
50175 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_v_self
->name)
;
50176 __Pyx_INCREF(__pyx_v_offset)( ((PyObject*)(__pyx_v_offset))->ob_refcnt++);
50177 __Pyx_GIVEREF(__pyx_v_offset);
50178 PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_offset)(((PyTupleObject *)(__pyx_t_8))->ob_item[1] = __pyx_v_offset
)
;
50179 __Pyx_GIVEREF(__pyx_t_6);
50180 PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[2] = __pyx_t_6);
50181 __pyx_t_6 = 0;
50182
50183 /* "rbd.pyx":4318
50184 * completion.rbd_comp, _fadvise_flags)
50185 * if ret < 0:
50186 * raise make_ex(ret, 'error writing %s %ld~%ld' % # <<<<<<<<<<<<<<
50187 * (self.name, offset, _length))
50188 * except:
50189 */
50190 __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_error_writing_s_ld_ld, __pyx_t_8)PyString_Format(__pyx_kp_s_error_writing_s_ld_ld, __pyx_t_8); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __pyx_clineno = __LINE__50190; goto __pyx_L3_error;}
50191 __Pyx_GOTREF(__pyx_t_6);
50192 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
50193 __pyx_t_8 = __pyx_f_3rbd_make_ex(__pyx_t_5, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __pyx_clineno = __LINE__50193; goto __pyx_L3_error;}
50194 __Pyx_GOTREF(__pyx_t_8);
50195 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
50196 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
50197 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
50198 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
50199 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __pyx_clineno = __LINE__50199; goto __pyx_L3_error;}
50200
50201 /* "rbd.pyx":4317
50202 * ret = rbd_aio_write2(self.image, _offset, _length, _data,
50203 * completion.rbd_comp, _fadvise_flags)
50204 * if ret < 0: # <<<<<<<<<<<<<<
50205 * raise make_ex(ret, 'error writing %s %ld~%ld' %
50206 * (self.name, offset, _length))
50207 */
50208 }
50209
50210 /* "rbd.pyx":4312
50211 *
50212 * completion = self.__get_completion(oncomplete)
50213 * try: # <<<<<<<<<<<<<<
50214 * completion.__persist()
50215 * with nogil:
50216 */
50217 }
50218 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
50219 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
50220 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
50221 goto __pyx_L10_try_end;
50222 __pyx_L3_error:;
50223 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
50224 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
50225 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
50226 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
50227
50228 /* "rbd.pyx":4320
50229 * raise make_ex(ret, 'error writing %s %ld~%ld' %
50230 * (self.name, offset, _length))
50231 * except: # <<<<<<<<<<<<<<
50232 * completion.__unpersist()
50233 * raise
50234 */
50235 /*except:*/ {
50236 __Pyx_AddTraceback("rbd.Image.aio_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
50237 if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4320; __pyx_clineno = __LINE__50237; goto __pyx_L5_except_error;}
50238 __Pyx_GOTREF(__pyx_t_8);
50239 __Pyx_GOTREF(__pyx_t_6);
50240 __Pyx_GOTREF(__pyx_t_5);
50241
50242 /* "rbd.pyx":4321
50243 * (self.name, offset, _length))
50244 * except:
50245 * completion.__unpersist() # <<<<<<<<<<<<<<
50246 * raise
50247 *
50248 */
50249 __pyx_t_7 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___unpersist(__pyx_v_completion); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4321; __pyx_clineno = __LINE__50249; goto __pyx_L5_except_error;}
50250 __Pyx_GOTREF(__pyx_t_7);
50251 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
50252
50253 /* "rbd.pyx":4322
50254 * except:
50255 * completion.__unpersist()
50256 * raise # <<<<<<<<<<<<<<
50257 *
50258 * return completion
50259 */
50260 __Pyx_GIVEREF(__pyx_t_8);
50261 __Pyx_GIVEREF(__pyx_t_6);
50262 __Pyx_XGIVEREF(__pyx_t_5);
50263 __Pyx_ErrRestore(__pyx_t_8, __pyx_t_6, __pyx_t_5);
50264 __pyx_t_8 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
50265 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4322; __pyx_clineno = __LINE__50265; goto __pyx_L5_except_error;}
50266 }
50267 __pyx_L5_except_error:;
50268
50269 /* "rbd.pyx":4312
50270 *
50271 * completion = self.__get_completion(oncomplete)
50272 * try: # <<<<<<<<<<<<<<
50273 * completion.__persist()
50274 * with nogil:
50275 */
50276 __Pyx_XGIVEREF(__pyx_t_9);
50277 __Pyx_XGIVEREF(__pyx_t_10);
50278 __Pyx_XGIVEREF(__pyx_t_11);
50279 __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
50280 goto __pyx_L1_error;
50281 __pyx_L10_try_end:;
50282 }
50283
50284 /* "rbd.pyx":4324
50285 * raise
50286 *
50287 * return completion # <<<<<<<<<<<<<<
50288 *
50289 * def aio_discard(self, offset, length, oncomplete):
50290 */
50291 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
50292 __Pyx_INCREF(((PyObject *)__pyx_v_completion))( ((PyObject*)(((PyObject *)__pyx_v_completion)))->ob_refcnt
++)
;
50293 __pyx_r = ((PyObject *)__pyx_v_completion);
50294 goto __pyx_L0;
50295
50296 /* "rbd.pyx":4281
50297 * return completion
50298 *
50299 * def aio_write(self, data, offset, oncomplete, fadvise_flags=0): # <<<<<<<<<<<<<<
50300 * """
50301 * Asynchronously write data to the image
50302 */
50303
50304 /* function exit code */
50305 __pyx_L1_error:;
50306 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
50307 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
50308 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
50309 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
50310 __Pyx_AddTraceback("rbd.Image.aio_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
50311 __pyx_r = NULL((void*)0);
50312 __pyx_L0:;
50313 __Pyx_XDECREF((PyObject *)__pyx_v_completion)do { if (((PyObject *)__pyx_v_completion) == ((void*)0)) ; else
do { if ( --((PyObject*)((PyObject *)__pyx_v_completion))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject
*)__pyx_v_completion)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)((PyObject *)__pyx_v_completion)))); } while (
0); } while (0)
;
50314 __Pyx_XGIVEREF(__pyx_r);
50315 __Pyx_RefNannyFinishContext();
50316 return __pyx_r;
50317}
50318
50319/* "rbd.pyx":4326
50320 * return completion
50321 *
50322 * def aio_discard(self, offset, length, oncomplete): # <<<<<<<<<<<<<<
50323 * """
50324 * Asynchronously trim the range from the image. It will be logically
50325 */
50326
50327/* Python wrapper */
50328static PyObject *__pyx_pw_3rbd_5Image_157aio_discard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
50329static char __pyx_doc_3rbd_5Image_156aio_discard[] = "Image.aio_discard(self, offset, length, oncomplete)\n\n Asynchronously trim the range from the image. It will be logically\n filled with zeroes.\n ";
50330static PyObject *__pyx_pw_3rbd_5Image_157aio_discard(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
50331 PyObject *__pyx_v_offset = 0;
50332 PyObject *__pyx_v_length = 0;
50333 PyObject *__pyx_v_oncomplete = 0;
50334 int __pyx_lineno = 0;
50335 const char *__pyx_filename = NULL((void*)0);
50336 int __pyx_clineno = 0;
50337 PyObject *__pyx_r = 0;
50338 __Pyx_RefNannyDeclarations
50339 __Pyx_RefNannySetupContext("aio_discard (wrapper)", 0);
50340 {
50341 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_length,&__pyx_n_s_oncomplete,0};
50342 PyObject* values[3] = {0,0,0};
50343 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
50344 Py_ssize_t kw_args;
50345 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
50346 switch (pos_args) {
50347 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
50348 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
50349 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
50350 case 0: break;
50351 default: goto __pyx_L5_argtuple_error;
50352 }
50353 kw_args = PyDict_Size(__pyx_kwds);
50354 switch (pos_args) {
50355 case 0:
50356 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset
)) != 0), 1)
) kw_args--;
50357 else goto __pyx_L5_argtuple_error;
50358 case 1:
50359 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_length
)) != 0), 1)
) kw_args--;
50360 else {
50361 __Pyx_RaiseArgtupleInvalid("aio_discard", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__50361; goto __pyx_L3_error;}
50362 }
50363 case 2:
50364 if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete)) != 0)__builtin_expect(!!((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oncomplete
)) != 0), 1)
) kw_args--;
50365 else {
50366 __Pyx_RaiseArgtupleInvalid("aio_discard", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__50366; goto __pyx_L3_error;}
50367 }
50368 }
50369 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
50370 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "aio_discard") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "aio_discard") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__50370; goto __pyx_L3_error;}
50371 }
50372 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 3) {
50373 goto __pyx_L5_argtuple_error;
50374 } else {
50375 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
50376 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
50377 values[2] = PyTuple_GET_ITEM(__pyx_args, 2)(((PyTupleObject *)(__pyx_args))->ob_item[2]);
50378 }
50379 __pyx_v_offset = values[0];
50380 __pyx_v_length = values[1];
50381 __pyx_v_oncomplete = values[2];
50382 }
50383 goto __pyx_L4_argument_unpacking_done;
50384 __pyx_L5_argtuple_error:;
50385 __Pyx_RaiseArgtupleInvalid("aio_discard", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__50385; goto __pyx_L3_error;}
50386 __pyx_L3_error:;
50387 __Pyx_AddTraceback("rbd.Image.aio_discard", __pyx_clineno, __pyx_lineno, __pyx_filename);
50388 __Pyx_RefNannyFinishContext();
50389 return NULL((void*)0);
50390 __pyx_L4_argument_unpacking_done:;
50391 __pyx_r = __pyx_pf_3rbd_5Image_156aio_discard(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_offset, __pyx_v_length, __pyx_v_oncomplete);
50392
50393 /* function exit code */
50394 __Pyx_RefNannyFinishContext();
50395 return __pyx_r;
50396}
50397
50398static PyObject *__pyx_pf_3rbd_5Image_156aio_discard(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_length, PyObject *__pyx_v_oncomplete) {
50399 uint64_t __pyx_v__offset;
50400 size_t __pyx_v__length;
50401 struct __pyx_obj_3rbd_Completion *__pyx_v_completion = 0;
50402 int __pyx_v_ret;
50403 PyObject *__pyx_r = NULL((void*)0);
50404 __Pyx_RefNannyDeclarations
50405 uint64_t __pyx_t_1;
50406 size_t __pyx_t_2;
50407 PyObject *__pyx_t_3 = NULL((void*)0);
50408 PyObject *__pyx_t_4 = NULL((void*)0);
50409 PyObject *__pyx_t_5 = NULL((void*)0);
50410 PyObject *__pyx_t_6 = NULL((void*)0);
50411 PyObject *__pyx_t_7 = NULL((void*)0);
50412 PyObject *__pyx_t_8 = NULL((void*)0);
50413 PyObject *__pyx_t_9 = NULL((void*)0);
50414 int __pyx_t_10;
50415 int __pyx_lineno = 0;
50416 const char *__pyx_filename = NULL((void*)0);
50417 int __pyx_clineno = 0;
50418 __Pyx_RefNannySetupContext("aio_discard", 0);
50419
50420 /* "rbd.pyx":4333
50421 *
50422 * cdef:
50423 * uint64_t _offset = offset # <<<<<<<<<<<<<<
50424 * size_t _length = length
50425 * Completion completion
50426 */
50427 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4333; __pyx_clineno = __LINE__50427; goto __pyx_L1_error;}
50428 __pyx_v__offset = __pyx_t_1;
50429
50430 /* "rbd.pyx":4334
50431 * cdef:
50432 * uint64_t _offset = offset
50433 * size_t _length = length # <<<<<<<<<<<<<<
50434 * Completion completion
50435 *
50436 */
50437 __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_2 == (size_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4334; __pyx_clineno = __LINE__50437; goto __pyx_L1_error;}
50438 __pyx_v__length = __pyx_t_2;
50439
50440 /* "rbd.pyx":4337
50441 * Completion completion
50442 *
50443 * completion = self.__get_completion(oncomplete) # <<<<<<<<<<<<<<
50444 * try:
50445 * completion.__persist()
50446 */
50447 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_completion); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__50447; goto __pyx_L1_error;}
50448 __Pyx_GOTREF(__pyx_t_4);
50449 __pyx_t_5 = NULL((void*)0);
50450 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
50451 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
50452 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
50453 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
50454 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
50455 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
50456 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
50457 }
50458 }
50459 if (!__pyx_t_5) {
50460 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_oncomplete); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__50460; goto __pyx_L1_error;}
50461 __Pyx_GOTREF(__pyx_t_3);
50462 } else {
50463 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__50463; goto __pyx_L1_error;}
50464 __Pyx_GOTREF(__pyx_t_6);
50465 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
50466 __Pyx_INCREF(__pyx_v_oncomplete)( ((PyObject*)(__pyx_v_oncomplete))->ob_refcnt++);
50467 __Pyx_GIVEREF(__pyx_v_oncomplete);
50468 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_oncomplete)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_v_oncomplete
)
;
50469 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__50469; goto __pyx_L1_error;}
50470 __Pyx_GOTREF(__pyx_t_3);
50471 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
50472 }
50473 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
50474 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3rbd_Completion)))__builtin_expect(!!(((__pyx_t_3) == (&_Py_NoneStruct)) ||
__builtin_expect(!!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_3rbd_Completion
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__50474; goto __pyx_L1_error;}
50475 __pyx_v_completion = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_3);
50476 __pyx_t_3 = 0;
50477
50478 /* "rbd.pyx":4338
50479 *
50480 * completion = self.__get_completion(oncomplete)
50481 * try: # <<<<<<<<<<<<<<
50482 * completion.__persist()
50483 * with nogil:
50484 */
50485 {
50486 __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
50487 __Pyx_XGOTREF(__pyx_t_7);
50488 __Pyx_XGOTREF(__pyx_t_8);
50489 __Pyx_XGOTREF(__pyx_t_9);
50490 /*try:*/ {
50491
50492 /* "rbd.pyx":4339
50493 * completion = self.__get_completion(oncomplete)
50494 * try:
50495 * completion.__persist() # <<<<<<<<<<<<<<
50496 * with nogil:
50497 * ret = rbd_aio_discard(self.image, _offset, _length,
50498 */
50499 __pyx_t_3 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___persist(__pyx_v_completion); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __pyx_clineno = __LINE__50499; goto __pyx_L3_error;}
50500 __Pyx_GOTREF(__pyx_t_3);
50501 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
50502
50503 /* "rbd.pyx":4340
50504 * try:
50505 * completion.__persist()
50506 * with nogil: # <<<<<<<<<<<<<<
50507 * ret = rbd_aio_discard(self.image, _offset, _length,
50508 * completion.rbd_comp)
50509 */
50510 {
50511 #ifdef WITH_THREAD1
50512 PyThreadState *_save;
50513 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
50514 #endif
50515 /*try:*/ {
50516
50517 /* "rbd.pyx":4341
50518 * completion.__persist()
50519 * with nogil:
50520 * ret = rbd_aio_discard(self.image, _offset, _length, # <<<<<<<<<<<<<<
50521 * completion.rbd_comp)
50522 * if ret < 0:
50523 */
50524 __pyx_v_ret = rbd_aio_discard(__pyx_v_self->image, __pyx_v__offset, __pyx_v__length, __pyx_v_completion->rbd_comp);
50525 }
50526
50527 /* "rbd.pyx":4340
50528 * try:
50529 * completion.__persist()
50530 * with nogil: # <<<<<<<<<<<<<<
50531 * ret = rbd_aio_discard(self.image, _offset, _length,
50532 * completion.rbd_comp)
50533 */
50534 /*finally:*/ {
50535 /*normal exit:*/{
50536 #ifdef WITH_THREAD1
50537 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
50538 #endif
50539 goto __pyx_L15;
50540 }
50541 __pyx_L15:;
50542 }
50543 }
50544
50545 /* "rbd.pyx":4343
50546 * ret = rbd_aio_discard(self.image, _offset, _length,
50547 * completion.rbd_comp)
50548 * if ret < 0: # <<<<<<<<<<<<<<
50549 * raise make_ex(ret, 'error discarding %s %ld~%ld' %
50550 * (self.name, offset, _length))
50551 */
50552 __pyx_t_10 = ((__pyx_v_ret < 0) != 0);
50553 if (__pyx_t_10) {
50554
50555 /* "rbd.pyx":4344
50556 * completion.rbd_comp)
50557 * if ret < 0:
50558 * raise make_ex(ret, 'error discarding %s %ld~%ld' % # <<<<<<<<<<<<<<
50559 * (self.name, offset, _length))
50560 * except:
50561 */
50562 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4344; __pyx_clineno = __LINE__50562; goto __pyx_L3_error;}
50563 __Pyx_GOTREF(__pyx_t_3);
50564
50565 /* "rbd.pyx":4345
50566 * if ret < 0:
50567 * raise make_ex(ret, 'error discarding %s %ld~%ld' %
50568 * (self.name, offset, _length)) # <<<<<<<<<<<<<<
50569 * except:
50570 * completion.__unpersist()
50571 */
50572 __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v__length); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4345; __pyx_clineno = __LINE__50572; goto __pyx_L3_error;}
50573 __Pyx_GOTREF(__pyx_t_4);
50574 __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4345; __pyx_clineno = __LINE__50574; goto __pyx_L3_error;}
50575 __Pyx_GOTREF(__pyx_t_6);
50576 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
50577 __Pyx_GIVEREF(__pyx_v_self->name);
50578 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_v_self
->name)
;
50579 __Pyx_INCREF(__pyx_v_offset)( ((PyObject*)(__pyx_v_offset))->ob_refcnt++);
50580 __Pyx_GIVEREF(__pyx_v_offset);
50581 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_offset)(((PyTupleObject *)(__pyx_t_6))->ob_item[1] = __pyx_v_offset
)
;
50582 __Pyx_GIVEREF(__pyx_t_4);
50583 PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4)(((PyTupleObject *)(__pyx_t_6))->ob_item[2] = __pyx_t_4);
50584 __pyx_t_4 = 0;
50585
50586 /* "rbd.pyx":4344
50587 * completion.rbd_comp)
50588 * if ret < 0:
50589 * raise make_ex(ret, 'error discarding %s %ld~%ld' % # <<<<<<<<<<<<<<
50590 * (self.name, offset, _length))
50591 * except:
50592 */
50593 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_discarding_s_ld_ld, __pyx_t_6)PyString_Format(__pyx_kp_s_error_discarding_s_ld_ld, __pyx_t_6
)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4344; __pyx_clineno = __LINE__50593; goto __pyx_L3_error;}
50594 __Pyx_GOTREF(__pyx_t_4);
50595 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
50596 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4344; __pyx_clineno = __LINE__50596; goto __pyx_L3_error;}
50597 __Pyx_GOTREF(__pyx_t_6);
50598 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
50599 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
50600 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
50601 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
50602 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4344; __pyx_clineno = __LINE__50602; goto __pyx_L3_error;}
50603
50604 /* "rbd.pyx":4343
50605 * ret = rbd_aio_discard(self.image, _offset, _length,
50606 * completion.rbd_comp)
50607 * if ret < 0: # <<<<<<<<<<<<<<
50608 * raise make_ex(ret, 'error discarding %s %ld~%ld' %
50609 * (self.name, offset, _length))
50610 */
50611 }
50612
50613 /* "rbd.pyx":4338
50614 *
50615 * completion = self.__get_completion(oncomplete)
50616 * try: # <<<<<<<<<<<<<<
50617 * completion.__persist()
50618 * with nogil:
50619 */
50620 }
50621 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
50622 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
50623 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
50624 goto __pyx_L10_try_end;
50625 __pyx_L3_error:;
50626 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
50627 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
50628 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
50629 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
50630
50631 /* "rbd.pyx":4346
50632 * raise make_ex(ret, 'error discarding %s %ld~%ld' %
50633 * (self.name, offset, _length))
50634 * except: # <<<<<<<<<<<<<<
50635 * completion.__unpersist()
50636 * raise
50637 */
50638 /*except:*/ {
50639 __Pyx_AddTraceback("rbd.Image.aio_discard", __pyx_clineno, __pyx_lineno, __pyx_filename);
50640 if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4346; __pyx_clineno = __LINE__50640; goto __pyx_L5_except_error;}
50641 __Pyx_GOTREF(__pyx_t_6);
50642 __Pyx_GOTREF(__pyx_t_4);
50643 __Pyx_GOTREF(__pyx_t_3);
50644
50645 /* "rbd.pyx":4347
50646 * (self.name, offset, _length))
50647 * except:
50648 * completion.__unpersist() # <<<<<<<<<<<<<<
50649 * raise
50650 *
50651 */
50652 __pyx_t_5 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___unpersist(__pyx_v_completion); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4347; __pyx_clineno = __LINE__50652; goto __pyx_L5_except_error;}
50653 __Pyx_GOTREF(__pyx_t_5);
50654 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
50655
50656 /* "rbd.pyx":4348
50657 * except:
50658 * completion.__unpersist()
50659 * raise # <<<<<<<<<<<<<<
50660 *
50661 * return completion
50662 */
50663 __Pyx_GIVEREF(__pyx_t_6);
50664 __Pyx_GIVEREF(__pyx_t_4);
50665 __Pyx_XGIVEREF(__pyx_t_3);
50666 __Pyx_ErrRestore(__pyx_t_6, __pyx_t_4, __pyx_t_3);
50667 __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0;
50668 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4348; __pyx_clineno = __LINE__50668; goto __pyx_L5_except_error;}
50669 }
50670 __pyx_L5_except_error:;
50671
50672 /* "rbd.pyx":4338
50673 *
50674 * completion = self.__get_completion(oncomplete)
50675 * try: # <<<<<<<<<<<<<<
50676 * completion.__persist()
50677 * with nogil:
50678 */
50679 __Pyx_XGIVEREF(__pyx_t_7);
50680 __Pyx_XGIVEREF(__pyx_t_8);
50681 __Pyx_XGIVEREF(__pyx_t_9);
50682 __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
50683 goto __pyx_L1_error;
50684 __pyx_L10_try_end:;
50685 }
50686
50687 /* "rbd.pyx":4350
50688 * raise
50689 *
50690 * return completion # <<<<<<<<<<<<<<
50691 *
50692 * def aio_flush(self, oncomplete):
50693 */
50694 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
50695 __Pyx_INCREF(((PyObject *)__pyx_v_completion))( ((PyObject*)(((PyObject *)__pyx_v_completion)))->ob_refcnt
++)
;
50696 __pyx_r = ((PyObject *)__pyx_v_completion);
50697 goto __pyx_L0;
50698
50699 /* "rbd.pyx":4326
50700 * return completion
50701 *
50702 * def aio_discard(self, offset, length, oncomplete): # <<<<<<<<<<<<<<
50703 * """
50704 * Asynchronously trim the range from the image. It will be logically
50705 */
50706
50707 /* function exit code */
50708 __pyx_L1_error:;
50709 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
50710 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
50711 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
50712 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
50713 __Pyx_AddTraceback("rbd.Image.aio_discard", __pyx_clineno, __pyx_lineno, __pyx_filename);
50714 __pyx_r = NULL((void*)0);
50715 __pyx_L0:;
50716 __Pyx_XDECREF((PyObject *)__pyx_v_completion)do { if (((PyObject *)__pyx_v_completion) == ((void*)0)) ; else
do { if ( --((PyObject*)((PyObject *)__pyx_v_completion))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject
*)__pyx_v_completion)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)((PyObject *)__pyx_v_completion)))); } while (
0); } while (0)
;
50717 __Pyx_XGIVEREF(__pyx_r);
50718 __Pyx_RefNannyFinishContext();
50719 return __pyx_r;
50720}
50721
50722/* "rbd.pyx":4352
50723 * return completion
50724 *
50725 * def aio_flush(self, oncomplete): # <<<<<<<<<<<<<<
50726 * """
50727 * Asynchronously wait until all writes are fully flushed if caching is
50728 */
50729
50730/* Python wrapper */
50731static PyObject *__pyx_pw_3rbd_5Image_159aio_flush(PyObject *__pyx_v_self, PyObject *__pyx_v_oncomplete); /*proto*/
50732static char __pyx_doc_3rbd_5Image_158aio_flush[] = "Image.aio_flush(self, oncomplete)\n\n Asynchronously wait until all writes are fully flushed if caching is\n enabled.\n ";
50733static PyObject *__pyx_pw_3rbd_5Image_159aio_flush(PyObject *__pyx_v_self, PyObject *__pyx_v_oncomplete) {
50734 PyObject *__pyx_r = 0;
50735 __Pyx_RefNannyDeclarations
50736 __Pyx_RefNannySetupContext("aio_flush (wrapper)", 0);
50737 __pyx_r = __pyx_pf_3rbd_5Image_158aio_flush(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_oncomplete));
50738
50739 /* function exit code */
50740 __Pyx_RefNannyFinishContext();
50741 return __pyx_r;
50742}
50743
50744static PyObject *__pyx_pf_3rbd_5Image_158aio_flush(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_oncomplete) {
50745 struct __pyx_obj_3rbd_Completion *__pyx_v_completion = 0;
50746 int __pyx_v_ret;
50747 PyObject *__pyx_r = NULL((void*)0);
50748 __Pyx_RefNannyDeclarations
50749 PyObject *__pyx_t_1 = NULL((void*)0);
50750 PyObject *__pyx_t_2 = NULL((void*)0);
50751 PyObject *__pyx_t_3 = NULL((void*)0);
50752 PyObject *__pyx_t_4 = NULL((void*)0);
50753 PyObject *__pyx_t_5 = NULL((void*)0);
50754 PyObject *__pyx_t_6 = NULL((void*)0);
50755 PyObject *__pyx_t_7 = NULL((void*)0);
50756 int __pyx_t_8;
50757 int __pyx_lineno = 0;
50758 const char *__pyx_filename = NULL((void*)0);
50759 int __pyx_clineno = 0;
50760 __Pyx_RefNannySetupContext("aio_flush", 0);
50761
50762 /* "rbd.pyx":4358
50763 * """
50764 *
50765 * cdef Completion completion = self.__get_completion(oncomplete) # <<<<<<<<<<<<<<
50766 * try:
50767 * completion.__persist()
50768 */
50769 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_completion); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4358; __pyx_clineno = __LINE__50769; goto __pyx_L1_error;}
50770 __Pyx_GOTREF(__pyx_t_2);
50771 __pyx_t_3 = NULL((void*)0);
50772 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 1)
) {
50773 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
50774 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
50775 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
50776 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
50777 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
50778 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
50779 }
50780 }
50781 if (!__pyx_t_3) {
50782 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_oncomplete); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4358; __pyx_clineno = __LINE__50782; goto __pyx_L1_error;}
50783 __Pyx_GOTREF(__pyx_t_1);
50784 } else {
50785 __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4358; __pyx_clineno = __LINE__50785; goto __pyx_L1_error;}
50786 __Pyx_GOTREF(__pyx_t_4);
50787 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
50788 __Pyx_INCREF(__pyx_v_oncomplete)( ((PyObject*)(__pyx_v_oncomplete))->ob_refcnt++);
50789 __Pyx_GIVEREF(__pyx_v_oncomplete);
50790 PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_oncomplete)(((PyTupleObject *)(__pyx_t_4))->ob_item[0+1] = __pyx_v_oncomplete
)
;
50791 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4358; __pyx_clineno = __LINE__50791; goto __pyx_L1_error;}
50792 __Pyx_GOTREF(__pyx_t_1);
50793 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
50794 }
50795 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
50796 if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3rbd_Completion)))__builtin_expect(!!(((__pyx_t_1) == (&_Py_NoneStruct)) ||
__builtin_expect(!!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3rbd_Completion
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4358; __pyx_clineno = __LINE__50796; goto __pyx_L1_error;}
50797 __pyx_v_completion = ((struct __pyx_obj_3rbd_Completion *)__pyx_t_1);
50798 __pyx_t_1 = 0;
50799
50800 /* "rbd.pyx":4359
50801 *
50802 * cdef Completion completion = self.__get_completion(oncomplete)
50803 * try: # <<<<<<<<<<<<<<
50804 * completion.__persist()
50805 * with nogil:
50806 */
50807 {
50808 __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
50809 __Pyx_XGOTREF(__pyx_t_5);
50810 __Pyx_XGOTREF(__pyx_t_6);
50811 __Pyx_XGOTREF(__pyx_t_7);
50812 /*try:*/ {
50813
50814 /* "rbd.pyx":4360
50815 * cdef Completion completion = self.__get_completion(oncomplete)
50816 * try:
50817 * completion.__persist() # <<<<<<<<<<<<<<
50818 * with nogil:
50819 * ret = rbd_aio_flush(self.image, completion.rbd_comp)
50820 */
50821 __pyx_t_1 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___persist(__pyx_v_completion); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4360; __pyx_clineno = __LINE__50821; goto __pyx_L3_error;}
50822 __Pyx_GOTREF(__pyx_t_1);
50823 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
50824
50825 /* "rbd.pyx":4361
50826 * try:
50827 * completion.__persist()
50828 * with nogil: # <<<<<<<<<<<<<<
50829 * ret = rbd_aio_flush(self.image, completion.rbd_comp)
50830 * if ret < 0:
50831 */
50832 {
50833 #ifdef WITH_THREAD1
50834 PyThreadState *_save;
50835 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
50836 #endif
50837 /*try:*/ {
50838
50839 /* "rbd.pyx":4362
50840 * completion.__persist()
50841 * with nogil:
50842 * ret = rbd_aio_flush(self.image, completion.rbd_comp) # <<<<<<<<<<<<<<
50843 * if ret < 0:
50844 * raise make_ex(ret, 'error flushing')
50845 */
50846 __pyx_v_ret = rbd_aio_flush(__pyx_v_self->image, __pyx_v_completion->rbd_comp);
50847 }
50848
50849 /* "rbd.pyx":4361
50850 * try:
50851 * completion.__persist()
50852 * with nogil: # <<<<<<<<<<<<<<
50853 * ret = rbd_aio_flush(self.image, completion.rbd_comp)
50854 * if ret < 0:
50855 */
50856 /*finally:*/ {
50857 /*normal exit:*/{
50858 #ifdef WITH_THREAD1
50859 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
50860 #endif
50861 goto __pyx_L15;
50862 }
50863 __pyx_L15:;
50864 }
50865 }
50866
50867 /* "rbd.pyx":4363
50868 * with nogil:
50869 * ret = rbd_aio_flush(self.image, completion.rbd_comp)
50870 * if ret < 0: # <<<<<<<<<<<<<<
50871 * raise make_ex(ret, 'error flushing')
50872 * except:
50873 */
50874 __pyx_t_8 = ((__pyx_v_ret < 0) != 0);
50875 if (__pyx_t_8) {
50876
50877 /* "rbd.pyx":4364
50878 * ret = rbd_aio_flush(self.image, completion.rbd_comp)
50879 * if ret < 0:
50880 * raise make_ex(ret, 'error flushing') # <<<<<<<<<<<<<<
50881 * except:
50882 * completion.__unpersist()
50883 */
50884 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4364; __pyx_clineno = __LINE__50884; goto __pyx_L3_error;}
50885 __Pyx_GOTREF(__pyx_t_1);
50886 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_kp_s_error_flushing, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4364; __pyx_clineno = __LINE__50886; goto __pyx_L3_error;}
50887 __Pyx_GOTREF(__pyx_t_2);
50888 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
50889 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
50890 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
50891 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4364; __pyx_clineno = __LINE__50891; goto __pyx_L3_error;}
50892
50893 /* "rbd.pyx":4363
50894 * with nogil:
50895 * ret = rbd_aio_flush(self.image, completion.rbd_comp)
50896 * if ret < 0: # <<<<<<<<<<<<<<
50897 * raise make_ex(ret, 'error flushing')
50898 * except:
50899 */
50900 }
50901
50902 /* "rbd.pyx":4359
50903 *
50904 * cdef Completion completion = self.__get_completion(oncomplete)
50905 * try: # <<<<<<<<<<<<<<
50906 * completion.__persist()
50907 * with nogil:
50908 */
50909 }
50910 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
50911 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
50912 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
50913 goto __pyx_L10_try_end;
50914 __pyx_L3_error:;
50915 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
50916 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
50917 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
50918 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
50919
50920 /* "rbd.pyx":4365
50921 * if ret < 0:
50922 * raise make_ex(ret, 'error flushing')
50923 * except: # <<<<<<<<<<<<<<
50924 * completion.__unpersist()
50925 * raise
50926 */
50927 /*except:*/ {
50928 __Pyx_AddTraceback("rbd.Image.aio_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
50929 if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4365; __pyx_clineno = __LINE__50929; goto __pyx_L5_except_error;}
50930 __Pyx_GOTREF(__pyx_t_2);
50931 __Pyx_GOTREF(__pyx_t_1);
50932 __Pyx_GOTREF(__pyx_t_4);
50933
50934 /* "rbd.pyx":4366
50935 * raise make_ex(ret, 'error flushing')
50936 * except:
50937 * completion.__unpersist() # <<<<<<<<<<<<<<
50938 * raise
50939 *
50940 */
50941 __pyx_t_3 = ((struct __pyx_vtabstruct_3rbd_Completion *)__pyx_v_completion->__pyx_vtab)->__pyx___unpersist(__pyx_v_completion); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4366; __pyx_clineno = __LINE__50941; goto __pyx_L5_except_error;}
50942 __Pyx_GOTREF(__pyx_t_3);
50943 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
50944
50945 /* "rbd.pyx":4367
50946 * except:
50947 * completion.__unpersist()
50948 * raise # <<<<<<<<<<<<<<
50949 *
50950 * return completion
50951 */
50952 __Pyx_GIVEREF(__pyx_t_2);
50953 __Pyx_GIVEREF(__pyx_t_1);
50954 __Pyx_XGIVEREF(__pyx_t_4);
50955 __Pyx_ErrRestore(__pyx_t_2, __pyx_t_1, __pyx_t_4);
50956 __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0;
50957 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4367; __pyx_clineno = __LINE__50957; goto __pyx_L5_except_error;}
50958 }
50959 __pyx_L5_except_error:;
50960
50961 /* "rbd.pyx":4359
50962 *
50963 * cdef Completion completion = self.__get_completion(oncomplete)
50964 * try: # <<<<<<<<<<<<<<
50965 * completion.__persist()
50966 * with nogil:
50967 */
50968 __Pyx_XGIVEREF(__pyx_t_5);
50969 __Pyx_XGIVEREF(__pyx_t_6);
50970 __Pyx_XGIVEREF(__pyx_t_7);
50971 __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
50972 goto __pyx_L1_error;
50973 __pyx_L10_try_end:;
50974 }
50975
50976 /* "rbd.pyx":4369
50977 * raise
50978 *
50979 * return completion # <<<<<<<<<<<<<<
50980 *
50981 * def metadata_get(self, key):
50982 */
50983 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
50984 __Pyx_INCREF(((PyObject *)__pyx_v_completion))( ((PyObject*)(((PyObject *)__pyx_v_completion)))->ob_refcnt
++)
;
50985 __pyx_r = ((PyObject *)__pyx_v_completion);
50986 goto __pyx_L0;
50987
50988 /* "rbd.pyx":4352
50989 * return completion
50990 *
50991 * def aio_flush(self, oncomplete): # <<<<<<<<<<<<<<
50992 * """
50993 * Asynchronously wait until all writes are fully flushed if caching is
50994 */
50995
50996 /* function exit code */
50997 __pyx_L1_error:;
50998 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
50999 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
51000 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
51001 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
51002 __Pyx_AddTraceback("rbd.Image.aio_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
51003 __pyx_r = NULL((void*)0);
51004 __pyx_L0:;
51005 __Pyx_XDECREF((PyObject *)__pyx_v_completion)do { if (((PyObject *)__pyx_v_completion) == ((void*)0)) ; else
do { if ( --((PyObject*)((PyObject *)__pyx_v_completion))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((PyObject
*)__pyx_v_completion)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)((PyObject *)__pyx_v_completion)))); } while (
0); } while (0)
;
51006 __Pyx_XGIVEREF(__pyx_r);
51007 __Pyx_RefNannyFinishContext();
51008 return __pyx_r;
51009}
51010
51011/* "rbd.pyx":4371
51012 * return completion
51013 *
51014 * def metadata_get(self, key): # <<<<<<<<<<<<<<
51015 * """
51016 * Get image metadata for the given key.
51017 */
51018
51019/* Python wrapper */
51020static PyObject *__pyx_pw_3rbd_5Image_161metadata_get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
51021static char __pyx_doc_3rbd_5Image_160metadata_get[] = "Image.metadata_get(self, key)\n\n Get image metadata for the given key.\n\n :param key: metadata key\n :type key: str\n :returns: str - metadata value\n ";
51022static PyObject *__pyx_pw_3rbd_5Image_161metadata_get(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
51023 PyObject *__pyx_r = 0;
51024 __Pyx_RefNannyDeclarations
51025 __Pyx_RefNannySetupContext("metadata_get (wrapper)", 0);
51026 __pyx_r = __pyx_pf_3rbd_5Image_160metadata_get(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_key));
51027
51028 /* function exit code */
51029 __Pyx_RefNannyFinishContext();
51030 return __pyx_r;
51031}
51032
51033static PyObject *__pyx_pf_3rbd_5Image_160metadata_get(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_key) {
51034 char *__pyx_v__key;
51035 size_t __pyx_v_size;
51036 char *__pyx_v_value;
51037 int __pyx_v_ret;
51038 PyObject *__pyx_r = NULL((void*)0);
51039 __Pyx_RefNannyDeclarations
51040 PyObject *__pyx_t_1 = NULL((void*)0);
51041 PyObject *__pyx_t_2 = NULL((void*)0);
51042 PyObject *__pyx_t_3 = NULL((void*)0);
51043 Py_ssize_t __pyx_t_4;
51044 PyObject *__pyx_t_5 = NULL((void*)0);
51045 char *__pyx_t_6;
51046 void *__pyx_t_7;
51047 int __pyx_t_8;
51048 PyObject *__pyx_t_9 = NULL((void*)0);
51049 int __pyx_t_10;
51050 int __pyx_t_11;
51051 char const *__pyx_t_12;
51052 PyObject *__pyx_t_13 = NULL((void*)0);
51053 PyObject *__pyx_t_14 = NULL((void*)0);
51054 PyObject *__pyx_t_15 = NULL((void*)0);
51055 PyObject *__pyx_t_16 = NULL((void*)0);
51056 PyObject *__pyx_t_17 = NULL((void*)0);
51057 PyObject *__pyx_t_18 = NULL((void*)0);
51058 int __pyx_lineno = 0;
51059 const char *__pyx_filename = NULL((void*)0);
51060 int __pyx_clineno = 0;
51061 __Pyx_RefNannySetupContext("metadata_get", 0);
51062 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51063
51064 /* "rbd.pyx":4379
51065 * :returns: str - metadata value
51066 * """
51067 * key = cstr(key, 'key') # <<<<<<<<<<<<<<
51068 * cdef:
51069 * char *_key = key
51070 */
51071 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4379; __pyx_clineno = __LINE__51071; goto __pyx_L1_error;}
51072 __Pyx_GOTREF(__pyx_t_2);
51073 __pyx_t_3 = NULL((void*)0);
51074 __pyx_t_4 = 0;
51075 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
51076 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
51077 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
51078 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
51079 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
51080 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
51081 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51082 __pyx_t_4 = 1;
51083 }
51084 }
51085 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4379; __pyx_clineno = __LINE__51085; goto __pyx_L1_error;}
51086 __Pyx_GOTREF(__pyx_t_5);
51087 if (__pyx_t_3) {
51088 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
51089 }
51090 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51091 __Pyx_GIVEREF(__pyx_v_key);
51092 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_key
)
;
51093 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
51094 __Pyx_GIVEREF(__pyx_n_s_key);
51095 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_key
)
;
51096 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4379; __pyx_clineno = __LINE__51096; goto __pyx_L1_error;}
51097 __Pyx_GOTREF(__pyx_t_1);
51098 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
51099 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51100 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51101 __pyx_t_1 = 0;
51102
51103 /* "rbd.pyx":4381
51104 * key = cstr(key, 'key')
51105 * cdef:
51106 * char *_key = key # <<<<<<<<<<<<<<
51107 * size_t size = 4096
51108 * char *value = NULL
51109 */
51110 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4381; __pyx_clineno = __LINE__51110; goto __pyx_L1_error;}
51111 __pyx_v__key = __pyx_t_6;
51112
51113 /* "rbd.pyx":4382
51114 * cdef:
51115 * char *_key = key
51116 * size_t size = 4096 # <<<<<<<<<<<<<<
51117 * char *value = NULL
51118 * int ret
51119 */
51120 __pyx_v_size = 0x1000;
51121
51122 /* "rbd.pyx":4383
51123 * char *_key = key
51124 * size_t size = 4096
51125 * char *value = NULL # <<<<<<<<<<<<<<
51126 * int ret
51127 * try:
51128 */
51129 __pyx_v_value = NULL((void*)0);
51130
51131 /* "rbd.pyx":4385
51132 * char *value = NULL
51133 * int ret
51134 * try: # <<<<<<<<<<<<<<
51135 * while True:
51136 * value = <char *>realloc_chk(value, size)
51137 */
51138 /*try:*/ {
51139
51140 /* "rbd.pyx":4386
51141 * int ret
51142 * try:
51143 * while True: # <<<<<<<<<<<<<<
51144 * value = <char *>realloc_chk(value, size)
51145 * with nogil:
51146 */
51147 while (1) {
51148
51149 /* "rbd.pyx":4387
51150 * try:
51151 * while True:
51152 * value = <char *>realloc_chk(value, size) # <<<<<<<<<<<<<<
51153 * with nogil:
51154 * ret = rbd_metadata_get(self.image, _key, value, &size)
51155 */
51156 __pyx_t_7 = __pyx_f_3rbd_realloc_chk(__pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_7 == NULL)__builtin_expect(!!(__pyx_t_7 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4387; __pyx_clineno = __LINE__51156; goto __pyx_L4_error;}
51157 __pyx_v_value = ((char *)__pyx_t_7);
51158
51159 /* "rbd.pyx":4388
51160 * while True:
51161 * value = <char *>realloc_chk(value, size)
51162 * with nogil: # <<<<<<<<<<<<<<
51163 * ret = rbd_metadata_get(self.image, _key, value, &size)
51164 * if ret != -errno.ERANGE:
51165 */
51166 {
51167 #ifdef WITH_THREAD1
51168 PyThreadState *_save;
51169 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
51170 #endif
51171 /*try:*/ {
51172
51173 /* "rbd.pyx":4389
51174 * value = <char *>realloc_chk(value, size)
51175 * with nogil:
51176 * ret = rbd_metadata_get(self.image, _key, value, &size) # <<<<<<<<<<<<<<
51177 * if ret != -errno.ERANGE:
51178 * break
51179 */
51180 __pyx_v_ret = rbd_metadata_get(__pyx_v_self->image, __pyx_v__key, __pyx_v_value, (&__pyx_v_size));
51181 }
51182
51183 /* "rbd.pyx":4388
51184 * while True:
51185 * value = <char *>realloc_chk(value, size)
51186 * with nogil: # <<<<<<<<<<<<<<
51187 * ret = rbd_metadata_get(self.image, _key, value, &size)
51188 * if ret != -errno.ERANGE:
51189 */
51190 /*finally:*/ {
51191 /*normal exit:*/{
51192 #ifdef WITH_THREAD1
51193 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
51194 #endif
51195 goto __pyx_L12;
51196 }
51197 __pyx_L12:;
51198 }
51199 }
51200
51201 /* "rbd.pyx":4390
51202 * with nogil:
51203 * ret = rbd_metadata_get(self.image, _key, value, &size)
51204 * if ret != -errno.ERANGE: # <<<<<<<<<<<<<<
51205 * break
51206 * if ret == -errno.ENOENT:
51207 */
51208 __pyx_t_8 = ((__pyx_v_ret != (-ERANGE34)) != 0);
51209 if (__pyx_t_8) {
51210
51211 /* "rbd.pyx":4391
51212 * ret = rbd_metadata_get(self.image, _key, value, &size)
51213 * if ret != -errno.ERANGE:
51214 * break # <<<<<<<<<<<<<<
51215 * if ret == -errno.ENOENT:
51216 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51217 */
51218 goto __pyx_L7_break;
51219
51220 /* "rbd.pyx":4390
51221 * with nogil:
51222 * ret = rbd_metadata_get(self.image, _key, value, &size)
51223 * if ret != -errno.ERANGE: # <<<<<<<<<<<<<<
51224 * break
51225 * if ret == -errno.ENOENT:
51226 */
51227 }
51228 }
51229 __pyx_L7_break:;
51230
51231 /* "rbd.pyx":4392
51232 * if ret != -errno.ERANGE:
51233 * break
51234 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
51235 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51236 * if ret != 0:
51237 */
51238 __pyx_t_8 = ((__pyx_v_ret == (-ENOENT2)) != 0);
51239 if (__pyx_t_8) {
51240
51241 /* "rbd.pyx":4393
51242 * break
51243 * if ret == -errno.ENOENT:
51244 * raise KeyError('no metadata %s for image %s' % (key, self.name)) # <<<<<<<<<<<<<<
51245 * if ret != 0:
51246 * raise make_ex(ret, 'error getting metadata %s for image %s' %
51247 */
51248 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4393; __pyx_clineno = __LINE__51248; goto __pyx_L4_error;}
51249 __Pyx_GOTREF(__pyx_t_1);
51250 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51251 __Pyx_GIVEREF(__pyx_v_key);
51252 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_key);
51253 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
51254 __Pyx_GIVEREF(__pyx_v_self->name);
51255 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = __pyx_v_self
->name)
;
51256 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_no_metadata_s_for_image_s, __pyx_t_1)PyString_Format(__pyx_kp_s_no_metadata_s_for_image_s, __pyx_t_1
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4393; __pyx_clineno = __LINE__51256; goto __pyx_L4_error;}
51257 __Pyx_GOTREF(__pyx_t_2);
51258 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51259 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4393; __pyx_clineno = __LINE__51259; goto __pyx_L4_error;}
51260 __Pyx_GOTREF(__pyx_t_1);
51261 __Pyx_GIVEREF(__pyx_t_2);
51262 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
51263 __pyx_t_2 = 0;
51264 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4393; __pyx_clineno = __LINE__51264; goto __pyx_L4_error;}
51265 __Pyx_GOTREF(__pyx_t_2);
51266 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51267 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
51268 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51269 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4393; __pyx_clineno = __LINE__51269; goto __pyx_L4_error;}
51270
51271 /* "rbd.pyx":4392
51272 * if ret != -errno.ERANGE:
51273 * break
51274 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
51275 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51276 * if ret != 0:
51277 */
51278 }
51279
51280 /* "rbd.pyx":4394
51281 * if ret == -errno.ENOENT:
51282 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51283 * if ret != 0: # <<<<<<<<<<<<<<
51284 * raise make_ex(ret, 'error getting metadata %s for image %s' %
51285 * (key, self.name))
51286 */
51287 __pyx_t_8 = ((__pyx_v_ret != 0) != 0);
51288 if (__pyx_t_8) {
51289
51290 /* "rbd.pyx":4395
51291 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51292 * if ret != 0:
51293 * raise make_ex(ret, 'error getting metadata %s for image %s' % # <<<<<<<<<<<<<<
51294 * (key, self.name))
51295 * return decode_cstr(value)
51296 */
51297 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4395; __pyx_clineno = __LINE__51297; goto __pyx_L4_error;}
51298 __Pyx_GOTREF(__pyx_t_2);
51299
51300 /* "rbd.pyx":4396
51301 * if ret != 0:
51302 * raise make_ex(ret, 'error getting metadata %s for image %s' %
51303 * (key, self.name)) # <<<<<<<<<<<<<<
51304 * return decode_cstr(value)
51305 * finally:
51306 */
51307 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4396; __pyx_clineno = __LINE__51307; goto __pyx_L4_error;}
51308 __Pyx_GOTREF(__pyx_t_1);
51309 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51310 __Pyx_GIVEREF(__pyx_v_key);
51311 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_key);
51312 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
51313 __Pyx_GIVEREF(__pyx_v_self->name);
51314 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = __pyx_v_self
->name)
;
51315
51316 /* "rbd.pyx":4395
51317 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51318 * if ret != 0:
51319 * raise make_ex(ret, 'error getting metadata %s for image %s' % # <<<<<<<<<<<<<<
51320 * (key, self.name))
51321 * return decode_cstr(value)
51322 */
51323 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_metadata_s_for_ima, __pyx_t_1)PyString_Format(__pyx_kp_s_error_getting_metadata_s_for_ima, __pyx_t_1
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4395; __pyx_clineno = __LINE__51323; goto __pyx_L4_error;}
51324 __Pyx_GOTREF(__pyx_t_5);
51325 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51326 __pyx_t_1 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4395; __pyx_clineno = __LINE__51326; goto __pyx_L4_error;}
51327 __Pyx_GOTREF(__pyx_t_1);
51328 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51329 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
51330 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
51331 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51332 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4395; __pyx_clineno = __LINE__51332; goto __pyx_L4_error;}
51333
51334 /* "rbd.pyx":4394
51335 * if ret == -errno.ENOENT:
51336 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51337 * if ret != 0: # <<<<<<<<<<<<<<
51338 * raise make_ex(ret, 'error getting metadata %s for image %s' %
51339 * (key, self.name))
51340 */
51341 }
51342
51343 /* "rbd.pyx":4397
51344 * raise make_ex(ret, 'error getting metadata %s for image %s' %
51345 * (key, self.name))
51346 * return decode_cstr(value) # <<<<<<<<<<<<<<
51347 * finally:
51348 * free(value)
51349 */
51350 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
51351 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4397; __pyx_clineno = __LINE__51351; goto __pyx_L4_error;}
51352 __Pyx_GOTREF(__pyx_t_5);
51353 __pyx_t_2 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_value); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4397; __pyx_clineno = __LINE__51353; goto __pyx_L4_error;}
51354 __Pyx_GOTREF(__pyx_t_2);
51355 __pyx_t_3 = NULL((void*)0);
51356 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
51357 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
51358 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
51359 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
51360 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
51361 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
51362 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51363 }
51364 }
51365 if (!__pyx_t_3) {
51366 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4397; __pyx_clineno = __LINE__51366; goto __pyx_L4_error;}
51367 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51368 __Pyx_GOTREF(__pyx_t_1);
51369 } else {
51370 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4397; __pyx_clineno = __LINE__51370; goto __pyx_L4_error;}
51371 __Pyx_GOTREF(__pyx_t_9);
51372 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
51373 __Pyx_GIVEREF(__pyx_t_2);
51374 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_2);
51375 __pyx_t_2 = 0;
51376 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4397; __pyx_clineno = __LINE__51376; goto __pyx_L4_error;}
51377 __Pyx_GOTREF(__pyx_t_1);
51378 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
51379 }
51380 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
51381 __pyx_r = __pyx_t_1;
51382 __pyx_t_1 = 0;
51383 goto __pyx_L3_return;
51384 }
51385
51386 /* "rbd.pyx":4399
51387 * return decode_cstr(value)
51388 * finally:
51389 * free(value) # <<<<<<<<<<<<<<
51390 *
51391 * def metadata_set(self, key, value):
51392 */
51393 /*finally:*/ {
51394 /*exception exit:*/{
51395 __pyx_L4_error:;
51396 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
51397 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
51398 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
51399 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
51400 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
51401 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
51402 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
51403 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_13, &
__pyx_t_14, &__pyx_t_15) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
51404 __Pyx_XGOTREF(__pyx_t_13);
51405 __Pyx_XGOTREF(__pyx_t_14);
51406 __Pyx_XGOTREF(__pyx_t_15);
51407 __Pyx_XGOTREF(__pyx_t_16);
51408 __Pyx_XGOTREF(__pyx_t_17);
51409 __Pyx_XGOTREF(__pyx_t_18);
51410 __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
51411 {
51412 free(__pyx_v_value);
51413 }
51414 if (PY_MAJOR_VERSION2 >= 3) {
51415 __Pyx_XGIVEREF(__pyx_t_16);
51416 __Pyx_XGIVEREF(__pyx_t_17);
51417 __Pyx_XGIVEREF(__pyx_t_18);
51418 __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
51419 }
51420 __Pyx_XGIVEREF(__pyx_t_13);
51421 __Pyx_XGIVEREF(__pyx_t_14);
51422 __Pyx_XGIVEREF(__pyx_t_15);
51423 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
51424 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
51425 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
51426 goto __pyx_L1_error;
51427 }
51428 __pyx_L3_return: {
51429 __pyx_t_18 = __pyx_r;
51430 __pyx_r = 0;
51431 free(__pyx_v_value);
51432 __pyx_r = __pyx_t_18;
51433 __pyx_t_18 = 0;
51434 goto __pyx_L0;
51435 }
51436 }
51437
51438 /* "rbd.pyx":4371
51439 * return completion
51440 *
51441 * def metadata_get(self, key): # <<<<<<<<<<<<<<
51442 * """
51443 * Get image metadata for the given key.
51444 */
51445
51446 /* function exit code */
51447 __pyx_L1_error:;
51448 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
51449 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
51450 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
51451 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
51452 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
51453 __Pyx_AddTraceback("rbd.Image.metadata_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
51454 __pyx_r = NULL((void*)0);
51455 __pyx_L0:;
51456 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
51457 __Pyx_XGIVEREF(__pyx_r);
51458 __Pyx_RefNannyFinishContext();
51459 return __pyx_r;
51460}
51461
51462/* "rbd.pyx":4401
51463 * free(value)
51464 *
51465 * def metadata_set(self, key, value): # <<<<<<<<<<<<<<
51466 * """
51467 * Set image metadata for the given key.
51468 */
51469
51470/* Python wrapper */
51471static PyObject *__pyx_pw_3rbd_5Image_163metadata_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
51472static char __pyx_doc_3rbd_5Image_162metadata_set[] = "Image.metadata_set(self, key, value)\n\n Set image metadata for the given key.\n\n :param key: metadata key\n :type key: str\n :param value: metadata value\n :type value: str\n ";
51473static PyObject *__pyx_pw_3rbd_5Image_163metadata_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
51474 PyObject *__pyx_v_key = 0;
51475 PyObject *__pyx_v_value = 0;
51476 int __pyx_lineno = 0;
51477 const char *__pyx_filename = NULL((void*)0);
51478 int __pyx_clineno = 0;
51479 PyObject *__pyx_r = 0;
51480 __Pyx_RefNannyDeclarations
51481 __Pyx_RefNannySetupContext("metadata_set (wrapper)", 0);
51482 {
51483 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
51484 PyObject* values[2] = {0,0};
51485 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
51486 Py_ssize_t kw_args;
51487 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
51488 switch (pos_args) {
51489 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
51490 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
51491 case 0: break;
51492 default: goto __pyx_L5_argtuple_error;
51493 }
51494 kw_args = PyDict_Size(__pyx_kwds);
51495 switch (pos_args) {
51496 case 0:
51497 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key
)) != 0), 1)
) kw_args--;
51498 else goto __pyx_L5_argtuple_error;
51499 case 1:
51500 if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)__builtin_expect(!!((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value
)) != 0), 1)
) kw_args--;
51501 else {
51502 __Pyx_RaiseArgtupleInvalid("metadata_set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4401; __pyx_clineno = __LINE__51502; goto __pyx_L3_error;}
51503 }
51504 }
51505 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
51506 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "metadata_set") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "metadata_set") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4401; __pyx_clineno = __LINE__51506; goto __pyx_L3_error;}
51507 }
51508 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 2) {
51509 goto __pyx_L5_argtuple_error;
51510 } else {
51511 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
51512 values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
51513 }
51514 __pyx_v_key = values[0];
51515 __pyx_v_value = values[1];
51516 }
51517 goto __pyx_L4_argument_unpacking_done;
51518 __pyx_L5_argtuple_error:;
51519 __Pyx_RaiseArgtupleInvalid("metadata_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4401; __pyx_clineno = __LINE__51519; goto __pyx_L3_error;}
51520 __pyx_L3_error:;
51521 __Pyx_AddTraceback("rbd.Image.metadata_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
51522 __Pyx_RefNannyFinishContext();
51523 return NULL((void*)0);
51524 __pyx_L4_argument_unpacking_done:;
51525 __pyx_r = __pyx_pf_3rbd_5Image_162metadata_set(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), __pyx_v_key, __pyx_v_value);
51526
51527 /* function exit code */
51528 __Pyx_RefNannyFinishContext();
51529 return __pyx_r;
51530}
51531
51532static PyObject *__pyx_pf_3rbd_5Image_162metadata_set(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
51533 char *__pyx_v__key;
51534 char *__pyx_v__value;
51535 int __pyx_v_ret;
51536 PyObject *__pyx_r = NULL((void*)0);
51537 __Pyx_RefNannyDeclarations
51538 PyObject *__pyx_t_1 = NULL((void*)0);
51539 PyObject *__pyx_t_2 = NULL((void*)0);
51540 PyObject *__pyx_t_3 = NULL((void*)0);
51541 Py_ssize_t __pyx_t_4;
51542 PyObject *__pyx_t_5 = NULL((void*)0);
51543 char *__pyx_t_6;
51544 int __pyx_t_7;
51545 int __pyx_lineno = 0;
51546 const char *__pyx_filename = NULL((void*)0);
51547 int __pyx_clineno = 0;
51548 __Pyx_RefNannySetupContext("metadata_set", 0);
51549 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51550 __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++);
51551
51552 /* "rbd.pyx":4410
51553 * :type value: str
51554 * """
51555 * key = cstr(key, 'key') # <<<<<<<<<<<<<<
51556 * value = cstr(value, 'value')
51557 * cdef:
51558 */
51559 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4410; __pyx_clineno = __LINE__51559; goto __pyx_L1_error;}
51560 __Pyx_GOTREF(__pyx_t_2);
51561 __pyx_t_3 = NULL((void*)0);
51562 __pyx_t_4 = 0;
51563 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
51564 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
51565 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
51566 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
51567 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
51568 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
51569 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51570 __pyx_t_4 = 1;
51571 }
51572 }
51573 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4410; __pyx_clineno = __LINE__51573; goto __pyx_L1_error;}
51574 __Pyx_GOTREF(__pyx_t_5);
51575 if (__pyx_t_3) {
51576 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
51577 }
51578 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51579 __Pyx_GIVEREF(__pyx_v_key);
51580 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_key
)
;
51581 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
51582 __Pyx_GIVEREF(__pyx_n_s_key);
51583 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_key
)
;
51584 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4410; __pyx_clineno = __LINE__51584; goto __pyx_L1_error;}
51585 __Pyx_GOTREF(__pyx_t_1);
51586 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
51587 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51588 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51589 __pyx_t_1 = 0;
51590
51591 /* "rbd.pyx":4411
51592 * """
51593 * key = cstr(key, 'key')
51594 * value = cstr(value, 'value') # <<<<<<<<<<<<<<
51595 * cdef:
51596 * char *_key = key
51597 */
51598 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4411; __pyx_clineno = __LINE__51598; goto __pyx_L1_error;}
51599 __Pyx_GOTREF(__pyx_t_2);
51600 __pyx_t_5 = NULL((void*)0);
51601 __pyx_t_4 = 0;
51602 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
51603 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
51604 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
51605 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
51606 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
51607 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
51608 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51609 __pyx_t_4 = 1;
51610 }
51611 }
51612 __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4411; __pyx_clineno = __LINE__51612; goto __pyx_L1_error;}
51613 __Pyx_GOTREF(__pyx_t_3);
51614 if (__pyx_t_5) {
51615 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_3))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
51616 }
51617 __Pyx_INCREF(__pyx_v_value)( ((PyObject*)(__pyx_v_value))->ob_refcnt++);
51618 __Pyx_GIVEREF(__pyx_v_value);
51619 PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_value)(((PyTupleObject *)(__pyx_t_3))->ob_item[0+__pyx_t_4] = __pyx_v_value
)
;
51620 __Pyx_INCREF(__pyx_n_s_value)( ((PyObject*)(__pyx_n_s_value))->ob_refcnt++);
51621 __Pyx_GIVEREF(__pyx_n_s_value);
51622 PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_n_s_value)(((PyTupleObject *)(__pyx_t_3))->ob_item[1+__pyx_t_4] = __pyx_n_s_value
)
;
51623 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4411; __pyx_clineno = __LINE__51623; goto __pyx_L1_error;}
51624 __Pyx_GOTREF(__pyx_t_1);
51625 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
51626 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51627 __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_value; __pyx_v_value
= __pyx_t_1; do { if ( --((PyObject*)(tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)
->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0)
;
51628 __pyx_t_1 = 0;
51629
51630 /* "rbd.pyx":4413
51631 * value = cstr(value, 'value')
51632 * cdef:
51633 * char *_key = key # <<<<<<<<<<<<<<
51634 * char *_value = value
51635 * with nogil:
51636 */
51637 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4413; __pyx_clineno = __LINE__51637; goto __pyx_L1_error;}
51638 __pyx_v__key = __pyx_t_6;
51639
51640 /* "rbd.pyx":4414
51641 * cdef:
51642 * char *_key = key
51643 * char *_value = value # <<<<<<<<<<<<<<
51644 * with nogil:
51645 * ret = rbd_metadata_set(self.image, _key, _value)
51646 */
51647 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4414; __pyx_clineno = __LINE__51647; goto __pyx_L1_error;}
51648 __pyx_v__value = __pyx_t_6;
51649
51650 /* "rbd.pyx":4415
51651 * char *_key = key
51652 * char *_value = value
51653 * with nogil: # <<<<<<<<<<<<<<
51654 * ret = rbd_metadata_set(self.image, _key, _value)
51655 *
51656 */
51657 {
51658 #ifdef WITH_THREAD1
51659 PyThreadState *_save;
51660 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
51661 #endif
51662 /*try:*/ {
51663
51664 /* "rbd.pyx":4416
51665 * char *_value = value
51666 * with nogil:
51667 * ret = rbd_metadata_set(self.image, _key, _value) # <<<<<<<<<<<<<<
51668 *
51669 * if ret != 0:
51670 */
51671 __pyx_v_ret = rbd_metadata_set(__pyx_v_self->image, __pyx_v__key, __pyx_v__value);
51672 }
51673
51674 /* "rbd.pyx":4415
51675 * char *_key = key
51676 * char *_value = value
51677 * with nogil: # <<<<<<<<<<<<<<
51678 * ret = rbd_metadata_set(self.image, _key, _value)
51679 *
51680 */
51681 /*finally:*/ {
51682 /*normal exit:*/{
51683 #ifdef WITH_THREAD1
51684 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
51685 #endif
51686 goto __pyx_L5;
51687 }
51688 __pyx_L5:;
51689 }
51690 }
51691
51692 /* "rbd.pyx":4418
51693 * ret = rbd_metadata_set(self.image, _key, _value)
51694 *
51695 * if ret != 0: # <<<<<<<<<<<<<<
51696 * raise make_ex(ret, 'error setting metadata %s for image %s' %
51697 * (key, self.name))
51698 */
51699 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
51700 if (__pyx_t_7) {
51701
51702 /* "rbd.pyx":4419
51703 *
51704 * if ret != 0:
51705 * raise make_ex(ret, 'error setting metadata %s for image %s' % # <<<<<<<<<<<<<<
51706 * (key, self.name))
51707 *
51708 */
51709 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4419; __pyx_clineno = __LINE__51709; goto __pyx_L1_error;}
51710 __Pyx_GOTREF(__pyx_t_1);
51711
51712 /* "rbd.pyx":4420
51713 * if ret != 0:
51714 * raise make_ex(ret, 'error setting metadata %s for image %s' %
51715 * (key, self.name)) # <<<<<<<<<<<<<<
51716 *
51717 *
51718 */
51719 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4420; __pyx_clineno = __LINE__51719; goto __pyx_L1_error;}
51720 __Pyx_GOTREF(__pyx_t_2);
51721 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51722 __Pyx_GIVEREF(__pyx_v_key);
51723 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key)(((PyTupleObject *)(__pyx_t_2))->ob_item[0] = __pyx_v_key);
51724 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
51725 __Pyx_GIVEREF(__pyx_v_self->name);
51726 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_2))->ob_item[1] = __pyx_v_self
->name)
;
51727
51728 /* "rbd.pyx":4419
51729 *
51730 * if ret != 0:
51731 * raise make_ex(ret, 'error setting metadata %s for image %s' % # <<<<<<<<<<<<<<
51732 * (key, self.name))
51733 *
51734 */
51735 __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_error_setting_metadata_s_for_ima, __pyx_t_2)PyString_Format(__pyx_kp_s_error_setting_metadata_s_for_ima, __pyx_t_2
)
; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4419; __pyx_clineno = __LINE__51735; goto __pyx_L1_error;}
51736 __Pyx_GOTREF(__pyx_t_3);
51737 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51738 __pyx_t_2 = __pyx_f_3rbd_make_ex(__pyx_t_1, __pyx_t_3, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4419; __pyx_clineno = __LINE__51738; goto __pyx_L1_error;}
51739 __Pyx_GOTREF(__pyx_t_2);
51740 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51741 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
51742 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
51743 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51744 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4419; __pyx_clineno = __LINE__51744; goto __pyx_L1_error;}
51745
51746 /* "rbd.pyx":4418
51747 * ret = rbd_metadata_set(self.image, _key, _value)
51748 *
51749 * if ret != 0: # <<<<<<<<<<<<<<
51750 * raise make_ex(ret, 'error setting metadata %s for image %s' %
51751 * (key, self.name))
51752 */
51753 }
51754
51755 /* "rbd.pyx":4401
51756 * free(value)
51757 *
51758 * def metadata_set(self, key, value): # <<<<<<<<<<<<<<
51759 * """
51760 * Set image metadata for the given key.
51761 */
51762
51763 /* function exit code */
51764 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
51765 goto __pyx_L0;
51766 __pyx_L1_error:;
51767 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
51768 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
51769 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
51770 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
51771 __Pyx_AddTraceback("rbd.Image.metadata_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
51772 __pyx_r = NULL((void*)0);
51773 __pyx_L0:;
51774 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
51775 __Pyx_XDECREF(__pyx_v_value)do { if ((__pyx_v_value) == ((void*)0)) ; else do { if ( --((
PyObject*)(__pyx_v_value))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(__pyx_v_value)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_v_value)))); } while (0); }
while (0)
;
51776 __Pyx_XGIVEREF(__pyx_r);
51777 __Pyx_RefNannyFinishContext();
51778 return __pyx_r;
51779}
51780
51781/* "rbd.pyx":4423
51782 *
51783 *
51784 * def metadata_remove(self, key): # <<<<<<<<<<<<<<
51785 * """
51786 * Remove image metadata for the given key.
51787 */
51788
51789/* Python wrapper */
51790static PyObject *__pyx_pw_3rbd_5Image_165metadata_remove(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
51791static char __pyx_doc_3rbd_5Image_164metadata_remove[] = "Image.metadata_remove(self, key)\n\n Remove image metadata for the given key.\n\n :param key: metadata key\n :type key: str\n ";
51792static PyObject *__pyx_pw_3rbd_5Image_165metadata_remove(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
51793 PyObject *__pyx_r = 0;
51794 __Pyx_RefNannyDeclarations
51795 __Pyx_RefNannySetupContext("metadata_remove (wrapper)", 0);
51796 __pyx_r = __pyx_pf_3rbd_5Image_164metadata_remove(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_key));
51797
51798 /* function exit code */
51799 __Pyx_RefNannyFinishContext();
51800 return __pyx_r;
51801}
51802
51803static PyObject *__pyx_pf_3rbd_5Image_164metadata_remove(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_key) {
51804 char *__pyx_v__key;
51805 int __pyx_v_ret;
51806 PyObject *__pyx_r = NULL((void*)0);
51807 __Pyx_RefNannyDeclarations
51808 PyObject *__pyx_t_1 = NULL((void*)0);
51809 PyObject *__pyx_t_2 = NULL((void*)0);
51810 PyObject *__pyx_t_3 = NULL((void*)0);
51811 Py_ssize_t __pyx_t_4;
51812 PyObject *__pyx_t_5 = NULL((void*)0);
51813 char *__pyx_t_6;
51814 int __pyx_t_7;
51815 int __pyx_lineno = 0;
51816 const char *__pyx_filename = NULL((void*)0);
51817 int __pyx_clineno = 0;
51818 __Pyx_RefNannySetupContext("metadata_remove", 0);
51819 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51820
51821 /* "rbd.pyx":4430
51822 * :type key: str
51823 * """
51824 * key = cstr(key, 'key') # <<<<<<<<<<<<<<
51825 * cdef:
51826 * char *_key = key
51827 */
51828 __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4430; __pyx_clineno = __LINE__51828; goto __pyx_L1_error;}
51829 __Pyx_GOTREF(__pyx_t_2);
51830 __pyx_t_3 = NULL((void*)0);
51831 __pyx_t_4 = 0;
51832 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_2))__builtin_expect(!!(((__pyx_t_2)->ob_type == &PyMethod_Type
)), 0)
) {
51833 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_self);
51834 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
51835 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2)(((PyMethodObject *)__pyx_t_2) -> im_func);
51836 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
51837 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
51838 __Pyx_DECREF_SET(__pyx_t_2, function)do { PyObject *tmp = (PyObject *) __pyx_t_2; __pyx_t_2 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51839 __pyx_t_4 = 1;
51840 }
51841 }
51842 __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4430; __pyx_clineno = __LINE__51842; goto __pyx_L1_error;}
51843 __Pyx_GOTREF(__pyx_t_5);
51844 if (__pyx_t_3) {
51845 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
51846 }
51847 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51848 __Pyx_GIVEREF(__pyx_v_key);
51849 PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[0+__pyx_t_4] = __pyx_v_key
)
;
51850 __Pyx_INCREF(__pyx_n_s_key)( ((PyObject*)(__pyx_n_s_key))->ob_refcnt++);
51851 __Pyx_GIVEREF(__pyx_n_s_key);
51852 PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_key)(((PyTupleObject *)(__pyx_t_5))->ob_item[1+__pyx_t_4] = __pyx_n_s_key
)
;
51853 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4430; __pyx_clineno = __LINE__51853; goto __pyx_L1_error;}
51854 __Pyx_GOTREF(__pyx_t_1);
51855 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
51856 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51857 __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_1
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
51858 __pyx_t_1 = 0;
51859
51860 /* "rbd.pyx":4432
51861 * key = cstr(key, 'key')
51862 * cdef:
51863 * char *_key = key # <<<<<<<<<<<<<<
51864 * with nogil:
51865 * ret = rbd_metadata_remove(self.image, _key)
51866 */
51867 __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_6) && PyErr_Occurred())
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4432; __pyx_clineno = __LINE__51867; goto __pyx_L1_error;}
51868 __pyx_v__key = __pyx_t_6;
51869
51870 /* "rbd.pyx":4433
51871 * cdef:
51872 * char *_key = key
51873 * with nogil: # <<<<<<<<<<<<<<
51874 * ret = rbd_metadata_remove(self.image, _key)
51875 *
51876 */
51877 {
51878 #ifdef WITH_THREAD1
51879 PyThreadState *_save;
51880 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
51881 #endif
51882 /*try:*/ {
51883
51884 /* "rbd.pyx":4434
51885 * char *_key = key
51886 * with nogil:
51887 * ret = rbd_metadata_remove(self.image, _key) # <<<<<<<<<<<<<<
51888 *
51889 * if ret == -errno.ENOENT:
51890 */
51891 __pyx_v_ret = rbd_metadata_remove(__pyx_v_self->image, __pyx_v__key);
51892 }
51893
51894 /* "rbd.pyx":4433
51895 * cdef:
51896 * char *_key = key
51897 * with nogil: # <<<<<<<<<<<<<<
51898 * ret = rbd_metadata_remove(self.image, _key)
51899 *
51900 */
51901 /*finally:*/ {
51902 /*normal exit:*/{
51903 #ifdef WITH_THREAD1
51904 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
51905 #endif
51906 goto __pyx_L5;
51907 }
51908 __pyx_L5:;
51909 }
51910 }
51911
51912 /* "rbd.pyx":4436
51913 * ret = rbd_metadata_remove(self.image, _key)
51914 *
51915 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
51916 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51917 * if ret != 0:
51918 */
51919 __pyx_t_7 = ((__pyx_v_ret == (-ENOENT2)) != 0);
51920 if (__pyx_t_7) {
51921
51922 /* "rbd.pyx":4437
51923 *
51924 * if ret == -errno.ENOENT:
51925 * raise KeyError('no metadata %s for image %s' % (key, self.name)) # <<<<<<<<<<<<<<
51926 * if ret != 0:
51927 * raise make_ex(ret, 'error removing metadata %s for image %s' %
51928 */
51929 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__51929; goto __pyx_L1_error;}
51930 __Pyx_GOTREF(__pyx_t_1);
51931 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51932 __Pyx_GIVEREF(__pyx_v_key);
51933 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_key);
51934 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
51935 __Pyx_GIVEREF(__pyx_v_self->name);
51936 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = __pyx_v_self
->name)
;
51937 __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_no_metadata_s_for_image_s, __pyx_t_1)PyString_Format(__pyx_kp_s_no_metadata_s_for_image_s, __pyx_t_1
)
; if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__51937; goto __pyx_L1_error;}
51938 __Pyx_GOTREF(__pyx_t_2);
51939 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51940 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__51940; goto __pyx_L1_error;}
51941 __Pyx_GOTREF(__pyx_t_1);
51942 __Pyx_GIVEREF(__pyx_t_2);
51943 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_2);
51944 __pyx_t_2 = 0;
51945 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__51945; goto __pyx_L1_error;}
51946 __Pyx_GOTREF(__pyx_t_2);
51947 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
51948 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
51949 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
51950 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__51950; goto __pyx_L1_error;}
51951
51952 /* "rbd.pyx":4436
51953 * ret = rbd_metadata_remove(self.image, _key)
51954 *
51955 * if ret == -errno.ENOENT: # <<<<<<<<<<<<<<
51956 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51957 * if ret != 0:
51958 */
51959 }
51960
51961 /* "rbd.pyx":4438
51962 * if ret == -errno.ENOENT:
51963 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51964 * if ret != 0: # <<<<<<<<<<<<<<
51965 * raise make_ex(ret, 'error removing metadata %s for image %s' %
51966 * (key, self.name))
51967 */
51968 __pyx_t_7 = ((__pyx_v_ret != 0) != 0);
51969 if (__pyx_t_7) {
51970
51971 /* "rbd.pyx":4439
51972 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51973 * if ret != 0:
51974 * raise make_ex(ret, 'error removing metadata %s for image %s' % # <<<<<<<<<<<<<<
51975 * (key, self.name))
51976 *
51977 */
51978 __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4439; __pyx_clineno = __LINE__51978; goto __pyx_L1_error;}
51979 __Pyx_GOTREF(__pyx_t_2);
51980
51981 /* "rbd.pyx":4440
51982 * if ret != 0:
51983 * raise make_ex(ret, 'error removing metadata %s for image %s' %
51984 * (key, self.name)) # <<<<<<<<<<<<<<
51985 *
51986 * def metadata_list(self):
51987 */
51988 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4440; __pyx_clineno = __LINE__51988; goto __pyx_L1_error;}
51989 __Pyx_GOTREF(__pyx_t_1);
51990 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
51991 __Pyx_GIVEREF(__pyx_v_key);
51992 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_v_key);
51993 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
51994 __Pyx_GIVEREF(__pyx_v_self->name);
51995 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_1))->ob_item[1] = __pyx_v_self
->name)
;
51996
51997 /* "rbd.pyx":4439
51998 * raise KeyError('no metadata %s for image %s' % (key, self.name))
51999 * if ret != 0:
52000 * raise make_ex(ret, 'error removing metadata %s for image %s' % # <<<<<<<<<<<<<<
52001 * (key, self.name))
52002 *
52003 */
52004 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_removing_metadata_s_for_im, __pyx_t_1)PyString_Format(__pyx_kp_s_error_removing_metadata_s_for_im, __pyx_t_1
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4439; __pyx_clineno = __LINE__52004; goto __pyx_L1_error;}
52005 __Pyx_GOTREF(__pyx_t_5);
52006 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
52007 __pyx_t_1 = __pyx_f_3rbd_make_ex(__pyx_t_2, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4439; __pyx_clineno = __LINE__52007; goto __pyx_L1_error;}
52008 __Pyx_GOTREF(__pyx_t_1);
52009 __Pyx_DECREF(__pyx_t_2)do { if ( --((PyObject*)(__pyx_t_2))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_2)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_2)))); } while (
0)
; __pyx_t_2 = 0;
52010 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52011 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
52012 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
52013 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4439; __pyx_clineno = __LINE__52013; goto __pyx_L1_error;}
52014
52015 /* "rbd.pyx":4438
52016 * if ret == -errno.ENOENT:
52017 * raise KeyError('no metadata %s for image %s' % (key, self.name))
52018 * if ret != 0: # <<<<<<<<<<<<<<
52019 * raise make_ex(ret, 'error removing metadata %s for image %s' %
52020 * (key, self.name))
52021 */
52022 }
52023
52024 /* "rbd.pyx":4423
52025 *
52026 *
52027 * def metadata_remove(self, key): # <<<<<<<<<<<<<<
52028 * """
52029 * Remove image metadata for the given key.
52030 */
52031
52032 /* function exit code */
52033 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
52034 goto __pyx_L0;
52035 __pyx_L1_error:;
52036 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
52037 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
52038 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
52039 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
52040 __Pyx_AddTraceback("rbd.Image.metadata_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
52041 __pyx_r = NULL((void*)0);
52042 __pyx_L0:;
52043 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
52044 __Pyx_XGIVEREF(__pyx_r);
52045 __Pyx_RefNannyFinishContext();
52046 return __pyx_r;
52047}
52048
52049/* "rbd.pyx":4442
52050 * (key, self.name))
52051 *
52052 * def metadata_list(self): # <<<<<<<<<<<<<<
52053 * """
52054 * List image metadata.
52055 */
52056
52057/* Python wrapper */
52058static PyObject *__pyx_pw_3rbd_5Image_167metadata_list(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
52059static char __pyx_doc_3rbd_5Image_166metadata_list[] = "Image.metadata_list(self)\n\n List image metadata.\n\n :returns: :class:`MetadataIterator`\n ";
52060static PyObject *__pyx_pw_3rbd_5Image_167metadata_list(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
52061 PyObject *__pyx_r = 0;
52062 __Pyx_RefNannyDeclarations
52063 __Pyx_RefNannySetupContext("metadata_list (wrapper)", 0);
52064 __pyx_r = __pyx_pf_3rbd_5Image_166metadata_list(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
52065
52066 /* function exit code */
52067 __Pyx_RefNannyFinishContext();
52068 return __pyx_r;
52069}
52070
52071static PyObject *__pyx_pf_3rbd_5Image_166metadata_list(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
52072 PyObject *__pyx_r = NULL((void*)0);
52073 __Pyx_RefNannyDeclarations
52074 PyObject *__pyx_t_1 = NULL((void*)0);
52075 PyObject *__pyx_t_2 = NULL((void*)0);
52076 int __pyx_lineno = 0;
52077 const char *__pyx_filename = NULL((void*)0);
52078 int __pyx_clineno = 0;
52079 __Pyx_RefNannySetupContext("metadata_list", 0);
52080
52081 /* "rbd.pyx":4448
52082 * :returns: :class:`MetadataIterator`
52083 * """
52084 * return MetadataIterator(self) # <<<<<<<<<<<<<<
52085 *
52086 * def watchers_list(self):
52087 */
52088 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
52089 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __pyx_clineno = __LINE__52089; goto __pyx_L1_error;}
52090 __Pyx_GOTREF(__pyx_t_1);
52091 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
52092 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
52093 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
52094 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_MetadataIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __pyx_clineno = __LINE__52094; goto __pyx_L1_error;}
52095 __Pyx_GOTREF(__pyx_t_2);
52096 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
52097 __pyx_r = __pyx_t_2;
52098 __pyx_t_2 = 0;
52099 goto __pyx_L0;
52100
52101 /* "rbd.pyx":4442
52102 * (key, self.name))
52103 *
52104 * def metadata_list(self): # <<<<<<<<<<<<<<
52105 * """
52106 * List image metadata.
52107 */
52108
52109 /* function exit code */
52110 __pyx_L1_error:;
52111 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
52112 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
52113 __Pyx_AddTraceback("rbd.Image.metadata_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
52114 __pyx_r = NULL((void*)0);
52115 __pyx_L0:;
52116 __Pyx_XGIVEREF(__pyx_r);
52117 __Pyx_RefNannyFinishContext();
52118 return __pyx_r;
52119}
52120
52121/* "rbd.pyx":4450
52122 * return MetadataIterator(self)
52123 *
52124 * def watchers_list(self): # <<<<<<<<<<<<<<
52125 * """
52126 * List image watchers.
52127 */
52128
52129/* Python wrapper */
52130static PyObject *__pyx_pw_3rbd_5Image_169watchers_list(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
52131static char __pyx_doc_3rbd_5Image_168watchers_list[] = "Image.watchers_list(self)\n\n List image watchers.\n\n :returns: :class:`WatcherIterator`\n ";
52132static PyObject *__pyx_pw_3rbd_5Image_169watchers_list(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
52133 PyObject *__pyx_r = 0;
52134 __Pyx_RefNannyDeclarations
52135 __Pyx_RefNannySetupContext("watchers_list (wrapper)", 0);
52136 __pyx_r = __pyx_pf_3rbd_5Image_168watchers_list(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
52137
52138 /* function exit code */
52139 __Pyx_RefNannyFinishContext();
52140 return __pyx_r;
52141}
52142
52143static PyObject *__pyx_pf_3rbd_5Image_168watchers_list(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
52144 PyObject *__pyx_r = NULL((void*)0);
52145 __Pyx_RefNannyDeclarations
52146 PyObject *__pyx_t_1 = NULL((void*)0);
52147 PyObject *__pyx_t_2 = NULL((void*)0);
52148 int __pyx_lineno = 0;
52149 const char *__pyx_filename = NULL((void*)0);
52150 int __pyx_clineno = 0;
52151 __Pyx_RefNannySetupContext("watchers_list", 0);
52152
52153 /* "rbd.pyx":4456
52154 * :returns: :class:`WatcherIterator`
52155 * """
52156 * return WatcherIterator(self) # <<<<<<<<<<<<<<
52157 *
52158 * def config_list(self):
52159 */
52160 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
52161 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4456; __pyx_clineno = __LINE__52161; goto __pyx_L1_error;}
52162 __Pyx_GOTREF(__pyx_t_1);
52163 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
52164 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
52165 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
52166 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_WatcherIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4456; __pyx_clineno = __LINE__52166; goto __pyx_L1_error;}
52167 __Pyx_GOTREF(__pyx_t_2);
52168 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
52169 __pyx_r = __pyx_t_2;
52170 __pyx_t_2 = 0;
52171 goto __pyx_L0;
52172
52173 /* "rbd.pyx":4450
52174 * return MetadataIterator(self)
52175 *
52176 * def watchers_list(self): # <<<<<<<<<<<<<<
52177 * """
52178 * List image watchers.
52179 */
52180
52181 /* function exit code */
52182 __pyx_L1_error:;
52183 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
52184 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
52185 __Pyx_AddTraceback("rbd.Image.watchers_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
52186 __pyx_r = NULL((void*)0);
52187 __pyx_L0:;
52188 __Pyx_XGIVEREF(__pyx_r);
52189 __Pyx_RefNannyFinishContext();
52190 return __pyx_r;
52191}
52192
52193/* "rbd.pyx":4458
52194 * return WatcherIterator(self)
52195 *
52196 * def config_list(self): # <<<<<<<<<<<<<<
52197 * """
52198 * List image-level config overrides.
52199 */
52200
52201/* Python wrapper */
52202static PyObject *__pyx_pw_3rbd_5Image_171config_list(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
52203static char __pyx_doc_3rbd_5Image_170config_list[] = "Image.config_list(self)\n\n List image-level config overrides.\n\n :returns: :class:`ConfigPoolIterator`\n ";
52204static PyObject *__pyx_pw_3rbd_5Image_171config_list(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
52205 PyObject *__pyx_r = 0;
52206 __Pyx_RefNannyDeclarations
52207 __Pyx_RefNannySetupContext("config_list (wrapper)", 0);
52208 __pyx_r = __pyx_pf_3rbd_5Image_170config_list(((struct __pyx_obj_3rbd_Image *)__pyx_v_self));
52209
52210 /* function exit code */
52211 __Pyx_RefNannyFinishContext();
52212 return __pyx_r;
52213}
52214
52215static PyObject *__pyx_pf_3rbd_5Image_170config_list(struct __pyx_obj_3rbd_Image *__pyx_v_self) {
52216 PyObject *__pyx_r = NULL((void*)0);
52217 __Pyx_RefNannyDeclarations
52218 PyObject *__pyx_t_1 = NULL((void*)0);
52219 PyObject *__pyx_t_2 = NULL((void*)0);
52220 int __pyx_lineno = 0;
52221 const char *__pyx_filename = NULL((void*)0);
52222 int __pyx_clineno = 0;
52223 __Pyx_RefNannySetupContext("config_list", 0);
52224
52225 /* "rbd.pyx":4464
52226 * :returns: :class:`ConfigPoolIterator`
52227 * """
52228 * return ConfigImageIterator(self) # <<<<<<<<<<<<<<
52229 *
52230 * def snap_get_namespace_type(self, snap_id):
52231 */
52232 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
52233 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4464; __pyx_clineno = __LINE__52233; goto __pyx_L1_error;}
52234 __Pyx_GOTREF(__pyx_t_1);
52235 __Pyx_INCREF(((PyObject *)__pyx_v_self))( ((PyObject*)(((PyObject *)__pyx_v_self)))->ob_refcnt++);
52236 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
52237 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = ((PyObject *
)__pyx_v_self))
;
52238 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3rbd_ConfigImageIterator), __pyx_t_1, NULL((void*)0)); if (unlikely(!__pyx_t_2)__builtin_expect(!!(!__pyx_t_2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4464; __pyx_clineno = __LINE__52238; goto __pyx_L1_error;}
52239 __Pyx_GOTREF(__pyx_t_2);
52240 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
52241 __pyx_r = __pyx_t_2;
52242 __pyx_t_2 = 0;
52243 goto __pyx_L0;
52244
52245 /* "rbd.pyx":4458
52246 * return WatcherIterator(self)
52247 *
52248 * def config_list(self): # <<<<<<<<<<<<<<
52249 * """
52250 * List image-level config overrides.
52251 */
52252
52253 /* function exit code */
52254 __pyx_L1_error:;
52255 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
52256 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
;
52257 __Pyx_AddTraceback("rbd.Image.config_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
52258 __pyx_r = NULL((void*)0);
52259 __pyx_L0:;
52260 __Pyx_XGIVEREF(__pyx_r);
52261 __Pyx_RefNannyFinishContext();
52262 return __pyx_r;
52263}
52264
52265/* "rbd.pyx":4466
52266 * return ConfigImageIterator(self)
52267 *
52268 * def snap_get_namespace_type(self, snap_id): # <<<<<<<<<<<<<<
52269 * """
52270 * Get the snapshot namespace type.
52271 */
52272
52273/* Python wrapper */
52274static PyObject *__pyx_pw_3rbd_5Image_173snap_get_namespace_type(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id); /*proto*/
52275static char __pyx_doc_3rbd_5Image_172snap_get_namespace_type[] = "Image.snap_get_namespace_type(self, snap_id)\n\n Get the snapshot namespace type.\n :param snap_id: the snapshot id of a snap shot\n :type key: int\n ";
52276static PyObject *__pyx_pw_3rbd_5Image_173snap_get_namespace_type(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id) {
52277 PyObject *__pyx_r = 0;
52278 __Pyx_RefNannyDeclarations
52279 __Pyx_RefNannySetupContext("snap_get_namespace_type (wrapper)", 0);
52280 __pyx_r = __pyx_pf_3rbd_5Image_172snap_get_namespace_type(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_snap_id));
52281
52282 /* function exit code */
52283 __Pyx_RefNannyFinishContext();
52284 return __pyx_r;
52285}
52286
52287static PyObject *__pyx_pf_3rbd_5Image_172snap_get_namespace_type(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id) {
52288 rbd_snap_namespace_type_t __pyx_v_namespace_type;
52289 uint64_t __pyx_v__snap_id;
52290 int __pyx_v_ret;
52291 PyObject *__pyx_r = NULL((void*)0);
52292 __Pyx_RefNannyDeclarations
52293 uint64_t __pyx_t_1;
52294 int __pyx_t_2;
52295 PyObject *__pyx_t_3 = NULL((void*)0);
52296 PyObject *__pyx_t_4 = NULL((void*)0);
52297 PyObject *__pyx_t_5 = NULL((void*)0);
52298 int __pyx_lineno = 0;
52299 const char *__pyx_filename = NULL((void*)0);
52300 int __pyx_clineno = 0;
52301 __Pyx_RefNannySetupContext("snap_get_namespace_type", 0);
52302
52303 /* "rbd.pyx":4474
52304 * cdef:
52305 * rbd_snap_namespace_type_t namespace_type
52306 * uint64_t _snap_id = snap_id # <<<<<<<<<<<<<<
52307 * with nogil:
52308 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type)
52309 */
52310 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_snap_id); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4474; __pyx_clineno = __LINE__52310; goto __pyx_L1_error;}
52311 __pyx_v__snap_id = __pyx_t_1;
52312
52313 /* "rbd.pyx":4475
52314 * rbd_snap_namespace_type_t namespace_type
52315 * uint64_t _snap_id = snap_id
52316 * with nogil: # <<<<<<<<<<<<<<
52317 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type)
52318 * if ret != 0:
52319 */
52320 {
52321 #ifdef WITH_THREAD1
52322 PyThreadState *_save;
52323 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
52324 #endif
52325 /*try:*/ {
52326
52327 /* "rbd.pyx":4476
52328 * uint64_t _snap_id = snap_id
52329 * with nogil:
52330 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type) # <<<<<<<<<<<<<<
52331 * if ret != 0:
52332 * raise make_ex(ret, 'error getting snapshot namespace type for image: %s, snap_id: %d' % (self.name, snap_id))
52333 */
52334 __pyx_v_ret = rbd_snap_get_namespace_type(__pyx_v_self->image, __pyx_v__snap_id, (&__pyx_v_namespace_type));
52335 }
52336
52337 /* "rbd.pyx":4475
52338 * rbd_snap_namespace_type_t namespace_type
52339 * uint64_t _snap_id = snap_id
52340 * with nogil: # <<<<<<<<<<<<<<
52341 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type)
52342 * if ret != 0:
52343 */
52344 /*finally:*/ {
52345 /*normal exit:*/{
52346 #ifdef WITH_THREAD1
52347 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
52348 #endif
52349 goto __pyx_L5;
52350 }
52351 __pyx_L5:;
52352 }
52353 }
52354
52355 /* "rbd.pyx":4477
52356 * with nogil:
52357 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type)
52358 * if ret != 0: # <<<<<<<<<<<<<<
52359 * raise make_ex(ret, 'error getting snapshot namespace type for image: %s, snap_id: %d' % (self.name, snap_id))
52360 *
52361 */
52362 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
52363 if (__pyx_t_2) {
52364
52365 /* "rbd.pyx":4478
52366 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type)
52367 * if ret != 0:
52368 * raise make_ex(ret, 'error getting snapshot namespace type for image: %s, snap_id: %d' % (self.name, snap_id)) # <<<<<<<<<<<<<<
52369 *
52370 * return namespace_type
52371 */
52372 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4478; __pyx_clineno = __LINE__52372; goto __pyx_L1_error;}
52373 __Pyx_GOTREF(__pyx_t_3);
52374 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4478; __pyx_clineno = __LINE__52374; goto __pyx_L1_error;}
52375 __Pyx_GOTREF(__pyx_t_4);
52376 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
52377 __Pyx_GIVEREF(__pyx_v_self->name);
52378 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_v_self
->name)
;
52379 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
52380 __Pyx_GIVEREF(__pyx_v_snap_id);
52381 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_snap_id)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_v_snap_id
)
;
52382 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_snapshot_namespace, __pyx_t_4)PyString_Format(__pyx_kp_s_error_getting_snapshot_namespace, __pyx_t_4
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4478; __pyx_clineno = __LINE__52382; goto __pyx_L1_error;}
52383 __Pyx_GOTREF(__pyx_t_5);
52384 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
52385 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4478; __pyx_clineno = __LINE__52385; goto __pyx_L1_error;}
52386 __Pyx_GOTREF(__pyx_t_4);
52387 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
52388 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52389 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52390 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
52391 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4478; __pyx_clineno = __LINE__52391; goto __pyx_L1_error;}
52392
52393 /* "rbd.pyx":4477
52394 * with nogil:
52395 * ret = rbd_snap_get_namespace_type(self.image, _snap_id, &namespace_type)
52396 * if ret != 0: # <<<<<<<<<<<<<<
52397 * raise make_ex(ret, 'error getting snapshot namespace type for image: %s, snap_id: %d' % (self.name, snap_id))
52398 *
52399 */
52400 }
52401
52402 /* "rbd.pyx":4480
52403 * raise make_ex(ret, 'error getting snapshot namespace type for image: %s, snap_id: %d' % (self.name, snap_id))
52404 *
52405 * return namespace_type # <<<<<<<<<<<<<<
52406 *
52407 * def snap_get_group_namespace(self, snap_id):
52408 */
52409 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
52410 __pyx_t_4 = __Pyx_PyInt_From_rbd_snap_namespace_type_t(__pyx_v_namespace_type); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4480; __pyx_clineno = __LINE__52410; goto __pyx_L1_error;}
52411 __Pyx_GOTREF(__pyx_t_4);
52412 __pyx_r = __pyx_t_4;
52413 __pyx_t_4 = 0;
52414 goto __pyx_L0;
52415
52416 /* "rbd.pyx":4466
52417 * return ConfigImageIterator(self)
52418 *
52419 * def snap_get_namespace_type(self, snap_id): # <<<<<<<<<<<<<<
52420 * """
52421 * Get the snapshot namespace type.
52422 */
52423
52424 /* function exit code */
52425 __pyx_L1_error:;
52426 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
52427 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
52428 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
52429 __Pyx_AddTraceback("rbd.Image.snap_get_namespace_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
52430 __pyx_r = NULL((void*)0);
52431 __pyx_L0:;
52432 __Pyx_XGIVEREF(__pyx_r);
52433 __Pyx_RefNannyFinishContext();
52434 return __pyx_r;
52435}
52436
52437/* "rbd.pyx":4482
52438 * return namespace_type
52439 *
52440 * def snap_get_group_namespace(self, snap_id): # <<<<<<<<<<<<<<
52441 * """
52442 * get the group namespace details.
52443 */
52444
52445/* Python wrapper */
52446static PyObject *__pyx_pw_3rbd_5Image_175snap_get_group_namespace(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id); /*proto*/
52447static char __pyx_doc_3rbd_5Image_174snap_get_group_namespace[] = "Image.snap_get_group_namespace(self, snap_id)\n\n get the group namespace details.\n :param snap_id: the snapshot id of the group snapshot\n :type key: int\n :returns: dict - contains the following keys:\n\n * ``pool`` (int) - pool id\n\n * ``name`` (str) - group name\n\n * ``snap_name`` (str) - group snap name\n ";
52448static PyObject *__pyx_pw_3rbd_5Image_175snap_get_group_namespace(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id) {
52449 PyObject *__pyx_r = 0;
52450 __Pyx_RefNannyDeclarations
52451 __Pyx_RefNannySetupContext("snap_get_group_namespace (wrapper)", 0);
52452 __pyx_r = __pyx_pf_3rbd_5Image_174snap_get_group_namespace(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_snap_id));
52453
52454 /* function exit code */
52455 __Pyx_RefNannyFinishContext();
52456 return __pyx_r;
52457}
52458
52459static PyObject *__pyx_pf_3rbd_5Image_174snap_get_group_namespace(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id) {
52460 rbd_snap_group_namespace_t __pyx_v_group_namespace;
52461 uint64_t __pyx_v__snap_id;
52462 int __pyx_v_ret;
52463 PyObject *__pyx_v_info = NULL((void*)0);
52464 PyObject *__pyx_r = NULL((void*)0);
52465 __Pyx_RefNannyDeclarations
52466 uint64_t __pyx_t_1;
52467 int __pyx_t_2;
52468 PyObject *__pyx_t_3 = NULL((void*)0);
52469 PyObject *__pyx_t_4 = NULL((void*)0);
52470 PyObject *__pyx_t_5 = NULL((void*)0);
52471 PyObject *__pyx_t_6 = NULL((void*)0);
52472 PyObject *__pyx_t_7 = NULL((void*)0);
52473 PyObject *__pyx_t_8 = NULL((void*)0);
52474 int __pyx_lineno = 0;
52475 const char *__pyx_filename = NULL((void*)0);
52476 int __pyx_clineno = 0;
52477 __Pyx_RefNannySetupContext("snap_get_group_namespace", 0);
52478
52479 /* "rbd.pyx":4497
52480 * cdef:
52481 * rbd_snap_group_namespace_t group_namespace
52482 * uint64_t _snap_id = snap_id # <<<<<<<<<<<<<<
52483 * with nogil:
52484 * ret = rbd_snap_get_group_namespace(self.image, _snap_id,
52485 */
52486 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_snap_id); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4497; __pyx_clineno = __LINE__52486; goto __pyx_L1_error;}
52487 __pyx_v__snap_id = __pyx_t_1;
52488
52489 /* "rbd.pyx":4498
52490 * rbd_snap_group_namespace_t group_namespace
52491 * uint64_t _snap_id = snap_id
52492 * with nogil: # <<<<<<<<<<<<<<
52493 * ret = rbd_snap_get_group_namespace(self.image, _snap_id,
52494 * &group_namespace,
52495 */
52496 {
52497 #ifdef WITH_THREAD1
52498 PyThreadState *_save;
52499 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
52500 #endif
52501 /*try:*/ {
52502
52503 /* "rbd.pyx":4499
52504 * uint64_t _snap_id = snap_id
52505 * with nogil:
52506 * ret = rbd_snap_get_group_namespace(self.image, _snap_id, # <<<<<<<<<<<<<<
52507 * &group_namespace,
52508 * sizeof(rbd_snap_group_namespace_t))
52509 */
52510 __pyx_v_ret = rbd_snap_get_group_namespace(__pyx_v_self->image, __pyx_v__snap_id, (&__pyx_v_group_namespace), (sizeof(rbd_snap_group_namespace_t)));
52511 }
52512
52513 /* "rbd.pyx":4498
52514 * rbd_snap_group_namespace_t group_namespace
52515 * uint64_t _snap_id = snap_id
52516 * with nogil: # <<<<<<<<<<<<<<
52517 * ret = rbd_snap_get_group_namespace(self.image, _snap_id,
52518 * &group_namespace,
52519 */
52520 /*finally:*/ {
52521 /*normal exit:*/{
52522 #ifdef WITH_THREAD1
52523 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
52524 #endif
52525 goto __pyx_L5;
52526 }
52527 __pyx_L5:;
52528 }
52529 }
52530
52531 /* "rbd.pyx":4502
52532 * &group_namespace,
52533 * sizeof(rbd_snap_group_namespace_t))
52534 * if ret != 0: # <<<<<<<<<<<<<<
52535 * raise make_ex(ret, 'error getting snapshot group namespace for image: %s, snap_id: %d' % (self.name, snap_id))
52536 *
52537 */
52538 __pyx_t_2 = ((__pyx_v_ret != 0) != 0);
52539 if (__pyx_t_2) {
52540
52541 /* "rbd.pyx":4503
52542 * sizeof(rbd_snap_group_namespace_t))
52543 * if ret != 0:
52544 * raise make_ex(ret, 'error getting snapshot group namespace for image: %s, snap_id: %d' % (self.name, snap_id)) # <<<<<<<<<<<<<<
52545 *
52546 * info = {
52547 */
52548 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4503; __pyx_clineno = __LINE__52548; goto __pyx_L1_error;}
52549 __Pyx_GOTREF(__pyx_t_3);
52550 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4503; __pyx_clineno = __LINE__52550; goto __pyx_L1_error;}
52551 __Pyx_GOTREF(__pyx_t_4);
52552 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
52553 __Pyx_GIVEREF(__pyx_v_self->name);
52554 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_4))->ob_item[0] = __pyx_v_self
->name)
;
52555 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
52556 __Pyx_GIVEREF(__pyx_v_snap_id);
52557 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_snap_id)(((PyTupleObject *)(__pyx_t_4))->ob_item[1] = __pyx_v_snap_id
)
;
52558 __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_snapshot_group_nam, __pyx_t_4)PyString_Format(__pyx_kp_s_error_getting_snapshot_group_nam, __pyx_t_4
)
; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4503; __pyx_clineno = __LINE__52558; goto __pyx_L1_error;}
52559 __Pyx_GOTREF(__pyx_t_5);
52560 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
52561 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4503; __pyx_clineno = __LINE__52561; goto __pyx_L1_error;}
52562 __Pyx_GOTREF(__pyx_t_4);
52563 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
52564 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52565 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
52566 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
52567 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4503; __pyx_clineno = __LINE__52567; goto __pyx_L1_error;}
52568
52569 /* "rbd.pyx":4502
52570 * &group_namespace,
52571 * sizeof(rbd_snap_group_namespace_t))
52572 * if ret != 0: # <<<<<<<<<<<<<<
52573 * raise make_ex(ret, 'error getting snapshot group namespace for image: %s, snap_id: %d' % (self.name, snap_id))
52574 *
52575 */
52576 }
52577
52578 /* "rbd.pyx":4506
52579 *
52580 * info = {
52581 * 'pool' : group_namespace.group_pool, # <<<<<<<<<<<<<<
52582 * 'name' : decode_cstr(group_namespace.group_name),
52583 * 'snap_name' : decode_cstr(group_namespace.group_snap_name)
52584 */
52585 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4506; __pyx_clineno = __LINE__52585; goto __pyx_L1_error;}
52586 __Pyx_GOTREF(__pyx_t_4);
52587 __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_group_namespace.group_pool); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4506; __pyx_clineno = __LINE__52587; goto __pyx_L1_error;}
52588 __Pyx_GOTREF(__pyx_t_5);
52589 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4506; __pyx_clineno = __LINE__52589; goto __pyx_L1_error;}
52590 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52591
52592 /* "rbd.pyx":4507
52593 * info = {
52594 * 'pool' : group_namespace.group_pool,
52595 * 'name' : decode_cstr(group_namespace.group_name), # <<<<<<<<<<<<<<
52596 * 'snap_name' : decode_cstr(group_namespace.group_snap_name)
52597 * }
52598 */
52599 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4507; __pyx_clineno = __LINE__52599; goto __pyx_L1_error;}
52600 __Pyx_GOTREF(__pyx_t_3);
52601 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_group_namespace.group_name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4507; __pyx_clineno = __LINE__52601; goto __pyx_L1_error;}
52602 __Pyx_GOTREF(__pyx_t_6);
52603 __pyx_t_7 = NULL((void*)0);
52604 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
52605 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
52606 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
52607 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
52608 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
52609 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
52610 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
52611 }
52612 }
52613 if (!__pyx_t_7) {
52614 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4507; __pyx_clineno = __LINE__52614; goto __pyx_L1_error;}
52615 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
52616 __Pyx_GOTREF(__pyx_t_5);
52617 } else {
52618 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4507; __pyx_clineno = __LINE__52618; goto __pyx_L1_error;}
52619 __Pyx_GOTREF(__pyx_t_8);
52620 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
52621 __Pyx_GIVEREF(__pyx_t_6);
52622 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
52623 __pyx_t_6 = 0;
52624 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4507; __pyx_clineno = __LINE__52624; goto __pyx_L1_error;}
52625 __Pyx_GOTREF(__pyx_t_5);
52626 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
52627 }
52628 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
52629 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4506; __pyx_clineno = __LINE__52629; goto __pyx_L1_error;}
52630 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52631
52632 /* "rbd.pyx":4508
52633 * 'pool' : group_namespace.group_pool,
52634 * 'name' : decode_cstr(group_namespace.group_name),
52635 * 'snap_name' : decode_cstr(group_namespace.group_snap_name) # <<<<<<<<<<<<<<
52636 * }
52637 * rbd_snap_group_namespace_cleanup(&group_namespace,
52638 */
52639 __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4508; __pyx_clineno = __LINE__52639; goto __pyx_L1_error;}
52640 __Pyx_GOTREF(__pyx_t_3);
52641 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v_group_namespace.group_snap_name); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4508; __pyx_clineno = __LINE__52641; goto __pyx_L1_error;}
52642 __Pyx_GOTREF(__pyx_t_8);
52643 __pyx_t_6 = NULL((void*)0);
52644 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 0)
) {
52645 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
52646 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
52647 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
52648 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
52649 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
52650 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
52651 }
52652 }
52653 if (!__pyx_t_6) {
52654 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4508; __pyx_clineno = __LINE__52654; goto __pyx_L1_error;}
52655 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
52656 __Pyx_GOTREF(__pyx_t_5);
52657 } else {
52658 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4508; __pyx_clineno = __LINE__52658; goto __pyx_L1_error;}
52659 __Pyx_GOTREF(__pyx_t_7);
52660 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
52661 __Pyx_GIVEREF(__pyx_t_8);
52662 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
52663 __pyx_t_8 = 0;
52664 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4508; __pyx_clineno = __LINE__52664; goto __pyx_L1_error;}
52665 __Pyx_GOTREF(__pyx_t_5);
52666 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
52667 }
52668 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
52669 if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_snap_name, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4506; __pyx_clineno = __LINE__52669; goto __pyx_L1_error;}
52670 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52671 __pyx_v_info = ((PyObject*)__pyx_t_4);
52672 __pyx_t_4 = 0;
52673
52674 /* "rbd.pyx":4510
52675 * 'snap_name' : decode_cstr(group_namespace.group_snap_name)
52676 * }
52677 * rbd_snap_group_namespace_cleanup(&group_namespace, # <<<<<<<<<<<<<<
52678 * sizeof(rbd_snap_group_namespace_t))
52679 * return info
52680 */
52681 rbd_snap_group_namespace_cleanup((&__pyx_v_group_namespace), (sizeof(rbd_snap_group_namespace_t)));
52682
52683 /* "rbd.pyx":4512
52684 * rbd_snap_group_namespace_cleanup(&group_namespace,
52685 * sizeof(rbd_snap_group_namespace_t))
52686 * return info # <<<<<<<<<<<<<<
52687 *
52688 * def snap_get_trash_namespace(self, snap_id):
52689 */
52690 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
52691 __Pyx_INCREF(__pyx_v_info)( ((PyObject*)(__pyx_v_info))->ob_refcnt++);
52692 __pyx_r = __pyx_v_info;
52693 goto __pyx_L0;
52694
52695 /* "rbd.pyx":4482
52696 * return namespace_type
52697 *
52698 * def snap_get_group_namespace(self, snap_id): # <<<<<<<<<<<<<<
52699 * """
52700 * get the group namespace details.
52701 */
52702
52703 /* function exit code */
52704 __pyx_L1_error:;
52705 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
52706 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
52707 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
52708 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
52709 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
52710 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
52711 __Pyx_AddTraceback("rbd.Image.snap_get_group_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
52712 __pyx_r = NULL((void*)0);
52713 __pyx_L0:;
52714 __Pyx_XDECREF(__pyx_v_info)do { if ((__pyx_v_info) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_info))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_info)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_info)))); } while (0); } while
(0)
;
52715 __Pyx_XGIVEREF(__pyx_r);
52716 __Pyx_RefNannyFinishContext();
52717 return __pyx_r;
52718}
52719
52720/* "rbd.pyx":4514
52721 * return info
52722 *
52723 * def snap_get_trash_namespace(self, snap_id): # <<<<<<<<<<<<<<
52724 * """
52725 * get the trash namespace details.
52726 */
52727
52728/* Python wrapper */
52729static PyObject *__pyx_pw_3rbd_5Image_177snap_get_trash_namespace(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id); /*proto*/
52730static char __pyx_doc_3rbd_5Image_176snap_get_trash_namespace[] = "Image.snap_get_trash_namespace(self, snap_id)\n\n get the trash namespace details.\n :param snap_id: the snapshot id of the trash snapshot\n :type key: int\n :returns: dict - contains the following keys:\n\n * ``original_name`` (str) - original snap name\n ";
52731static PyObject *__pyx_pw_3rbd_5Image_177snap_get_trash_namespace(PyObject *__pyx_v_self, PyObject *__pyx_v_snap_id) {
52732 PyObject *__pyx_r = 0;
52733 __Pyx_RefNannyDeclarations
52734 __Pyx_RefNannySetupContext("snap_get_trash_namespace (wrapper)", 0);
52735 __pyx_r = __pyx_pf_3rbd_5Image_176snap_get_trash_namespace(((struct __pyx_obj_3rbd_Image *)__pyx_v_self), ((PyObject *)__pyx_v_snap_id));
52736
52737 /* function exit code */
52738 __Pyx_RefNannyFinishContext();
52739 return __pyx_r;
52740}
52741
52742static PyObject *__pyx_pf_3rbd_5Image_176snap_get_trash_namespace(struct __pyx_obj_3rbd_Image *__pyx_v_self, PyObject *__pyx_v_snap_id) {
52743 uint64_t __pyx_v__snap_id;
52744 size_t __pyx_v__size;
52745 char *__pyx_v__name;
52746 int __pyx_v_ret;
52747 PyObject *__pyx_r = NULL((void*)0);
52748 __Pyx_RefNannyDeclarations
52749 uint64_t __pyx_t_1;
52750 void *__pyx_t_2;
52751 int __pyx_t_3;
52752 PyObject *__pyx_t_4 = NULL((void*)0);
52753 PyObject *__pyx_t_5 = NULL((void*)0);
52754 PyObject *__pyx_t_6 = NULL((void*)0);
52755 PyObject *__pyx_t_7 = NULL((void*)0);
52756 PyObject *__pyx_t_8 = NULL((void*)0);
52757 PyObject *__pyx_t_9 = NULL((void*)0);
52758 int __pyx_t_10;
52759 int __pyx_t_11;
52760 char const *__pyx_t_12;
52761 PyObject *__pyx_t_13 = NULL((void*)0);
52762 PyObject *__pyx_t_14 = NULL((void*)0);
52763 PyObject *__pyx_t_15 = NULL((void*)0);
52764 PyObject *__pyx_t_16 = NULL((void*)0);
52765 PyObject *__pyx_t_17 = NULL((void*)0);
52766 PyObject *__pyx_t_18 = NULL((void*)0);
52767 int __pyx_lineno = 0;
52768 const char *__pyx_filename = NULL((void*)0);
52769 int __pyx_clineno = 0;
52770 __Pyx_RefNannySetupContext("snap_get_trash_namespace", 0);
52771
52772 /* "rbd.pyx":4524
52773 * """
52774 * cdef:
52775 * uint64_t _snap_id = snap_id # <<<<<<<<<<<<<<
52776 * size_t _size = 512
52777 * char *_name = NULL
52778 */
52779 __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_snap_id); if (unlikely((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred())__builtin_expect(!!((__pyx_t_1 == (uint64_t)-1) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4524; __pyx_clineno = __LINE__52779; goto __pyx_L1_error;}
52780 __pyx_v__snap_id = __pyx_t_1;
52781
52782 /* "rbd.pyx":4525
52783 * cdef:
52784 * uint64_t _snap_id = snap_id
52785 * size_t _size = 512 # <<<<<<<<<<<<<<
52786 * char *_name = NULL
52787 * try:
52788 */
52789 __pyx_v__size = 0x200;
52790
52791 /* "rbd.pyx":4526
52792 * uint64_t _snap_id = snap_id
52793 * size_t _size = 512
52794 * char *_name = NULL # <<<<<<<<<<<<<<
52795 * try:
52796 * while True:
52797 */
52798 __pyx_v__name = NULL((void*)0);
52799
52800 /* "rbd.pyx":4527
52801 * size_t _size = 512
52802 * char *_name = NULL
52803 * try: # <<<<<<<<<<<<<<
52804 * while True:
52805 * _name = <char*>realloc_chk(_name, _size);
52806 */
52807 /*try:*/ {
52808
52809 /* "rbd.pyx":4528
52810 * char *_name = NULL
52811 * try:
52812 * while True: # <<<<<<<<<<<<<<
52813 * _name = <char*>realloc_chk(_name, _size);
52814 * with nogil:
52815 */
52816 while (1) {
52817
52818 /* "rbd.pyx":4529
52819 * try:
52820 * while True:
52821 * _name = <char*>realloc_chk(_name, _size); # <<<<<<<<<<<<<<
52822 * with nogil:
52823 * ret = rbd_snap_get_trash_namespace(self.image, _snap_id,
52824 */
52825 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v__name, __pyx_v__size); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4529; __pyx_clineno = __LINE__52825; goto __pyx_L4_error;}
52826 __pyx_v__name = ((char *)__pyx_t_2);
52827
52828 /* "rbd.pyx":4530
52829 * while True:
52830 * _name = <char*>realloc_chk(_name, _size);
52831 * with nogil: # <<<<<<<<<<<<<<
52832 * ret = rbd_snap_get_trash_namespace(self.image, _snap_id,
52833 * _name, _size)
52834 */
52835 {
52836 #ifdef WITH_THREAD1
52837 PyThreadState *_save;
52838 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
52839 #endif
52840 /*try:*/ {
52841
52842 /* "rbd.pyx":4531
52843 * _name = <char*>realloc_chk(_name, _size);
52844 * with nogil:
52845 * ret = rbd_snap_get_trash_namespace(self.image, _snap_id, # <<<<<<<<<<<<<<
52846 * _name, _size)
52847 * if ret >= 0:
52848 */
52849 __pyx_v_ret = rbd_snap_get_trash_namespace(__pyx_v_self->image, __pyx_v__snap_id, __pyx_v__name, __pyx_v__size);
52850 }
52851
52852 /* "rbd.pyx":4530
52853 * while True:
52854 * _name = <char*>realloc_chk(_name, _size);
52855 * with nogil: # <<<<<<<<<<<<<<
52856 * ret = rbd_snap_get_trash_namespace(self.image, _snap_id,
52857 * _name, _size)
52858 */
52859 /*finally:*/ {
52860 /*normal exit:*/{
52861 #ifdef WITH_THREAD1
52862 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
52863 #endif
52864 goto __pyx_L12;
52865 }
52866 __pyx_L12:;
52867 }
52868 }
52869
52870 /* "rbd.pyx":4533
52871 * ret = rbd_snap_get_trash_namespace(self.image, _snap_id,
52872 * _name, _size)
52873 * if ret >= 0: # <<<<<<<<<<<<<<
52874 * break
52875 * elif ret != -errno.ERANGE:
52876 */
52877 __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
52878 if (__pyx_t_3) {
52879
52880 /* "rbd.pyx":4534
52881 * _name, _size)
52882 * if ret >= 0:
52883 * break # <<<<<<<<<<<<<<
52884 * elif ret != -errno.ERANGE:
52885 * raise make_ex(ret, 'error getting snapshot trash '
52886 */
52887 goto __pyx_L7_break;
52888
52889 /* "rbd.pyx":4533
52890 * ret = rbd_snap_get_trash_namespace(self.image, _snap_id,
52891 * _name, _size)
52892 * if ret >= 0: # <<<<<<<<<<<<<<
52893 * break
52894 * elif ret != -errno.ERANGE:
52895 */
52896 }
52897
52898 /* "rbd.pyx":4535
52899 * if ret >= 0:
52900 * break
52901 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
52902 * raise make_ex(ret, 'error getting snapshot trash '
52903 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id))
52904 */
52905 __pyx_t_3 = ((__pyx_v_ret != (-ERANGE34)) != 0);
52906 if (__pyx_t_3) {
52907
52908 /* "rbd.pyx":4536
52909 * break
52910 * elif ret != -errno.ERANGE:
52911 * raise make_ex(ret, 'error getting snapshot trash ' # <<<<<<<<<<<<<<
52912 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id))
52913 * return {
52914 */
52915 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__52915; goto __pyx_L4_error;}
52916 __Pyx_GOTREF(__pyx_t_4);
52917
52918 /* "rbd.pyx":4537
52919 * elif ret != -errno.ERANGE:
52920 * raise make_ex(ret, 'error getting snapshot trash '
52921 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id)) # <<<<<<<<<<<<<<
52922 * return {
52923 * 'original_name' : decode_cstr(_name)
52924 */
52925 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4537; __pyx_clineno = __LINE__52925; goto __pyx_L4_error;}
52926 __Pyx_GOTREF(__pyx_t_5);
52927 __Pyx_INCREF(__pyx_v_self->name)( ((PyObject*)(__pyx_v_self->name))->ob_refcnt++);
52928 __Pyx_GIVEREF(__pyx_v_self->name);
52929 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->name)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_self
->name)
;
52930 __Pyx_INCREF(__pyx_v_snap_id)( ((PyObject*)(__pyx_v_snap_id))->ob_refcnt++);
52931 __Pyx_GIVEREF(__pyx_v_snap_id);
52932 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_snap_id)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_v_snap_id
)
;
52933 __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_error_getting_snapshot_trash_nam, __pyx_t_5)PyString_Format(__pyx_kp_s_error_getting_snapshot_trash_nam, __pyx_t_5
)
; if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4537; __pyx_clineno = __LINE__52933; goto __pyx_L4_error;}
52934 __Pyx_GOTREF(__pyx_t_6);
52935 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52936
52937 /* "rbd.pyx":4536
52938 * break
52939 * elif ret != -errno.ERANGE:
52940 * raise make_ex(ret, 'error getting snapshot trash ' # <<<<<<<<<<<<<<
52941 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id))
52942 * return {
52943 */
52944 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__52944; goto __pyx_L4_error;}
52945 __Pyx_GOTREF(__pyx_t_5);
52946 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
52947 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
52948 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
52949 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
52950 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__52950; goto __pyx_L4_error;}
52951
52952 /* "rbd.pyx":4535
52953 * if ret >= 0:
52954 * break
52955 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
52956 * raise make_ex(ret, 'error getting snapshot trash '
52957 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id))
52958 */
52959 }
52960 }
52961 __pyx_L7_break:;
52962
52963 /* "rbd.pyx":4538
52964 * raise make_ex(ret, 'error getting snapshot trash '
52965 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id))
52966 * return { # <<<<<<<<<<<<<<
52967 * 'original_name' : decode_cstr(_name)
52968 * }
52969 */
52970 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
;
52971
52972 /* "rbd.pyx":4539
52973 * 'namespace image: %s, snap_id: %d' % (self.name, snap_id))
52974 * return {
52975 * 'original_name' : decode_cstr(_name) # <<<<<<<<<<<<<<
52976 * }
52977 * finally:
52978 */
52979 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__52979; goto __pyx_L4_error;}
52980 __Pyx_GOTREF(__pyx_t_5);
52981 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__52981; goto __pyx_L4_error;}
52982 __Pyx_GOTREF(__pyx_t_4);
52983 __pyx_t_7 = __Pyx_PyBytes_FromStringPyString_FromString(__pyx_v__name); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__52983; goto __pyx_L4_error;}
52984 __Pyx_GOTREF(__pyx_t_7);
52985 __pyx_t_8 = NULL((void*)0);
52986 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
52987 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
52988 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
52989 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
52990 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
52991 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
52992 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
52993 }
52994 }
52995 if (!__pyx_t_8) {
52996 __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__52996; goto __pyx_L4_error;}
52997 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
52998 __Pyx_GOTREF(__pyx_t_6);
52999 } else {
53000 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__53000; goto __pyx_L4_error;}
53001 __Pyx_GOTREF(__pyx_t_9);
53002 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
53003 __Pyx_GIVEREF(__pyx_t_7);
53004 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_7);
53005 __pyx_t_7 = 0;
53006 __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__53006; goto __pyx_L4_error;}
53007 __Pyx_GOTREF(__pyx_t_6);
53008 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
53009 }
53010 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
53011 if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_original_name, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__53011; goto __pyx_L4_error;}
53012 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
53013 __pyx_r = __pyx_t_5;
53014 __pyx_t_5 = 0;
53015 goto __pyx_L3_return;
53016 }
53017
53018 /* "rbd.pyx":4542
53019 * }
53020 * finally:
53021 * free(_name) # <<<<<<<<<<<<<<
53022 *
53023 *
53024 */
53025 /*finally:*/ {
53026 /*exception exit:*/{
53027 __pyx_L4_error:;
53028 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
53029 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
53030 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
53031 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
53032 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
53033 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
53034 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
53035 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
53036 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_13, &
__pyx_t_14, &__pyx_t_15) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
53037 __Pyx_XGOTREF(__pyx_t_13);
53038 __Pyx_XGOTREF(__pyx_t_14);
53039 __Pyx_XGOTREF(__pyx_t_15);
53040 __Pyx_XGOTREF(__pyx_t_16);
53041 __Pyx_XGOTREF(__pyx_t_17);
53042 __Pyx_XGOTREF(__pyx_t_18);
53043 __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
53044 {
53045 free(__pyx_v__name);
53046 }
53047 if (PY_MAJOR_VERSION2 >= 3) {
53048 __Pyx_XGIVEREF(__pyx_t_16);
53049 __Pyx_XGIVEREF(__pyx_t_17);
53050 __Pyx_XGIVEREF(__pyx_t_18);
53051 __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
53052 }
53053 __Pyx_XGIVEREF(__pyx_t_13);
53054 __Pyx_XGIVEREF(__pyx_t_14);
53055 __Pyx_XGIVEREF(__pyx_t_15);
53056 __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
53057 __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
53058 __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
53059 goto __pyx_L1_error;
53060 }
53061 __pyx_L3_return: {
53062 __pyx_t_18 = __pyx_r;
53063 __pyx_r = 0;
53064 free(__pyx_v__name);
53065 __pyx_r = __pyx_t_18;
53066 __pyx_t_18 = 0;
53067 goto __pyx_L0;
53068 }
53069 }
53070
53071 /* "rbd.pyx":4514
53072 * return info
53073 *
53074 * def snap_get_trash_namespace(self, snap_id): # <<<<<<<<<<<<<<
53075 * """
53076 * get the trash namespace details.
53077 */
53078
53079 /* function exit code */
53080 __pyx_L1_error:;
53081 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
53082 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
53083 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
53084 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
53085 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
53086 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
53087 __Pyx_AddTraceback("rbd.Image.snap_get_trash_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
53088 __pyx_r = NULL((void*)0);
53089 __pyx_L0:;
53090 __Pyx_XGIVEREF(__pyx_r);
53091 __Pyx_RefNannyFinishContext();
53092 return __pyx_r;
53093}
53094
53095/* "rbd.pyx":4561
53096 * cdef size_t num_images
53097 *
53098 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
53099 * self.ioctx = convert_ioctx(ioctx)
53100 * self.images = NULL
53101 */
53102
53103/* Python wrapper */
53104static int __pyx_pw_3rbd_13ImageIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
53105static int __pyx_pw_3rbd_13ImageIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
53106 PyObject *__pyx_v_ioctx = 0;
53107 int __pyx_lineno = 0;
53108 const char *__pyx_filename = NULL((void*)0);
53109 int __pyx_clineno = 0;
53110 int __pyx_r;
53111 __Pyx_RefNannyDeclarations
53112 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
53113 {
53114 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
53115 PyObject* values[1] = {0};
53116 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
53117 Py_ssize_t kw_args;
53118 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
53119 switch (pos_args) {
53120 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
53121 case 0: break;
53122 default: goto __pyx_L5_argtuple_error;
53123 }
53124 kw_args = PyDict_Size(__pyx_kwds);
53125 switch (pos_args) {
53126 case 0:
53127 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
53128 else goto __pyx_L5_argtuple_error;
53129 }
53130 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
53131 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4561; __pyx_clineno = __LINE__53131; goto __pyx_L3_error;}
53132 }
53133 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
53134 goto __pyx_L5_argtuple_error;
53135 } else {
53136 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
53137 }
53138 __pyx_v_ioctx = values[0];
53139 }
53140 goto __pyx_L4_argument_unpacking_done;
53141 __pyx_L5_argtuple_error:;
53142 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4561; __pyx_clineno = __LINE__53142; goto __pyx_L3_error;}
53143 __pyx_L3_error:;
53144 __Pyx_AddTraceback("rbd.ImageIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53145 __Pyx_RefNannyFinishContext();
53146 return -1;
53147 __pyx_L4_argument_unpacking_done:;
53148 __pyx_r = __pyx_pf_3rbd_13ImageIterator___init__(((struct __pyx_obj_3rbd_ImageIterator *)__pyx_v_self), __pyx_v_ioctx);
53149
53150 /* function exit code */
53151 __Pyx_RefNannyFinishContext();
53152 return __pyx_r;
53153}
53154
53155static int __pyx_pf_3rbd_13ImageIterator___init__(struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
53156 int __pyx_v_ret;
53157 int __pyx_r;
53158 __Pyx_RefNannyDeclarations
53159 rados_ioctx_t __pyx_t_1;
53160 void *__pyx_t_2;
53161 int __pyx_t_3;
53162 PyObject *__pyx_t_4 = NULL((void*)0);
53163 PyObject *__pyx_t_5 = NULL((void*)0);
53164 int __pyx_lineno = 0;
53165 const char *__pyx_filename = NULL((void*)0);
53166 int __pyx_clineno = 0;
53167 __Pyx_RefNannySetupContext("__init__", 0);
53168
53169 /* "rbd.pyx":4562
53170 *
53171 * def __init__(self, ioctx):
53172 * self.ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
53173 * self.images = NULL
53174 * self.num_images = 1024
53175 */
53176 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4562; __pyx_clineno = __LINE__53176; goto __pyx_L1_error;}
53177 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4562; __pyx_clineno = __LINE__53177; goto __pyx_L1_error;}
53178 __pyx_v_self->ioctx = __pyx_t_1;
53179
53180 /* "rbd.pyx":4563
53181 * def __init__(self, ioctx):
53182 * self.ioctx = convert_ioctx(ioctx)
53183 * self.images = NULL # <<<<<<<<<<<<<<
53184 * self.num_images = 1024
53185 * while True:
53186 */
53187 __pyx_v_self->images = NULL((void*)0);
53188
53189 /* "rbd.pyx":4564
53190 * self.ioctx = convert_ioctx(ioctx)
53191 * self.images = NULL
53192 * self.num_images = 1024 # <<<<<<<<<<<<<<
53193 * while True:
53194 * self.images = <rbd_image_spec_t*>realloc_chk(
53195 */
53196 __pyx_v_self->num_images = 0x400;
53197
53198 /* "rbd.pyx":4565
53199 * self.images = NULL
53200 * self.num_images = 1024
53201 * while True: # <<<<<<<<<<<<<<
53202 * self.images = <rbd_image_spec_t*>realloc_chk(
53203 * self.images, self.num_images * sizeof(rbd_image_spec_t))
53204 */
53205 while (1) {
53206
53207 /* "rbd.pyx":4566
53208 * self.num_images = 1024
53209 * while True:
53210 * self.images = <rbd_image_spec_t*>realloc_chk( # <<<<<<<<<<<<<<
53211 * self.images, self.num_images * sizeof(rbd_image_spec_t))
53212 * with nogil:
53213 */
53214 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->images, (__pyx_v_self->num_images * (sizeof(rbd_image_spec_t)))); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__53214; goto __pyx_L1_error;}
53215 __pyx_v_self->images = ((rbd_image_spec_t *)__pyx_t_2);
53216
53217 /* "rbd.pyx":4568
53218 * self.images = <rbd_image_spec_t*>realloc_chk(
53219 * self.images, self.num_images * sizeof(rbd_image_spec_t))
53220 * with nogil: # <<<<<<<<<<<<<<
53221 * ret = rbd_list2(self.ioctx, self.images, &self.num_images)
53222 * if ret >= 0:
53223 */
53224 {
53225 #ifdef WITH_THREAD1
53226 PyThreadState *_save;
53227 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
53228 #endif
53229 /*try:*/ {
53230
53231 /* "rbd.pyx":4569
53232 * self.images, self.num_images * sizeof(rbd_image_spec_t))
53233 * with nogil:
53234 * ret = rbd_list2(self.ioctx, self.images, &self.num_images) # <<<<<<<<<<<<<<
53235 * if ret >= 0:
53236 * break
53237 */
53238 __pyx_v_ret = rbd_list2(__pyx_v_self->ioctx, __pyx_v_self->images, (&__pyx_v_self->num_images));
53239 }
53240
53241 /* "rbd.pyx":4568
53242 * self.images = <rbd_image_spec_t*>realloc_chk(
53243 * self.images, self.num_images * sizeof(rbd_image_spec_t))
53244 * with nogil: # <<<<<<<<<<<<<<
53245 * ret = rbd_list2(self.ioctx, self.images, &self.num_images)
53246 * if ret >= 0:
53247 */
53248 /*finally:*/ {
53249 /*normal exit:*/{
53250 #ifdef WITH_THREAD1
53251 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
53252 #endif
53253 goto __pyx_L9;
53254 }
53255 __pyx_L9:;
53256 }
53257 }
53258
53259 /* "rbd.pyx":4570
53260 * with nogil:
53261 * ret = rbd_list2(self.ioctx, self.images, &self.num_images)
53262 * if ret >= 0: # <<<<<<<<<<<<<<
53263 * break
53264 * elif ret == -errno.ERANGE:
53265 */
53266 __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
53267 if (__pyx_t_3) {
53268
53269 /* "rbd.pyx":4571
53270 * ret = rbd_list2(self.ioctx, self.images, &self.num_images)
53271 * if ret >= 0:
53272 * break # <<<<<<<<<<<<<<
53273 * elif ret == -errno.ERANGE:
53274 * self.num_images *= 2
53275 */
53276 goto __pyx_L4_break;
53277
53278 /* "rbd.pyx":4570
53279 * with nogil:
53280 * ret = rbd_list2(self.ioctx, self.images, &self.num_images)
53281 * if ret >= 0: # <<<<<<<<<<<<<<
53282 * break
53283 * elif ret == -errno.ERANGE:
53284 */
53285 }
53286
53287 /* "rbd.pyx":4572
53288 * if ret >= 0:
53289 * break
53290 * elif ret == -errno.ERANGE: # <<<<<<<<<<<<<<
53291 * self.num_images *= 2
53292 * else:
53293 */
53294 __pyx_t_3 = ((__pyx_v_ret == (-ERANGE34)) != 0);
53295 if (__pyx_t_3) {
53296
53297 /* "rbd.pyx":4573
53298 * break
53299 * elif ret == -errno.ERANGE:
53300 * self.num_images *= 2 # <<<<<<<<<<<<<<
53301 * else:
53302 * raise make_ex(ret, 'error listing images.')
53303 */
53304 __pyx_v_self->num_images = (__pyx_v_self->num_images * 2);
53305
53306 /* "rbd.pyx":4572
53307 * if ret >= 0:
53308 * break
53309 * elif ret == -errno.ERANGE: # <<<<<<<<<<<<<<
53310 * self.num_images *= 2
53311 * else:
53312 */
53313 goto __pyx_L10;
53314 }
53315
53316 /* "rbd.pyx":4575
53317 * self.num_images *= 2
53318 * else:
53319 * raise make_ex(ret, 'error listing images.') # <<<<<<<<<<<<<<
53320 *
53321 * def __iter__(self):
53322 */
53323 /*else*/ {
53324 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4575; __pyx_clineno = __LINE__53324; goto __pyx_L1_error;}
53325 __Pyx_GOTREF(__pyx_t_4);
53326 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_images_2, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4575; __pyx_clineno = __LINE__53326; goto __pyx_L1_error;}
53327 __Pyx_GOTREF(__pyx_t_5);
53328 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
53329 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
53330 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
53331 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4575; __pyx_clineno = __LINE__53331; goto __pyx_L1_error;}
53332 }
53333 __pyx_L10:;
53334 }
53335 __pyx_L4_break:;
53336
53337 /* "rbd.pyx":4561
53338 * cdef size_t num_images
53339 *
53340 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
53341 * self.ioctx = convert_ioctx(ioctx)
53342 * self.images = NULL
53343 */
53344
53345 /* function exit code */
53346 __pyx_r = 0;
53347 goto __pyx_L0;
53348 __pyx_L1_error:;
53349 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
53350 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
53351 __Pyx_AddTraceback("rbd.ImageIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53352 __pyx_r = -1;
53353 __pyx_L0:;
53354 __Pyx_RefNannyFinishContext();
53355 return __pyx_r;
53356}
53357static PyObject *__pyx_gb_3rbd_13ImageIterator_4generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
53358
53359/* "rbd.pyx":4577
53360 * raise make_ex(ret, 'error listing images.')
53361 *
53362 * def __iter__(self): # <<<<<<<<<<<<<<
53363 * for i in range(self.num_images):
53364 * yield {
53365 */
53366
53367/* Python wrapper */
53368static PyObject *__pyx_pw_3rbd_13ImageIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
53369static PyObject *__pyx_pw_3rbd_13ImageIterator_3__iter__(PyObject *__pyx_v_self) {
53370 PyObject *__pyx_r = 0;
53371 __Pyx_RefNannyDeclarations
53372 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
53373 __pyx_r = __pyx_pf_3rbd_13ImageIterator_2__iter__(((struct __pyx_obj_3rbd_ImageIterator *)__pyx_v_self));
53374
53375 /* function exit code */
53376 __Pyx_RefNannyFinishContext();
53377 return __pyx_r;
53378}
53379
53380static PyObject *__pyx_pf_3rbd_13ImageIterator_2__iter__(struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self) {
53381 struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *__pyx_cur_scope;
53382 PyObject *__pyx_r = NULL((void*)0);
53383 __Pyx_RefNannyDeclarations
53384 int __pyx_lineno = 0;
53385 const char *__pyx_filename = NULL((void*)0);
53386 int __pyx_clineno = 0;
53387 __Pyx_RefNannySetupContext("__iter__", 0);
53388 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_6___iter__(__pyx_ptype_3rbd___pyx_scope_struct_6___iter__, __pyx_empty_tuple, NULL((void*)0));
53389 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
53390 __Pyx_RefNannyFinishContext();
53391 return NULL((void*)0);
53392 }
53393 __Pyx_GOTREF(__pyx_cur_scope);
53394 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
53395 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
53396 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
53397 {
53398 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_13ImageIterator_4generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ImageIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_13ImageIterator_4generator5, (PyObject *) __pyx_cur_scope
, __pyx_n_s_iter, __pyx_n_s_ImageIterator___iter)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __pyx_clineno = __LINE__53398; goto __pyx_L1_error;}
53399 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
53400 __Pyx_RefNannyFinishContext();
53401 return (PyObject *) gen;
53402 }
53403
53404 /* function exit code */
53405 __pyx_L1_error:;
53406 __Pyx_AddTraceback("rbd.ImageIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53407 __pyx_r = NULL((void*)0);
53408 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
53409 __Pyx_XGIVEREF(__pyx_r);
53410 __Pyx_RefNannyFinishContext();
53411 return __pyx_r;
53412}
53413
53414static PyObject *__pyx_gb_3rbd_13ImageIterator_4generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
53415{
53416 struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *)__pyx_generator->closure);
53417 PyObject *__pyx_r = NULL((void*)0);
53418 size_t __pyx_t_1;
53419 size_t __pyx_t_2;
53420 PyObject *__pyx_t_3 = NULL((void*)0);
53421 PyObject *__pyx_t_4 = NULL((void*)0);
53422 PyObject *__pyx_t_5 = NULL((void*)0);
53423 PyObject *__pyx_t_6 = NULL((void*)0);
53424 PyObject *__pyx_t_7 = NULL((void*)0);
53425 PyObject *__pyx_t_8 = NULL((void*)0);
53426 int __pyx_lineno = 0;
53427 const char *__pyx_filename = NULL((void*)0);
53428 int __pyx_clineno = 0;
53429 __Pyx_RefNannyDeclarations
53430 __Pyx_RefNannySetupContext("None", 0);
53431 switch (__pyx_generator->resume_label) {
53432 case 0: goto __pyx_L3_first_run;
53433 case 1: goto __pyx_L6_resume_from_yield;
53434 default: /* CPython raises the right error here */
53435 __Pyx_RefNannyFinishContext();
53436 return NULL((void*)0);
53437 }
53438 __pyx_L3_first_run:;
53439 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __pyx_clineno = __LINE__53439; goto __pyx_L1_error;}
53440
53441 /* "rbd.pyx":4578
53442 *
53443 * def __iter__(self):
53444 * for i in range(self.num_images): # <<<<<<<<<<<<<<
53445 * yield {
53446 * 'id' : decode_cstr(self.images[i].id),
53447 */
53448 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_images;
53449 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
53450 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
53451
53452 /* "rbd.pyx":4580
53453 * for i in range(self.num_images):
53454 * yield {
53455 * 'id' : decode_cstr(self.images[i].id), # <<<<<<<<<<<<<<
53456 * 'name' : decode_cstr(self.images[i].name)
53457 * }
53458 */
53459 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53459; goto __pyx_L1_error;}
53460 __Pyx_GOTREF(__pyx_t_3);
53461 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53461; goto __pyx_L1_error;}
53462 __Pyx_GOTREF(__pyx_t_5);
53463 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53463; goto __pyx_L1_error;}
53464 __Pyx_GOTREF(__pyx_t_6);
53465 __pyx_t_7 = NULL((void*)0);
53466 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
53467 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
53468 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
53469 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
53470 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
53471 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
53472 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
53473 }
53474 }
53475 if (!__pyx_t_7) {
53476 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53476; goto __pyx_L1_error;}
53477 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
53478 __Pyx_GOTREF(__pyx_t_4);
53479 } else {
53480 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53480; goto __pyx_L1_error;}
53481 __Pyx_GOTREF(__pyx_t_8);
53482 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
53483 __Pyx_GIVEREF(__pyx_t_6);
53484 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
53485 __pyx_t_6 = 0;
53486 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53486; goto __pyx_L1_error;}
53487 __Pyx_GOTREF(__pyx_t_4);
53488 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
53489 }
53490 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
53491 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_id, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53491; goto __pyx_L1_error;}
53492 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
53493
53494 /* "rbd.pyx":4581
53495 * yield {
53496 * 'id' : decode_cstr(self.images[i].id),
53497 * 'name' : decode_cstr(self.images[i].name) # <<<<<<<<<<<<<<
53498 * }
53499 *
53500 */
53501 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4581; __pyx_clineno = __LINE__53501; goto __pyx_L1_error;}
53502 __Pyx_GOTREF(__pyx_t_5);
53503 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4581; __pyx_clineno = __LINE__53503; goto __pyx_L1_error;}
53504 __Pyx_GOTREF(__pyx_t_8);
53505 __pyx_t_6 = NULL((void*)0);
53506 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
53507 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
53508 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
53509 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
53510 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
53511 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
53512 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
53513 }
53514 }
53515 if (!__pyx_t_6) {
53516 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4581; __pyx_clineno = __LINE__53516; goto __pyx_L1_error;}
53517 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
53518 __Pyx_GOTREF(__pyx_t_4);
53519 } else {
53520 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4581; __pyx_clineno = __LINE__53520; goto __pyx_L1_error;}
53521 __Pyx_GOTREF(__pyx_t_7);
53522 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
53523 __Pyx_GIVEREF(__pyx_t_8);
53524 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
53525 __pyx_t_8 = 0;
53526 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4581; __pyx_clineno = __LINE__53526; goto __pyx_L1_error;}
53527 __Pyx_GOTREF(__pyx_t_4);
53528 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
53529 }
53530 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
53531 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4580; __pyx_clineno = __LINE__53531; goto __pyx_L1_error;}
53532 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
53533 __pyx_r = __pyx_t_3;
53534 __pyx_t_3 = 0;
53535 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
53536 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
53537 __Pyx_XGIVEREF(__pyx_r);
53538 __Pyx_RefNannyFinishContext();
53539 /* return from generator, yielding value */
53540 __pyx_generator->resume_label = 1;
53541 return __pyx_r;
53542 __pyx_L6_resume_from_yield:;
53543 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
53544 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
53545 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4579; __pyx_clineno = __LINE__53545; goto __pyx_L1_error;}
53546 }
53547
53548 /* "rbd.pyx":4577
53549 * raise make_ex(ret, 'error listing images.')
53550 *
53551 * def __iter__(self): # <<<<<<<<<<<<<<
53552 * for i in range(self.num_images):
53553 * yield {
53554 */
53555
53556 /* function exit code */
53557 PyErr_SetNone(PyExc_StopIteration);
53558 goto __pyx_L0;
53559 __pyx_L1_error:;
53560 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
53561 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
53562 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
53563 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
53564 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
53565 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
53566 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53567 __pyx_L0:;
53568 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
53569 __pyx_generator->resume_label = -1;
53570 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
53571 __Pyx_RefNannyFinishContext();
53572 return __pyx_r;
53573}
53574
53575/* "rbd.pyx":4584
53576 * }
53577 *
53578 * def __dealloc__(self): # <<<<<<<<<<<<<<
53579 * if self.images:
53580 * rbd_image_spec_list_cleanup(self.images, self.num_images)
53581 */
53582
53583/* Python wrapper */
53584static void __pyx_pw_3rbd_13ImageIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
53585static void __pyx_pw_3rbd_13ImageIterator_6__dealloc__(PyObject *__pyx_v_self) {
53586 __Pyx_RefNannyDeclarations
53587 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
53588 __pyx_pf_3rbd_13ImageIterator_5__dealloc__(((struct __pyx_obj_3rbd_ImageIterator *)__pyx_v_self));
53589
53590 /* function exit code */
53591 __Pyx_RefNannyFinishContext();
53592}
53593
53594static void __pyx_pf_3rbd_13ImageIterator_5__dealloc__(struct __pyx_obj_3rbd_ImageIterator *__pyx_v_self) {
53595 __Pyx_RefNannyDeclarations
53596 int __pyx_t_1;
53597 __Pyx_RefNannySetupContext("__dealloc__", 0);
53598
53599 /* "rbd.pyx":4585
53600 *
53601 * def __dealloc__(self):
53602 * if self.images: # <<<<<<<<<<<<<<
53603 * rbd_image_spec_list_cleanup(self.images, self.num_images)
53604 * free(self.images)
53605 */
53606 __pyx_t_1 = (__pyx_v_self->images != 0);
53607 if (__pyx_t_1) {
53608
53609 /* "rbd.pyx":4586
53610 * def __dealloc__(self):
53611 * if self.images:
53612 * rbd_image_spec_list_cleanup(self.images, self.num_images) # <<<<<<<<<<<<<<
53613 * free(self.images)
53614 *
53615 */
53616 rbd_image_spec_list_cleanup(__pyx_v_self->images, __pyx_v_self->num_images);
53617
53618 /* "rbd.pyx":4587
53619 * if self.images:
53620 * rbd_image_spec_list_cleanup(self.images, self.num_images)
53621 * free(self.images) # <<<<<<<<<<<<<<
53622 *
53623 *
53624 */
53625 free(__pyx_v_self->images);
53626
53627 /* "rbd.pyx":4585
53628 *
53629 * def __dealloc__(self):
53630 * if self.images: # <<<<<<<<<<<<<<
53631 * rbd_image_spec_list_cleanup(self.images, self.num_images)
53632 * free(self.images)
53633 */
53634 }
53635
53636 /* "rbd.pyx":4584
53637 * }
53638 *
53639 * def __dealloc__(self): # <<<<<<<<<<<<<<
53640 * if self.images:
53641 * rbd_image_spec_list_cleanup(self.images, self.num_images)
53642 */
53643
53644 /* function exit code */
53645 __Pyx_RefNannyFinishContext();
53646}
53647
53648/* "rbd.pyx":4609
53649 * object image
53650 *
53651 * def __init__(self, Image image): # <<<<<<<<<<<<<<
53652 * self.image = image
53653 * self.lock_owners = NULL
53654 */
53655
53656/* Python wrapper */
53657static int __pyx_pw_3rbd_17LockOwnerIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
53658static int __pyx_pw_3rbd_17LockOwnerIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
53659 struct __pyx_obj_3rbd_Image *__pyx_v_image = 0;
53660 int __pyx_lineno = 0;
53661 const char *__pyx_filename = NULL((void*)0);
53662 int __pyx_clineno = 0;
53663 int __pyx_r;
53664 __Pyx_RefNannyDeclarations
53665 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
53666 {
53667 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,0};
53668 PyObject* values[1] = {0};
53669 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
53670 Py_ssize_t kw_args;
53671 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
53672 switch (pos_args) {
53673 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
53674 case 0: break;
53675 default: goto __pyx_L5_argtuple_error;
53676 }
53677 kw_args = PyDict_Size(__pyx_kwds);
53678 switch (pos_args) {
53679 case 0:
53680 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
53681 else goto __pyx_L5_argtuple_error;
53682 }
53683 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
53684 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4609; __pyx_clineno = __LINE__53684; goto __pyx_L3_error;}
53685 }
53686 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
53687 goto __pyx_L5_argtuple_error;
53688 } else {
53689 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
53690 }
53691 __pyx_v_image = ((struct __pyx_obj_3rbd_Image *)values[0]);
53692 }
53693 goto __pyx_L4_argument_unpacking_done;
53694 __pyx_L5_argtuple_error:;
53695 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4609; __pyx_clineno = __LINE__53695; goto __pyx_L3_error;}
53696 __pyx_L3_error:;
53697 __Pyx_AddTraceback("rbd.LockOwnerIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53698 __Pyx_RefNannyFinishContext();
53699 return -1;
53700 __pyx_L4_argument_unpacking_done:;
53701 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3rbd_Image, 1, "image", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image
), __pyx_ptype_3rbd_Image, 1, "image", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4609; __pyx_clineno = __LINE__53701; goto __pyx_L1_error;}
53702 __pyx_r = __pyx_pf_3rbd_17LockOwnerIterator___init__(((struct __pyx_obj_3rbd_LockOwnerIterator *)__pyx_v_self), __pyx_v_image);
53703
53704 /* function exit code */
53705 goto __pyx_L0;
53706 __pyx_L1_error:;
53707 __pyx_r = -1;
53708 __pyx_L0:;
53709 __Pyx_RefNannyFinishContext();
53710 return __pyx_r;
53711}
53712
53713static int __pyx_pf_3rbd_17LockOwnerIterator___init__(struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image) {
53714 int __pyx_v_ret;
53715 int __pyx_r;
53716 __Pyx_RefNannyDeclarations
53717 void *__pyx_t_1;
53718 int __pyx_t_2;
53719 PyObject *__pyx_t_3 = NULL((void*)0);
53720 PyObject *__pyx_t_4 = NULL((void*)0);
53721 PyObject *__pyx_t_5 = NULL((void*)0);
53722 int __pyx_lineno = 0;
53723 const char *__pyx_filename = NULL((void*)0);
53724 int __pyx_clineno = 0;
53725 __Pyx_RefNannySetupContext("__init__", 0);
53726
53727 /* "rbd.pyx":4610
53728 *
53729 * def __init__(self, Image image):
53730 * self.image = image # <<<<<<<<<<<<<<
53731 * self.lock_owners = NULL
53732 * self.num_lock_owners = 8
53733 */
53734 __Pyx_INCREF(((PyObject *)__pyx_v_image))( ((PyObject*)(((PyObject *)__pyx_v_image)))->ob_refcnt++);
53735 __Pyx_GIVEREF(((PyObject *)__pyx_v_image));
53736 __Pyx_GOTREF(__pyx_v_self->image);
53737 __Pyx_DECREF(__pyx_v_self->image)do { if ( --((PyObject*)(__pyx_v_self->image))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
image)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->image)))); } while (0)
;
53738 __pyx_v_self->image = ((PyObject *)__pyx_v_image);
53739
53740 /* "rbd.pyx":4611
53741 * def __init__(self, Image image):
53742 * self.image = image
53743 * self.lock_owners = NULL # <<<<<<<<<<<<<<
53744 * self.num_lock_owners = 8
53745 * while True:
53746 */
53747 __pyx_v_self->lock_owners = NULL((void*)0);
53748
53749 /* "rbd.pyx":4612
53750 * self.image = image
53751 * self.lock_owners = NULL
53752 * self.num_lock_owners = 8 # <<<<<<<<<<<<<<
53753 * while True:
53754 * self.lock_owners = <char**>realloc_chk(self.lock_owners,
53755 */
53756 __pyx_v_self->num_lock_owners = 8;
53757
53758 /* "rbd.pyx":4613
53759 * self.lock_owners = NULL
53760 * self.num_lock_owners = 8
53761 * while True: # <<<<<<<<<<<<<<
53762 * self.lock_owners = <char**>realloc_chk(self.lock_owners,
53763 * self.num_lock_owners *
53764 */
53765 while (1) {
53766
53767 /* "rbd.pyx":4614
53768 * self.num_lock_owners = 8
53769 * while True:
53770 * self.lock_owners = <char**>realloc_chk(self.lock_owners, # <<<<<<<<<<<<<<
53771 * self.num_lock_owners *
53772 * sizeof(char*))
53773 */
53774 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->lock_owners, (__pyx_v_self->num_lock_owners * (sizeof(char *)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4614; __pyx_clineno = __LINE__53774; goto __pyx_L1_error;}
53775 __pyx_v_self->lock_owners = ((char **)__pyx_t_1);
53776
53777 /* "rbd.pyx":4617
53778 * self.num_lock_owners *
53779 * sizeof(char*))
53780 * with nogil: # <<<<<<<<<<<<<<
53781 * ret = rbd_lock_get_owners(image.image, &self.lock_mode,
53782 * self.lock_owners,
53783 */
53784 {
53785 #ifdef WITH_THREAD1
53786 PyThreadState *_save;
53787 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
53788 #endif
53789 /*try:*/ {
53790
53791 /* "rbd.pyx":4618
53792 * sizeof(char*))
53793 * with nogil:
53794 * ret = rbd_lock_get_owners(image.image, &self.lock_mode, # <<<<<<<<<<<<<<
53795 * self.lock_owners,
53796 * &self.num_lock_owners)
53797 */
53798 __pyx_v_ret = rbd_lock_get_owners(__pyx_v_image->image, (&__pyx_v_self->lock_mode), __pyx_v_self->lock_owners, (&__pyx_v_self->num_lock_owners));
53799 }
53800
53801 /* "rbd.pyx":4617
53802 * self.num_lock_owners *
53803 * sizeof(char*))
53804 * with nogil: # <<<<<<<<<<<<<<
53805 * ret = rbd_lock_get_owners(image.image, &self.lock_mode,
53806 * self.lock_owners,
53807 */
53808 /*finally:*/ {
53809 /*normal exit:*/{
53810 #ifdef WITH_THREAD1
53811 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
53812 #endif
53813 goto __pyx_L9;
53814 }
53815 __pyx_L9:;
53816 }
53817 }
53818
53819 /* "rbd.pyx":4621
53820 * self.lock_owners,
53821 * &self.num_lock_owners)
53822 * if ret >= 0: # <<<<<<<<<<<<<<
53823 * break
53824 * elif ret != -errno.ERANGE:
53825 */
53826 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
53827 if (__pyx_t_2) {
53828
53829 /* "rbd.pyx":4622
53830 * &self.num_lock_owners)
53831 * if ret >= 0:
53832 * break # <<<<<<<<<<<<<<
53833 * elif ret != -errno.ERANGE:
53834 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name)
53835 */
53836 goto __pyx_L4_break;
53837
53838 /* "rbd.pyx":4621
53839 * self.lock_owners,
53840 * &self.num_lock_owners)
53841 * if ret >= 0: # <<<<<<<<<<<<<<
53842 * break
53843 * elif ret != -errno.ERANGE:
53844 */
53845 }
53846
53847 /* "rbd.pyx":4623
53848 * if ret >= 0:
53849 * break
53850 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
53851 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name)
53852 *
53853 */
53854 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
53855 if (__pyx_t_2) {
53856
53857 /* "rbd.pyx":4624
53858 * break
53859 * elif ret != -errno.ERANGE:
53860 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name) # <<<<<<<<<<<<<<
53861 *
53862 * def __iter__(self):
53863 */
53864 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4624; __pyx_clineno = __LINE__53864; goto __pyx_L1_error;}
53865 __Pyx_GOTREF(__pyx_t_3);
53866 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_listing_lock_owners_for_im, __pyx_v_image->name)PyString_Format(__pyx_kp_s_error_listing_lock_owners_for_im, __pyx_v_image
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4624; __pyx_clineno = __LINE__53866; goto __pyx_L1_error;}
53867 __Pyx_GOTREF(__pyx_t_4);
53868 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4624; __pyx_clineno = __LINE__53868; goto __pyx_L1_error;}
53869 __Pyx_GOTREF(__pyx_t_5);
53870 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
53871 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
53872 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
53873 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
53874 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4624; __pyx_clineno = __LINE__53874; goto __pyx_L1_error;}
53875
53876 /* "rbd.pyx":4623
53877 * if ret >= 0:
53878 * break
53879 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
53880 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name)
53881 *
53882 */
53883 }
53884 }
53885 __pyx_L4_break:;
53886
53887 /* "rbd.pyx":4609
53888 * object image
53889 *
53890 * def __init__(self, Image image): # <<<<<<<<<<<<<<
53891 * self.image = image
53892 * self.lock_owners = NULL
53893 */
53894
53895 /* function exit code */
53896 __pyx_r = 0;
53897 goto __pyx_L0;
53898 __pyx_L1_error:;
53899 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
53900 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
53901 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
53902 __Pyx_AddTraceback("rbd.LockOwnerIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53903 __pyx_r = -1;
53904 __pyx_L0:;
53905 __Pyx_RefNannyFinishContext();
53906 return __pyx_r;
53907}
53908static PyObject *__pyx_gb_3rbd_17LockOwnerIterator_4generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
53909
53910/* "rbd.pyx":4626
53911 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name)
53912 *
53913 * def __iter__(self): # <<<<<<<<<<<<<<
53914 * for i in range(self.num_lock_owners):
53915 * yield {
53916 */
53917
53918/* Python wrapper */
53919static PyObject *__pyx_pw_3rbd_17LockOwnerIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
53920static PyObject *__pyx_pw_3rbd_17LockOwnerIterator_3__iter__(PyObject *__pyx_v_self) {
53921 PyObject *__pyx_r = 0;
53922 __Pyx_RefNannyDeclarations
53923 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
53924 __pyx_r = __pyx_pf_3rbd_17LockOwnerIterator_2__iter__(((struct __pyx_obj_3rbd_LockOwnerIterator *)__pyx_v_self));
53925
53926 /* function exit code */
53927 __Pyx_RefNannyFinishContext();
53928 return __pyx_r;
53929}
53930
53931static PyObject *__pyx_pf_3rbd_17LockOwnerIterator_2__iter__(struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self) {
53932 struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *__pyx_cur_scope;
53933 PyObject *__pyx_r = NULL((void*)0);
53934 __Pyx_RefNannyDeclarations
53935 int __pyx_lineno = 0;
53936 const char *__pyx_filename = NULL((void*)0);
53937 int __pyx_clineno = 0;
53938 __Pyx_RefNannySetupContext("__iter__", 0);
53939 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_7___iter__(__pyx_ptype_3rbd___pyx_scope_struct_7___iter__, __pyx_empty_tuple, NULL((void*)0));
53940 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
53941 __Pyx_RefNannyFinishContext();
53942 return NULL((void*)0);
53943 }
53944 __Pyx_GOTREF(__pyx_cur_scope);
53945 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
53946 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
53947 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
53948 {
53949 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_17LockOwnerIterator_4generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_LockOwnerIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_17LockOwnerIterator_4generator6, (PyObject *)
__pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_LockOwnerIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4626; __pyx_clineno = __LINE__53949; goto __pyx_L1_error;}
53950 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
53951 __Pyx_RefNannyFinishContext();
53952 return (PyObject *) gen;
53953 }
53954
53955 /* function exit code */
53956 __pyx_L1_error:;
53957 __Pyx_AddTraceback("rbd.LockOwnerIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53958 __pyx_r = NULL((void*)0);
53959 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
53960 __Pyx_XGIVEREF(__pyx_r);
53961 __Pyx_RefNannyFinishContext();
53962 return __pyx_r;
53963}
53964
53965static PyObject *__pyx_gb_3rbd_17LockOwnerIterator_4generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
53966{
53967 struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *)__pyx_generator->closure);
53968 PyObject *__pyx_r = NULL((void*)0);
53969 size_t __pyx_t_1;
53970 size_t __pyx_t_2;
53971 PyObject *__pyx_t_3 = NULL((void*)0);
53972 PyObject *__pyx_t_4 = NULL((void*)0);
53973 PyObject *__pyx_t_5 = NULL((void*)0);
53974 PyObject *__pyx_t_6 = NULL((void*)0);
53975 PyObject *__pyx_t_7 = NULL((void*)0);
53976 PyObject *__pyx_t_8 = NULL((void*)0);
53977 int __pyx_lineno = 0;
53978 const char *__pyx_filename = NULL((void*)0);
53979 int __pyx_clineno = 0;
53980 __Pyx_RefNannyDeclarations
53981 __Pyx_RefNannySetupContext("None", 0);
53982 switch (__pyx_generator->resume_label) {
53983 case 0: goto __pyx_L3_first_run;
53984 case 1: goto __pyx_L6_resume_from_yield;
53985 default: /* CPython raises the right error here */
53986 __Pyx_RefNannyFinishContext();
53987 return NULL((void*)0);
53988 }
53989 __pyx_L3_first_run:;
53990 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4626; __pyx_clineno = __LINE__53990; goto __pyx_L1_error;}
53991
53992 /* "rbd.pyx":4627
53993 *
53994 * def __iter__(self):
53995 * for i in range(self.num_lock_owners): # <<<<<<<<<<<<<<
53996 * yield {
53997 * 'mode' : int(self.lock_mode),
53998 */
53999 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_lock_owners;
54000 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
54001 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
54002
54003 /* "rbd.pyx":4629
54004 * for i in range(self.num_lock_owners):
54005 * yield {
54006 * 'mode' : int(self.lock_mode), # <<<<<<<<<<<<<<
54007 * 'owner' : decode_cstr(self.lock_owners[i]),
54008 * }
54009 */
54010 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4629; __pyx_clineno = __LINE__54010; goto __pyx_L1_error;}
54011 __Pyx_GOTREF(__pyx_t_3);
54012 __pyx_t_4 = __Pyx_PyInt_From_rbd_lock_mode_t(__pyx_cur_scope->__pyx_v_self->lock_mode); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4629; __pyx_clineno = __LINE__54012; goto __pyx_L1_error;}
54013 __Pyx_GOTREF(__pyx_t_4);
54014 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4629; __pyx_clineno = __LINE__54014; goto __pyx_L1_error;}
54015 __Pyx_GOTREF(__pyx_t_5);
54016 __Pyx_GIVEREF(__pyx_t_4);
54017 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_t_4);
54018 __pyx_t_4 = 0;
54019 __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4629; __pyx_clineno = __LINE__54019; goto __pyx_L1_error;}
54020 __Pyx_GOTREF(__pyx_t_4);
54021 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
54022 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4629; __pyx_clineno = __LINE__54022; goto __pyx_L1_error;}
54023 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
54024
54025 /* "rbd.pyx":4630
54026 * yield {
54027 * 'mode' : int(self.lock_mode),
54028 * 'owner' : decode_cstr(self.lock_owners[i]), # <<<<<<<<<<<<<<
54029 * }
54030 *
54031 */
54032 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4630; __pyx_clineno = __LINE__54032; goto __pyx_L1_error;}
54033 __Pyx_GOTREF(__pyx_t_5);
54034 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->lock_owners[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4630; __pyx_clineno = __LINE__54034; goto __pyx_L1_error;}
54035 __Pyx_GOTREF(__pyx_t_6);
54036 __pyx_t_7 = NULL((void*)0);
54037 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
54038 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
54039 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
54040 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
54041 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
54042 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
54043 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
54044 }
54045 }
54046 if (!__pyx_t_7) {
54047 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4630; __pyx_clineno = __LINE__54047; goto __pyx_L1_error;}
54048 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
54049 __Pyx_GOTREF(__pyx_t_4);
54050 } else {
54051 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4630; __pyx_clineno = __LINE__54051; goto __pyx_L1_error;}
54052 __Pyx_GOTREF(__pyx_t_8);
54053 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
54054 __Pyx_GIVEREF(__pyx_t_6);
54055 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
54056 __pyx_t_6 = 0;
54057 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4630; __pyx_clineno = __LINE__54057; goto __pyx_L1_error;}
54058 __Pyx_GOTREF(__pyx_t_4);
54059 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
54060 }
54061 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
54062 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_owner, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4629; __pyx_clineno = __LINE__54062; goto __pyx_L1_error;}
54063 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
54064 __pyx_r = __pyx_t_3;
54065 __pyx_t_3 = 0;
54066 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
54067 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
54068 __Pyx_XGIVEREF(__pyx_r);
54069 __Pyx_RefNannyFinishContext();
54070 /* return from generator, yielding value */
54071 __pyx_generator->resume_label = 1;
54072 return __pyx_r;
54073 __pyx_L6_resume_from_yield:;
54074 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
54075 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
54076 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4628; __pyx_clineno = __LINE__54076; goto __pyx_L1_error;}
54077 }
54078
54079 /* "rbd.pyx":4626
54080 * raise make_ex(ret, 'error listing lock owners for image %s' % image.name)
54081 *
54082 * def __iter__(self): # <<<<<<<<<<<<<<
54083 * for i in range(self.num_lock_owners):
54084 * yield {
54085 */
54086
54087 /* function exit code */
54088 PyErr_SetNone(PyExc_StopIteration);
54089 goto __pyx_L0;
54090 __pyx_L1_error:;
54091 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
54092 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
54093 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
54094 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
54095 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
54096 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
54097 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54098 __pyx_L0:;
54099 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
54100 __pyx_generator->resume_label = -1;
54101 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
54102 __Pyx_RefNannyFinishContext();
54103 return __pyx_r;
54104}
54105
54106/* "rbd.pyx":4633
54107 * }
54108 *
54109 * def __dealloc__(self): # <<<<<<<<<<<<<<
54110 * if self.lock_owners:
54111 * rbd_lock_get_owners_cleanup(self.lock_owners, self.num_lock_owners)
54112 */
54113
54114/* Python wrapper */
54115static void __pyx_pw_3rbd_17LockOwnerIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
54116static void __pyx_pw_3rbd_17LockOwnerIterator_6__dealloc__(PyObject *__pyx_v_self) {
54117 __Pyx_RefNannyDeclarations
54118 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
54119 __pyx_pf_3rbd_17LockOwnerIterator_5__dealloc__(((struct __pyx_obj_3rbd_LockOwnerIterator *)__pyx_v_self));
54120
54121 /* function exit code */
54122 __Pyx_RefNannyFinishContext();
54123}
54124
54125static void __pyx_pf_3rbd_17LockOwnerIterator_5__dealloc__(struct __pyx_obj_3rbd_LockOwnerIterator *__pyx_v_self) {
54126 __Pyx_RefNannyDeclarations
54127 int __pyx_t_1;
54128 __Pyx_RefNannySetupContext("__dealloc__", 0);
54129
54130 /* "rbd.pyx":4634
54131 *
54132 * def __dealloc__(self):
54133 * if self.lock_owners: # <<<<<<<<<<<<<<
54134 * rbd_lock_get_owners_cleanup(self.lock_owners, self.num_lock_owners)
54135 * free(self.lock_owners)
54136 */
54137 __pyx_t_1 = (__pyx_v_self->lock_owners != 0);
54138 if (__pyx_t_1) {
54139
54140 /* "rbd.pyx":4635
54141 * def __dealloc__(self):
54142 * if self.lock_owners:
54143 * rbd_lock_get_owners_cleanup(self.lock_owners, self.num_lock_owners) # <<<<<<<<<<<<<<
54144 * free(self.lock_owners)
54145 *
54146 */
54147 rbd_lock_get_owners_cleanup(__pyx_v_self->lock_owners, __pyx_v_self->num_lock_owners);
54148
54149 /* "rbd.pyx":4636
54150 * if self.lock_owners:
54151 * rbd_lock_get_owners_cleanup(self.lock_owners, self.num_lock_owners)
54152 * free(self.lock_owners) # <<<<<<<<<<<<<<
54153 *
54154 * cdef class MetadataIterator(object):
54155 */
54156 free(__pyx_v_self->lock_owners);
54157
54158 /* "rbd.pyx":4634
54159 *
54160 * def __dealloc__(self):
54161 * if self.lock_owners: # <<<<<<<<<<<<<<
54162 * rbd_lock_get_owners_cleanup(self.lock_owners, self.num_lock_owners)
54163 * free(self.lock_owners)
54164 */
54165 }
54166
54167 /* "rbd.pyx":4633
54168 * }
54169 *
54170 * def __dealloc__(self): # <<<<<<<<<<<<<<
54171 * if self.lock_owners:
54172 * rbd_lock_get_owners_cleanup(self.lock_owners, self.num_lock_owners)
54173 */
54174
54175 /* function exit code */
54176 __Pyx_RefNannyFinishContext();
54177}
54178
54179/* "rbd.pyx":4655
54180 * object next_chunk
54181 *
54182 * def __init__(self, Image image): # <<<<<<<<<<<<<<
54183 * self.image_name = image.name
54184 * self.image = image.image
54185 */
54186
54187/* Python wrapper */
54188static int __pyx_pw_3rbd_16MetadataIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
54189static int __pyx_pw_3rbd_16MetadataIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
54190 struct __pyx_obj_3rbd_Image *__pyx_v_image = 0;
54191 int __pyx_lineno = 0;
54192 const char *__pyx_filename = NULL((void*)0);
54193 int __pyx_clineno = 0;
54194 int __pyx_r;
54195 __Pyx_RefNannyDeclarations
54196 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
54197 {
54198 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,0};
54199 PyObject* values[1] = {0};
54200 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
54201 Py_ssize_t kw_args;
54202 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
54203 switch (pos_args) {
54204 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
54205 case 0: break;
54206 default: goto __pyx_L5_argtuple_error;
54207 }
54208 kw_args = PyDict_Size(__pyx_kwds);
54209 switch (pos_args) {
54210 case 0:
54211 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
54212 else goto __pyx_L5_argtuple_error;
54213 }
54214 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
54215 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4655; __pyx_clineno = __LINE__54215; goto __pyx_L3_error;}
54216 }
54217 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
54218 goto __pyx_L5_argtuple_error;
54219 } else {
54220 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
54221 }
54222 __pyx_v_image = ((struct __pyx_obj_3rbd_Image *)values[0]);
54223 }
54224 goto __pyx_L4_argument_unpacking_done;
54225 __pyx_L5_argtuple_error:;
54226 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4655; __pyx_clineno = __LINE__54226; goto __pyx_L3_error;}
54227 __pyx_L3_error:;
54228 __Pyx_AddTraceback("rbd.MetadataIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54229 __Pyx_RefNannyFinishContext();
54230 return -1;
54231 __pyx_L4_argument_unpacking_done:;
54232 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3rbd_Image, 1, "image", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image
), __pyx_ptype_3rbd_Image, 1, "image", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4655; __pyx_clineno = __LINE__54232; goto __pyx_L1_error;}
Value stored to '__pyx_lineno' is never read
54233 __pyx_r = __pyx_pf_3rbd_16MetadataIterator___init__(((struct __pyx_obj_3rbd_MetadataIterator *)__pyx_v_self), __pyx_v_image);
54234
54235 /* function exit code */
54236 goto __pyx_L0;
54237 __pyx_L1_error:;
54238 __pyx_r = -1;
54239 __pyx_L0:;
54240 __Pyx_RefNannyFinishContext();
54241 return __pyx_r;
54242}
54243
54244static int __pyx_pf_3rbd_16MetadataIterator___init__(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image) {
54245 int __pyx_r;
54246 __Pyx_RefNannyDeclarations
54247 PyObject *__pyx_t_1 = NULL((void*)0);
54248 rbd_image_t __pyx_t_2;
54249 PyObject *__pyx_t_3 = NULL((void*)0);
54250 PyObject *__pyx_t_4 = NULL((void*)0);
54251 int __pyx_lineno = 0;
54252 const char *__pyx_filename = NULL((void*)0);
54253 int __pyx_clineno = 0;
54254 __Pyx_RefNannySetupContext("__init__", 0);
54255
54256 /* "rbd.pyx":4656
54257 *
54258 * def __init__(self, Image image):
54259 * self.image_name = image.name # <<<<<<<<<<<<<<
54260 * self.image = image.image
54261 * self.last_read = strdup("")
54262 */
54263 __pyx_t_1 = __pyx_v_image->name;
54264 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
54265 __Pyx_GIVEREF(__pyx_t_1);
54266 __Pyx_GOTREF(__pyx_v_self->image_name);
54267 __Pyx_DECREF(__pyx_v_self->image_name)do { if ( --((PyObject*)(__pyx_v_self->image_name))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
image_name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_v_self->image_name)))); } while (0)
;
54268 __pyx_v_self->image_name = __pyx_t_1;
54269 __pyx_t_1 = 0;
54270
54271 /* "rbd.pyx":4657
54272 * def __init__(self, Image image):
54273 * self.image_name = image.name
54274 * self.image = image.image # <<<<<<<<<<<<<<
54275 * self.last_read = strdup("")
54276 * self.max_read = 32
54277 */
54278 __pyx_t_2 = __pyx_v_image->image;
54279 __pyx_v_self->image = __pyx_t_2;
54280
54281 /* "rbd.pyx":4658
54282 * self.image_name = image.name
54283 * self.image = image.image
54284 * self.last_read = strdup("") # <<<<<<<<<<<<<<
54285 * self.max_read = 32
54286 * self.get_next_chunk()
54287 */
54288 __pyx_v_self->last_read = strdup(__pyx_k__13)(__extension__ (__builtin_constant_p (__pyx_k__13) &&
((size_t)(const void *)((__pyx_k__13) + 1) - (size_t)(const void
*)(__pyx_k__13) == 1) ? (((const char *) (__pyx_k__13))[0] ==
'\0' ? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_k__13) + 1; char *__retval = (char *) malloc
(__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_k__13, __len); __retval; })) : __strdup (__pyx_k__13
)))
;
54289
54290 /* "rbd.pyx":4659
54291 * self.image = image.image
54292 * self.last_read = strdup("")
54293 * self.max_read = 32 # <<<<<<<<<<<<<<
54294 * self.get_next_chunk()
54295 *
54296 */
54297 __pyx_v_self->max_read = 32;
54298
54299 /* "rbd.pyx":4660
54300 * self.last_read = strdup("")
54301 * self.max_read = 32
54302 * self.get_next_chunk() # <<<<<<<<<<<<<<
54303 *
54304 * def __iter__(self):
54305 */
54306 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4660; __pyx_clineno = __LINE__54306; goto __pyx_L1_error;}
54307 __Pyx_GOTREF(__pyx_t_3);
54308 __pyx_t_4 = NULL((void*)0);
54309 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_3))__builtin_expect(!!(((__pyx_t_3)->ob_type == &PyMethod_Type
)), 1)
) {
54310 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_self);
54311 if (likely(__pyx_t_4)__builtin_expect(!!(__pyx_t_4), 1)) {
54312 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3)(((PyMethodObject *)__pyx_t_3) -> im_func);
54313 __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++);
54314 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
54315 __Pyx_DECREF_SET(__pyx_t_3, function)do { PyObject *tmp = (PyObject *) __pyx_t_3; __pyx_t_3 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
54316 }
54317 }
54318 if (__pyx_t_4) {
54319 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4660; __pyx_clineno = __LINE__54319; goto __pyx_L1_error;}
54320 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
54321 } else {
54322 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4660; __pyx_clineno = __LINE__54322; goto __pyx_L1_error;}
54323 }
54324 __Pyx_GOTREF(__pyx_t_1);
54325 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
54326 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
54327
54328 /* "rbd.pyx":4655
54329 * object next_chunk
54330 *
54331 * def __init__(self, Image image): # <<<<<<<<<<<<<<
54332 * self.image_name = image.name
54333 * self.image = image.image
54334 */
54335
54336 /* function exit code */
54337 __pyx_r = 0;
54338 goto __pyx_L0;
54339 __pyx_L1_error:;
54340 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
54341 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
54342 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
54343 __Pyx_AddTraceback("rbd.MetadataIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54344 __pyx_r = -1;
54345 __pyx_L0:;
54346 __Pyx_RefNannyFinishContext();
54347 return __pyx_r;
54348}
54349static PyObject *__pyx_gb_3rbd_16MetadataIterator_4generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
54350
54351/* "rbd.pyx":4662
54352 * self.get_next_chunk()
54353 *
54354 * def __iter__(self): # <<<<<<<<<<<<<<
54355 * while len(self.next_chunk) > 0:
54356 * for pair in self.next_chunk:
54357 */
54358
54359/* Python wrapper */
54360static PyObject *__pyx_pw_3rbd_16MetadataIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
54361static PyObject *__pyx_pw_3rbd_16MetadataIterator_3__iter__(PyObject *__pyx_v_self) {
54362 PyObject *__pyx_r = 0;
54363 __Pyx_RefNannyDeclarations
54364 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
54365 __pyx_r = __pyx_pf_3rbd_16MetadataIterator_2__iter__(((struct __pyx_obj_3rbd_MetadataIterator *)__pyx_v_self));
54366
54367 /* function exit code */
54368 __Pyx_RefNannyFinishContext();
54369 return __pyx_r;
54370}
54371
54372static PyObject *__pyx_pf_3rbd_16MetadataIterator_2__iter__(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self) {
54373 struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *__pyx_cur_scope;
54374 PyObject *__pyx_r = NULL((void*)0);
54375 __Pyx_RefNannyDeclarations
54376 int __pyx_lineno = 0;
54377 const char *__pyx_filename = NULL((void*)0);
54378 int __pyx_clineno = 0;
54379 __Pyx_RefNannySetupContext("__iter__", 0);
54380 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_8___iter__(__pyx_ptype_3rbd___pyx_scope_struct_8___iter__, __pyx_empty_tuple, NULL((void*)0));
54381 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
54382 __Pyx_RefNannyFinishContext();
54383 return NULL((void*)0);
54384 }
54385 __Pyx_GOTREF(__pyx_cur_scope);
54386 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
54387 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
54388 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
54389 {
54390 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_16MetadataIterator_4generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MetadataIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_16MetadataIterator_4generator7, (PyObject *) __pyx_cur_scope
, __pyx_n_s_iter, __pyx_n_s_MetadataIterator___iter)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4662; __pyx_clineno = __LINE__54390; goto __pyx_L1_error;}
54391 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
54392 __Pyx_RefNannyFinishContext();
54393 return (PyObject *) gen;
54394 }
54395
54396 /* function exit code */
54397 __pyx_L1_error:;
54398 __Pyx_AddTraceback("rbd.MetadataIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54399 __pyx_r = NULL((void*)0);
54400 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
54401 __Pyx_XGIVEREF(__pyx_r);
54402 __Pyx_RefNannyFinishContext();
54403 return __pyx_r;
54404}
54405
54406static PyObject *__pyx_gb_3rbd_16MetadataIterator_4generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
54407{
54408 struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *)__pyx_generator->closure);
54409 PyObject *__pyx_r = NULL((void*)0);
54410 PyObject *__pyx_t_1 = NULL((void*)0);
54411 Py_ssize_t __pyx_t_2;
54412 int __pyx_t_3;
54413 PyObject *(*__pyx_t_4)(PyObject *);
54414 PyObject *__pyx_t_5 = NULL((void*)0);
54415 PyObject *__pyx_t_6 = NULL((void*)0);
54416 int __pyx_lineno = 0;
54417 const char *__pyx_filename = NULL((void*)0);
54418 int __pyx_clineno = 0;
54419 __Pyx_RefNannyDeclarations
54420 __Pyx_RefNannySetupContext("None", 0);
54421 switch (__pyx_generator->resume_label) {
54422 case 0: goto __pyx_L3_first_run;
54423 case 1: goto __pyx_L8_resume_from_yield;
54424 default: /* CPython raises the right error here */
54425 __Pyx_RefNannyFinishContext();
54426 return NULL((void*)0);
54427 }
54428 __pyx_L3_first_run:;
54429 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4662; __pyx_clineno = __LINE__54429; goto __pyx_L1_error;}
54430
54431 /* "rbd.pyx":4663
54432 *
54433 * def __iter__(self):
54434 * while len(self.next_chunk) > 0: # <<<<<<<<<<<<<<
54435 * for pair in self.next_chunk:
54436 * yield pair
54437 */
54438 while (1) {
54439 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->next_chunk;
54440 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
54441 __pyx_t_2 = PyObject_LengthPyObject_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)__builtin_expect(!!(__pyx_t_2 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4663; __pyx_clineno = __LINE__54441; goto __pyx_L1_error;}
54442 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
54443 __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
54444 if (!__pyx_t_3) break;
54445
54446 /* "rbd.pyx":4664
54447 * def __iter__(self):
54448 * while len(self.next_chunk) > 0:
54449 * for pair in self.next_chunk: # <<<<<<<<<<<<<<
54450 * yield pair
54451 * if len(self.next_chunk) < self.max_read:
54452 */
54453 if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_self->next_chunk))__builtin_expect(!!(((((PyObject*)(__pyx_cur_scope->__pyx_v_self
->next_chunk))->ob_type) == &PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_self->next_chunk)((((PyObject*)(__pyx_cur_scope->__pyx_v_self->next_chunk
))->ob_type) == &PyTuple_Type)
) {
54454 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->next_chunk; __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++); __pyx_t_2 = 0;
54455 __pyx_t_4 = NULL((void*)0);
54456 } else {
54457 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_self->next_chunk); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54457; goto __pyx_L1_error;}
54458 __Pyx_GOTREF(__pyx_t_1);
54459 __pyx_t_4 = Py_TYPE(__pyx_t_1)(((PyObject*)(__pyx_t_1))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54459; goto __pyx_L1_error;}
54460 }
54461 for (;;) {
54462 if (likely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 1)) {
54463 if (likely(PyList_CheckExact(__pyx_t_1))__builtin_expect(!!(((((PyObject*)(__pyx_t_1))->ob_type) ==
&PyList_Type)), 1)
) {
54464 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
54465 #if CYTHON_COMPILING_IN_CPYTHON1
54466 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2)(((PyListObject *)(__pyx_t_1))->ob_item[__pyx_t_2]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_2++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54466; goto __pyx_L1_error;}
54467 #else
54468 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_2) )
; __pyx_t_2++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54468; goto __pyx_L1_error;}
54469 __Pyx_GOTREF(__pyx_t_5);
54470 #endif
54471 } else {
54472 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)(((PyVarObject*)(__pyx_t_1))->ob_size)) break;
54473 #if CYTHON_COMPILING_IN_CPYTHON1
54474 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)(((PyTupleObject *)(__pyx_t_1))->ob_item[__pyx_t_2]); __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++); __pyx_t_2++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54474; goto __pyx_L1_error;}
54475 #else
54476 __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_2)( (((PyObject*)(__pyx_t_1))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_1, __pyx_t_2) )
; __pyx_t_2++; if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54476; goto __pyx_L1_error;}
54477 __Pyx_GOTREF(__pyx_t_5);
54478 #endif
54479 }
54480 } else {
54481 __pyx_t_5 = __pyx_t_4(__pyx_t_1);
54482 if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {
54483 PyObject* exc_type = PyErr_Occurred();
54484 if (exc_type) {
54485 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
54486 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4664; __pyx_clineno = __LINE__54486; goto __pyx_L1_error;}
54487 }
54488 break;
54489 }
54490 __Pyx_GOTREF(__pyx_t_5);
54491 }
54492 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_pair);
54493 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pair, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_pair
; __pyx_cur_scope->__pyx_v_pair = __pyx_t_5; do { if ((tmp
) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0); } while (0)
;
54494 __Pyx_GIVEREF(__pyx_t_5);
54495 __pyx_t_5 = 0;
54496
54497 /* "rbd.pyx":4665
54498 * while len(self.next_chunk) > 0:
54499 * for pair in self.next_chunk:
54500 * yield pair # <<<<<<<<<<<<<<
54501 * if len(self.next_chunk) < self.max_read:
54502 * break
54503 */
54504 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_pair)( ((PyObject*)(__pyx_cur_scope->__pyx_v_pair))->ob_refcnt
++)
;
54505 __pyx_r = __pyx_cur_scope->__pyx_v_pair;
54506 __Pyx_XGIVEREF(__pyx_t_1);
54507 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
54508 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
54509 __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
54510 __Pyx_XGIVEREF(__pyx_r);
54511 __Pyx_RefNannyFinishContext();
54512 /* return from generator, yielding value */
54513 __pyx_generator->resume_label = 1;
54514 return __pyx_r;
54515 __pyx_L8_resume_from_yield:;
54516 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
54517 __pyx_cur_scope->__pyx_t_0 = 0;
54518 __Pyx_XGOTREF(__pyx_t_1);
54519 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
54520 __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
54521 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4665; __pyx_clineno = __LINE__54521; goto __pyx_L1_error;}
54522
54523 /* "rbd.pyx":4664
54524 * def __iter__(self):
54525 * while len(self.next_chunk) > 0:
54526 * for pair in self.next_chunk: # <<<<<<<<<<<<<<
54527 * yield pair
54528 * if len(self.next_chunk) < self.max_read:
54529 */
54530 }
54531 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
54532
54533 /* "rbd.pyx":4666
54534 * for pair in self.next_chunk:
54535 * yield pair
54536 * if len(self.next_chunk) < self.max_read: # <<<<<<<<<<<<<<
54537 * break
54538 * self.get_next_chunk()
54539 */
54540 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->next_chunk;
54541 __Pyx_INCREF(__pyx_t_1)( ((PyObject*)(__pyx_t_1))->ob_refcnt++);
54542 __pyx_t_2 = PyObject_LengthPyObject_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)__builtin_expect(!!(__pyx_t_2 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4666; __pyx_clineno = __LINE__54542; goto __pyx_L1_error;}
54543 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
54544 __pyx_t_3 = ((__pyx_t_2 < __pyx_cur_scope->__pyx_v_self->max_read) != 0);
54545 if (__pyx_t_3) {
54546
54547 /* "rbd.pyx":4667
54548 * yield pair
54549 * if len(self.next_chunk) < self.max_read:
54550 * break # <<<<<<<<<<<<<<
54551 * self.get_next_chunk()
54552 *
54553 */
54554 goto __pyx_L5_break;
54555
54556 /* "rbd.pyx":4666
54557 * for pair in self.next_chunk:
54558 * yield pair
54559 * if len(self.next_chunk) < self.max_read: # <<<<<<<<<<<<<<
54560 * break
54561 * self.get_next_chunk()
54562 */
54563 }
54564
54565 /* "rbd.pyx":4668
54566 * if len(self.next_chunk) < self.max_read:
54567 * break
54568 * self.get_next_chunk() # <<<<<<<<<<<<<<
54569 *
54570 * def __dealloc__(self):
54571 */
54572 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_next_chunk); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4668; __pyx_clineno = __LINE__54572; goto __pyx_L1_error;}
54573 __Pyx_GOTREF(__pyx_t_5);
54574 __pyx_t_6 = NULL((void*)0);
54575 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
54576 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
54577 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
54578 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
54579 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
54580 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
54581 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
54582 }
54583 }
54584 if (__pyx_t_6) {
54585 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4668; __pyx_clineno = __LINE__54585; goto __pyx_L1_error;}
54586 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
54587 } else {
54588 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4668; __pyx_clineno = __LINE__54588; goto __pyx_L1_error;}
54589 }
54590 __Pyx_GOTREF(__pyx_t_1);
54591 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
54592 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
54593 }
54594 __pyx_L5_break:;
54595
54596 /* "rbd.pyx":4662
54597 * self.get_next_chunk()
54598 *
54599 * def __iter__(self): # <<<<<<<<<<<<<<
54600 * while len(self.next_chunk) > 0:
54601 * for pair in self.next_chunk:
54602 */
54603
54604 /* function exit code */
54605 PyErr_SetNone(PyExc_StopIteration);
54606 goto __pyx_L0;
54607 __pyx_L1_error:;
54608 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
54609 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
54610 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
54611 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54612 __pyx_L0:;
54613 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
54614 __pyx_generator->resume_label = -1;
54615 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
54616 __Pyx_RefNannyFinishContext();
54617 return __pyx_r;
54618}
54619
54620/* "rbd.pyx":4670
54621 * self.get_next_chunk()
54622 *
54623 * def __dealloc__(self): # <<<<<<<<<<<<<<
54624 * if self.last_read:
54625 * free(self.last_read)
54626 */
54627
54628/* Python wrapper */
54629static void __pyx_pw_3rbd_16MetadataIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
54630static void __pyx_pw_3rbd_16MetadataIterator_6__dealloc__(PyObject *__pyx_v_self) {
54631 __Pyx_RefNannyDeclarations
54632 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
54633 __pyx_pf_3rbd_16MetadataIterator_5__dealloc__(((struct __pyx_obj_3rbd_MetadataIterator *)__pyx_v_self));
54634
54635 /* function exit code */
54636 __Pyx_RefNannyFinishContext();
54637}
54638
54639static void __pyx_pf_3rbd_16MetadataIterator_5__dealloc__(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self) {
54640 __Pyx_RefNannyDeclarations
54641 int __pyx_t_1;
54642 __Pyx_RefNannySetupContext("__dealloc__", 0);
54643
54644 /* "rbd.pyx":4671
54645 *
54646 * def __dealloc__(self):
54647 * if self.last_read: # <<<<<<<<<<<<<<
54648 * free(self.last_read)
54649 *
54650 */
54651 __pyx_t_1 = (__pyx_v_self->last_read != 0);
54652 if (__pyx_t_1) {
54653
54654 /* "rbd.pyx":4672
54655 * def __dealloc__(self):
54656 * if self.last_read:
54657 * free(self.last_read) # <<<<<<<<<<<<<<
54658 *
54659 * def get_next_chunk(self):
54660 */
54661 free(__pyx_v_self->last_read);
54662
54663 /* "rbd.pyx":4671
54664 *
54665 * def __dealloc__(self):
54666 * if self.last_read: # <<<<<<<<<<<<<<
54667 * free(self.last_read)
54668 *
54669 */
54670 }
54671
54672 /* "rbd.pyx":4670
54673 * self.get_next_chunk()
54674 *
54675 * def __dealloc__(self): # <<<<<<<<<<<<<<
54676 * if self.last_read:
54677 * free(self.last_read)
54678 */
54679
54680 /* function exit code */
54681 __Pyx_RefNannyFinishContext();
54682}
54683
54684/* "rbd.pyx":4674
54685 * free(self.last_read)
54686 *
54687 * def get_next_chunk(self): # <<<<<<<<<<<<<<
54688 * cdef:
54689 * char *c_keys = NULL
54690 */
54691
54692/* Python wrapper */
54693static PyObject *__pyx_pw_3rbd_16MetadataIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused); /*proto*/
54694static char __pyx_doc_3rbd_16MetadataIterator_7get_next_chunk[] = "MetadataIterator.get_next_chunk(self)";
54695static PyObject *__pyx_pw_3rbd_16MetadataIterator_8get_next_chunk(PyObject *__pyx_v_self, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *unused) {
54696 PyObject *__pyx_r = 0;
54697 __Pyx_RefNannyDeclarations
54698 __Pyx_RefNannySetupContext("get_next_chunk (wrapper)", 0);
54699 __pyx_r = __pyx_pf_3rbd_16MetadataIterator_7get_next_chunk(((struct __pyx_obj_3rbd_MetadataIterator *)__pyx_v_self));
54700
54701 /* function exit code */
54702 __Pyx_RefNannyFinishContext();
54703 return __pyx_r;
54704}
54705
54706static PyObject *__pyx_pf_3rbd_16MetadataIterator_7get_next_chunk(struct __pyx_obj_3rbd_MetadataIterator *__pyx_v_self) {
54707 char *__pyx_v_c_keys;
54708 size_t __pyx_v_keys_size;
54709 char *__pyx_v_c_vals;
54710 size_t __pyx_v_vals_size;
54711 int __pyx_v_ret;
54712 PyObject *__pyx_v_keys = NULL((void*)0);
54713 PyObject *__pyx_v_vals = NULL((void*)0);
54714 PyObject *__pyx_v_last_read = NULL((void*)0);
54715 PyObject *__pyx_v_key = NULL((void*)0);
54716 PyObject *__pyx_v_val = NULL((void*)0);
54717 PyObject *__pyx_r = NULL((void*)0);
54718 __Pyx_RefNannyDeclarations
54719 void *__pyx_t_1;
54720 int __pyx_t_2;
54721 PyObject *__pyx_t_3 = NULL((void*)0);
54722 PyObject *__pyx_t_4 = NULL((void*)0);
54723 PyObject *__pyx_t_5 = NULL((void*)0);
54724 Py_ssize_t __pyx_t_6;
54725 PyObject *(*__pyx_t_7)(PyObject *);
54726 PyObject *__pyx_t_8 = NULL((void*)0);
54727 PyObject *__pyx_t_9 = NULL((void*)0);
54728 PyObject *__pyx_t_10 = NULL((void*)0);
54729 char const *__pyx_t_11;
54730 int __pyx_t_12;
54731 int __pyx_t_13;
54732 char const *__pyx_t_14;
54733 PyObject *__pyx_t_15 = NULL((void*)0);
54734 PyObject *__pyx_t_16 = NULL((void*)0);
54735 PyObject *__pyx_t_17 = NULL((void*)0);
54736 PyObject *__pyx_t_18 = NULL((void*)0);
54737 PyObject *__pyx_t_19 = NULL((void*)0);
54738 PyObject *__pyx_t_20 = NULL((void*)0);
54739 int __pyx_lineno = 0;
54740 const char *__pyx_filename = NULL((void*)0);
54741 int __pyx_clineno = 0;
54742 __Pyx_RefNannySetupContext("get_next_chunk", 0);
54743
54744 /* "rbd.pyx":4676
54745 * def get_next_chunk(self):
54746 * cdef:
54747 * char *c_keys = NULL # <<<<<<<<<<<<<<
54748 * size_t keys_size = 4096
54749 * char *c_vals = NULL
54750 */
54751 __pyx_v_c_keys = NULL((void*)0);
54752
54753 /* "rbd.pyx":4677
54754 * cdef:
54755 * char *c_keys = NULL
54756 * size_t keys_size = 4096 # <<<<<<<<<<<<<<
54757 * char *c_vals = NULL
54758 * size_t vals_size = 4096
54759 */
54760 __pyx_v_keys_size = 0x1000;
54761
54762 /* "rbd.pyx":4678
54763 * char *c_keys = NULL
54764 * size_t keys_size = 4096
54765 * char *c_vals = NULL # <<<<<<<<<<<<<<
54766 * size_t vals_size = 4096
54767 * try:
54768 */
54769 __pyx_v_c_vals = NULL((void*)0);
54770
54771 /* "rbd.pyx":4679
54772 * size_t keys_size = 4096
54773 * char *c_vals = NULL
54774 * size_t vals_size = 4096 # <<<<<<<<<<<<<<
54775 * try:
54776 * while True:
54777 */
54778 __pyx_v_vals_size = 0x1000;
54779
54780 /* "rbd.pyx":4680
54781 * char *c_vals = NULL
54782 * size_t vals_size = 4096
54783 * try: # <<<<<<<<<<<<<<
54784 * while True:
54785 * c_keys = <char *>realloc_chk(c_keys, keys_size)
54786 */
54787 /*try:*/ {
54788
54789 /* "rbd.pyx":4681
54790 * size_t vals_size = 4096
54791 * try:
54792 * while True: # <<<<<<<<<<<<<<
54793 * c_keys = <char *>realloc_chk(c_keys, keys_size)
54794 * c_vals = <char *>realloc_chk(c_vals, vals_size)
54795 */
54796 while (1) {
54797
54798 /* "rbd.pyx":4682
54799 * try:
54800 * while True:
54801 * c_keys = <char *>realloc_chk(c_keys, keys_size) # <<<<<<<<<<<<<<
54802 * c_vals = <char *>realloc_chk(c_vals, vals_size)
54803 * with nogil:
54804 */
54805 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_keys, __pyx_v_keys_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4682; __pyx_clineno = __LINE__54805; goto __pyx_L4_error;}
54806 __pyx_v_c_keys = ((char *)__pyx_t_1);
54807
54808 /* "rbd.pyx":4683
54809 * while True:
54810 * c_keys = <char *>realloc_chk(c_keys, keys_size)
54811 * c_vals = <char *>realloc_chk(c_vals, vals_size) # <<<<<<<<<<<<<<
54812 * with nogil:
54813 * ret = rbd_metadata_list(self.image, self.last_read,
54814 */
54815 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_c_vals, __pyx_v_vals_size); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4683; __pyx_clineno = __LINE__54815; goto __pyx_L4_error;}
54816 __pyx_v_c_vals = ((char *)__pyx_t_1);
54817
54818 /* "rbd.pyx":4684
54819 * c_keys = <char *>realloc_chk(c_keys, keys_size)
54820 * c_vals = <char *>realloc_chk(c_vals, vals_size)
54821 * with nogil: # <<<<<<<<<<<<<<
54822 * ret = rbd_metadata_list(self.image, self.last_read,
54823 * self.max_read, c_keys, &keys_size,
54824 */
54825 {
54826 #ifdef WITH_THREAD1
54827 PyThreadState *_save;
54828 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
54829 #endif
54830 /*try:*/ {
54831
54832 /* "rbd.pyx":4685
54833 * c_vals = <char *>realloc_chk(c_vals, vals_size)
54834 * with nogil:
54835 * ret = rbd_metadata_list(self.image, self.last_read, # <<<<<<<<<<<<<<
54836 * self.max_read, c_keys, &keys_size,
54837 * c_vals, &vals_size)
54838 */
54839 __pyx_v_ret = rbd_metadata_list(__pyx_v_self->image, __pyx_v_self->last_read, __pyx_v_self->max_read, __pyx_v_c_keys, (&__pyx_v_keys_size), __pyx_v_c_vals, (&__pyx_v_vals_size));
54840 }
54841
54842 /* "rbd.pyx":4684
54843 * c_keys = <char *>realloc_chk(c_keys, keys_size)
54844 * c_vals = <char *>realloc_chk(c_vals, vals_size)
54845 * with nogil: # <<<<<<<<<<<<<<
54846 * ret = rbd_metadata_list(self.image, self.last_read,
54847 * self.max_read, c_keys, &keys_size,
54848 */
54849 /*finally:*/ {
54850 /*normal exit:*/{
54851 #ifdef WITH_THREAD1
54852 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
54853 #endif
54854 goto __pyx_L12;
54855 }
54856 __pyx_L12:;
54857 }
54858 }
54859
54860 /* "rbd.pyx":4688
54861 * self.max_read, c_keys, &keys_size,
54862 * c_vals, &vals_size)
54863 * if ret >= 0: # <<<<<<<<<<<<<<
54864 * break
54865 * elif ret != -errno.ERANGE:
54866 */
54867 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
54868 if (__pyx_t_2) {
54869
54870 /* "rbd.pyx":4689
54871 * c_vals, &vals_size)
54872 * if ret >= 0:
54873 * break # <<<<<<<<<<<<<<
54874 * elif ret != -errno.ERANGE:
54875 * raise make_ex(ret, 'error listing metadata for image %s' %
54876 */
54877 goto __pyx_L7_break;
54878
54879 /* "rbd.pyx":4688
54880 * self.max_read, c_keys, &keys_size,
54881 * c_vals, &vals_size)
54882 * if ret >= 0: # <<<<<<<<<<<<<<
54883 * break
54884 * elif ret != -errno.ERANGE:
54885 */
54886 }
54887
54888 /* "rbd.pyx":4690
54889 * if ret >= 0:
54890 * break
54891 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
54892 * raise make_ex(ret, 'error listing metadata for image %s' %
54893 * self.image_name)
54894 */
54895 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
54896 if (__pyx_t_2) {
54897
54898 /* "rbd.pyx":4691
54899 * break
54900 * elif ret != -errno.ERANGE:
54901 * raise make_ex(ret, 'error listing metadata for image %s' % # <<<<<<<<<<<<<<
54902 * self.image_name)
54903 * keys = [decode_cstr(key) for key in
54904 */
54905 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__54905; goto __pyx_L4_error;}
54906 __Pyx_GOTREF(__pyx_t_3);
54907
54908 /* "rbd.pyx":4692
54909 * elif ret != -errno.ERANGE:
54910 * raise make_ex(ret, 'error listing metadata for image %s' %
54911 * self.image_name) # <<<<<<<<<<<<<<
54912 * keys = [decode_cstr(key) for key in
54913 * c_keys[:keys_size].split(b'\0') if key]
54914 */
54915 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_listing_metadata_for_image, __pyx_v_self->image_name)PyString_Format(__pyx_kp_s_error_listing_metadata_for_image, __pyx_v_self
->image_name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__54915; goto __pyx_L4_error;}
54916 __Pyx_GOTREF(__pyx_t_4);
54917
54918 /* "rbd.pyx":4691
54919 * break
54920 * elif ret != -errno.ERANGE:
54921 * raise make_ex(ret, 'error listing metadata for image %s' % # <<<<<<<<<<<<<<
54922 * self.image_name)
54923 * keys = [decode_cstr(key) for key in
54924 */
54925 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__54925; goto __pyx_L4_error;}
54926 __Pyx_GOTREF(__pyx_t_5);
54927 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
54928 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
54929 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
54930 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
54931 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__54931; goto __pyx_L4_error;}
54932
54933 /* "rbd.pyx":4690
54934 * if ret >= 0:
54935 * break
54936 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
54937 * raise make_ex(ret, 'error listing metadata for image %s' %
54938 * self.image_name)
54939 */
54940 }
54941 }
54942 __pyx_L7_break:;
54943
54944 /* "rbd.pyx":4693
54945 * raise make_ex(ret, 'error listing metadata for image %s' %
54946 * self.image_name)
54947 * keys = [decode_cstr(key) for key in # <<<<<<<<<<<<<<
54948 * c_keys[:keys_size].split(b'\0') if key]
54949 * vals = [decode_cstr(val) for val in
54950 */
54951 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4693; __pyx_clineno = __LINE__54951; goto __pyx_L4_error;}
54952 __Pyx_GOTREF(__pyx_t_5);
54953
54954 /* "rbd.pyx":4694
54955 * self.image_name)
54956 * keys = [decode_cstr(key) for key in
54957 * c_keys[:keys_size].split(b'\0') if key] # <<<<<<<<<<<<<<
54958 * vals = [decode_cstr(val) for val in
54959 * c_vals[:vals_size].split(b'\0') if val]
54960 */
54961 __pyx_t_4 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_keys + 0, __pyx_v_keys_size - 0); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54961; goto __pyx_L4_error;}
54962 __Pyx_GOTREF(__pyx_t_4);
54963 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54963; goto __pyx_L4_error;}
54964 __Pyx_GOTREF(__pyx_t_3);
54965 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
54966 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__25, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54966; goto __pyx_L4_error;}
54967 __Pyx_GOTREF(__pyx_t_4);
54968 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
54969 if (likely(PyList_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_4)((((PyObject*)(__pyx_t_4))->ob_type) == &PyTuple_Type)) {
54970 __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_6 = 0;
54971 __pyx_t_7 = NULL((void*)0);
54972 } else {
54973 __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54973; goto __pyx_L4_error;}
54974 __Pyx_GOTREF(__pyx_t_3);
54975 __pyx_t_7 = Py_TYPE(__pyx_t_3)(((PyObject*)(__pyx_t_3))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54975; goto __pyx_L4_error;}
54976 }
54977 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
54978 for (;;) {
54979 if (likely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 1)) {
54980 if (likely(PyList_CheckExact(__pyx_t_3))__builtin_expect(!!(((((PyObject*)(__pyx_t_3))->ob_type) ==
&PyList_Type)), 1)
) {
54981 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)(((PyVarObject*)(__pyx_t_3))->ob_size)) break;
54982 #if CYTHON_COMPILING_IN_CPYTHON1
54983 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6)(((PyListObject *)(__pyx_t_3))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54983; goto __pyx_L4_error;}
54984 #else
54985 __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6)( (((PyObject*)(__pyx_t_3))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_3, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54985; goto __pyx_L4_error;}
54986 __Pyx_GOTREF(__pyx_t_4);
54987 #endif
54988 } else {
54989 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)(((PyVarObject*)(__pyx_t_3))->ob_size)) break;
54990 #if CYTHON_COMPILING_IN_CPYTHON1
54991 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)(((PyTupleObject *)(__pyx_t_3))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54991; goto __pyx_L4_error;}
54992 #else
54993 __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6)( (((PyObject*)(__pyx_t_3))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_3, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__54993; goto __pyx_L4_error;}
54994 __Pyx_GOTREF(__pyx_t_4);
54995 #endif
54996 }
54997 } else {
54998 __pyx_t_4 = __pyx_t_7(__pyx_t_3);
54999 if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {
55000 PyObject* exc_type = PyErr_Occurred();
55001 if (exc_type) {
55002 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
55003 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__55003; goto __pyx_L4_error;}
55004 }
55005 break;
55006 }
55007 __Pyx_GOTREF(__pyx_t_4);
55008 }
55009 __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4)do { PyObject *tmp = (PyObject *) __pyx_v_key; __pyx_v_key = __pyx_t_4
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
55010 __pyx_t_4 = 0;
55011 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_key); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__55011; goto __pyx_L4_error;}
55012 if (__pyx_t_2) {
55013
55014 /* "rbd.pyx":4693
55015 * raise make_ex(ret, 'error listing metadata for image %s' %
55016 * self.image_name)
55017 * keys = [decode_cstr(key) for key in # <<<<<<<<<<<<<<
55018 * c_keys[:keys_size].split(b'\0') if key]
55019 * vals = [decode_cstr(val) for val in
55020 */
55021 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4693; __pyx_clineno = __LINE__55021; goto __pyx_L4_error;}
55022 __Pyx_GOTREF(__pyx_t_8);
55023 __pyx_t_9 = NULL((void*)0);
55024 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
55025 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
55026 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
55027 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
55028 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
55029 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
55030 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
55031 }
55032 }
55033 if (!__pyx_t_9) {
55034 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_key); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4693; __pyx_clineno = __LINE__55034; goto __pyx_L4_error;}
55035 __Pyx_GOTREF(__pyx_t_4);
55036 } else {
55037 __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)__builtin_expect(!!(!__pyx_t_10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4693; __pyx_clineno = __LINE__55037; goto __pyx_L4_error;}
55038 __Pyx_GOTREF(__pyx_t_10);
55039 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_10))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
55040 __Pyx_INCREF(__pyx_v_key)( ((PyObject*)(__pyx_v_key))->ob_refcnt++);
55041 __Pyx_GIVEREF(__pyx_v_key);
55042 PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_key)(((PyTupleObject *)(__pyx_t_10))->ob_item[0+1] = __pyx_v_key
)
;
55043 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4693; __pyx_clineno = __LINE__55043; goto __pyx_L4_error;}
55044 __Pyx_GOTREF(__pyx_t_4);
55045 __Pyx_DECREF(__pyx_t_10)do { if ( --((PyObject*)(__pyx_t_10))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_10)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_10)))); } while
(0)
; __pyx_t_10 = 0;
55046 }
55047 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
55048 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_5, (PyObject
*)__pyx_t_4)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4693; __pyx_clineno = __LINE__55048; goto __pyx_L4_error;}
55049 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55050
55051 /* "rbd.pyx":4694
55052 * self.image_name)
55053 * keys = [decode_cstr(key) for key in
55054 * c_keys[:keys_size].split(b'\0') if key] # <<<<<<<<<<<<<<
55055 * vals = [decode_cstr(val) for val in
55056 * c_vals[:vals_size].split(b'\0') if val]
55057 */
55058 }
55059
55060 /* "rbd.pyx":4693
55061 * raise make_ex(ret, 'error listing metadata for image %s' %
55062 * self.image_name)
55063 * keys = [decode_cstr(key) for key in # <<<<<<<<<<<<<<
55064 * c_keys[:keys_size].split(b'\0') if key]
55065 * vals = [decode_cstr(val) for val in
55066 */
55067 }
55068 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55069 __pyx_v_keys = ((PyObject*)__pyx_t_5);
55070 __pyx_t_5 = 0;
55071
55072 /* "rbd.pyx":4695
55073 * keys = [decode_cstr(key) for key in
55074 * c_keys[:keys_size].split(b'\0') if key]
55075 * vals = [decode_cstr(val) for val in # <<<<<<<<<<<<<<
55076 * c_vals[:vals_size].split(b'\0') if val]
55077 * if len(keys) > 0:
55078 */
55079 __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4695; __pyx_clineno = __LINE__55079; goto __pyx_L4_error;}
55080 __Pyx_GOTREF(__pyx_t_5);
55081
55082 /* "rbd.pyx":4696
55083 * c_keys[:keys_size].split(b'\0') if key]
55084 * vals = [decode_cstr(val) for val in
55085 * c_vals[:vals_size].split(b'\0') if val] # <<<<<<<<<<<<<<
55086 * if len(keys) > 0:
55087 * last_read = cstr(keys[-1], 'last_read')
55088 */
55089 __pyx_t_3 = __Pyx_PyBytes_FromStringAndSizePyString_FromStringAndSize(__pyx_v_c_vals + 0, __pyx_v_vals_size - 0); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55089; goto __pyx_L4_error;}
55090 __Pyx_GOTREF(__pyx_t_3);
55091 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55091; goto __pyx_L4_error;}
55092 __Pyx_GOTREF(__pyx_t_4);
55093 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55094 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__26, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55094; goto __pyx_L4_error;}
55095 __Pyx_GOTREF(__pyx_t_3);
55096 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55097 if (likely(PyList_CheckExact(__pyx_t_3))__builtin_expect(!!(((((PyObject*)(__pyx_t_3))->ob_type) ==
&PyList_Type)), 1)
|| PyTuple_CheckExact(__pyx_t_3)((((PyObject*)(__pyx_t_3))->ob_type) == &PyTuple_Type)) {
55098 __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4)( ((PyObject*)(__pyx_t_4))->ob_refcnt++); __pyx_t_6 = 0;
55099 __pyx_t_7 = NULL((void*)0);
55100 } else {
55101 __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55101; goto __pyx_L4_error;}
55102 __Pyx_GOTREF(__pyx_t_4);
55103 __pyx_t_7 = Py_TYPE(__pyx_t_4)(((PyObject*)(__pyx_t_4))->ob_type)->tp_iternext; if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55103; goto __pyx_L4_error;}
55104 }
55105 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55106 for (;;) {
55107 if (likely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 1)) {
55108 if (likely(PyList_CheckExact(__pyx_t_4))__builtin_expect(!!(((((PyObject*)(__pyx_t_4))->ob_type) ==
&PyList_Type)), 1)
) {
55109 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)(((PyVarObject*)(__pyx_t_4))->ob_size)) break;
55110 #if CYTHON_COMPILING_IN_CPYTHON1
55111 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6)(((PyListObject *)(__pyx_t_4))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55111; goto __pyx_L4_error;}
55112 #else
55113 __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6)( (((PyObject*)(__pyx_t_4))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_4, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55113; goto __pyx_L4_error;}
55114 __Pyx_GOTREF(__pyx_t_3);
55115 #endif
55116 } else {
55117 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)(((PyVarObject*)(__pyx_t_4))->ob_size)) break;
55118 #if CYTHON_COMPILING_IN_CPYTHON1
55119 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6)(((PyTupleObject *)(__pyx_t_4))->ob_item[__pyx_t_6]); __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++); __pyx_t_6++; if (unlikely(0 < 0)__builtin_expect(!!(0 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55119; goto __pyx_L4_error;}
55120 #else
55121 __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6)( (((PyObject*)(__pyx_t_4))->ob_type)->tp_as_sequence->
sq_item(__pyx_t_4, __pyx_t_6) )
; __pyx_t_6++; if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55121; goto __pyx_L4_error;}
55122 __Pyx_GOTREF(__pyx_t_3);
55123 #endif
55124 }
55125 } else {
55126 __pyx_t_3 = __pyx_t_7(__pyx_t_4);
55127 if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {
55128 PyObject* exc_type = PyErr_Occurred();
55129 if (exc_type) {
55130 if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))__builtin_expect(!!(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches
(exc_type, PyExc_StopIteration)), 1)
) PyErr_Clear();
55131 else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55131; goto __pyx_L4_error;}
55132 }
55133 break;
55134 }
55135 __Pyx_GOTREF(__pyx_t_3);
55136 }
55137 __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3)do { PyObject *tmp = (PyObject *) __pyx_v_val; __pyx_v_val = __pyx_t_3
; do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0); } while (0)
;
55138 __pyx_t_3 = 0;
55139 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__55139; goto __pyx_L4_error;}
55140 if (__pyx_t_2) {
55141
55142 /* "rbd.pyx":4695
55143 * keys = [decode_cstr(key) for key in
55144 * c_keys[:keys_size].split(b'\0') if key]
55145 * vals = [decode_cstr(val) for val in # <<<<<<<<<<<<<<
55146 * c_vals[:vals_size].split(b'\0') if val]
55147 * if len(keys) > 0:
55148 */
55149 __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4695; __pyx_clineno = __LINE__55149; goto __pyx_L4_error;}
55150 __Pyx_GOTREF(__pyx_t_8);
55151 __pyx_t_10 = NULL((void*)0);
55152 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_8))__builtin_expect(!!(((__pyx_t_8)->ob_type == &PyMethod_Type
)), 0)
) {
55153 __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_self);
55154 if (likely(__pyx_t_10)__builtin_expect(!!(__pyx_t_10), 1)) {
55155 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8)(((PyMethodObject *)__pyx_t_8) -> im_func);
55156 __Pyx_INCREF(__pyx_t_10)( ((PyObject*)(__pyx_t_10))->ob_refcnt++);
55157 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
55158 __Pyx_DECREF_SET(__pyx_t_8, function)do { PyObject *tmp = (PyObject *) __pyx_t_8; __pyx_t_8 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
55159 }
55160 }
55161 if (!__pyx_t_10) {
55162 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_val); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4695; __pyx_clineno = __LINE__55162; goto __pyx_L4_error;}
55163 __Pyx_GOTREF(__pyx_t_3);
55164 } else {
55165 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4695; __pyx_clineno = __LINE__55165; goto __pyx_L4_error;}
55166 __Pyx_GOTREF(__pyx_t_9);
55167 __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_10); __pyx_t_10 = NULL((void*)0);
55168 __Pyx_INCREF(__pyx_v_val)( ((PyObject*)(__pyx_v_val))->ob_refcnt++);
55169 __Pyx_GIVEREF(__pyx_v_val);
55170 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_val)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_v_val
)
;
55171 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4695; __pyx_clineno = __LINE__55171; goto __pyx_L4_error;}
55172 __Pyx_GOTREF(__pyx_t_3);
55173 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
55174 }
55175 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
55176 if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))__builtin_expect(!!(__Pyx_ListComp_Append(__pyx_t_5, (PyObject
*)__pyx_t_3)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4695; __pyx_clineno = __LINE__55176; goto __pyx_L4_error;}
55177 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55178
55179 /* "rbd.pyx":4696
55180 * c_keys[:keys_size].split(b'\0') if key]
55181 * vals = [decode_cstr(val) for val in
55182 * c_vals[:vals_size].split(b'\0') if val] # <<<<<<<<<<<<<<
55183 * if len(keys) > 0:
55184 * last_read = cstr(keys[-1], 'last_read')
55185 */
55186 }
55187
55188 /* "rbd.pyx":4695
55189 * keys = [decode_cstr(key) for key in
55190 * c_keys[:keys_size].split(b'\0') if key]
55191 * vals = [decode_cstr(val) for val in # <<<<<<<<<<<<<<
55192 * c_vals[:vals_size].split(b'\0') if val]
55193 * if len(keys) > 0:
55194 */
55195 }
55196 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55197 __pyx_v_vals = ((PyObject*)__pyx_t_5);
55198 __pyx_t_5 = 0;
55199
55200 /* "rbd.pyx":4697
55201 * vals = [decode_cstr(val) for val in
55202 * c_vals[:vals_size].split(b'\0') if val]
55203 * if len(keys) > 0: # <<<<<<<<<<<<<<
55204 * last_read = cstr(keys[-1], 'last_read')
55205 * free(self.last_read)
55206 */
55207 __pyx_t_6 = PyList_GET_SIZE(__pyx_v_keys)(((PyVarObject*)(__pyx_v_keys))->ob_size); if (unlikely(__pyx_t_6 == -1)__builtin_expect(!!(__pyx_t_6 == -1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4697; __pyx_clineno = __LINE__55207; goto __pyx_L4_error;}
55208 __pyx_t_2 = ((__pyx_t_6 > 0) != 0);
55209 if (__pyx_t_2) {
55210
55211 /* "rbd.pyx":4698
55212 * c_vals[:vals_size].split(b'\0') if val]
55213 * if len(keys) > 0:
55214 * last_read = cstr(keys[-1], 'last_read') # <<<<<<<<<<<<<<
55215 * free(self.last_read)
55216 * self.last_read = strdup(last_read)
55217 */
55218 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cstr); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4698; __pyx_clineno = __LINE__55218; goto __pyx_L4_error;}
55219 __Pyx_GOTREF(__pyx_t_4);
55220 __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_keys, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1)(( (sizeof(long) < sizeof(Py_ssize_t)) || (sizeof(long) >
sizeof(Py_ssize_t) && __builtin_expect(!!(-1L < (
long)((Py_ssize_t)(((size_t)-1)>>1)) || -1L == (long)((
Py_ssize_t)(((size_t)-1)>>1))), 1) && (!1 || __builtin_expect
(!!(-1L > (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)
|| -1L == (long)(-((Py_ssize_t)(((size_t)-1)>>1))-1)),
1))) || (sizeof(long) == sizeof(Py_ssize_t) && (1 ||
__builtin_expect(!!(-1L < (long)((Py_ssize_t)(((size_t)-1
)>>1)) || -1L == (long)((Py_ssize_t)(((size_t)-1)>>
1))), 1))) ) ? __Pyx_GetItemInt_List_Fast(__pyx_v_keys, (Py_ssize_t
)-1L, 1, 1) : (PyErr_SetString(PyExc_IndexError, "list index out of range"
), (PyObject*)((void*)0)))
; if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4698; __pyx_clineno = __LINE__55220; goto __pyx_L4_error;};
55221 __Pyx_GOTREF(__pyx_t_3);
55222 __pyx_t_8 = NULL((void*)0);
55223 __pyx_t_6 = 0;
55224 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
55225 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
55226 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
55227 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
55228 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
55229 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
55230 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
55231 __pyx_t_6 = 1;
55232 }
55233 }
55234 __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4698; __pyx_clineno = __LINE__55234; goto __pyx_L4_error;}
55235 __Pyx_GOTREF(__pyx_t_9);
55236 if (__pyx_t_8) {
55237 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
55238 }
55239 __Pyx_GIVEREF(__pyx_t_3);
55240 PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_3)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+__pyx_t_6] = __pyx_t_3
)
;
55241 __Pyx_INCREF(__pyx_n_s_last_read)( ((PyObject*)(__pyx_n_s_last_read))->ob_refcnt++);
55242 __Pyx_GIVEREF(__pyx_n_s_last_read);
55243 PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_n_s_last_read)(((PyTupleObject *)(__pyx_t_9))->ob_item[1+__pyx_t_6] = __pyx_n_s_last_read
)
;
55244 __pyx_t_3 = 0;
55245 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4698; __pyx_clineno = __LINE__55245; goto __pyx_L4_error;}
55246 __Pyx_GOTREF(__pyx_t_5);
55247 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
55248 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55249 __pyx_v_last_read = __pyx_t_5;
55250 __pyx_t_5 = 0;
55251
55252 /* "rbd.pyx":4699
55253 * if len(keys) > 0:
55254 * last_read = cstr(keys[-1], 'last_read')
55255 * free(self.last_read) # <<<<<<<<<<<<<<
55256 * self.last_read = strdup(last_read)
55257 * self.next_chunk = list(zip(keys, vals))
55258 */
55259 free(__pyx_v_self->last_read);
55260
55261 /* "rbd.pyx":4700
55262 * last_read = cstr(keys[-1], 'last_read')
55263 * free(self.last_read)
55264 * self.last_read = strdup(last_read) # <<<<<<<<<<<<<<
55265 * self.next_chunk = list(zip(keys, vals))
55266 * finally:
55267 */
55268 __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_last_read); if (unlikely((!__pyx_t_11) && PyErr_Occurred())__builtin_expect(!!((!__pyx_t_11) && PyErr_Occurred()
), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4700; __pyx_clineno = __LINE__55268; goto __pyx_L4_error;}
55269 __pyx_v_self->last_read = strdup(__pyx_t_11)(__extension__ (__builtin_constant_p (__pyx_t_11) && (
(size_t)(const void *)((__pyx_t_11) + 1) - (size_t)(const void
*)(__pyx_t_11) == 1) ? (((const char *) (__pyx_t_11))[0] == '\0'
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len
= strlen (__pyx_t_11) + 1; char *__retval = (char *) malloc (
__len); if (__retval != ((void*)0)) __retval = (char *) memcpy
(__retval, __pyx_t_11, __len); __retval; })) : __strdup (__pyx_t_11
)))
;
55270
55271 /* "rbd.pyx":4697
55272 * vals = [decode_cstr(val) for val in
55273 * c_vals[:vals_size].split(b'\0') if val]
55274 * if len(keys) > 0: # <<<<<<<<<<<<<<
55275 * last_read = cstr(keys[-1], 'last_read')
55276 * free(self.last_read)
55277 */
55278 }
55279
55280 /* "rbd.pyx":4701
55281 * free(self.last_read)
55282 * self.last_read = strdup(last_read)
55283 * self.next_chunk = list(zip(keys, vals)) # <<<<<<<<<<<<<<
55284 * finally:
55285 * free(c_keys)
55286 */
55287 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4701; __pyx_clineno = __LINE__55287; goto __pyx_L4_error;}
55288 __Pyx_GOTREF(__pyx_t_5);
55289 __Pyx_INCREF(__pyx_v_keys)( ((PyObject*)(__pyx_v_keys))->ob_refcnt++);
55290 __Pyx_GIVEREF(__pyx_v_keys);
55291 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_keys)(((PyTupleObject *)(__pyx_t_5))->ob_item[0] = __pyx_v_keys
)
;
55292 __Pyx_INCREF(__pyx_v_vals)( ((PyObject*)(__pyx_v_vals))->ob_refcnt++);
55293 __Pyx_GIVEREF(__pyx_v_vals);
55294 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_vals)(((PyTupleObject *)(__pyx_t_5))->ob_item[1] = __pyx_v_vals
)
;
55295 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_5, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4701; __pyx_clineno = __LINE__55295; goto __pyx_L4_error;}
55296 __Pyx_GOTREF(__pyx_t_4);
55297 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
55298 __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4701; __pyx_clineno = __LINE__55298; goto __pyx_L4_error;}
55299 __Pyx_GOTREF(__pyx_t_5);
55300 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55301 __Pyx_GIVEREF(__pyx_t_5);
55302 __Pyx_GOTREF(__pyx_v_self->next_chunk);
55303 __Pyx_DECREF(__pyx_v_self->next_chunk)do { if ( --((PyObject*)(__pyx_v_self->next_chunk))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
next_chunk)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_v_self->next_chunk)))); } while (0)
;
55304 __pyx_v_self->next_chunk = __pyx_t_5;
55305 __pyx_t_5 = 0;
55306 }
55307
55308 /* "rbd.pyx":4703
55309 * self.next_chunk = list(zip(keys, vals))
55310 * finally:
55311 * free(c_keys) # <<<<<<<<<<<<<<
55312 * free(c_vals)
55313 *
55314 */
55315 /*finally:*/ {
55316 /*normal exit:*/{
55317 free(__pyx_v_c_keys);
55318
55319 /* "rbd.pyx":4704
55320 * finally:
55321 * free(c_keys)
55322 * free(c_vals) # <<<<<<<<<<<<<<
55323 *
55324 * cdef class SnapIterator(object):
55325 */
55326 free(__pyx_v_c_vals);
55327 goto __pyx_L5;
55328 }
55329 /*exception exit:*/{
55330 __pyx_L4_error:;
55331 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
55332 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
55333 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
55334 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
55335 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
; __pyx_t_9 = 0;
55336 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
55337 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
55338 if (PY_MAJOR_VERSION2 >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
55339 if ((PY_MAJOR_VERSION2 < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)__builtin_expect(!!(__Pyx_GetException(&__pyx_t_15, &
__pyx_t_16, &__pyx_t_17) < 0), 0)
) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
55340 __Pyx_XGOTREF(__pyx_t_15);
55341 __Pyx_XGOTREF(__pyx_t_16);
55342 __Pyx_XGOTREF(__pyx_t_17);
55343 __Pyx_XGOTREF(__pyx_t_18);
55344 __Pyx_XGOTREF(__pyx_t_19);
55345 __Pyx_XGOTREF(__pyx_t_20);
55346 __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
55347 {
55348
55349 /* "rbd.pyx":4703
55350 * self.next_chunk = list(zip(keys, vals))
55351 * finally:
55352 * free(c_keys) # <<<<<<<<<<<<<<
55353 * free(c_vals)
55354 *
55355 */
55356 free(__pyx_v_c_keys);
55357
55358 /* "rbd.pyx":4704
55359 * finally:
55360 * free(c_keys)
55361 * free(c_vals) # <<<<<<<<<<<<<<
55362 *
55363 * cdef class SnapIterator(object):
55364 */
55365 free(__pyx_v_c_vals);
55366 }
55367 if (PY_MAJOR_VERSION2 >= 3) {
55368 __Pyx_XGIVEREF(__pyx_t_18);
55369 __Pyx_XGIVEREF(__pyx_t_19);
55370 __Pyx_XGIVEREF(__pyx_t_20);
55371 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
55372 }
55373 __Pyx_XGIVEREF(__pyx_t_15);
55374 __Pyx_XGIVEREF(__pyx_t_16);
55375 __Pyx_XGIVEREF(__pyx_t_17);
55376 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
55377 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
55378 __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
55379 goto __pyx_L1_error;
55380 }
55381 __pyx_L5:;
55382 }
55383
55384 /* "rbd.pyx":4674
55385 * free(self.last_read)
55386 *
55387 * def get_next_chunk(self): # <<<<<<<<<<<<<<
55388 * cdef:
55389 * char *c_keys = NULL
55390 */
55391
55392 /* function exit code */
55393 __pyx_r = Py_None(&_Py_NoneStruct); __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
55394 goto __pyx_L0;
55395 __pyx_L1_error:;
55396 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
55397 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
55398 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
55399 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
55400 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
55401 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
;
55402 __Pyx_AddTraceback("rbd.MetadataIterator.get_next_chunk", __pyx_clineno, __pyx_lineno, __pyx_filename);
55403 __pyx_r = NULL((void*)0);
55404 __pyx_L0:;
55405 __Pyx_XDECREF(__pyx_v_keys)do { if ((__pyx_v_keys) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_keys))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_keys)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_keys)))); } while (0); } while
(0)
;
55406 __Pyx_XDECREF(__pyx_v_vals)do { if ((__pyx_v_vals) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_vals))->ob_refcnt != 0) ; else ( (*(((PyObject*
)((PyObject *)(__pyx_v_vals)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(__pyx_v_vals)))); } while (0); } while
(0)
;
55407 __Pyx_XDECREF(__pyx_v_last_read)do { if ((__pyx_v_last_read) == ((void*)0)) ; else do { if ( --
((PyObject*)(__pyx_v_last_read))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(__pyx_v_last_read)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_v_last_read
)))); } while (0); } while (0)
;
55408 __Pyx_XDECREF(__pyx_v_key)do { if ((__pyx_v_key) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_key))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_key)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_key)))); } while (0); } while (0)
;
55409 __Pyx_XDECREF(__pyx_v_val)do { if ((__pyx_v_val) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_v_val))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(__pyx_v_val)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_v_val)))); } while (0); } while (0)
;
55410 __Pyx_XGIVEREF(__pyx_r);
55411 __Pyx_RefNannyFinishContext();
55412 return __pyx_r;
55413}
55414
55415/* "rbd.pyx":4731
55416 * cdef object image
55417 *
55418 * def __init__(self, Image image): # <<<<<<<<<<<<<<
55419 * self.image = image
55420 * self.snaps = NULL
55421 */
55422
55423/* Python wrapper */
55424static int __pyx_pw_3rbd_12SnapIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
55425static int __pyx_pw_3rbd_12SnapIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
55426 struct __pyx_obj_3rbd_Image *__pyx_v_image = 0;
55427 int __pyx_lineno = 0;
55428 const char *__pyx_filename = NULL((void*)0);
55429 int __pyx_clineno = 0;
55430 int __pyx_r;
55431 __Pyx_RefNannyDeclarations
55432 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
55433 {
55434 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,0};
55435 PyObject* values[1] = {0};
55436 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
55437 Py_ssize_t kw_args;
55438 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
55439 switch (pos_args) {
55440 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
55441 case 0: break;
55442 default: goto __pyx_L5_argtuple_error;
55443 }
55444 kw_args = PyDict_Size(__pyx_kwds);
55445 switch (pos_args) {
55446 case 0:
55447 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
55448 else goto __pyx_L5_argtuple_error;
55449 }
55450 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
55451 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4731; __pyx_clineno = __LINE__55451; goto __pyx_L3_error;}
55452 }
55453 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
55454 goto __pyx_L5_argtuple_error;
55455 } else {
55456 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
55457 }
55458 __pyx_v_image = ((struct __pyx_obj_3rbd_Image *)values[0]);
55459 }
55460 goto __pyx_L4_argument_unpacking_done;
55461 __pyx_L5_argtuple_error:;
55462 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4731; __pyx_clineno = __LINE__55462; goto __pyx_L3_error;}
55463 __pyx_L3_error:;
55464 __Pyx_AddTraceback("rbd.SnapIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55465 __Pyx_RefNannyFinishContext();
55466 return -1;
55467 __pyx_L4_argument_unpacking_done:;
55468 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3rbd_Image, 1, "image", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image
), __pyx_ptype_3rbd_Image, 1, "image", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4731; __pyx_clineno = __LINE__55468; goto __pyx_L1_error;}
55469 __pyx_r = __pyx_pf_3rbd_12SnapIterator___init__(((struct __pyx_obj_3rbd_SnapIterator *)__pyx_v_self), __pyx_v_image);
55470
55471 /* function exit code */
55472 goto __pyx_L0;
55473 __pyx_L1_error:;
55474 __pyx_r = -1;
55475 __pyx_L0:;
55476 __Pyx_RefNannyFinishContext();
55477 return __pyx_r;
55478}
55479
55480static int __pyx_pf_3rbd_12SnapIterator___init__(struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image) {
55481 int __pyx_v_ret;
55482 int __pyx_r;
55483 __Pyx_RefNannyDeclarations
55484 void *__pyx_t_1;
55485 int __pyx_t_2;
55486 PyObject *__pyx_t_3 = NULL((void*)0);
55487 PyObject *__pyx_t_4 = NULL((void*)0);
55488 PyObject *__pyx_t_5 = NULL((void*)0);
55489 int __pyx_lineno = 0;
55490 const char *__pyx_filename = NULL((void*)0);
55491 int __pyx_clineno = 0;
55492 __Pyx_RefNannySetupContext("__init__", 0);
55493
55494 /* "rbd.pyx":4732
55495 *
55496 * def __init__(self, Image image):
55497 * self.image = image # <<<<<<<<<<<<<<
55498 * self.snaps = NULL
55499 * self.num_snaps = 10
55500 */
55501 __Pyx_INCREF(((PyObject *)__pyx_v_image))( ((PyObject*)(((PyObject *)__pyx_v_image)))->ob_refcnt++);
55502 __Pyx_GIVEREF(((PyObject *)__pyx_v_image));
55503 __Pyx_GOTREF(__pyx_v_self->image);
55504 __Pyx_DECREF(__pyx_v_self->image)do { if ( --((PyObject*)(__pyx_v_self->image))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
image)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->image)))); } while (0)
;
55505 __pyx_v_self->image = ((PyObject *)__pyx_v_image);
55506
55507 /* "rbd.pyx":4733
55508 * def __init__(self, Image image):
55509 * self.image = image
55510 * self.snaps = NULL # <<<<<<<<<<<<<<
55511 * self.num_snaps = 10
55512 * while True:
55513 */
55514 __pyx_v_self->snaps = NULL((void*)0);
55515
55516 /* "rbd.pyx":4734
55517 * self.image = image
55518 * self.snaps = NULL
55519 * self.num_snaps = 10 # <<<<<<<<<<<<<<
55520 * while True:
55521 * self.snaps = <rbd_snap_info_t*>realloc_chk(self.snaps,
55522 */
55523 __pyx_v_self->num_snaps = 10;
55524
55525 /* "rbd.pyx":4735
55526 * self.snaps = NULL
55527 * self.num_snaps = 10
55528 * while True: # <<<<<<<<<<<<<<
55529 * self.snaps = <rbd_snap_info_t*>realloc_chk(self.snaps,
55530 * self.num_snaps *
55531 */
55532 while (1) {
55533
55534 /* "rbd.pyx":4736
55535 * self.num_snaps = 10
55536 * while True:
55537 * self.snaps = <rbd_snap_info_t*>realloc_chk(self.snaps, # <<<<<<<<<<<<<<
55538 * self.num_snaps *
55539 * sizeof(rbd_snap_info_t))
55540 */
55541 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->snaps, (__pyx_v_self->num_snaps * (sizeof(rbd_snap_info_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4736; __pyx_clineno = __LINE__55541; goto __pyx_L1_error;}
55542 __pyx_v_self->snaps = ((rbd_snap_info_t *)__pyx_t_1);
55543
55544 /* "rbd.pyx":4739
55545 * self.num_snaps *
55546 * sizeof(rbd_snap_info_t))
55547 * with nogil: # <<<<<<<<<<<<<<
55548 * ret = rbd_snap_list(image.image, self.snaps, &self.num_snaps)
55549 * if ret >= 0:
55550 */
55551 {
55552 #ifdef WITH_THREAD1
55553 PyThreadState *_save;
55554 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
55555 #endif
55556 /*try:*/ {
55557
55558 /* "rbd.pyx":4740
55559 * sizeof(rbd_snap_info_t))
55560 * with nogil:
55561 * ret = rbd_snap_list(image.image, self.snaps, &self.num_snaps) # <<<<<<<<<<<<<<
55562 * if ret >= 0:
55563 * self.num_snaps = ret
55564 */
55565 __pyx_v_ret = rbd_snap_list(__pyx_v_image->image, __pyx_v_self->snaps, (&__pyx_v_self->num_snaps));
55566 }
55567
55568 /* "rbd.pyx":4739
55569 * self.num_snaps *
55570 * sizeof(rbd_snap_info_t))
55571 * with nogil: # <<<<<<<<<<<<<<
55572 * ret = rbd_snap_list(image.image, self.snaps, &self.num_snaps)
55573 * if ret >= 0:
55574 */
55575 /*finally:*/ {
55576 /*normal exit:*/{
55577 #ifdef WITH_THREAD1
55578 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
55579 #endif
55580 goto __pyx_L9;
55581 }
55582 __pyx_L9:;
55583 }
55584 }
55585
55586 /* "rbd.pyx":4741
55587 * with nogil:
55588 * ret = rbd_snap_list(image.image, self.snaps, &self.num_snaps)
55589 * if ret >= 0: # <<<<<<<<<<<<<<
55590 * self.num_snaps = ret
55591 * break
55592 */
55593 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
55594 if (__pyx_t_2) {
55595
55596 /* "rbd.pyx":4742
55597 * ret = rbd_snap_list(image.image, self.snaps, &self.num_snaps)
55598 * if ret >= 0:
55599 * self.num_snaps = ret # <<<<<<<<<<<<<<
55600 * break
55601 * elif ret != -errno.ERANGE:
55602 */
55603 __pyx_v_self->num_snaps = __pyx_v_ret;
55604
55605 /* "rbd.pyx":4743
55606 * if ret >= 0:
55607 * self.num_snaps = ret
55608 * break # <<<<<<<<<<<<<<
55609 * elif ret != -errno.ERANGE:
55610 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name)
55611 */
55612 goto __pyx_L4_break;
55613
55614 /* "rbd.pyx":4741
55615 * with nogil:
55616 * ret = rbd_snap_list(image.image, self.snaps, &self.num_snaps)
55617 * if ret >= 0: # <<<<<<<<<<<<<<
55618 * self.num_snaps = ret
55619 * break
55620 */
55621 }
55622
55623 /* "rbd.pyx":4744
55624 * self.num_snaps = ret
55625 * break
55626 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
55627 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name)
55628 *
55629 */
55630 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
55631 if (__pyx_t_2) {
55632
55633 /* "rbd.pyx":4745
55634 * break
55635 * elif ret != -errno.ERANGE:
55636 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name) # <<<<<<<<<<<<<<
55637 *
55638 * def __iter__(self):
55639 */
55640 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4745; __pyx_clineno = __LINE__55640; goto __pyx_L1_error;}
55641 __Pyx_GOTREF(__pyx_t_3);
55642 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_listing_snapshots_for_imag, __pyx_v_image->name)PyString_Format(__pyx_kp_s_error_listing_snapshots_for_imag, __pyx_v_image
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4745; __pyx_clineno = __LINE__55642; goto __pyx_L1_error;}
55643 __Pyx_GOTREF(__pyx_t_4);
55644 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4745; __pyx_clineno = __LINE__55644; goto __pyx_L1_error;}
55645 __Pyx_GOTREF(__pyx_t_5);
55646 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55647 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55648 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
55649 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
55650 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4745; __pyx_clineno = __LINE__55650; goto __pyx_L1_error;}
55651
55652 /* "rbd.pyx":4744
55653 * self.num_snaps = ret
55654 * break
55655 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
55656 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name)
55657 *
55658 */
55659 }
55660 }
55661 __pyx_L4_break:;
55662
55663 /* "rbd.pyx":4731
55664 * cdef object image
55665 *
55666 * def __init__(self, Image image): # <<<<<<<<<<<<<<
55667 * self.image = image
55668 * self.snaps = NULL
55669 */
55670
55671 /* function exit code */
55672 __pyx_r = 0;
55673 goto __pyx_L0;
55674 __pyx_L1_error:;
55675 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
55676 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
55677 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
55678 __Pyx_AddTraceback("rbd.SnapIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55679 __pyx_r = -1;
55680 __pyx_L0:;
55681 __Pyx_RefNannyFinishContext();
55682 return __pyx_r;
55683}
55684static PyObject *__pyx_gb_3rbd_12SnapIterator_4generator8(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
55685
55686/* "rbd.pyx":4747
55687 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name)
55688 *
55689 * def __iter__(self): # <<<<<<<<<<<<<<
55690 * for i in range(self.num_snaps):
55691 * s = {
55692 */
55693
55694/* Python wrapper */
55695static PyObject *__pyx_pw_3rbd_12SnapIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
55696static PyObject *__pyx_pw_3rbd_12SnapIterator_3__iter__(PyObject *__pyx_v_self) {
55697 PyObject *__pyx_r = 0;
55698 __Pyx_RefNannyDeclarations
55699 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
55700 __pyx_r = __pyx_pf_3rbd_12SnapIterator_2__iter__(((struct __pyx_obj_3rbd_SnapIterator *)__pyx_v_self));
55701
55702 /* function exit code */
55703 __Pyx_RefNannyFinishContext();
55704 return __pyx_r;
55705}
55706
55707static PyObject *__pyx_pf_3rbd_12SnapIterator_2__iter__(struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self) {
55708 struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *__pyx_cur_scope;
55709 PyObject *__pyx_r = NULL((void*)0);
55710 __Pyx_RefNannyDeclarations
55711 int __pyx_lineno = 0;
55712 const char *__pyx_filename = NULL((void*)0);
55713 int __pyx_clineno = 0;
55714 __Pyx_RefNannySetupContext("__iter__", 0);
55715 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_9___iter__(__pyx_ptype_3rbd___pyx_scope_struct_9___iter__, __pyx_empty_tuple, NULL((void*)0));
55716 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
55717 __Pyx_RefNannyFinishContext();
55718 return NULL((void*)0);
55719 }
55720 __Pyx_GOTREF(__pyx_cur_scope);
55721 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
55722 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
55723 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
55724 {
55725 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_12SnapIterator_4generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_SnapIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_12SnapIterator_4generator8, (PyObject *) __pyx_cur_scope
, __pyx_n_s_iter, __pyx_n_s_SnapIterator___iter)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4747; __pyx_clineno = __LINE__55725; goto __pyx_L1_error;}
55726 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
55727 __Pyx_RefNannyFinishContext();
55728 return (PyObject *) gen;
55729 }
55730
55731 /* function exit code */
55732 __pyx_L1_error:;
55733 __Pyx_AddTraceback("rbd.SnapIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55734 __pyx_r = NULL((void*)0);
55735 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
55736 __Pyx_XGIVEREF(__pyx_r);
55737 __Pyx_RefNannyFinishContext();
55738 return __pyx_r;
55739}
55740
55741static PyObject *__pyx_gb_3rbd_12SnapIterator_4generator8(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
55742{
55743 struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *)__pyx_generator->closure);
55744 PyObject *__pyx_r = NULL((void*)0);
55745 int __pyx_t_1;
55746 int __pyx_t_2;
55747 PyObject *__pyx_t_3 = NULL((void*)0);
55748 PyObject *__pyx_t_4 = NULL((void*)0);
55749 PyObject *__pyx_t_5 = NULL((void*)0);
55750 PyObject *__pyx_t_6 = NULL((void*)0);
55751 PyObject *__pyx_t_7 = NULL((void*)0);
55752 PyObject *__pyx_t_8 = NULL((void*)0);
55753 int __pyx_t_9;
55754 PyObject *__pyx_t_10 = NULL((void*)0);
55755 PyObject *__pyx_t_11 = NULL((void*)0);
55756 PyObject *__pyx_t_12 = NULL((void*)0);
55757 int __pyx_lineno = 0;
55758 const char *__pyx_filename = NULL((void*)0);
55759 int __pyx_clineno = 0;
55760 __Pyx_RefNannyDeclarations
55761 __Pyx_RefNannySetupContext("None", 0);
55762 switch (__pyx_generator->resume_label) {
55763 case 0: goto __pyx_L3_first_run;
55764 case 1: goto __pyx_L27_resume_from_yield;
55765 default: /* CPython raises the right error here */
55766 __Pyx_RefNannyFinishContext();
55767 return NULL((void*)0);
55768 }
55769 __pyx_L3_first_run:;
55770 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4747; __pyx_clineno = __LINE__55770; goto __pyx_L1_error;}
55771
55772 /* "rbd.pyx":4748
55773 *
55774 * def __iter__(self):
55775 * for i in range(self.num_snaps): # <<<<<<<<<<<<<<
55776 * s = {
55777 * 'id' : self.snaps[i].id,
55778 */
55779 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_snaps;
55780 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
55781 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
55782
55783 /* "rbd.pyx":4750
55784 * for i in range(self.num_snaps):
55785 * s = {
55786 * 'id' : self.snaps[i].id, # <<<<<<<<<<<<<<
55787 * 'size' : self.snaps[i].size,
55788 * 'name' : decode_cstr(self.snaps[i].name),
55789 */
55790 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4750; __pyx_clineno = __LINE__55790; goto __pyx_L1_error;}
55791 __Pyx_GOTREF(__pyx_t_3);
55792 __pyx_t_4 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4750; __pyx_clineno = __LINE__55792; goto __pyx_L1_error;}
55793 __Pyx_GOTREF(__pyx_t_4);
55794 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_id, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4750; __pyx_clineno = __LINE__55794; goto __pyx_L1_error;}
55795 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55796
55797 /* "rbd.pyx":4751
55798 * s = {
55799 * 'id' : self.snaps[i].id,
55800 * 'size' : self.snaps[i].size, # <<<<<<<<<<<<<<
55801 * 'name' : decode_cstr(self.snaps[i].name),
55802 * 'namespace' : self.image.snap_get_namespace_type(self.snaps[i].id)
55803 */
55804 __pyx_t_4 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).size); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4751; __pyx_clineno = __LINE__55804; goto __pyx_L1_error;}
55805 __Pyx_GOTREF(__pyx_t_4);
55806 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_size, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4750; __pyx_clineno = __LINE__55806; goto __pyx_L1_error;}
55807 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55808
55809 /* "rbd.pyx":4752
55810 * 'id' : self.snaps[i].id,
55811 * 'size' : self.snaps[i].size,
55812 * 'name' : decode_cstr(self.snaps[i].name), # <<<<<<<<<<<<<<
55813 * 'namespace' : self.image.snap_get_namespace_type(self.snaps[i].id)
55814 * }
55815 */
55816 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4752; __pyx_clineno = __LINE__55816; goto __pyx_L1_error;}
55817 __Pyx_GOTREF(__pyx_t_5);
55818 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4752; __pyx_clineno = __LINE__55818; goto __pyx_L1_error;}
55819 __Pyx_GOTREF(__pyx_t_6);
55820 __pyx_t_7 = NULL((void*)0);
55821 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
55822 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
55823 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
55824 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
55825 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
55826 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
55827 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
55828 }
55829 }
55830 if (!__pyx_t_7) {
55831 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4752; __pyx_clineno = __LINE__55831; goto __pyx_L1_error;}
55832 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
55833 __Pyx_GOTREF(__pyx_t_4);
55834 } else {
55835 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4752; __pyx_clineno = __LINE__55835; goto __pyx_L1_error;}
55836 __Pyx_GOTREF(__pyx_t_8);
55837 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
55838 __Pyx_GIVEREF(__pyx_t_6);
55839 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
55840 __pyx_t_6 = 0;
55841 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4752; __pyx_clineno = __LINE__55841; goto __pyx_L1_error;}
55842 __Pyx_GOTREF(__pyx_t_4);
55843 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
55844 }
55845 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
55846 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4750; __pyx_clineno = __LINE__55846; goto __pyx_L1_error;}
55847 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55848
55849 /* "rbd.pyx":4753
55850 * 'size' : self.snaps[i].size,
55851 * 'name' : decode_cstr(self.snaps[i].name),
55852 * 'namespace' : self.image.snap_get_namespace_type(self.snaps[i].id) # <<<<<<<<<<<<<<
55853 * }
55854 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP:
55855 */
55856 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->image, __pyx_n_s_snap_get_namespace_type); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __pyx_clineno = __LINE__55856; goto __pyx_L1_error;}
55857 __Pyx_GOTREF(__pyx_t_5);
55858 __pyx_t_8 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __pyx_clineno = __LINE__55858; goto __pyx_L1_error;}
55859 __Pyx_GOTREF(__pyx_t_8);
55860 __pyx_t_6 = NULL((void*)0);
55861 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 1)
) {
55862 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
55863 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
55864 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
55865 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
55866 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
55867 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
55868 }
55869 }
55870 if (!__pyx_t_6) {
55871 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __pyx_clineno = __LINE__55871; goto __pyx_L1_error;}
55872 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
55873 __Pyx_GOTREF(__pyx_t_4);
55874 } else {
55875 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __pyx_clineno = __LINE__55875; goto __pyx_L1_error;}
55876 __Pyx_GOTREF(__pyx_t_7);
55877 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
55878 __Pyx_GIVEREF(__pyx_t_8);
55879 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
55880 __pyx_t_8 = 0;
55881 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __pyx_clineno = __LINE__55881; goto __pyx_L1_error;}
55882 __Pyx_GOTREF(__pyx_t_4);
55883 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
55884 }
55885 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
55886 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_namespace, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4750; __pyx_clineno = __LINE__55886; goto __pyx_L1_error;}
55887 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55888 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s);
55889 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, ((PyObject*)__pyx_t_3))do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_s
; __pyx_cur_scope->__pyx_v_s = ((PyObject*)__pyx_t_3); do {
if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)
(tmp)))); } while (0); } while (0); } while (0)
;
55890 __Pyx_GIVEREF(__pyx_t_3);
55891 __pyx_t_3 = 0;
55892
55893 /* "rbd.pyx":4755
55894 * 'namespace' : self.image.snap_get_namespace_type(self.snaps[i].id)
55895 * }
55896 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP: # <<<<<<<<<<<<<<
55897 * try:
55898 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
55899 */
55900 __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_namespace)PyObject_GetItem(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_namespace
)
; if (unlikely(__pyx_t_3 == NULL)__builtin_expect(!!(__pyx_t_3 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4755; __pyx_clineno = __LINE__55900; goto __pyx_L1_error;};
55901 __Pyx_GOTREF(__pyx_t_3);
55902 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_GROUP); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4755; __pyx_clineno = __LINE__55902; goto __pyx_L1_error;}
55903 __Pyx_GOTREF(__pyx_t_4);
55904 __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ2); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4755; __pyx_clineno = __LINE__55904; goto __pyx_L1_error;}
55905 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55906 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55907 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)__builtin_expect(!!(__pyx_t_9 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4755; __pyx_clineno = __LINE__55907; goto __pyx_L1_error;}
55908 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
55909 if (__pyx_t_9) {
55910
55911 /* "rbd.pyx":4756
55912 * }
55913 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP:
55914 * try: # <<<<<<<<<<<<<<
55915 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
55916 * except:
55917 */
55918 {
55919 __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
55920 __Pyx_XGOTREF(__pyx_t_10);
55921 __Pyx_XGOTREF(__pyx_t_11);
55922 __Pyx_XGOTREF(__pyx_t_12);
55923 /*try:*/ {
55924
55925 /* "rbd.pyx":4757
55926 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP:
55927 * try:
55928 * group = self.image.snap_get_group_namespace(self.snaps[i].id) # <<<<<<<<<<<<<<
55929 * except:
55930 * group = None
55931 */
55932 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->image, __pyx_n_s_snap_get_group_namespace); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4757; __pyx_clineno = __LINE__55932; goto __pyx_L7_error;}
55933 __Pyx_GOTREF(__pyx_t_4);
55934 __pyx_t_3 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4757; __pyx_clineno = __LINE__55934; goto __pyx_L7_error;}
55935 __Pyx_GOTREF(__pyx_t_3);
55936 __pyx_t_7 = NULL((void*)0);
55937 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
55938 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
55939 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
55940 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
55941 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
55942 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
55943 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
55944 }
55945 }
55946 if (!__pyx_t_7) {
55947 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4757; __pyx_clineno = __LINE__55947; goto __pyx_L7_error;}
55948 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
55949 __Pyx_GOTREF(__pyx_t_5);
55950 } else {
55951 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4757; __pyx_clineno = __LINE__55951; goto __pyx_L7_error;}
55952 __Pyx_GOTREF(__pyx_t_8);
55953 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
55954 __Pyx_GIVEREF(__pyx_t_3);
55955 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_3);
55956 __pyx_t_3 = 0;
55957 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4757; __pyx_clineno = __LINE__55957; goto __pyx_L7_error;}
55958 __Pyx_GOTREF(__pyx_t_5);
55959 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
55960 }
55961 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
55962 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_group);
55963 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_group, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_group
; __pyx_cur_scope->__pyx_v_group = __pyx_t_5; do { if ((tmp
) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0); } while (0)
;
55964 __Pyx_GIVEREF(__pyx_t_5);
55965 __pyx_t_5 = 0;
55966
55967 /* "rbd.pyx":4756
55968 * }
55969 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP:
55970 * try: # <<<<<<<<<<<<<<
55971 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
55972 * except:
55973 */
55974 }
55975 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
55976 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
55977 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
; __pyx_t_12 = 0;
55978 goto __pyx_L14_try_end;
55979 __pyx_L7_error:;
55980 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
55981 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
55982 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
55983 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
55984 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
55985 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
55986
55987 /* "rbd.pyx":4758
55988 * try:
55989 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
55990 * except: # <<<<<<<<<<<<<<
55991 * group = None
55992 * s['group'] = group
55993 */
55994 /*except:*/ {
55995 __Pyx_AddTraceback("rbd.SnapIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55996 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4758; __pyx_clineno = __LINE__55996; goto __pyx_L9_except_error;}
55997 __Pyx_GOTREF(__pyx_t_5);
55998 __Pyx_GOTREF(__pyx_t_4);
55999 __Pyx_GOTREF(__pyx_t_8);
56000
56001 /* "rbd.pyx":4759
56002 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
56003 * except:
56004 * group = None # <<<<<<<<<<<<<<
56005 * s['group'] = group
56006 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH:
56007 */
56008 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
56009 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_group);
56010 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_group, Py_None)do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_group
; __pyx_cur_scope->__pyx_v_group = (&_Py_NoneStruct); do
{ if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)
(tmp)))); } while (0); } while (0); } while (0)
;
56011 __Pyx_GIVEREF(Py_None);
56012 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56013 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56014 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
56015 goto __pyx_L8_exception_handled;
56016 }
56017 __pyx_L9_except_error:;
56018
56019 /* "rbd.pyx":4756
56020 * }
56021 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP:
56022 * try: # <<<<<<<<<<<<<<
56023 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
56024 * except:
56025 */
56026 __Pyx_XGIVEREF(__pyx_t_10);
56027 __Pyx_XGIVEREF(__pyx_t_11);
56028 __Pyx_XGIVEREF(__pyx_t_12);
56029 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
56030 goto __pyx_L1_error;
56031 __pyx_L8_exception_handled:;
56032 __Pyx_XGIVEREF(__pyx_t_10);
56033 __Pyx_XGIVEREF(__pyx_t_11);
56034 __Pyx_XGIVEREF(__pyx_t_12);
56035 __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
56036 __pyx_L14_try_end:;
56037 }
56038
56039 /* "rbd.pyx":4760
56040 * except:
56041 * group = None
56042 * s['group'] = group # <<<<<<<<<<<<<<
56043 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH:
56044 * try:
56045 */
56046 if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_group, __pyx_cur_scope->__pyx_v_group) < 0)__builtin_expect(!!(PyDict_SetItem(__pyx_cur_scope->__pyx_v_s
, __pyx_n_s_group, __pyx_cur_scope->__pyx_v_group) < 0)
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4760; __pyx_clineno = __LINE__56046; goto __pyx_L1_error;}
56047
56048 /* "rbd.pyx":4755
56049 * 'namespace' : self.image.snap_get_namespace_type(self.snaps[i].id)
56050 * }
56051 * if s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_GROUP: # <<<<<<<<<<<<<<
56052 * try:
56053 * group = self.image.snap_get_group_namespace(self.snaps[i].id)
56054 */
56055 goto __pyx_L6;
56056 }
56057
56058 /* "rbd.pyx":4761
56059 * group = None
56060 * s['group'] = group
56061 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH: # <<<<<<<<<<<<<<
56062 * try:
56063 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56064 */
56065 __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_namespace)PyObject_GetItem(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_namespace
)
; if (unlikely(__pyx_t_8 == NULL)__builtin_expect(!!(__pyx_t_8 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4761; __pyx_clineno = __LINE__56065; goto __pyx_L1_error;};
56066 __Pyx_GOTREF(__pyx_t_8);
56067 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_TRASH); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4761; __pyx_clineno = __LINE__56067; goto __pyx_L1_error;}
56068 __Pyx_GOTREF(__pyx_t_4);
56069 __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ2); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4761; __pyx_clineno = __LINE__56069; goto __pyx_L1_error;}
56070 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
56071 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56072 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)__builtin_expect(!!(__pyx_t_9 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4761; __pyx_clineno = __LINE__56072; goto __pyx_L1_error;}
56073 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56074 if (__pyx_t_9) {
56075
56076 /* "rbd.pyx":4762
56077 * s['group'] = group
56078 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH:
56079 * try: # <<<<<<<<<<<<<<
56080 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56081 * except:
56082 */
56083 {
56084 __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
56085 __Pyx_XGOTREF(__pyx_t_12);
56086 __Pyx_XGOTREF(__pyx_t_11);
56087 __Pyx_XGOTREF(__pyx_t_10);
56088 /*try:*/ {
56089
56090 /* "rbd.pyx":4763
56091 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH:
56092 * try:
56093 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id) # <<<<<<<<<<<<<<
56094 * except:
56095 * trash = None
56096 */
56097 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->image, __pyx_n_s_snap_get_trash_namespace); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4763; __pyx_clineno = __LINE__56097; goto __pyx_L17_error;}
56098 __Pyx_GOTREF(__pyx_t_4);
56099 __pyx_t_8 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4763; __pyx_clineno = __LINE__56099; goto __pyx_L17_error;}
56100 __Pyx_GOTREF(__pyx_t_8);
56101 __pyx_t_3 = NULL((void*)0);
56102 if (CYTHON_COMPILING_IN_CPYTHON1 && likely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 1)
) {
56103 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
56104 if (likely(__pyx_t_3)__builtin_expect(!!(__pyx_t_3), 1)) {
56105 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
56106 __Pyx_INCREF(__pyx_t_3)( ((PyObject*)(__pyx_t_3))->ob_refcnt++);
56107 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
56108 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
56109 }
56110 }
56111 if (!__pyx_t_3) {
56112 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4763; __pyx_clineno = __LINE__56112; goto __pyx_L17_error;}
56113 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
56114 __Pyx_GOTREF(__pyx_t_5);
56115 } else {
56116 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4763; __pyx_clineno = __LINE__56116; goto __pyx_L17_error;}
56117 __Pyx_GOTREF(__pyx_t_7);
56118 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_3); __pyx_t_3 = NULL((void*)0);
56119 __Pyx_GIVEREF(__pyx_t_8);
56120 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
56121 __pyx_t_8 = 0;
56122 __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4763; __pyx_clineno = __LINE__56122; goto __pyx_L17_error;}
56123 __Pyx_GOTREF(__pyx_t_5);
56124 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
56125 }
56126 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56127 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_trash);
56128 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_trash, __pyx_t_5)do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_trash
; __pyx_cur_scope->__pyx_v_trash = __pyx_t_5; do { if ((tmp
) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); } while (
0); } while (0); } while (0)
;
56129 __Pyx_GIVEREF(__pyx_t_5);
56130 __pyx_t_5 = 0;
56131
56132 /* "rbd.pyx":4762
56133 * s['group'] = group
56134 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH:
56135 * try: # <<<<<<<<<<<<<<
56136 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56137 * except:
56138 */
56139 }
56140 __Pyx_XDECREF(__pyx_t_12)do { if ((__pyx_t_12) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_12))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_12)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_12)))); } while (0); } while (0)
; __pyx_t_12 = 0;
56141 __Pyx_XDECREF(__pyx_t_11)do { if ((__pyx_t_11) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_11))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_11)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_11)))); } while (0); } while (0)
; __pyx_t_11 = 0;
56142 __Pyx_XDECREF(__pyx_t_10)do { if ((__pyx_t_10) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_10))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(__pyx_t_10)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_10)))); } while (0); } while (0)
; __pyx_t_10 = 0;
56143 goto __pyx_L24_try_end;
56144 __pyx_L17_error:;
56145 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
; __pyx_t_6 = 0;
56146 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
56147 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
; __pyx_t_8 = 0;
56148 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
; __pyx_t_7 = 0;
56149 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
56150 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
56151
56152 /* "rbd.pyx":4764
56153 * try:
56154 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56155 * except: # <<<<<<<<<<<<<<
56156 * trash = None
56157 * s['trash'] = trash
56158 */
56159 /*except:*/ {
56160 __Pyx_AddTraceback("rbd.SnapIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56161 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4764; __pyx_clineno = __LINE__56161; goto __pyx_L19_except_error;}
56162 __Pyx_GOTREF(__pyx_t_5);
56163 __Pyx_GOTREF(__pyx_t_4);
56164 __Pyx_GOTREF(__pyx_t_7);
56165
56166 /* "rbd.pyx":4765
56167 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56168 * except:
56169 * trash = None # <<<<<<<<<<<<<<
56170 * s['trash'] = trash
56171 * yield s
56172 */
56173 __Pyx_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
56174 __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_trash);
56175 __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_trash, Py_None)do { PyObject *tmp = (PyObject *) __pyx_cur_scope->__pyx_v_trash
; __pyx_cur_scope->__pyx_v_trash = (&_Py_NoneStruct); do
{ if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)(tmp
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)
(tmp)))); } while (0); } while (0); } while (0)
;
56176 __Pyx_GIVEREF(Py_None);
56177 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56178 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56179 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
56180 goto __pyx_L18_exception_handled;
56181 }
56182 __pyx_L19_except_error:;
56183
56184 /* "rbd.pyx":4762
56185 * s['group'] = group
56186 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH:
56187 * try: # <<<<<<<<<<<<<<
56188 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56189 * except:
56190 */
56191 __Pyx_XGIVEREF(__pyx_t_12);
56192 __Pyx_XGIVEREF(__pyx_t_11);
56193 __Pyx_XGIVEREF(__pyx_t_10);
56194 __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
56195 goto __pyx_L1_error;
56196 __pyx_L18_exception_handled:;
56197 __Pyx_XGIVEREF(__pyx_t_12);
56198 __Pyx_XGIVEREF(__pyx_t_11);
56199 __Pyx_XGIVEREF(__pyx_t_10);
56200 __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
56201 __pyx_L24_try_end:;
56202 }
56203
56204 /* "rbd.pyx":4766
56205 * except:
56206 * trash = None
56207 * s['trash'] = trash # <<<<<<<<<<<<<<
56208 * yield s
56209 *
56210 */
56211 if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_s, __pyx_n_s_trash, __pyx_cur_scope->__pyx_v_trash) < 0)__builtin_expect(!!(PyDict_SetItem(__pyx_cur_scope->__pyx_v_s
, __pyx_n_s_trash, __pyx_cur_scope->__pyx_v_trash) < 0)
, 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4766; __pyx_clineno = __LINE__56211; goto __pyx_L1_error;}
56212
56213 /* "rbd.pyx":4761
56214 * group = None
56215 * s['group'] = group
56216 * elif s['namespace'] == RBD_SNAP_NAMESPACE_TYPE_TRASH: # <<<<<<<<<<<<<<
56217 * try:
56218 * trash = self.image.snap_get_trash_namespace(self.snaps[i].id)
56219 */
56220 }
56221 __pyx_L6:;
56222
56223 /* "rbd.pyx":4767
56224 * trash = None
56225 * s['trash'] = trash
56226 * yield s # <<<<<<<<<<<<<<
56227 *
56228 * def __dealloc__(self):
56229 */
56230 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_s)( ((PyObject*)(__pyx_cur_scope->__pyx_v_s))->ob_refcnt++
)
;
56231 __pyx_r = __pyx_cur_scope->__pyx_v_s;
56232 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
56233 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
56234 __Pyx_XGIVEREF(__pyx_r);
56235 __Pyx_RefNannyFinishContext();
56236 /* return from generator, yielding value */
56237 __pyx_generator->resume_label = 1;
56238 return __pyx_r;
56239 __pyx_L27_resume_from_yield:;
56240 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
56241 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
56242 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4767; __pyx_clineno = __LINE__56242; goto __pyx_L1_error;}
56243 }
56244
56245 /* "rbd.pyx":4747
56246 * raise make_ex(ret, 'error listing snapshots for image %s' % image.name)
56247 *
56248 * def __iter__(self): # <<<<<<<<<<<<<<
56249 * for i in range(self.num_snaps):
56250 * s = {
56251 */
56252
56253 /* function exit code */
56254 PyErr_SetNone(PyExc_StopIteration);
56255 goto __pyx_L0;
56256 __pyx_L1_error:;
56257 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
56258 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
56259 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
56260 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
56261 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
56262 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
56263 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56264 __pyx_L0:;
56265 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
56266 __pyx_generator->resume_label = -1;
56267 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
56268 __Pyx_RefNannyFinishContext();
56269 return __pyx_r;
56270}
56271
56272/* "rbd.pyx":4769
56273 * yield s
56274 *
56275 * def __dealloc__(self): # <<<<<<<<<<<<<<
56276 * if self.snaps:
56277 * rbd_snap_list_end(self.snaps)
56278 */
56279
56280/* Python wrapper */
56281static void __pyx_pw_3rbd_12SnapIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
56282static void __pyx_pw_3rbd_12SnapIterator_6__dealloc__(PyObject *__pyx_v_self) {
56283 __Pyx_RefNannyDeclarations
56284 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
56285 __pyx_pf_3rbd_12SnapIterator_5__dealloc__(((struct __pyx_obj_3rbd_SnapIterator *)__pyx_v_self));
56286
56287 /* function exit code */
56288 __Pyx_RefNannyFinishContext();
56289}
56290
56291static void __pyx_pf_3rbd_12SnapIterator_5__dealloc__(struct __pyx_obj_3rbd_SnapIterator *__pyx_v_self) {
56292 __Pyx_RefNannyDeclarations
56293 int __pyx_t_1;
56294 __Pyx_RefNannySetupContext("__dealloc__", 0);
56295
56296 /* "rbd.pyx":4770
56297 *
56298 * def __dealloc__(self):
56299 * if self.snaps: # <<<<<<<<<<<<<<
56300 * rbd_snap_list_end(self.snaps)
56301 * free(self.snaps)
56302 */
56303 __pyx_t_1 = (__pyx_v_self->snaps != 0);
56304 if (__pyx_t_1) {
56305
56306 /* "rbd.pyx":4771
56307 * def __dealloc__(self):
56308 * if self.snaps:
56309 * rbd_snap_list_end(self.snaps) # <<<<<<<<<<<<<<
56310 * free(self.snaps)
56311 *
56312 */
56313 rbd_snap_list_end(__pyx_v_self->snaps);
56314
56315 /* "rbd.pyx":4772
56316 * if self.snaps:
56317 * rbd_snap_list_end(self.snaps)
56318 * free(self.snaps) # <<<<<<<<<<<<<<
56319 *
56320 * cdef class TrashIterator(object):
56321 */
56322 free(__pyx_v_self->snaps);
56323
56324 /* "rbd.pyx":4770
56325 *
56326 * def __dealloc__(self):
56327 * if self.snaps: # <<<<<<<<<<<<<<
56328 * rbd_snap_list_end(self.snaps)
56329 * free(self.snaps)
56330 */
56331 }
56332
56333 /* "rbd.pyx":4769
56334 * yield s
56335 *
56336 * def __dealloc__(self): # <<<<<<<<<<<<<<
56337 * if self.snaps:
56338 * rbd_snap_list_end(self.snaps)
56339 */
56340
56341 /* function exit code */
56342 __Pyx_RefNannyFinishContext();
56343}
56344
56345/* "rbd.pyx":4799
56346 * rbd_trash_image_info_t *entries
56347 *
56348 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
56349 * self.ioctx = convert_ioctx(ioctx)
56350 * self.num_entries = 1024
56351 */
56352
56353/* Python wrapper */
56354static int __pyx_pw_3rbd_13TrashIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
56355static int __pyx_pw_3rbd_13TrashIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
56356 PyObject *__pyx_v_ioctx = 0;
56357 int __pyx_lineno = 0;
56358 const char *__pyx_filename = NULL((void*)0);
56359 int __pyx_clineno = 0;
56360 int __pyx_r;
56361 __Pyx_RefNannyDeclarations
56362 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
56363 {
56364 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ioctx,0};
56365 PyObject* values[1] = {0};
56366 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
56367 Py_ssize_t kw_args;
56368 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
56369 switch (pos_args) {
56370 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
56371 case 0: break;
56372 default: goto __pyx_L5_argtuple_error;
56373 }
56374 kw_args = PyDict_Size(__pyx_kwds);
56375 switch (pos_args) {
56376 case 0:
56377 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ioctx
)) != 0), 1)
) kw_args--;
56378 else goto __pyx_L5_argtuple_error;
56379 }
56380 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
56381 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4799; __pyx_clineno = __LINE__56381; goto __pyx_L3_error;}
56382 }
56383 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
56384 goto __pyx_L5_argtuple_error;
56385 } else {
56386 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
56387 }
56388 __pyx_v_ioctx = values[0];
56389 }
56390 goto __pyx_L4_argument_unpacking_done;
56391 __pyx_L5_argtuple_error:;
56392 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4799; __pyx_clineno = __LINE__56392; goto __pyx_L3_error;}
56393 __pyx_L3_error:;
56394 __Pyx_AddTraceback("rbd.TrashIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56395 __Pyx_RefNannyFinishContext();
56396 return -1;
56397 __pyx_L4_argument_unpacking_done:;
56398 __pyx_r = __pyx_pf_3rbd_13TrashIterator___init__(((struct __pyx_obj_3rbd_TrashIterator *)__pyx_v_self), __pyx_v_ioctx);
56399
56400 /* function exit code */
56401 __Pyx_RefNannyFinishContext();
56402 return __pyx_r;
56403}
56404
56405static int __pyx_pf_3rbd_13TrashIterator___init__(struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self, PyObject *__pyx_v_ioctx) {
56406 int __pyx_v_ret;
56407 int __pyx_r;
56408 __Pyx_RefNannyDeclarations
56409 rados_ioctx_t __pyx_t_1;
56410 void *__pyx_t_2;
56411 int __pyx_t_3;
56412 PyObject *__pyx_t_4 = NULL((void*)0);
56413 PyObject *__pyx_t_5 = NULL((void*)0);
56414 int __pyx_lineno = 0;
56415 const char *__pyx_filename = NULL((void*)0);
56416 int __pyx_clineno = 0;
56417 __Pyx_RefNannySetupContext("__init__", 0);
56418
56419 /* "rbd.pyx":4800
56420 *
56421 * def __init__(self, ioctx):
56422 * self.ioctx = convert_ioctx(ioctx) # <<<<<<<<<<<<<<
56423 * self.num_entries = 1024
56424 * self.entries = NULL
56425 */
56426 if (!(likely(((__pyx_v_ioctx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx)))__builtin_expect(!!(((__pyx_v_ioctx) == (&_Py_NoneStruct)
) || __builtin_expect(!!(__Pyx_TypeTest(__pyx_v_ioctx, __pyx_ptype_5rados_Ioctx
)), 1)), 1)
)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4800; __pyx_clineno = __LINE__56426; goto __pyx_L1_error;}
56427 __pyx_t_1 = __pyx_f_3rbd_convert_ioctx(((struct __pyx_obj_5rados_Ioctx *)__pyx_v_ioctx)); if (unlikely(__pyx_t_1 == NULL && PyErr_Occurred())__builtin_expect(!!(__pyx_t_1 == ((void*)0) && PyErr_Occurred
()), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4800; __pyx_clineno = __LINE__56427; goto __pyx_L1_error;}
56428 __pyx_v_self->ioctx = __pyx_t_1;
56429
56430 /* "rbd.pyx":4801
56431 * def __init__(self, ioctx):
56432 * self.ioctx = convert_ioctx(ioctx)
56433 * self.num_entries = 1024 # <<<<<<<<<<<<<<
56434 * self.entries = NULL
56435 * while True:
56436 */
56437 __pyx_v_self->num_entries = 0x400;
56438
56439 /* "rbd.pyx":4802
56440 * self.ioctx = convert_ioctx(ioctx)
56441 * self.num_entries = 1024
56442 * self.entries = NULL # <<<<<<<<<<<<<<
56443 * while True:
56444 * self.entries = <rbd_trash_image_info_t*>realloc_chk(self.entries,
56445 */
56446 __pyx_v_self->entries = NULL((void*)0);
56447
56448 /* "rbd.pyx":4803
56449 * self.num_entries = 1024
56450 * self.entries = NULL
56451 * while True: # <<<<<<<<<<<<<<
56452 * self.entries = <rbd_trash_image_info_t*>realloc_chk(self.entries,
56453 * self.num_entries *
56454 */
56455 while (1) {
56456
56457 /* "rbd.pyx":4804
56458 * self.entries = NULL
56459 * while True:
56460 * self.entries = <rbd_trash_image_info_t*>realloc_chk(self.entries, # <<<<<<<<<<<<<<
56461 * self.num_entries *
56462 * sizeof(rbd_trash_image_info_t))
56463 */
56464 __pyx_t_2 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->entries, (__pyx_v_self->num_entries * (sizeof(rbd_trash_image_info_t)))); if (unlikely(__pyx_t_2 == NULL)__builtin_expect(!!(__pyx_t_2 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4804; __pyx_clineno = __LINE__56464; goto __pyx_L1_error;}
56465 __pyx_v_self->entries = ((rbd_trash_image_info_t *)__pyx_t_2);
56466
56467 /* "rbd.pyx":4807
56468 * self.num_entries *
56469 * sizeof(rbd_trash_image_info_t))
56470 * with nogil: # <<<<<<<<<<<<<<
56471 * ret = rbd_trash_list(self.ioctx, self.entries, &self.num_entries)
56472 * if ret >= 0:
56473 */
56474 {
56475 #ifdef WITH_THREAD1
56476 PyThreadState *_save;
56477 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
56478 #endif
56479 /*try:*/ {
56480
56481 /* "rbd.pyx":4808
56482 * sizeof(rbd_trash_image_info_t))
56483 * with nogil:
56484 * ret = rbd_trash_list(self.ioctx, self.entries, &self.num_entries) # <<<<<<<<<<<<<<
56485 * if ret >= 0:
56486 * self.num_entries = ret
56487 */
56488 __pyx_v_ret = rbd_trash_list(__pyx_v_self->ioctx, __pyx_v_self->entries, (&__pyx_v_self->num_entries));
56489 }
56490
56491 /* "rbd.pyx":4807
56492 * self.num_entries *
56493 * sizeof(rbd_trash_image_info_t))
56494 * with nogil: # <<<<<<<<<<<<<<
56495 * ret = rbd_trash_list(self.ioctx, self.entries, &self.num_entries)
56496 * if ret >= 0:
56497 */
56498 /*finally:*/ {
56499 /*normal exit:*/{
56500 #ifdef WITH_THREAD1
56501 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
56502 #endif
56503 goto __pyx_L9;
56504 }
56505 __pyx_L9:;
56506 }
56507 }
56508
56509 /* "rbd.pyx":4809
56510 * with nogil:
56511 * ret = rbd_trash_list(self.ioctx, self.entries, &self.num_entries)
56512 * if ret >= 0: # <<<<<<<<<<<<<<
56513 * self.num_entries = ret
56514 * break
56515 */
56516 __pyx_t_3 = ((__pyx_v_ret >= 0) != 0);
56517 if (__pyx_t_3) {
56518
56519 /* "rbd.pyx":4810
56520 * ret = rbd_trash_list(self.ioctx, self.entries, &self.num_entries)
56521 * if ret >= 0:
56522 * self.num_entries = ret # <<<<<<<<<<<<<<
56523 * break
56524 * elif ret != -errno.ERANGE:
56525 */
56526 __pyx_v_self->num_entries = __pyx_v_ret;
56527
56528 /* "rbd.pyx":4811
56529 * if ret >= 0:
56530 * self.num_entries = ret
56531 * break # <<<<<<<<<<<<<<
56532 * elif ret != -errno.ERANGE:
56533 * raise make_ex(ret, 'error listing trash entries')
56534 */
56535 goto __pyx_L4_break;
56536
56537 /* "rbd.pyx":4809
56538 * with nogil:
56539 * ret = rbd_trash_list(self.ioctx, self.entries, &self.num_entries)
56540 * if ret >= 0: # <<<<<<<<<<<<<<
56541 * self.num_entries = ret
56542 * break
56543 */
56544 }
56545
56546 /* "rbd.pyx":4812
56547 * self.num_entries = ret
56548 * break
56549 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
56550 * raise make_ex(ret, 'error listing trash entries')
56551 *
56552 */
56553 __pyx_t_3 = ((__pyx_v_ret != (-ERANGE34)) != 0);
56554 if (__pyx_t_3) {
56555
56556 /* "rbd.pyx":4813
56557 * break
56558 * elif ret != -errno.ERANGE:
56559 * raise make_ex(ret, 'error listing trash entries') # <<<<<<<<<<<<<<
56560 *
56561 * __source_string = ['USER', 'MIRRORING']
56562 */
56563 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4813; __pyx_clineno = __LINE__56563; goto __pyx_L1_error;}
56564 __Pyx_GOTREF(__pyx_t_4);
56565 __pyx_t_5 = __pyx_f_3rbd_make_ex(__pyx_t_4, __pyx_kp_s_error_listing_trash_entries, NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4813; __pyx_clineno = __LINE__56565; goto __pyx_L1_error;}
56566 __Pyx_GOTREF(__pyx_t_5);
56567 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56568 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
56569 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56570 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4813; __pyx_clineno = __LINE__56570; goto __pyx_L1_error;}
56571
56572 /* "rbd.pyx":4812
56573 * self.num_entries = ret
56574 * break
56575 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
56576 * raise make_ex(ret, 'error listing trash entries')
56577 *
56578 */
56579 }
56580 }
56581 __pyx_L4_break:;
56582
56583 /* "rbd.pyx":4799
56584 * rbd_trash_image_info_t *entries
56585 *
56586 * def __init__(self, ioctx): # <<<<<<<<<<<<<<
56587 * self.ioctx = convert_ioctx(ioctx)
56588 * self.num_entries = 1024
56589 */
56590
56591 /* function exit code */
56592 __pyx_r = 0;
56593 goto __pyx_L0;
56594 __pyx_L1_error:;
56595 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
56596 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
56597 __Pyx_AddTraceback("rbd.TrashIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56598 __pyx_r = -1;
56599 __pyx_L0:;
56600 __Pyx_RefNannyFinishContext();
56601 return __pyx_r;
56602}
56603static PyObject *__pyx_gb_3rbd_13TrashIterator_4generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
56604
56605/* "rbd.pyx":4817
56606 * __source_string = ['USER', 'MIRRORING']
56607 *
56608 * def __iter__(self): # <<<<<<<<<<<<<<
56609 * for i in range(self.num_entries):
56610 * yield {
56611 */
56612
56613/* Python wrapper */
56614static PyObject *__pyx_pw_3rbd_13TrashIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
56615static PyObject *__pyx_pw_3rbd_13TrashIterator_3__iter__(PyObject *__pyx_v_self) {
56616 PyObject *__pyx_r = 0;
56617 __Pyx_RefNannyDeclarations
56618 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
56619 __pyx_r = __pyx_pf_3rbd_13TrashIterator_2__iter__(((struct __pyx_obj_3rbd_TrashIterator *)__pyx_v_self));
56620
56621 /* function exit code */
56622 __Pyx_RefNannyFinishContext();
56623 return __pyx_r;
56624}
56625
56626static PyObject *__pyx_pf_3rbd_13TrashIterator_2__iter__(struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self) {
56627 struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *__pyx_cur_scope;
56628 PyObject *__pyx_r = NULL((void*)0);
56629 __Pyx_RefNannyDeclarations
56630 int __pyx_lineno = 0;
56631 const char *__pyx_filename = NULL((void*)0);
56632 int __pyx_clineno = 0;
56633 __Pyx_RefNannySetupContext("__iter__", 0);
56634 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_10___iter__(__pyx_ptype_3rbd___pyx_scope_struct_10___iter__, __pyx_empty_tuple, NULL((void*)0));
56635 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
56636 __Pyx_RefNannyFinishContext();
56637 return NULL((void*)0);
56638 }
56639 __Pyx_GOTREF(__pyx_cur_scope);
56640 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
56641 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
56642 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
56643 {
56644 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_13TrashIterator_4generator9, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_TrashIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_13TrashIterator_4generator9, (PyObject *) __pyx_cur_scope
, __pyx_n_s_iter, __pyx_n_s_TrashIterator___iter)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4817; __pyx_clineno = __LINE__56644; goto __pyx_L1_error;}
56645 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
56646 __Pyx_RefNannyFinishContext();
56647 return (PyObject *) gen;
56648 }
56649
56650 /* function exit code */
56651 __pyx_L1_error:;
56652 __Pyx_AddTraceback("rbd.TrashIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56653 __pyx_r = NULL((void*)0);
56654 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
56655 __Pyx_XGIVEREF(__pyx_r);
56656 __Pyx_RefNannyFinishContext();
56657 return __pyx_r;
56658}
56659
56660static PyObject *__pyx_gb_3rbd_13TrashIterator_4generator9(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
56661{
56662 struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *)__pyx_generator->closure);
56663 PyObject *__pyx_r = NULL((void*)0);
56664 size_t __pyx_t_1;
56665 size_t __pyx_t_2;
56666 PyObject *__pyx_t_3 = NULL((void*)0);
56667 PyObject *__pyx_t_4 = NULL((void*)0);
56668 PyObject *__pyx_t_5 = NULL((void*)0);
56669 PyObject *__pyx_t_6 = NULL((void*)0);
56670 PyObject *__pyx_t_7 = NULL((void*)0);
56671 PyObject *__pyx_t_8 = NULL((void*)0);
56672 int __pyx_lineno = 0;
56673 const char *__pyx_filename = NULL((void*)0);
56674 int __pyx_clineno = 0;
56675 __Pyx_RefNannyDeclarations
56676 __Pyx_RefNannySetupContext("None", 0);
56677 switch (__pyx_generator->resume_label) {
56678 case 0: goto __pyx_L3_first_run;
56679 case 1: goto __pyx_L6_resume_from_yield;
56680 default: /* CPython raises the right error here */
56681 __Pyx_RefNannyFinishContext();
56682 return NULL((void*)0);
56683 }
56684 __pyx_L3_first_run:;
56685 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4817; __pyx_clineno = __LINE__56685; goto __pyx_L1_error;}
56686
56687 /* "rbd.pyx":4818
56688 *
56689 * def __iter__(self):
56690 * for i in range(self.num_entries): # <<<<<<<<<<<<<<
56691 * yield {
56692 * 'id' : decode_cstr(self.entries[i].id),
56693 */
56694 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_entries;
56695 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
56696 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
56697
56698 /* "rbd.pyx":4820
56699 * for i in range(self.num_entries):
56700 * yield {
56701 * 'id' : decode_cstr(self.entries[i].id), # <<<<<<<<<<<<<<
56702 * 'name' : decode_cstr(self.entries[i].name),
56703 * 'source' : TrashIterator.__source_string[self.entries[i].source],
56704 */
56705 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56705; goto __pyx_L1_error;}
56706 __Pyx_GOTREF(__pyx_t_3);
56707 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56707; goto __pyx_L1_error;}
56708 __Pyx_GOTREF(__pyx_t_5);
56709 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->entries[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56709; goto __pyx_L1_error;}
56710 __Pyx_GOTREF(__pyx_t_6);
56711 __pyx_t_7 = NULL((void*)0);
56712 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
56713 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
56714 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
56715 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
56716 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
56717 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
56718 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
56719 }
56720 }
56721 if (!__pyx_t_7) {
56722 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56722; goto __pyx_L1_error;}
56723 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
56724 __Pyx_GOTREF(__pyx_t_4);
56725 } else {
56726 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56726; goto __pyx_L1_error;}
56727 __Pyx_GOTREF(__pyx_t_8);
56728 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
56729 __Pyx_GIVEREF(__pyx_t_6);
56730 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
56731 __pyx_t_6 = 0;
56732 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56732; goto __pyx_L1_error;}
56733 __Pyx_GOTREF(__pyx_t_4);
56734 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
56735 }
56736 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56737 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_id, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56737; goto __pyx_L1_error;}
56738 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56739
56740 /* "rbd.pyx":4821
56741 * yield {
56742 * 'id' : decode_cstr(self.entries[i].id),
56743 * 'name' : decode_cstr(self.entries[i].name), # <<<<<<<<<<<<<<
56744 * 'source' : TrashIterator.__source_string[self.entries[i].source],
56745 * 'deletion_time' : datetime.utcfromtimestamp(self.entries[i].deletion_time),
56746 */
56747 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4821; __pyx_clineno = __LINE__56747; goto __pyx_L1_error;}
56748 __Pyx_GOTREF(__pyx_t_5);
56749 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->entries[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4821; __pyx_clineno = __LINE__56749; goto __pyx_L1_error;}
56750 __Pyx_GOTREF(__pyx_t_8);
56751 __pyx_t_6 = NULL((void*)0);
56752 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
56753 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
56754 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
56755 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
56756 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
56757 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
56758 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
56759 }
56760 }
56761 if (!__pyx_t_6) {
56762 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4821; __pyx_clineno = __LINE__56762; goto __pyx_L1_error;}
56763 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
56764 __Pyx_GOTREF(__pyx_t_4);
56765 } else {
56766 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4821; __pyx_clineno = __LINE__56766; goto __pyx_L1_error;}
56767 __Pyx_GOTREF(__pyx_t_7);
56768 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
56769 __Pyx_GIVEREF(__pyx_t_8);
56770 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
56771 __pyx_t_8 = 0;
56772 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4821; __pyx_clineno = __LINE__56772; goto __pyx_L1_error;}
56773 __Pyx_GOTREF(__pyx_t_4);
56774 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
56775 }
56776 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56777 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56777; goto __pyx_L1_error;}
56778 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56779
56780 /* "rbd.pyx":4822
56781 * 'id' : decode_cstr(self.entries[i].id),
56782 * 'name' : decode_cstr(self.entries[i].name),
56783 * 'source' : TrashIterator.__source_string[self.entries[i].source], # <<<<<<<<<<<<<<
56784 * 'deletion_time' : datetime.utcfromtimestamp(self.entries[i].deletion_time),
56785 * 'deferment_end_time' : datetime.utcfromtimestamp(self.entries[i].deferment_end_time)
56786 */
56787 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_3rbd_TrashIterator), __pyx_n_s_source_string); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__56787; goto __pyx_L1_error;}
56788 __Pyx_GOTREF(__pyx_t_4);
56789 __pyx_t_5 = __Pyx_PyInt_From_rbd_trash_image_source_t((__pyx_cur_scope->__pyx_v_self->entries[__pyx_cur_scope->__pyx_v_i]).source); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__56789; goto __pyx_L1_error;}
56790 __Pyx_GOTREF(__pyx_t_5);
56791 __pyx_t_7 = PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(__pyx_t_7 == NULL)__builtin_expect(!!(__pyx_t_7 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__56791; goto __pyx_L1_error;};
56792 __Pyx_GOTREF(__pyx_t_7);
56793 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56794 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56795 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56795; goto __pyx_L1_error;}
56796 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
56797
56798 /* "rbd.pyx":4823
56799 * 'name' : decode_cstr(self.entries[i].name),
56800 * 'source' : TrashIterator.__source_string[self.entries[i].source],
56801 * 'deletion_time' : datetime.utcfromtimestamp(self.entries[i].deletion_time), # <<<<<<<<<<<<<<
56802 * 'deferment_end_time' : datetime.utcfromtimestamp(self.entries[i].deferment_end_time)
56803 * }
56804 */
56805 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__56805; goto __pyx_L1_error;}
56806 __Pyx_GOTREF(__pyx_t_5);
56807 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__56807; goto __pyx_L1_error;}
56808 __Pyx_GOTREF(__pyx_t_4);
56809 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56810 __pyx_t_5 = __Pyx_PyInt_From_time_t((__pyx_cur_scope->__pyx_v_self->entries[__pyx_cur_scope->__pyx_v_i]).deletion_time); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__56810; goto __pyx_L1_error;}
56811 __Pyx_GOTREF(__pyx_t_5);
56812 __pyx_t_8 = NULL((void*)0);
56813 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_4))__builtin_expect(!!(((__pyx_t_4)->ob_type == &PyMethod_Type
)), 0)
) {
56814 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_self);
56815 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
56816 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4)(((PyMethodObject *)__pyx_t_4) -> im_func);
56817 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
56818 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
56819 __Pyx_DECREF_SET(__pyx_t_4, function)do { PyObject *tmp = (PyObject *) __pyx_t_4; __pyx_t_4 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
56820 }
56821 }
56822 if (!__pyx_t_8) {
56823 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__56823; goto __pyx_L1_error;}
56824 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
56825 __Pyx_GOTREF(__pyx_t_7);
56826 } else {
56827 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__56827; goto __pyx_L1_error;}
56828 __Pyx_GOTREF(__pyx_t_6);
56829 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
56830 __Pyx_GIVEREF(__pyx_t_5);
56831 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_5);
56832 __pyx_t_5 = 0;
56833 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__56833; goto __pyx_L1_error;}
56834 __Pyx_GOTREF(__pyx_t_7);
56835 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
56836 }
56837 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56838 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_deletion_time, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56838; goto __pyx_L1_error;}
56839 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
56840
56841 /* "rbd.pyx":4824
56842 * 'source' : TrashIterator.__source_string[self.entries[i].source],
56843 * 'deletion_time' : datetime.utcfromtimestamp(self.entries[i].deletion_time),
56844 * 'deferment_end_time' : datetime.utcfromtimestamp(self.entries[i].deferment_end_time) # <<<<<<<<<<<<<<
56845 * }
56846 *
56847 */
56848 __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__56848; goto __pyx_L1_error;}
56849 __Pyx_GOTREF(__pyx_t_4);
56850 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_utcfromtimestamp); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__56850; goto __pyx_L1_error;}
56851 __Pyx_GOTREF(__pyx_t_6);
56852 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56853 __pyx_t_4 = __Pyx_PyInt_From_time_t((__pyx_cur_scope->__pyx_v_self->entries[__pyx_cur_scope->__pyx_v_i]).deferment_end_time); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__56853; goto __pyx_L1_error;}
56854 __Pyx_GOTREF(__pyx_t_4);
56855 __pyx_t_5 = NULL((void*)0);
56856 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_6))__builtin_expect(!!(((__pyx_t_6)->ob_type == &PyMethod_Type
)), 0)
) {
56857 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_self);
56858 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
56859 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6)(((PyMethodObject *)__pyx_t_6) -> im_func);
56860 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
56861 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
56862 __Pyx_DECREF_SET(__pyx_t_6, function)do { PyObject *tmp = (PyObject *) __pyx_t_6; __pyx_t_6 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
56863 }
56864 }
56865 if (!__pyx_t_5) {
56866 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__56866; goto __pyx_L1_error;}
56867 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
56868 __Pyx_GOTREF(__pyx_t_7);
56869 } else {
56870 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__56870; goto __pyx_L1_error;}
56871 __Pyx_GOTREF(__pyx_t_8);
56872 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
56873 __Pyx_GIVEREF(__pyx_t_4);
56874 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_4);
56875 __pyx_t_4 = 0;
56876 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__56876; goto __pyx_L1_error;}
56877 __Pyx_GOTREF(__pyx_t_7);
56878 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
56879 }
56880 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
56881 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_deferment_end_time, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__56881; goto __pyx_L1_error;}
56882 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
56883 __pyx_r = __pyx_t_3;
56884 __pyx_t_3 = 0;
56885 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
56886 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
56887 __Pyx_XGIVEREF(__pyx_r);
56888 __Pyx_RefNannyFinishContext();
56889 /* return from generator, yielding value */
56890 __pyx_generator->resume_label = 1;
56891 return __pyx_r;
56892 __pyx_L6_resume_from_yield:;
56893 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
56894 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
56895 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4819; __pyx_clineno = __LINE__56895; goto __pyx_L1_error;}
56896 }
56897
56898 /* "rbd.pyx":4817
56899 * __source_string = ['USER', 'MIRRORING']
56900 *
56901 * def __iter__(self): # <<<<<<<<<<<<<<
56902 * for i in range(self.num_entries):
56903 * yield {
56904 */
56905
56906 /* function exit code */
56907 PyErr_SetNone(PyExc_StopIteration);
56908 goto __pyx_L0;
56909 __pyx_L1_error:;
56910 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
56911 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
56912 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
56913 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
56914 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
56915 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
56916 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56917 __pyx_L0:;
56918 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
56919 __pyx_generator->resume_label = -1;
56920 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
56921 __Pyx_RefNannyFinishContext();
56922 return __pyx_r;
56923}
56924
56925/* "rbd.pyx":4827
56926 * }
56927 *
56928 * def __dealloc__(self): # <<<<<<<<<<<<<<
56929 * rbd_trash_list_cleanup(self.entries, self.num_entries)
56930 * if self.entries:
56931 */
56932
56933/* Python wrapper */
56934static void __pyx_pw_3rbd_13TrashIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
56935static void __pyx_pw_3rbd_13TrashIterator_6__dealloc__(PyObject *__pyx_v_self) {
56936 __Pyx_RefNannyDeclarations
56937 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
56938 __pyx_pf_3rbd_13TrashIterator_5__dealloc__(((struct __pyx_obj_3rbd_TrashIterator *)__pyx_v_self));
56939
56940 /* function exit code */
56941 __Pyx_RefNannyFinishContext();
56942}
56943
56944static void __pyx_pf_3rbd_13TrashIterator_5__dealloc__(struct __pyx_obj_3rbd_TrashIterator *__pyx_v_self) {
56945 __Pyx_RefNannyDeclarations
56946 int __pyx_t_1;
56947 __Pyx_RefNannySetupContext("__dealloc__", 0);
56948
56949 /* "rbd.pyx":4828
56950 *
56951 * def __dealloc__(self):
56952 * rbd_trash_list_cleanup(self.entries, self.num_entries) # <<<<<<<<<<<<<<
56953 * if self.entries:
56954 * free(self.entries)
56955 */
56956 rbd_trash_list_cleanup(__pyx_v_self->entries, __pyx_v_self->num_entries);
56957
56958 /* "rbd.pyx":4829
56959 * def __dealloc__(self):
56960 * rbd_trash_list_cleanup(self.entries, self.num_entries)
56961 * if self.entries: # <<<<<<<<<<<<<<
56962 * free(self.entries)
56963 *
56964 */
56965 __pyx_t_1 = (__pyx_v_self->entries != 0);
56966 if (__pyx_t_1) {
56967
56968 /* "rbd.pyx":4830
56969 * rbd_trash_list_cleanup(self.entries, self.num_entries)
56970 * if self.entries:
56971 * free(self.entries) # <<<<<<<<<<<<<<
56972 *
56973 * cdef class ChildIterator(object):
56974 */
56975 free(__pyx_v_self->entries);
56976
56977 /* "rbd.pyx":4829
56978 * def __dealloc__(self):
56979 * rbd_trash_list_cleanup(self.entries, self.num_entries)
56980 * if self.entries: # <<<<<<<<<<<<<<
56981 * free(self.entries)
56982 *
56983 */
56984 }
56985
56986 /* "rbd.pyx":4827
56987 * }
56988 *
56989 * def __dealloc__(self): # <<<<<<<<<<<<<<
56990 * rbd_trash_list_cleanup(self.entries, self.num_entries)
56991 * if self.entries:
56992 */
56993
56994 /* function exit code */
56995 __Pyx_RefNannyFinishContext();
56996}
56997
56998/* "rbd.pyx":4855
56999 * cdef object image
57000 *
57001 * def __init__(self, Image image, descendants=False): # <<<<<<<<<<<<<<
57002 * self.image = image
57003 * self.children = NULL
57004 */
57005
57006/* Python wrapper */
57007static int __pyx_pw_3rbd_13ChildIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
57008static int __pyx_pw_3rbd_13ChildIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
57009 struct __pyx_obj_3rbd_Image *__pyx_v_image = 0;
57010 PyObject *__pyx_v_descendants = 0;
57011 int __pyx_lineno = 0;
57012 const char *__pyx_filename = NULL((void*)0);
57013 int __pyx_clineno = 0;
57014 int __pyx_r;
57015 __Pyx_RefNannyDeclarations
57016 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
57017 {
57018 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,&__pyx_n_s_descendants,0};
57019 PyObject* values[2] = {0,0};
57020 values[1] = ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct));
57021 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
57022 Py_ssize_t kw_args;
57023 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
57024 switch (pos_args) {
57025 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
57026 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
57027 case 0: break;
57028 default: goto __pyx_L5_argtuple_error;
57029 }
57030 kw_args = PyDict_Size(__pyx_kwds);
57031 switch (pos_args) {
57032 case 0:
57033 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
57034 else goto __pyx_L5_argtuple_error;
57035 case 1:
57036 if (kw_args > 0) {
57037 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_descendants);
57038 if (value) { values[1] = value; kw_args--; }
57039 }
57040 }
57041 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
57042 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4855; __pyx_clineno = __LINE__57042; goto __pyx_L3_error;}
57043 }
57044 } else {
57045 switch (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)) {
57046 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1)(((PyTupleObject *)(__pyx_args))->ob_item[1]);
57047 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
57048 break;
57049 default: goto __pyx_L5_argtuple_error;
57050 }
57051 }
57052 __pyx_v_image = ((struct __pyx_obj_3rbd_Image *)values[0]);
57053 __pyx_v_descendants = values[1];
57054 }
57055 goto __pyx_L4_argument_unpacking_done;
57056 __pyx_L5_argtuple_error:;
57057 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4855; __pyx_clineno = __LINE__57057; goto __pyx_L3_error;}
57058 __pyx_L3_error:;
57059 __Pyx_AddTraceback("rbd.ChildIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57060 __Pyx_RefNannyFinishContext();
57061 return -1;
57062 __pyx_L4_argument_unpacking_done:;
57063 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3rbd_Image, 1, "image", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image
), __pyx_ptype_3rbd_Image, 1, "image", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4855; __pyx_clineno = __LINE__57063; goto __pyx_L1_error;}
57064 __pyx_r = __pyx_pf_3rbd_13ChildIterator___init__(((struct __pyx_obj_3rbd_ChildIterator *)__pyx_v_self), __pyx_v_image, __pyx_v_descendants);
57065
57066 /* function exit code */
57067 goto __pyx_L0;
57068 __pyx_L1_error:;
57069 __pyx_r = -1;
57070 __pyx_L0:;
57071 __Pyx_RefNannyFinishContext();
57072 return __pyx_r;
57073}
57074
57075static int __pyx_pf_3rbd_13ChildIterator___init__(struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image, PyObject *__pyx_v_descendants) {
57076 int __pyx_v_ret;
57077 int __pyx_r;
57078 __Pyx_RefNannyDeclarations
57079 void *__pyx_t_1;
57080 int __pyx_t_2;
57081 PyObject *__pyx_t_3 = NULL((void*)0);
57082 PyObject *__pyx_t_4 = NULL((void*)0);
57083 int __pyx_lineno = 0;
57084 const char *__pyx_filename = NULL((void*)0);
57085 int __pyx_clineno = 0;
57086 __Pyx_RefNannySetupContext("__init__", 0);
57087
57088 /* "rbd.pyx":4856
57089 *
57090 * def __init__(self, Image image, descendants=False):
57091 * self.image = image # <<<<<<<<<<<<<<
57092 * self.children = NULL
57093 * self.num_children = 10
57094 */
57095 __Pyx_INCREF(((PyObject *)__pyx_v_image))( ((PyObject*)(((PyObject *)__pyx_v_image)))->ob_refcnt++);
57096 __Pyx_GIVEREF(((PyObject *)__pyx_v_image));
57097 __Pyx_GOTREF(__pyx_v_self->image);
57098 __Pyx_DECREF(__pyx_v_self->image)do { if ( --((PyObject*)(__pyx_v_self->image))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
image)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->image)))); } while (0)
;
57099 __pyx_v_self->image = ((PyObject *)__pyx_v_image);
57100
57101 /* "rbd.pyx":4857
57102 * def __init__(self, Image image, descendants=False):
57103 * self.image = image
57104 * self.children = NULL # <<<<<<<<<<<<<<
57105 * self.num_children = 10
57106 * while True:
57107 */
57108 __pyx_v_self->children = NULL((void*)0);
57109
57110 /* "rbd.pyx":4858
57111 * self.image = image
57112 * self.children = NULL
57113 * self.num_children = 10 # <<<<<<<<<<<<<<
57114 * while True:
57115 * self.children = <rbd_linked_image_spec_t*>realloc_chk(
57116 */
57117 __pyx_v_self->num_children = 10;
57118
57119 /* "rbd.pyx":4859
57120 * self.children = NULL
57121 * self.num_children = 10
57122 * while True: # <<<<<<<<<<<<<<
57123 * self.children = <rbd_linked_image_spec_t*>realloc_chk(
57124 * self.children, self.num_children * sizeof(rbd_linked_image_spec_t))
57125 */
57126 while (1) {
57127
57128 /* "rbd.pyx":4860
57129 * self.num_children = 10
57130 * while True:
57131 * self.children = <rbd_linked_image_spec_t*>realloc_chk( # <<<<<<<<<<<<<<
57132 * self.children, self.num_children * sizeof(rbd_linked_image_spec_t))
57133 * if descendants:
57134 */
57135 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->children, (__pyx_v_self->num_children * (sizeof(rbd_linked_image_spec_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4860; __pyx_clineno = __LINE__57135; goto __pyx_L1_error;}
57136 __pyx_v_self->children = ((rbd_linked_image_spec_t *)__pyx_t_1);
57137
57138 /* "rbd.pyx":4862
57139 * self.children = <rbd_linked_image_spec_t*>realloc_chk(
57140 * self.children, self.num_children * sizeof(rbd_linked_image_spec_t))
57141 * if descendants: # <<<<<<<<<<<<<<
57142 * with nogil:
57143 * ret = rbd_list_descendants(image.image, self.children,
57144 */
57145 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_descendants); if (unlikely(__pyx_t_2 < 0)__builtin_expect(!!(__pyx_t_2 < 0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4862; __pyx_clineno = __LINE__57145; goto __pyx_L1_error;}
57146 if (__pyx_t_2) {
57147
57148 /* "rbd.pyx":4863
57149 * self.children, self.num_children * sizeof(rbd_linked_image_spec_t))
57150 * if descendants:
57151 * with nogil: # <<<<<<<<<<<<<<
57152 * ret = rbd_list_descendants(image.image, self.children,
57153 * &self.num_children)
57154 */
57155 {
57156 #ifdef WITH_THREAD1
57157 PyThreadState *_save;
57158 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
57159 #endif
57160 /*try:*/ {
57161
57162 /* "rbd.pyx":4864
57163 * if descendants:
57164 * with nogil:
57165 * ret = rbd_list_descendants(image.image, self.children, # <<<<<<<<<<<<<<
57166 * &self.num_children)
57167 * else:
57168 */
57169 __pyx_v_ret = rbd_list_descendants(__pyx_v_image->image, __pyx_v_self->children, (&__pyx_v_self->num_children));
57170 }
57171
57172 /* "rbd.pyx":4863
57173 * self.children, self.num_children * sizeof(rbd_linked_image_spec_t))
57174 * if descendants:
57175 * with nogil: # <<<<<<<<<<<<<<
57176 * ret = rbd_list_descendants(image.image, self.children,
57177 * &self.num_children)
57178 */
57179 /*finally:*/ {
57180 /*normal exit:*/{
57181 #ifdef WITH_THREAD1
57182 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
57183 #endif
57184 goto __pyx_L10;
57185 }
57186 __pyx_L10:;
57187 }
57188 }
57189
57190 /* "rbd.pyx":4862
57191 * self.children = <rbd_linked_image_spec_t*>realloc_chk(
57192 * self.children, self.num_children * sizeof(rbd_linked_image_spec_t))
57193 * if descendants: # <<<<<<<<<<<<<<
57194 * with nogil:
57195 * ret = rbd_list_descendants(image.image, self.children,
57196 */
57197 goto __pyx_L5;
57198 }
57199
57200 /* "rbd.pyx":4867
57201 * &self.num_children)
57202 * else:
57203 * with nogil: # <<<<<<<<<<<<<<
57204 * ret = rbd_list_children3(image.image, self.children,
57205 * &self.num_children)
57206 */
57207 /*else*/ {
57208 {
57209 #ifdef WITH_THREAD1
57210 PyThreadState *_save;
57211 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
57212 #endif
57213 /*try:*/ {
57214
57215 /* "rbd.pyx":4868
57216 * else:
57217 * with nogil:
57218 * ret = rbd_list_children3(image.image, self.children, # <<<<<<<<<<<<<<
57219 * &self.num_children)
57220 * if ret >= 0:
57221 */
57222 __pyx_v_ret = rbd_list_children3(__pyx_v_image->image, __pyx_v_self->children, (&__pyx_v_self->num_children));
57223 }
57224
57225 /* "rbd.pyx":4867
57226 * &self.num_children)
57227 * else:
57228 * with nogil: # <<<<<<<<<<<<<<
57229 * ret = rbd_list_children3(image.image, self.children,
57230 * &self.num_children)
57231 */
57232 /*finally:*/ {
57233 /*normal exit:*/{
57234 #ifdef WITH_THREAD1
57235 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
57236 #endif
57237 goto __pyx_L15;
57238 }
57239 __pyx_L15:;
57240 }
57241 }
57242 }
57243 __pyx_L5:;
57244
57245 /* "rbd.pyx":4870
57246 * ret = rbd_list_children3(image.image, self.children,
57247 * &self.num_children)
57248 * if ret >= 0: # <<<<<<<<<<<<<<
57249 * break
57250 * elif ret != -errno.ERANGE:
57251 */
57252 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
57253 if (__pyx_t_2) {
57254
57255 /* "rbd.pyx":4871
57256 * &self.num_children)
57257 * if ret >= 0:
57258 * break # <<<<<<<<<<<<<<
57259 * elif ret != -errno.ERANGE:
57260 * raise make_ex(ret, 'error listing children.')
57261 */
57262 goto __pyx_L4_break;
57263
57264 /* "rbd.pyx":4870
57265 * ret = rbd_list_children3(image.image, self.children,
57266 * &self.num_children)
57267 * if ret >= 0: # <<<<<<<<<<<<<<
57268 * break
57269 * elif ret != -errno.ERANGE:
57270 */
57271 }
57272
57273 /* "rbd.pyx":4872
57274 * if ret >= 0:
57275 * break
57276 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
57277 * raise make_ex(ret, 'error listing children.')
57278 *
57279 */
57280 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
57281 if (__pyx_t_2) {
57282
57283 /* "rbd.pyx":4873
57284 * break
57285 * elif ret != -errno.ERANGE:
57286 * raise make_ex(ret, 'error listing children.') # <<<<<<<<<<<<<<
57287 *
57288 * def __iter__(self):
57289 */
57290 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__57290; goto __pyx_L1_error;}
57291 __Pyx_GOTREF(__pyx_t_3);
57292 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_listing_children, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__57292; goto __pyx_L1_error;}
57293 __Pyx_GOTREF(__pyx_t_4);
57294 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
57295 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
57296 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57297 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__57297; goto __pyx_L1_error;}
57298
57299 /* "rbd.pyx":4872
57300 * if ret >= 0:
57301 * break
57302 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
57303 * raise make_ex(ret, 'error listing children.')
57304 *
57305 */
57306 }
57307 }
57308 __pyx_L4_break:;
57309
57310 /* "rbd.pyx":4855
57311 * cdef object image
57312 *
57313 * def __init__(self, Image image, descendants=False): # <<<<<<<<<<<<<<
57314 * self.image = image
57315 * self.children = NULL
57316 */
57317
57318 /* function exit code */
57319 __pyx_r = 0;
57320 goto __pyx_L0;
57321 __pyx_L1_error:;
57322 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
57323 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
57324 __Pyx_AddTraceback("rbd.ChildIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57325 __pyx_r = -1;
57326 __pyx_L0:;
57327 __Pyx_RefNannyFinishContext();
57328 return __pyx_r;
57329}
57330static PyObject *__pyx_gb_3rbd_13ChildIterator_4generator10(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
57331
57332/* "rbd.pyx":4875
57333 * raise make_ex(ret, 'error listing children.')
57334 *
57335 * def __iter__(self): # <<<<<<<<<<<<<<
57336 * for i in range(self.num_children):
57337 * yield {
57338 */
57339
57340/* Python wrapper */
57341static PyObject *__pyx_pw_3rbd_13ChildIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
57342static PyObject *__pyx_pw_3rbd_13ChildIterator_3__iter__(PyObject *__pyx_v_self) {
57343 PyObject *__pyx_r = 0;
57344 __Pyx_RefNannyDeclarations
57345 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
57346 __pyx_r = __pyx_pf_3rbd_13ChildIterator_2__iter__(((struct __pyx_obj_3rbd_ChildIterator *)__pyx_v_self));
57347
57348 /* function exit code */
57349 __Pyx_RefNannyFinishContext();
57350 return __pyx_r;
57351}
57352
57353static PyObject *__pyx_pf_3rbd_13ChildIterator_2__iter__(struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self) {
57354 struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *__pyx_cur_scope;
57355 PyObject *__pyx_r = NULL((void*)0);
57356 __Pyx_RefNannyDeclarations
57357 int __pyx_lineno = 0;
57358 const char *__pyx_filename = NULL((void*)0);
57359 int __pyx_clineno = 0;
57360 __Pyx_RefNannySetupContext("__iter__", 0);
57361 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_11___iter__(__pyx_ptype_3rbd___pyx_scope_struct_11___iter__, __pyx_empty_tuple, NULL((void*)0));
57362 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
57363 __Pyx_RefNannyFinishContext();
57364 return NULL((void*)0);
57365 }
57366 __Pyx_GOTREF(__pyx_cur_scope);
57367 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
57368 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
57369 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
57370 {
57371 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_13ChildIterator_4generator10, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ChildIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_13ChildIterator_4generator10, (PyObject *) __pyx_cur_scope
, __pyx_n_s_iter, __pyx_n_s_ChildIterator___iter)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4875; __pyx_clineno = __LINE__57371; goto __pyx_L1_error;}
57372 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
57373 __Pyx_RefNannyFinishContext();
57374 return (PyObject *) gen;
57375 }
57376
57377 /* function exit code */
57378 __pyx_L1_error:;
57379 __Pyx_AddTraceback("rbd.ChildIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57380 __pyx_r = NULL((void*)0);
57381 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
57382 __Pyx_XGIVEREF(__pyx_r);
57383 __Pyx_RefNannyFinishContext();
57384 return __pyx_r;
57385}
57386
57387static PyObject *__pyx_gb_3rbd_13ChildIterator_4generator10(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
57388{
57389 struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *)__pyx_generator->closure);
57390 PyObject *__pyx_r = NULL((void*)0);
57391 size_t __pyx_t_1;
57392 size_t __pyx_t_2;
57393 PyObject *__pyx_t_3 = NULL((void*)0);
57394 PyObject *__pyx_t_4 = NULL((void*)0);
57395 PyObject *__pyx_t_5 = NULL((void*)0);
57396 PyObject *__pyx_t_6 = NULL((void*)0);
57397 PyObject *__pyx_t_7 = NULL((void*)0);
57398 PyObject *__pyx_t_8 = NULL((void*)0);
57399 int __pyx_lineno = 0;
57400 const char *__pyx_filename = NULL((void*)0);
57401 int __pyx_clineno = 0;
57402 __Pyx_RefNannyDeclarations
57403 __Pyx_RefNannySetupContext("None", 0);
57404 switch (__pyx_generator->resume_label) {
57405 case 0: goto __pyx_L3_first_run;
57406 case 1: goto __pyx_L6_resume_from_yield;
57407 default: /* CPython raises the right error here */
57408 __Pyx_RefNannyFinishContext();
57409 return NULL((void*)0);
57410 }
57411 __pyx_L3_first_run:;
57412 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4875; __pyx_clineno = __LINE__57412; goto __pyx_L1_error;}
57413
57414 /* "rbd.pyx":4876
57415 *
57416 * def __iter__(self):
57417 * for i in range(self.num_children): # <<<<<<<<<<<<<<
57418 * yield {
57419 * 'pool' : decode_cstr(self.children[i].pool_name),
57420 */
57421 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_children;
57422 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
57423 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
57424
57425 /* "rbd.pyx":4878
57426 * for i in range(self.num_children):
57427 * yield {
57428 * 'pool' : decode_cstr(self.children[i].pool_name), # <<<<<<<<<<<<<<
57429 * 'pool_namespace' : decode_cstr(self.children[i].pool_namespace),
57430 * 'image' : decode_cstr(self.children[i].image_name),
57431 */
57432 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57432; goto __pyx_L1_error;}
57433 __Pyx_GOTREF(__pyx_t_3);
57434 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57434; goto __pyx_L1_error;}
57435 __Pyx_GOTREF(__pyx_t_5);
57436 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->children[__pyx_cur_scope->__pyx_v_i]).pool_name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57436; goto __pyx_L1_error;}
57437 __Pyx_GOTREF(__pyx_t_6);
57438 __pyx_t_7 = NULL((void*)0);
57439 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
57440 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
57441 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
57442 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
57443 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
57444 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
57445 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
57446 }
57447 }
57448 if (!__pyx_t_7) {
57449 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57449; goto __pyx_L1_error;}
57450 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
57451 __Pyx_GOTREF(__pyx_t_4);
57452 } else {
57453 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57453; goto __pyx_L1_error;}
57454 __Pyx_GOTREF(__pyx_t_8);
57455 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
57456 __Pyx_GIVEREF(__pyx_t_6);
57457 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
57458 __pyx_t_6 = 0;
57459 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57459; goto __pyx_L1_error;}
57460 __Pyx_GOTREF(__pyx_t_4);
57461 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
57462 }
57463 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
57464 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57464; goto __pyx_L1_error;}
57465 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57466
57467 /* "rbd.pyx":4879
57468 * yield {
57469 * 'pool' : decode_cstr(self.children[i].pool_name),
57470 * 'pool_namespace' : decode_cstr(self.children[i].pool_namespace), # <<<<<<<<<<<<<<
57471 * 'image' : decode_cstr(self.children[i].image_name),
57472 * 'id' : decode_cstr(self.children[i].image_id),
57473 */
57474 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__57474; goto __pyx_L1_error;}
57475 __Pyx_GOTREF(__pyx_t_5);
57476 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->children[__pyx_cur_scope->__pyx_v_i]).pool_namespace); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__57476; goto __pyx_L1_error;}
57477 __Pyx_GOTREF(__pyx_t_8);
57478 __pyx_t_6 = NULL((void*)0);
57479 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
57480 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
57481 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
57482 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
57483 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
57484 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
57485 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
57486 }
57487 }
57488 if (!__pyx_t_6) {
57489 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__57489; goto __pyx_L1_error;}
57490 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
57491 __Pyx_GOTREF(__pyx_t_4);
57492 } else {
57493 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__57493; goto __pyx_L1_error;}
57494 __Pyx_GOTREF(__pyx_t_7);
57495 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
57496 __Pyx_GIVEREF(__pyx_t_8);
57497 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
57498 __pyx_t_8 = 0;
57499 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__57499; goto __pyx_L1_error;}
57500 __Pyx_GOTREF(__pyx_t_4);
57501 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
57502 }
57503 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
57504 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pool_namespace, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57504; goto __pyx_L1_error;}
57505 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57506
57507 /* "rbd.pyx":4880
57508 * 'pool' : decode_cstr(self.children[i].pool_name),
57509 * 'pool_namespace' : decode_cstr(self.children[i].pool_namespace),
57510 * 'image' : decode_cstr(self.children[i].image_name), # <<<<<<<<<<<<<<
57511 * 'id' : decode_cstr(self.children[i].image_id),
57512 * 'trash' : self.children[i].trash
57513 */
57514 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4880; __pyx_clineno = __LINE__57514; goto __pyx_L1_error;}
57515 __Pyx_GOTREF(__pyx_t_5);
57516 __pyx_t_7 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->children[__pyx_cur_scope->__pyx_v_i]).image_name); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4880; __pyx_clineno = __LINE__57516; goto __pyx_L1_error;}
57517 __Pyx_GOTREF(__pyx_t_7);
57518 __pyx_t_8 = NULL((void*)0);
57519 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
57520 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
57521 if (likely(__pyx_t_8)__builtin_expect(!!(__pyx_t_8), 1)) {
57522 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
57523 __Pyx_INCREF(__pyx_t_8)( ((PyObject*)(__pyx_t_8))->ob_refcnt++);
57524 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
57525 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
57526 }
57527 }
57528 if (!__pyx_t_8) {
57529 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4880; __pyx_clineno = __LINE__57529; goto __pyx_L1_error;}
57530 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
57531 __Pyx_GOTREF(__pyx_t_4);
57532 } else {
57533 __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4880; __pyx_clineno = __LINE__57533; goto __pyx_L1_error;}
57534 __Pyx_GOTREF(__pyx_t_6);
57535 __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8)(((PyTupleObject *)(__pyx_t_6))->ob_item[0] = __pyx_t_8); __pyx_t_8 = NULL((void*)0);
57536 __Pyx_GIVEREF(__pyx_t_7);
57537 PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7)(((PyTupleObject *)(__pyx_t_6))->ob_item[0+1] = __pyx_t_7);
57538 __pyx_t_7 = 0;
57539 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4880; __pyx_clineno = __LINE__57539; goto __pyx_L1_error;}
57540 __Pyx_GOTREF(__pyx_t_4);
57541 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
57542 }
57543 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
57544 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_image, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57544; goto __pyx_L1_error;}
57545 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57546
57547 /* "rbd.pyx":4881
57548 * 'pool_namespace' : decode_cstr(self.children[i].pool_namespace),
57549 * 'image' : decode_cstr(self.children[i].image_name),
57550 * 'id' : decode_cstr(self.children[i].image_id), # <<<<<<<<<<<<<<
57551 * 'trash' : self.children[i].trash
57552 * }
57553 */
57554 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__57554; goto __pyx_L1_error;}
57555 __Pyx_GOTREF(__pyx_t_5);
57556 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->children[__pyx_cur_scope->__pyx_v_i]).image_id); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__57556; goto __pyx_L1_error;}
57557 __Pyx_GOTREF(__pyx_t_6);
57558 __pyx_t_7 = NULL((void*)0);
57559 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
57560 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
57561 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
57562 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
57563 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
57564 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
57565 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
57566 }
57567 }
57568 if (!__pyx_t_7) {
57569 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__57569; goto __pyx_L1_error;}
57570 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
57571 __Pyx_GOTREF(__pyx_t_4);
57572 } else {
57573 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__57573; goto __pyx_L1_error;}
57574 __Pyx_GOTREF(__pyx_t_8);
57575 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
57576 __Pyx_GIVEREF(__pyx_t_6);
57577 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
57578 __pyx_t_6 = 0;
57579 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__57579; goto __pyx_L1_error;}
57580 __Pyx_GOTREF(__pyx_t_4);
57581 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
57582 }
57583 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
57584 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_id, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57584; goto __pyx_L1_error;}
57585 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57586
57587 /* "rbd.pyx":4882
57588 * 'image' : decode_cstr(self.children[i].image_name),
57589 * 'id' : decode_cstr(self.children[i].image_id),
57590 * 'trash' : self.children[i].trash # <<<<<<<<<<<<<<
57591 * }
57592 *
57593 */
57594 __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_cur_scope->__pyx_v_self->children[__pyx_cur_scope->__pyx_v_i]).trash)(((__pyx_cur_scope->__pyx_v_self->children[__pyx_cur_scope
->__pyx_v_i]).trash) ? (( ((PyObject*)(((PyObject *) &
_Py_TrueStruct)))->ob_refcnt++), ((PyObject *) &_Py_TrueStruct
)) : (( ((PyObject*)(((PyObject *) &_Py_ZeroStruct)))->
ob_refcnt++), ((PyObject *) &_Py_ZeroStruct)))
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4882; __pyx_clineno = __LINE__57594; goto __pyx_L1_error;}
57595 __Pyx_GOTREF(__pyx_t_4);
57596 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_trash, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4878; __pyx_clineno = __LINE__57596; goto __pyx_L1_error;}
57597 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57598 __pyx_r = __pyx_t_3;
57599 __pyx_t_3 = 0;
57600 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
57601 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
57602 __Pyx_XGIVEREF(__pyx_r);
57603 __Pyx_RefNannyFinishContext();
57604 /* return from generator, yielding value */
57605 __pyx_generator->resume_label = 1;
57606 return __pyx_r;
57607 __pyx_L6_resume_from_yield:;
57608 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
57609 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
57610 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4877; __pyx_clineno = __LINE__57610; goto __pyx_L1_error;}
57611 }
57612
57613 /* "rbd.pyx":4875
57614 * raise make_ex(ret, 'error listing children.')
57615 *
57616 * def __iter__(self): # <<<<<<<<<<<<<<
57617 * for i in range(self.num_children):
57618 * yield {
57619 */
57620
57621 /* function exit code */
57622 PyErr_SetNone(PyExc_StopIteration);
57623 goto __pyx_L0;
57624 __pyx_L1_error:;
57625 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
57626 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
57627 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
57628 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
57629 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
57630 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
57631 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57632 __pyx_L0:;
57633 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
57634 __pyx_generator->resume_label = -1;
57635 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
57636 __Pyx_RefNannyFinishContext();
57637 return __pyx_r;
57638}
57639
57640/* "rbd.pyx":4885
57641 * }
57642 *
57643 * def __dealloc__(self): # <<<<<<<<<<<<<<
57644 * if self.children:
57645 * rbd_linked_image_spec_list_cleanup(self.children, self.num_children)
57646 */
57647
57648/* Python wrapper */
57649static void __pyx_pw_3rbd_13ChildIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
57650static void __pyx_pw_3rbd_13ChildIterator_6__dealloc__(PyObject *__pyx_v_self) {
57651 __Pyx_RefNannyDeclarations
57652 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
57653 __pyx_pf_3rbd_13ChildIterator_5__dealloc__(((struct __pyx_obj_3rbd_ChildIterator *)__pyx_v_self));
57654
57655 /* function exit code */
57656 __Pyx_RefNannyFinishContext();
57657}
57658
57659static void __pyx_pf_3rbd_13ChildIterator_5__dealloc__(struct __pyx_obj_3rbd_ChildIterator *__pyx_v_self) {
57660 __Pyx_RefNannyDeclarations
57661 int __pyx_t_1;
57662 __Pyx_RefNannySetupContext("__dealloc__", 0);
57663
57664 /* "rbd.pyx":4886
57665 *
57666 * def __dealloc__(self):
57667 * if self.children: # <<<<<<<<<<<<<<
57668 * rbd_linked_image_spec_list_cleanup(self.children, self.num_children)
57669 * free(self.children)
57670 */
57671 __pyx_t_1 = (__pyx_v_self->children != 0);
57672 if (__pyx_t_1) {
57673
57674 /* "rbd.pyx":4887
57675 * def __dealloc__(self):
57676 * if self.children:
57677 * rbd_linked_image_spec_list_cleanup(self.children, self.num_children) # <<<<<<<<<<<<<<
57678 * free(self.children)
57679 *
57680 */
57681 rbd_linked_image_spec_list_cleanup(__pyx_v_self->children, __pyx_v_self->num_children);
57682
57683 /* "rbd.pyx":4888
57684 * if self.children:
57685 * rbd_linked_image_spec_list_cleanup(self.children, self.num_children)
57686 * free(self.children) # <<<<<<<<<<<<<<
57687 *
57688 * cdef class WatcherIterator(object):
57689 */
57690 free(__pyx_v_self->children);
57691
57692 /* "rbd.pyx":4886
57693 *
57694 * def __dealloc__(self):
57695 * if self.children: # <<<<<<<<<<<<<<
57696 * rbd_linked_image_spec_list_cleanup(self.children, self.num_children)
57697 * free(self.children)
57698 */
57699 }
57700
57701 /* "rbd.pyx":4885
57702 * }
57703 *
57704 * def __dealloc__(self): # <<<<<<<<<<<<<<
57705 * if self.children:
57706 * rbd_linked_image_spec_list_cleanup(self.children, self.num_children)
57707 */
57708
57709 /* function exit code */
57710 __Pyx_RefNannyFinishContext();
57711}
57712
57713/* "rbd.pyx":4909
57714 * cdef object image
57715 *
57716 * def __init__(self, Image image): # <<<<<<<<<<<<<<
57717 * self.image = image
57718 * self.watchers = NULL
57719 */
57720
57721/* Python wrapper */
57722static int __pyx_pw_3rbd_15WatcherIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
57723static int __pyx_pw_3rbd_15WatcherIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
57724 struct __pyx_obj_3rbd_Image *__pyx_v_image = 0;
57725 int __pyx_lineno = 0;
57726 const char *__pyx_filename = NULL((void*)0);
57727 int __pyx_clineno = 0;
57728 int __pyx_r;
57729 __Pyx_RefNannyDeclarations
57730 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
57731 {
57732 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,0};
57733 PyObject* values[1] = {0};
57734 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
57735 Py_ssize_t kw_args;
57736 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
57737 switch (pos_args) {
57738 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
57739 case 0: break;
57740 default: goto __pyx_L5_argtuple_error;
57741 }
57742 kw_args = PyDict_Size(__pyx_kwds);
57743 switch (pos_args) {
57744 case 0:
57745 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
57746 else goto __pyx_L5_argtuple_error;
57747 }
57748 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
57749 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4909; __pyx_clineno = __LINE__57749; goto __pyx_L3_error;}
57750 }
57751 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
57752 goto __pyx_L5_argtuple_error;
57753 } else {
57754 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
57755 }
57756 __pyx_v_image = ((struct __pyx_obj_3rbd_Image *)values[0]);
57757 }
57758 goto __pyx_L4_argument_unpacking_done;
57759 __pyx_L5_argtuple_error:;
57760 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4909; __pyx_clineno = __LINE__57760; goto __pyx_L3_error;}
57761 __pyx_L3_error:;
57762 __Pyx_AddTraceback("rbd.WatcherIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57763 __Pyx_RefNannyFinishContext();
57764 return -1;
57765 __pyx_L4_argument_unpacking_done:;
57766 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3rbd_Image, 1, "image", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image
), __pyx_ptype_3rbd_Image, 1, "image", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4909; __pyx_clineno = __LINE__57766; goto __pyx_L1_error;}
57767 __pyx_r = __pyx_pf_3rbd_15WatcherIterator___init__(((struct __pyx_obj_3rbd_WatcherIterator *)__pyx_v_self), __pyx_v_image);
57768
57769 /* function exit code */
57770 goto __pyx_L0;
57771 __pyx_L1_error:;
57772 __pyx_r = -1;
57773 __pyx_L0:;
57774 __Pyx_RefNannyFinishContext();
57775 return __pyx_r;
57776}
57777
57778static int __pyx_pf_3rbd_15WatcherIterator___init__(struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image) {
57779 int __pyx_v_ret;
57780 int __pyx_r;
57781 __Pyx_RefNannyDeclarations
57782 void *__pyx_t_1;
57783 int __pyx_t_2;
57784 PyObject *__pyx_t_3 = NULL((void*)0);
57785 PyObject *__pyx_t_4 = NULL((void*)0);
57786 int __pyx_lineno = 0;
57787 const char *__pyx_filename = NULL((void*)0);
57788 int __pyx_clineno = 0;
57789 __Pyx_RefNannySetupContext("__init__", 0);
57790
57791 /* "rbd.pyx":4910
57792 *
57793 * def __init__(self, Image image):
57794 * self.image = image # <<<<<<<<<<<<<<
57795 * self.watchers = NULL
57796 * self.num_watchers = 10
57797 */
57798 __Pyx_INCREF(((PyObject *)__pyx_v_image))( ((PyObject*)(((PyObject *)__pyx_v_image)))->ob_refcnt++);
57799 __Pyx_GIVEREF(((PyObject *)__pyx_v_image));
57800 __Pyx_GOTREF(__pyx_v_self->image);
57801 __Pyx_DECREF(__pyx_v_self->image)do { if ( --((PyObject*)(__pyx_v_self->image))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
image)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->image)))); } while (0)
;
57802 __pyx_v_self->image = ((PyObject *)__pyx_v_image);
57803
57804 /* "rbd.pyx":4911
57805 * def __init__(self, Image image):
57806 * self.image = image
57807 * self.watchers = NULL # <<<<<<<<<<<<<<
57808 * self.num_watchers = 10
57809 * while True:
57810 */
57811 __pyx_v_self->watchers = NULL((void*)0);
57812
57813 /* "rbd.pyx":4912
57814 * self.image = image
57815 * self.watchers = NULL
57816 * self.num_watchers = 10 # <<<<<<<<<<<<<<
57817 * while True:
57818 * self.watchers = <rbd_image_watcher_t*>realloc_chk(self.watchers,
57819 */
57820 __pyx_v_self->num_watchers = 10;
57821
57822 /* "rbd.pyx":4913
57823 * self.watchers = NULL
57824 * self.num_watchers = 10
57825 * while True: # <<<<<<<<<<<<<<
57826 * self.watchers = <rbd_image_watcher_t*>realloc_chk(self.watchers,
57827 * self.num_watchers *
57828 */
57829 while (1) {
57830
57831 /* "rbd.pyx":4914
57832 * self.num_watchers = 10
57833 * while True:
57834 * self.watchers = <rbd_image_watcher_t*>realloc_chk(self.watchers, # <<<<<<<<<<<<<<
57835 * self.num_watchers *
57836 * sizeof(rbd_image_watcher_t))
57837 */
57838 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->watchers, (__pyx_v_self->num_watchers * (sizeof(rbd_image_watcher_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4914; __pyx_clineno = __LINE__57838; goto __pyx_L1_error;}
57839 __pyx_v_self->watchers = ((rbd_image_watcher_t *)__pyx_t_1);
57840
57841 /* "rbd.pyx":4917
57842 * self.num_watchers *
57843 * sizeof(rbd_image_watcher_t))
57844 * with nogil: # <<<<<<<<<<<<<<
57845 * ret = rbd_watchers_list(image.image, self.watchers, &self.num_watchers)
57846 * if ret >= 0:
57847 */
57848 {
57849 #ifdef WITH_THREAD1
57850 PyThreadState *_save;
57851 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
57852 #endif
57853 /*try:*/ {
57854
57855 /* "rbd.pyx":4918
57856 * sizeof(rbd_image_watcher_t))
57857 * with nogil:
57858 * ret = rbd_watchers_list(image.image, self.watchers, &self.num_watchers) # <<<<<<<<<<<<<<
57859 * if ret >= 0:
57860 * break
57861 */
57862 __pyx_v_ret = rbd_watchers_list(__pyx_v_image->image, __pyx_v_self->watchers, (&__pyx_v_self->num_watchers));
57863 }
57864
57865 /* "rbd.pyx":4917
57866 * self.num_watchers *
57867 * sizeof(rbd_image_watcher_t))
57868 * with nogil: # <<<<<<<<<<<<<<
57869 * ret = rbd_watchers_list(image.image, self.watchers, &self.num_watchers)
57870 * if ret >= 0:
57871 */
57872 /*finally:*/ {
57873 /*normal exit:*/{
57874 #ifdef WITH_THREAD1
57875 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
57876 #endif
57877 goto __pyx_L9;
57878 }
57879 __pyx_L9:;
57880 }
57881 }
57882
57883 /* "rbd.pyx":4919
57884 * with nogil:
57885 * ret = rbd_watchers_list(image.image, self.watchers, &self.num_watchers)
57886 * if ret >= 0: # <<<<<<<<<<<<<<
57887 * break
57888 * elif ret != -errno.ERANGE:
57889 */
57890 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
57891 if (__pyx_t_2) {
57892
57893 /* "rbd.pyx":4920
57894 * ret = rbd_watchers_list(image.image, self.watchers, &self.num_watchers)
57895 * if ret >= 0:
57896 * break # <<<<<<<<<<<<<<
57897 * elif ret != -errno.ERANGE:
57898 * raise make_ex(ret, 'error listing watchers.')
57899 */
57900 goto __pyx_L4_break;
57901
57902 /* "rbd.pyx":4919
57903 * with nogil:
57904 * ret = rbd_watchers_list(image.image, self.watchers, &self.num_watchers)
57905 * if ret >= 0: # <<<<<<<<<<<<<<
57906 * break
57907 * elif ret != -errno.ERANGE:
57908 */
57909 }
57910
57911 /* "rbd.pyx":4921
57912 * if ret >= 0:
57913 * break
57914 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
57915 * raise make_ex(ret, 'error listing watchers.')
57916 *
57917 */
57918 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
57919 if (__pyx_t_2) {
57920
57921 /* "rbd.pyx":4922
57922 * break
57923 * elif ret != -errno.ERANGE:
57924 * raise make_ex(ret, 'error listing watchers.') # <<<<<<<<<<<<<<
57925 *
57926 * def __iter__(self):
57927 */
57928 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4922; __pyx_clineno = __LINE__57928; goto __pyx_L1_error;}
57929 __Pyx_GOTREF(__pyx_t_3);
57930 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_listing_watchers, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4922; __pyx_clineno = __LINE__57930; goto __pyx_L1_error;}
57931 __Pyx_GOTREF(__pyx_t_4);
57932 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
57933 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
57934 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
57935 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4922; __pyx_clineno = __LINE__57935; goto __pyx_L1_error;}
57936
57937 /* "rbd.pyx":4921
57938 * if ret >= 0:
57939 * break
57940 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
57941 * raise make_ex(ret, 'error listing watchers.')
57942 *
57943 */
57944 }
57945 }
57946 __pyx_L4_break:;
57947
57948 /* "rbd.pyx":4909
57949 * cdef object image
57950 *
57951 * def __init__(self, Image image): # <<<<<<<<<<<<<<
57952 * self.image = image
57953 * self.watchers = NULL
57954 */
57955
57956 /* function exit code */
57957 __pyx_r = 0;
57958 goto __pyx_L0;
57959 __pyx_L1_error:;
57960 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
57961 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
57962 __Pyx_AddTraceback("rbd.WatcherIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57963 __pyx_r = -1;
57964 __pyx_L0:;
57965 __Pyx_RefNannyFinishContext();
57966 return __pyx_r;
57967}
57968static PyObject *__pyx_gb_3rbd_15WatcherIterator_4generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
57969
57970/* "rbd.pyx":4924
57971 * raise make_ex(ret, 'error listing watchers.')
57972 *
57973 * def __iter__(self): # <<<<<<<<<<<<<<
57974 * for i in range(self.num_watchers):
57975 * yield {
57976 */
57977
57978/* Python wrapper */
57979static PyObject *__pyx_pw_3rbd_15WatcherIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
57980static PyObject *__pyx_pw_3rbd_15WatcherIterator_3__iter__(PyObject *__pyx_v_self) {
57981 PyObject *__pyx_r = 0;
57982 __Pyx_RefNannyDeclarations
57983 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
57984 __pyx_r = __pyx_pf_3rbd_15WatcherIterator_2__iter__(((struct __pyx_obj_3rbd_WatcherIterator *)__pyx_v_self));
57985
57986 /* function exit code */
57987 __Pyx_RefNannyFinishContext();
57988 return __pyx_r;
57989}
57990
57991static PyObject *__pyx_pf_3rbd_15WatcherIterator_2__iter__(struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self) {
57992 struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *__pyx_cur_scope;
57993 PyObject *__pyx_r = NULL((void*)0);
57994 __Pyx_RefNannyDeclarations
57995 int __pyx_lineno = 0;
57996 const char *__pyx_filename = NULL((void*)0);
57997 int __pyx_clineno = 0;
57998 __Pyx_RefNannySetupContext("__iter__", 0);
57999 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_12___iter__(__pyx_ptype_3rbd___pyx_scope_struct_12___iter__, __pyx_empty_tuple, NULL((void*)0));
58000 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
58001 __Pyx_RefNannyFinishContext();
58002 return NULL((void*)0);
58003 }
58004 __Pyx_GOTREF(__pyx_cur_scope);
58005 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
58006 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
58007 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
58008 {
58009 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_15WatcherIterator_4generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_WatcherIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_15WatcherIterator_4generator11, (PyObject *) __pyx_cur_scope
, __pyx_n_s_iter, __pyx_n_s_WatcherIterator___iter)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4924; __pyx_clineno = __LINE__58009; goto __pyx_L1_error;}
58010 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
58011 __Pyx_RefNannyFinishContext();
58012 return (PyObject *) gen;
58013 }
58014
58015 /* function exit code */
58016 __pyx_L1_error:;
58017 __Pyx_AddTraceback("rbd.WatcherIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58018 __pyx_r = NULL((void*)0);
58019 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
58020 __Pyx_XGIVEREF(__pyx_r);
58021 __Pyx_RefNannyFinishContext();
58022 return __pyx_r;
58023}
58024
58025static PyObject *__pyx_gb_3rbd_15WatcherIterator_4generator11(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
58026{
58027 struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *)__pyx_generator->closure);
58028 PyObject *__pyx_r = NULL((void*)0);
58029 size_t __pyx_t_1;
58030 size_t __pyx_t_2;
58031 PyObject *__pyx_t_3 = NULL((void*)0);
58032 PyObject *__pyx_t_4 = NULL((void*)0);
58033 PyObject *__pyx_t_5 = NULL((void*)0);
58034 PyObject *__pyx_t_6 = NULL((void*)0);
58035 PyObject *__pyx_t_7 = NULL((void*)0);
58036 PyObject *__pyx_t_8 = NULL((void*)0);
58037 int __pyx_lineno = 0;
58038 const char *__pyx_filename = NULL((void*)0);
58039 int __pyx_clineno = 0;
58040 __Pyx_RefNannyDeclarations
58041 __Pyx_RefNannySetupContext("None", 0);
58042 switch (__pyx_generator->resume_label) {
58043 case 0: goto __pyx_L3_first_run;
58044 case 1: goto __pyx_L6_resume_from_yield;
58045 default: /* CPython raises the right error here */
58046 __Pyx_RefNannyFinishContext();
58047 return NULL((void*)0);
58048 }
58049 __pyx_L3_first_run:;
58050 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4924; __pyx_clineno = __LINE__58050; goto __pyx_L1_error;}
58051
58052 /* "rbd.pyx":4925
58053 *
58054 * def __iter__(self):
58055 * for i in range(self.num_watchers): # <<<<<<<<<<<<<<
58056 * yield {
58057 * 'addr' : decode_cstr(self.watchers[i].addr),
58058 */
58059 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_watchers;
58060 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
58061 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
58062
58063 /* "rbd.pyx":4927
58064 * for i in range(self.num_watchers):
58065 * yield {
58066 * 'addr' : decode_cstr(self.watchers[i].addr), # <<<<<<<<<<<<<<
58067 * 'id' : self.watchers[i].id,
58068 * 'cookie' : self.watchers[i].cookie
58069 */
58070 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58070; goto __pyx_L1_error;}
58071 __Pyx_GOTREF(__pyx_t_3);
58072 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58072; goto __pyx_L1_error;}
58073 __Pyx_GOTREF(__pyx_t_5);
58074 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->watchers[__pyx_cur_scope->__pyx_v_i]).addr); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58074; goto __pyx_L1_error;}
58075 __Pyx_GOTREF(__pyx_t_6);
58076 __pyx_t_7 = NULL((void*)0);
58077 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
58078 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
58079 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
58080 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
58081 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
58082 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
58083 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
58084 }
58085 }
58086 if (!__pyx_t_7) {
58087 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58087; goto __pyx_L1_error;}
58088 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
58089 __Pyx_GOTREF(__pyx_t_4);
58090 } else {
58091 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58091; goto __pyx_L1_error;}
58092 __Pyx_GOTREF(__pyx_t_8);
58093 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
58094 __Pyx_GIVEREF(__pyx_t_6);
58095 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
58096 __pyx_t_6 = 0;
58097 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58097; goto __pyx_L1_error;}
58098 __Pyx_GOTREF(__pyx_t_4);
58099 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
58100 }
58101 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
58102 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_addr, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58102; goto __pyx_L1_error;}
58103 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58104
58105 /* "rbd.pyx":4928
58106 * yield {
58107 * 'addr' : decode_cstr(self.watchers[i].addr),
58108 * 'id' : self.watchers[i].id, # <<<<<<<<<<<<<<
58109 * 'cookie' : self.watchers[i].cookie
58110 * }
58111 */
58112 __pyx_t_4 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->watchers[__pyx_cur_scope->__pyx_v_i]).id); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4928; __pyx_clineno = __LINE__58112; goto __pyx_L1_error;}
58113 __Pyx_GOTREF(__pyx_t_4);
58114 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_id, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58114; goto __pyx_L1_error;}
58115 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58116
58117 /* "rbd.pyx":4929
58118 * 'addr' : decode_cstr(self.watchers[i].addr),
58119 * 'id' : self.watchers[i].id,
58120 * 'cookie' : self.watchers[i].cookie # <<<<<<<<<<<<<<
58121 * }
58122 *
58123 */
58124 __pyx_t_4 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->watchers[__pyx_cur_scope->__pyx_v_i]).cookie); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4929; __pyx_clineno = __LINE__58124; goto __pyx_L1_error;}
58125 __Pyx_GOTREF(__pyx_t_4);
58126 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cookie, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __pyx_clineno = __LINE__58126; goto __pyx_L1_error;}
58127 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58128 __pyx_r = __pyx_t_3;
58129 __pyx_t_3 = 0;
58130 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
58131 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
58132 __Pyx_XGIVEREF(__pyx_r);
58133 __Pyx_RefNannyFinishContext();
58134 /* return from generator, yielding value */
58135 __pyx_generator->resume_label = 1;
58136 return __pyx_r;
58137 __pyx_L6_resume_from_yield:;
58138 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
58139 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
58140 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4926; __pyx_clineno = __LINE__58140; goto __pyx_L1_error;}
58141 }
58142
58143 /* "rbd.pyx":4924
58144 * raise make_ex(ret, 'error listing watchers.')
58145 *
58146 * def __iter__(self): # <<<<<<<<<<<<<<
58147 * for i in range(self.num_watchers):
58148 * yield {
58149 */
58150
58151 /* function exit code */
58152 PyErr_SetNone(PyExc_StopIteration);
58153 goto __pyx_L0;
58154 __pyx_L1_error:;
58155 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
58156 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
58157 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
58158 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
58159 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
58160 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
58161 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58162 __pyx_L0:;
58163 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
58164 __pyx_generator->resume_label = -1;
58165 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
58166 __Pyx_RefNannyFinishContext();
58167 return __pyx_r;
58168}
58169
58170/* "rbd.pyx":4932
58171 * }
58172 *
58173 * def __dealloc__(self): # <<<<<<<<<<<<<<
58174 * if self.watchers:
58175 * rbd_watchers_list_cleanup(self.watchers, self.num_watchers)
58176 */
58177
58178/* Python wrapper */
58179static void __pyx_pw_3rbd_15WatcherIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
58180static void __pyx_pw_3rbd_15WatcherIterator_6__dealloc__(PyObject *__pyx_v_self) {
58181 __Pyx_RefNannyDeclarations
58182 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
58183 __pyx_pf_3rbd_15WatcherIterator_5__dealloc__(((struct __pyx_obj_3rbd_WatcherIterator *)__pyx_v_self));
58184
58185 /* function exit code */
58186 __Pyx_RefNannyFinishContext();
58187}
58188
58189static void __pyx_pf_3rbd_15WatcherIterator_5__dealloc__(struct __pyx_obj_3rbd_WatcherIterator *__pyx_v_self) {
58190 __Pyx_RefNannyDeclarations
58191 int __pyx_t_1;
58192 __Pyx_RefNannySetupContext("__dealloc__", 0);
58193
58194 /* "rbd.pyx":4933
58195 *
58196 * def __dealloc__(self):
58197 * if self.watchers: # <<<<<<<<<<<<<<
58198 * rbd_watchers_list_cleanup(self.watchers, self.num_watchers)
58199 * free(self.watchers)
58200 */
58201 __pyx_t_1 = (__pyx_v_self->watchers != 0);
58202 if (__pyx_t_1) {
58203
58204 /* "rbd.pyx":4934
58205 * def __dealloc__(self):
58206 * if self.watchers:
58207 * rbd_watchers_list_cleanup(self.watchers, self.num_watchers) # <<<<<<<<<<<<<<
58208 * free(self.watchers)
58209 *
58210 */
58211 rbd_watchers_list_cleanup(__pyx_v_self->watchers, __pyx_v_self->num_watchers);
58212
58213 /* "rbd.pyx":4935
58214 * if self.watchers:
58215 * rbd_watchers_list_cleanup(self.watchers, self.num_watchers)
58216 * free(self.watchers) # <<<<<<<<<<<<<<
58217 *
58218 * cdef class ConfigImageIterator(object):
58219 */
58220 free(__pyx_v_self->watchers);
58221
58222 /* "rbd.pyx":4933
58223 *
58224 * def __dealloc__(self):
58225 * if self.watchers: # <<<<<<<<<<<<<<
58226 * rbd_watchers_list_cleanup(self.watchers, self.num_watchers)
58227 * free(self.watchers)
58228 */
58229 }
58230
58231 /* "rbd.pyx":4932
58232 * }
58233 *
58234 * def __dealloc__(self): # <<<<<<<<<<<<<<
58235 * if self.watchers:
58236 * rbd_watchers_list_cleanup(self.watchers, self.num_watchers)
58237 */
58238
58239 /* function exit code */
58240 __Pyx_RefNannyFinishContext();
58241}
58242
58243/* "rbd.pyx":4956
58244 * int num_options
58245 *
58246 * def __init__(self, Image image): # <<<<<<<<<<<<<<
58247 * self.options = NULL
58248 * self.num_options = 32
58249 */
58250
58251/* Python wrapper */
58252static int __pyx_pw_3rbd_19ConfigImageIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
58253static int __pyx_pw_3rbd_19ConfigImageIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
58254 struct __pyx_obj_3rbd_Image *__pyx_v_image = 0;
58255 int __pyx_lineno = 0;
58256 const char *__pyx_filename = NULL((void*)0);
58257 int __pyx_clineno = 0;
58258 int __pyx_r;
58259 __Pyx_RefNannyDeclarations
58260 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
58261 {
58262 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_image,0};
58263 PyObject* values[1] = {0};
58264 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
58265 Py_ssize_t kw_args;
58266 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
58267 switch (pos_args) {
58268 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
58269 case 0: break;
58270 default: goto __pyx_L5_argtuple_error;
58271 }
58272 kw_args = PyDict_Size(__pyx_kwds);
58273 switch (pos_args) {
58274 case 0:
58275 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_image
)) != 0), 1)
) kw_args--;
58276 else goto __pyx_L5_argtuple_error;
58277 }
58278 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
58279 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4956; __pyx_clineno = __LINE__58279; goto __pyx_L3_error;}
58280 }
58281 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
58282 goto __pyx_L5_argtuple_error;
58283 } else {
58284 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
58285 }
58286 __pyx_v_image = ((struct __pyx_obj_3rbd_Image *)values[0]);
58287 }
58288 goto __pyx_L4_argument_unpacking_done;
58289 __pyx_L5_argtuple_error:;
58290 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4956; __pyx_clineno = __LINE__58290; goto __pyx_L3_error;}
58291 __pyx_L3_error:;
58292 __Pyx_AddTraceback("rbd.ConfigImageIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58293 __Pyx_RefNannyFinishContext();
58294 return -1;
58295 __pyx_L4_argument_unpacking_done:;
58296 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3rbd_Image, 1, "image", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image
), __pyx_ptype_3rbd_Image, 1, "image", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4956; __pyx_clineno = __LINE__58296; goto __pyx_L1_error;}
58297 __pyx_r = __pyx_pf_3rbd_19ConfigImageIterator___init__(((struct __pyx_obj_3rbd_ConfigImageIterator *)__pyx_v_self), __pyx_v_image);
58298
58299 /* function exit code */
58300 goto __pyx_L0;
58301 __pyx_L1_error:;
58302 __pyx_r = -1;
58303 __pyx_L0:;
58304 __Pyx_RefNannyFinishContext();
58305 return __pyx_r;
58306}
58307
58308static int __pyx_pf_3rbd_19ConfigImageIterator___init__(struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self, struct __pyx_obj_3rbd_Image *__pyx_v_image) {
58309 int __pyx_v_ret;
58310 int __pyx_r;
58311 __Pyx_RefNannyDeclarations
58312 void *__pyx_t_1;
58313 int __pyx_t_2;
58314 PyObject *__pyx_t_3 = NULL((void*)0);
58315 PyObject *__pyx_t_4 = NULL((void*)0);
58316 int __pyx_lineno = 0;
58317 const char *__pyx_filename = NULL((void*)0);
58318 int __pyx_clineno = 0;
58319 __Pyx_RefNannySetupContext("__init__", 0);
58320
58321 /* "rbd.pyx":4957
58322 *
58323 * def __init__(self, Image image):
58324 * self.options = NULL # <<<<<<<<<<<<<<
58325 * self.num_options = 32
58326 * while True:
58327 */
58328 __pyx_v_self->options = NULL((void*)0);
58329
58330 /* "rbd.pyx":4958
58331 * def __init__(self, Image image):
58332 * self.options = NULL
58333 * self.num_options = 32 # <<<<<<<<<<<<<<
58334 * while True:
58335 * self.options = <rbd_config_option_t *>realloc_chk(
58336 */
58337 __pyx_v_self->num_options = 32;
58338
58339 /* "rbd.pyx":4959
58340 * self.options = NULL
58341 * self.num_options = 32
58342 * while True: # <<<<<<<<<<<<<<
58343 * self.options = <rbd_config_option_t *>realloc_chk(
58344 * self.options, self.num_options * sizeof(rbd_config_option_t))
58345 */
58346 while (1) {
58347
58348 /* "rbd.pyx":4960
58349 * self.num_options = 32
58350 * while True:
58351 * self.options = <rbd_config_option_t *>realloc_chk( # <<<<<<<<<<<<<<
58352 * self.options, self.num_options * sizeof(rbd_config_option_t))
58353 * with nogil:
58354 */
58355 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->options, (__pyx_v_self->num_options * (sizeof(rbd_config_option_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4960; __pyx_clineno = __LINE__58355; goto __pyx_L1_error;}
58356 __pyx_v_self->options = ((rbd_config_option_t *)__pyx_t_1);
58357
58358 /* "rbd.pyx":4962
58359 * self.options = <rbd_config_option_t *>realloc_chk(
58360 * self.options, self.num_options * sizeof(rbd_config_option_t))
58361 * with nogil: # <<<<<<<<<<<<<<
58362 * ret = rbd_config_image_list(image.image, self.options,
58363 * &self.num_options)
58364 */
58365 {
58366 #ifdef WITH_THREAD1
58367 PyThreadState *_save;
58368 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
58369 #endif
58370 /*try:*/ {
58371
58372 /* "rbd.pyx":4963
58373 * self.options, self.num_options * sizeof(rbd_config_option_t))
58374 * with nogil:
58375 * ret = rbd_config_image_list(image.image, self.options, # <<<<<<<<<<<<<<
58376 * &self.num_options)
58377 * if ret < 0:
58378 */
58379 __pyx_v_ret = rbd_config_image_list(__pyx_v_image->image, __pyx_v_self->options, (&__pyx_v_self->num_options));
58380 }
58381
58382 /* "rbd.pyx":4962
58383 * self.options = <rbd_config_option_t *>realloc_chk(
58384 * self.options, self.num_options * sizeof(rbd_config_option_t))
58385 * with nogil: # <<<<<<<<<<<<<<
58386 * ret = rbd_config_image_list(image.image, self.options,
58387 * &self.num_options)
58388 */
58389 /*finally:*/ {
58390 /*normal exit:*/{
58391 #ifdef WITH_THREAD1
58392 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
58393 #endif
58394 goto __pyx_L9;
58395 }
58396 __pyx_L9:;
58397 }
58398 }
58399
58400 /* "rbd.pyx":4965
58401 * ret = rbd_config_image_list(image.image, self.options,
58402 * &self.num_options)
58403 * if ret < 0: # <<<<<<<<<<<<<<
58404 * if ret == -errno.ERANGE:
58405 * continue
58406 */
58407 __pyx_t_2 = ((__pyx_v_ret < 0) != 0);
58408 if (__pyx_t_2) {
58409
58410 /* "rbd.pyx":4966
58411 * &self.num_options)
58412 * if ret < 0:
58413 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
58414 * continue
58415 * self.num_options = 0
58416 */
58417 __pyx_t_2 = ((__pyx_v_ret == (-ERANGE34)) != 0);
58418 if (__pyx_t_2) {
58419
58420 /* "rbd.pyx":4967
58421 * if ret < 0:
58422 * if ret == -errno.ERANGE:
58423 * continue # <<<<<<<<<<<<<<
58424 * self.num_options = 0
58425 * raise make_ex(ret, 'error listing config options')
58426 */
58427 goto __pyx_L3_continue;
58428
58429 /* "rbd.pyx":4966
58430 * &self.num_options)
58431 * if ret < 0:
58432 * if ret == -errno.ERANGE: # <<<<<<<<<<<<<<
58433 * continue
58434 * self.num_options = 0
58435 */
58436 }
58437
58438 /* "rbd.pyx":4968
58439 * if ret == -errno.ERANGE:
58440 * continue
58441 * self.num_options = 0 # <<<<<<<<<<<<<<
58442 * raise make_ex(ret, 'error listing config options')
58443 * break
58444 */
58445 __pyx_v_self->num_options = 0;
58446
58447 /* "rbd.pyx":4969
58448 * continue
58449 * self.num_options = 0
58450 * raise make_ex(ret, 'error listing config options') # <<<<<<<<<<<<<<
58451 * break
58452 *
58453 */
58454 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4969; __pyx_clineno = __LINE__58454; goto __pyx_L1_error;}
58455 __Pyx_GOTREF(__pyx_t_3);
58456 __pyx_t_4 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_kp_s_error_listing_config_options, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4969; __pyx_clineno = __LINE__58456; goto __pyx_L1_error;}
58457 __Pyx_GOTREF(__pyx_t_4);
58458 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
58459 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
58460 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58461 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4969; __pyx_clineno = __LINE__58461; goto __pyx_L1_error;}
58462
58463 /* "rbd.pyx":4965
58464 * ret = rbd_config_image_list(image.image, self.options,
58465 * &self.num_options)
58466 * if ret < 0: # <<<<<<<<<<<<<<
58467 * if ret == -errno.ERANGE:
58468 * continue
58469 */
58470 }
58471
58472 /* "rbd.pyx":4970
58473 * self.num_options = 0
58474 * raise make_ex(ret, 'error listing config options')
58475 * break # <<<<<<<<<<<<<<
58476 *
58477 * def __iter__(self):
58478 */
58479 goto __pyx_L4_break;
58480 __pyx_L3_continue:;
58481 }
58482 __pyx_L4_break:;
58483
58484 /* "rbd.pyx":4956
58485 * int num_options
58486 *
58487 * def __init__(self, Image image): # <<<<<<<<<<<<<<
58488 * self.options = NULL
58489 * self.num_options = 32
58490 */
58491
58492 /* function exit code */
58493 __pyx_r = 0;
58494 goto __pyx_L0;
58495 __pyx_L1_error:;
58496 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
58497 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
58498 __Pyx_AddTraceback("rbd.ConfigImageIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58499 __pyx_r = -1;
58500 __pyx_L0:;
58501 __Pyx_RefNannyFinishContext();
58502 return __pyx_r;
58503}
58504static PyObject *__pyx_gb_3rbd_19ConfigImageIterator_4generator12(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
58505
58506/* "rbd.pyx":4972
58507 * break
58508 *
58509 * def __iter__(self): # <<<<<<<<<<<<<<
58510 * for i in range(self.num_options):
58511 * yield {
58512 */
58513
58514/* Python wrapper */
58515static PyObject *__pyx_pw_3rbd_19ConfigImageIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
58516static PyObject *__pyx_pw_3rbd_19ConfigImageIterator_3__iter__(PyObject *__pyx_v_self) {
58517 PyObject *__pyx_r = 0;
58518 __Pyx_RefNannyDeclarations
58519 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
58520 __pyx_r = __pyx_pf_3rbd_19ConfigImageIterator_2__iter__(((struct __pyx_obj_3rbd_ConfigImageIterator *)__pyx_v_self));
58521
58522 /* function exit code */
58523 __Pyx_RefNannyFinishContext();
58524 return __pyx_r;
58525}
58526
58527static PyObject *__pyx_pf_3rbd_19ConfigImageIterator_2__iter__(struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self) {
58528 struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *__pyx_cur_scope;
58529 PyObject *__pyx_r = NULL((void*)0);
58530 __Pyx_RefNannyDeclarations
58531 int __pyx_lineno = 0;
58532 const char *__pyx_filename = NULL((void*)0);
58533 int __pyx_clineno = 0;
58534 __Pyx_RefNannySetupContext("__iter__", 0);
58535 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_13___iter__(__pyx_ptype_3rbd___pyx_scope_struct_13___iter__, __pyx_empty_tuple, NULL((void*)0));
58536 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
58537 __Pyx_RefNannyFinishContext();
58538 return NULL((void*)0);
58539 }
58540 __Pyx_GOTREF(__pyx_cur_scope);
58541 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
58542 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
58543 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
58544 {
58545 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_19ConfigImageIterator_4generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ConfigImageIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_19ConfigImageIterator_4generator12, (PyObject
*) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ConfigImageIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4972; __pyx_clineno = __LINE__58545; goto __pyx_L1_error;}
58546 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
58547 __Pyx_RefNannyFinishContext();
58548 return (PyObject *) gen;
58549 }
58550
58551 /* function exit code */
58552 __pyx_L1_error:;
58553 __Pyx_AddTraceback("rbd.ConfigImageIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58554 __pyx_r = NULL((void*)0);
58555 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
58556 __Pyx_XGIVEREF(__pyx_r);
58557 __Pyx_RefNannyFinishContext();
58558 return __pyx_r;
58559}
58560
58561static PyObject *__pyx_gb_3rbd_19ConfigImageIterator_4generator12(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
58562{
58563 struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *)__pyx_generator->closure);
58564 PyObject *__pyx_r = NULL((void*)0);
58565 int __pyx_t_1;
58566 int __pyx_t_2;
58567 PyObject *__pyx_t_3 = NULL((void*)0);
58568 PyObject *__pyx_t_4 = NULL((void*)0);
58569 PyObject *__pyx_t_5 = NULL((void*)0);
58570 PyObject *__pyx_t_6 = NULL((void*)0);
58571 PyObject *__pyx_t_7 = NULL((void*)0);
58572 PyObject *__pyx_t_8 = NULL((void*)0);
58573 int __pyx_lineno = 0;
58574 const char *__pyx_filename = NULL((void*)0);
58575 int __pyx_clineno = 0;
58576 __Pyx_RefNannyDeclarations
58577 __Pyx_RefNannySetupContext("None", 0);
58578 switch (__pyx_generator->resume_label) {
58579 case 0: goto __pyx_L3_first_run;
58580 case 1: goto __pyx_L6_resume_from_yield;
58581 default: /* CPython raises the right error here */
58582 __Pyx_RefNannyFinishContext();
58583 return NULL((void*)0);
58584 }
58585 __pyx_L3_first_run:;
58586 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4972; __pyx_clineno = __LINE__58586; goto __pyx_L1_error;}
58587
58588 /* "rbd.pyx":4973
58589 *
58590 * def __iter__(self):
58591 * for i in range(self.num_options): # <<<<<<<<<<<<<<
58592 * yield {
58593 * 'name' : decode_cstr(self.options[i].name),
58594 */
58595 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_options;
58596 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
58597 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
58598
58599 /* "rbd.pyx":4975
58600 * for i in range(self.num_options):
58601 * yield {
58602 * 'name' : decode_cstr(self.options[i].name), # <<<<<<<<<<<<<<
58603 * 'value' : decode_cstr(self.options[i].value),
58604 * 'source' : self.options[i].source,
58605 */
58606 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58606; goto __pyx_L1_error;}
58607 __Pyx_GOTREF(__pyx_t_3);
58608 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58608; goto __pyx_L1_error;}
58609 __Pyx_GOTREF(__pyx_t_5);
58610 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->options[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58610; goto __pyx_L1_error;}
58611 __Pyx_GOTREF(__pyx_t_6);
58612 __pyx_t_7 = NULL((void*)0);
58613 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
58614 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
58615 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
58616 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
58617 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
58618 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
58619 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
58620 }
58621 }
58622 if (!__pyx_t_7) {
58623 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58623; goto __pyx_L1_error;}
58624 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
58625 __Pyx_GOTREF(__pyx_t_4);
58626 } else {
58627 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58627; goto __pyx_L1_error;}
58628 __Pyx_GOTREF(__pyx_t_8);
58629 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
58630 __Pyx_GIVEREF(__pyx_t_6);
58631 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
58632 __pyx_t_6 = 0;
58633 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58633; goto __pyx_L1_error;}
58634 __Pyx_GOTREF(__pyx_t_4);
58635 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
58636 }
58637 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
58638 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58638; goto __pyx_L1_error;}
58639 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58640
58641 /* "rbd.pyx":4976
58642 * yield {
58643 * 'name' : decode_cstr(self.options[i].name),
58644 * 'value' : decode_cstr(self.options[i].value), # <<<<<<<<<<<<<<
58645 * 'source' : self.options[i].source,
58646 * }
58647 */
58648 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4976; __pyx_clineno = __LINE__58648; goto __pyx_L1_error;}
58649 __Pyx_GOTREF(__pyx_t_5);
58650 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->options[__pyx_cur_scope->__pyx_v_i]).value); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4976; __pyx_clineno = __LINE__58650; goto __pyx_L1_error;}
58651 __Pyx_GOTREF(__pyx_t_8);
58652 __pyx_t_6 = NULL((void*)0);
58653 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
58654 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
58655 if (likely(__pyx_t_6)__builtin_expect(!!(__pyx_t_6), 1)) {
58656 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
58657 __Pyx_INCREF(__pyx_t_6)( ((PyObject*)(__pyx_t_6))->ob_refcnt++);
58658 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
58659 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
58660 }
58661 }
58662 if (!__pyx_t_6) {
58663 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4976; __pyx_clineno = __LINE__58663; goto __pyx_L1_error;}
58664 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
58665 __Pyx_GOTREF(__pyx_t_4);
58666 } else {
58667 __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4976; __pyx_clineno = __LINE__58667; goto __pyx_L1_error;}
58668 __Pyx_GOTREF(__pyx_t_7);
58669 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_6); __pyx_t_6 = NULL((void*)0);
58670 __Pyx_GIVEREF(__pyx_t_8);
58671 PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_7))->ob_item[0+1] = __pyx_t_8);
58672 __pyx_t_8 = 0;
58673 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4976; __pyx_clineno = __LINE__58673; goto __pyx_L1_error;}
58674 __Pyx_GOTREF(__pyx_t_4);
58675 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
58676 }
58677 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
58678 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_value, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58678; goto __pyx_L1_error;}
58679 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58680
58681 /* "rbd.pyx":4977
58682 * 'name' : decode_cstr(self.options[i].name),
58683 * 'value' : decode_cstr(self.options[i].value),
58684 * 'source' : self.options[i].source, # <<<<<<<<<<<<<<
58685 * }
58686 *
58687 */
58688 __pyx_t_4 = __Pyx_PyInt_From_rbd_config_source_t((__pyx_cur_scope->__pyx_v_self->options[__pyx_cur_scope->__pyx_v_i]).source); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4977; __pyx_clineno = __LINE__58688; goto __pyx_L1_error;}
58689 __Pyx_GOTREF(__pyx_t_4);
58690 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4975; __pyx_clineno = __LINE__58690; goto __pyx_L1_error;}
58691 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
58692 __pyx_r = __pyx_t_3;
58693 __pyx_t_3 = 0;
58694 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
58695 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
58696 __Pyx_XGIVEREF(__pyx_r);
58697 __Pyx_RefNannyFinishContext();
58698 /* return from generator, yielding value */
58699 __pyx_generator->resume_label = 1;
58700 return __pyx_r;
58701 __pyx_L6_resume_from_yield:;
58702 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
58703 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
58704 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4974; __pyx_clineno = __LINE__58704; goto __pyx_L1_error;}
58705 }
58706
58707 /* "rbd.pyx":4972
58708 * break
58709 *
58710 * def __iter__(self): # <<<<<<<<<<<<<<
58711 * for i in range(self.num_options):
58712 * yield {
58713 */
58714
58715 /* function exit code */
58716 PyErr_SetNone(PyExc_StopIteration);
58717 goto __pyx_L0;
58718 __pyx_L1_error:;
58719 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
58720 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
58721 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
58722 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
58723 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
58724 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
58725 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58726 __pyx_L0:;
58727 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
58728 __pyx_generator->resume_label = -1;
58729 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
58730 __Pyx_RefNannyFinishContext();
58731 return __pyx_r;
58732}
58733
58734/* "rbd.pyx":4980
58735 * }
58736 *
58737 * def __dealloc__(self): # <<<<<<<<<<<<<<
58738 * if self.options:
58739 * rbd_config_image_list_cleanup(self.options, self.num_options)
58740 */
58741
58742/* Python wrapper */
58743static void __pyx_pw_3rbd_19ConfigImageIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
58744static void __pyx_pw_3rbd_19ConfigImageIterator_6__dealloc__(PyObject *__pyx_v_self) {
58745 __Pyx_RefNannyDeclarations
58746 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
58747 __pyx_pf_3rbd_19ConfigImageIterator_5__dealloc__(((struct __pyx_obj_3rbd_ConfigImageIterator *)__pyx_v_self));
58748
58749 /* function exit code */
58750 __Pyx_RefNannyFinishContext();
58751}
58752
58753static void __pyx_pf_3rbd_19ConfigImageIterator_5__dealloc__(struct __pyx_obj_3rbd_ConfigImageIterator *__pyx_v_self) {
58754 __Pyx_RefNannyDeclarations
58755 int __pyx_t_1;
58756 __Pyx_RefNannySetupContext("__dealloc__", 0);
58757
58758 /* "rbd.pyx":4981
58759 *
58760 * def __dealloc__(self):
58761 * if self.options: # <<<<<<<<<<<<<<
58762 * rbd_config_image_list_cleanup(self.options, self.num_options)
58763 * free(self.options)
58764 */
58765 __pyx_t_1 = (__pyx_v_self->options != 0);
58766 if (__pyx_t_1) {
58767
58768 /* "rbd.pyx":4982
58769 * def __dealloc__(self):
58770 * if self.options:
58771 * rbd_config_image_list_cleanup(self.options, self.num_options) # <<<<<<<<<<<<<<
58772 * free(self.options)
58773 *
58774 */
58775 rbd_config_image_list_cleanup(__pyx_v_self->options, __pyx_v_self->num_options);
58776
58777 /* "rbd.pyx":4983
58778 * if self.options:
58779 * rbd_config_image_list_cleanup(self.options, self.num_options)
58780 * free(self.options) # <<<<<<<<<<<<<<
58781 *
58782 * cdef class GroupImageIterator(object):
58783 */
58784 free(__pyx_v_self->options);
58785
58786 /* "rbd.pyx":4981
58787 *
58788 * def __dealloc__(self):
58789 * if self.options: # <<<<<<<<<<<<<<
58790 * rbd_config_image_list_cleanup(self.options, self.num_options)
58791 * free(self.options)
58792 */
58793 }
58794
58795 /* "rbd.pyx":4980
58796 * }
58797 *
58798 * def __dealloc__(self): # <<<<<<<<<<<<<<
58799 * if self.options:
58800 * rbd_config_image_list_cleanup(self.options, self.num_options)
58801 */
58802
58803 /* function exit code */
58804 __Pyx_RefNannyFinishContext();
58805}
58806
58807/* "rbd.pyx":5004
58808 * cdef object group
58809 *
58810 * def __init__(self, Group group): # <<<<<<<<<<<<<<
58811 * self.group = group
58812 * self.images = NULL
58813 */
58814
58815/* Python wrapper */
58816static int __pyx_pw_3rbd_18GroupImageIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
58817static int __pyx_pw_3rbd_18GroupImageIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
58818 struct __pyx_obj_3rbd_Group *__pyx_v_group = 0;
58819 int __pyx_lineno = 0;
58820 const char *__pyx_filename = NULL((void*)0);
58821 int __pyx_clineno = 0;
58822 int __pyx_r;
58823 __Pyx_RefNannyDeclarations
58824 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
58825 {
58826 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0};
58827 PyObject* values[1] = {0};
58828 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
58829 Py_ssize_t kw_args;
58830 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
58831 switch (pos_args) {
58832 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
58833 case 0: break;
58834 default: goto __pyx_L5_argtuple_error;
58835 }
58836 kw_args = PyDict_Size(__pyx_kwds);
58837 switch (pos_args) {
58838 case 0:
58839 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_group)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_group
)) != 0), 1)
) kw_args--;
58840 else goto __pyx_L5_argtuple_error;
58841 }
58842 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
58843 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5004; __pyx_clineno = __LINE__58843; goto __pyx_L3_error;}
58844 }
58845 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
58846 goto __pyx_L5_argtuple_error;
58847 } else {
58848 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
58849 }
58850 __pyx_v_group = ((struct __pyx_obj_3rbd_Group *)values[0]);
58851 }
58852 goto __pyx_L4_argument_unpacking_done;
58853 __pyx_L5_argtuple_error:;
58854 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5004; __pyx_clineno = __LINE__58854; goto __pyx_L3_error;}
58855 __pyx_L3_error:;
58856 __Pyx_AddTraceback("rbd.GroupImageIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58857 __Pyx_RefNannyFinishContext();
58858 return -1;
58859 __pyx_L4_argument_unpacking_done:;
58860 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_3rbd_Group, 1, "group", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group
), __pyx_ptype_3rbd_Group, 1, "group", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5004; __pyx_clineno = __LINE__58860; goto __pyx_L1_error;}
58861 __pyx_r = __pyx_pf_3rbd_18GroupImageIterator___init__(((struct __pyx_obj_3rbd_GroupImageIterator *)__pyx_v_self), __pyx_v_group);
58862
58863 /* function exit code */
58864 goto __pyx_L0;
58865 __pyx_L1_error:;
58866 __pyx_r = -1;
58867 __pyx_L0:;
58868 __Pyx_RefNannyFinishContext();
58869 return __pyx_r;
58870}
58871
58872static int __pyx_pf_3rbd_18GroupImageIterator___init__(struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self, struct __pyx_obj_3rbd_Group *__pyx_v_group) {
58873 int __pyx_v_ret;
58874 int __pyx_r;
58875 __Pyx_RefNannyDeclarations
58876 void *__pyx_t_1;
58877 int __pyx_t_2;
58878 PyObject *__pyx_t_3 = NULL((void*)0);
58879 PyObject *__pyx_t_4 = NULL((void*)0);
58880 PyObject *__pyx_t_5 = NULL((void*)0);
58881 PyObject *__pyx_t_6 = NULL((void*)0);
58882 struct __pyx_opt_args_3rbd_make_ex __pyx_t_7;
58883 int __pyx_lineno = 0;
58884 const char *__pyx_filename = NULL((void*)0);
58885 int __pyx_clineno = 0;
58886 __Pyx_RefNannySetupContext("__init__", 0);
58887
58888 /* "rbd.pyx":5005
58889 *
58890 * def __init__(self, Group group):
58891 * self.group = group # <<<<<<<<<<<<<<
58892 * self.images = NULL
58893 * self.num_images = 10
58894 */
58895 __Pyx_INCREF(((PyObject *)__pyx_v_group))( ((PyObject*)(((PyObject *)__pyx_v_group)))->ob_refcnt++);
58896 __Pyx_GIVEREF(((PyObject *)__pyx_v_group));
58897 __Pyx_GOTREF(__pyx_v_self->group);
58898 __Pyx_DECREF(__pyx_v_self->group)do { if ( --((PyObject*)(__pyx_v_self->group))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
group)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->group)))); } while (0)
;
58899 __pyx_v_self->group = ((PyObject *)__pyx_v_group);
58900
58901 /* "rbd.pyx":5006
58902 * def __init__(self, Group group):
58903 * self.group = group
58904 * self.images = NULL # <<<<<<<<<<<<<<
58905 * self.num_images = 10
58906 * while True:
58907 */
58908 __pyx_v_self->images = NULL((void*)0);
58909
58910 /* "rbd.pyx":5007
58911 * self.group = group
58912 * self.images = NULL
58913 * self.num_images = 10 # <<<<<<<<<<<<<<
58914 * while True:
58915 * self.images = <rbd_group_image_info_t*>realloc_chk(self.images,
58916 */
58917 __pyx_v_self->num_images = 10;
58918
58919 /* "rbd.pyx":5008
58920 * self.images = NULL
58921 * self.num_images = 10
58922 * while True: # <<<<<<<<<<<<<<
58923 * self.images = <rbd_group_image_info_t*>realloc_chk(self.images,
58924 * self.num_images *
58925 */
58926 while (1) {
58927
58928 /* "rbd.pyx":5009
58929 * self.num_images = 10
58930 * while True:
58931 * self.images = <rbd_group_image_info_t*>realloc_chk(self.images, # <<<<<<<<<<<<<<
58932 * self.num_images *
58933 * sizeof(rbd_group_image_info_t))
58934 */
58935 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->images, (__pyx_v_self->num_images * (sizeof(rbd_group_image_info_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5009; __pyx_clineno = __LINE__58935; goto __pyx_L1_error;}
58936 __pyx_v_self->images = ((rbd_group_image_info_t *)__pyx_t_1);
58937
58938 /* "rbd.pyx":5012
58939 * self.num_images *
58940 * sizeof(rbd_group_image_info_t))
58941 * with nogil: # <<<<<<<<<<<<<<
58942 * ret = rbd_group_image_list(group._ioctx, group._name,
58943 * self.images,
58944 */
58945 {
58946 #ifdef WITH_THREAD1
58947 PyThreadState *_save;
58948 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
58949 #endif
58950 /*try:*/ {
58951
58952 /* "rbd.pyx":5013
58953 * sizeof(rbd_group_image_info_t))
58954 * with nogil:
58955 * ret = rbd_group_image_list(group._ioctx, group._name, # <<<<<<<<<<<<<<
58956 * self.images,
58957 * sizeof(rbd_group_image_info_t),
58958 */
58959 __pyx_v_ret = rbd_group_image_list(__pyx_v_group->_ioctx, __pyx_v_group->_name, __pyx_v_self->images, (sizeof(rbd_group_image_info_t)), (&__pyx_v_self->num_images));
58960 }
58961
58962 /* "rbd.pyx":5012
58963 * self.num_images *
58964 * sizeof(rbd_group_image_info_t))
58965 * with nogil: # <<<<<<<<<<<<<<
58966 * ret = rbd_group_image_list(group._ioctx, group._name,
58967 * self.images,
58968 */
58969 /*finally:*/ {
58970 /*normal exit:*/{
58971 #ifdef WITH_THREAD1
58972 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
58973 #endif
58974 goto __pyx_L9;
58975 }
58976 __pyx_L9:;
58977 }
58978 }
58979
58980 /* "rbd.pyx":5018
58981 * &self.num_images)
58982 *
58983 * if ret >= 0: # <<<<<<<<<<<<<<
58984 * break
58985 * elif ret != -errno.ERANGE:
58986 */
58987 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
58988 if (__pyx_t_2) {
58989
58990 /* "rbd.pyx":5019
58991 *
58992 * if ret >= 0:
58993 * break # <<<<<<<<<<<<<<
58994 * elif ret != -errno.ERANGE:
58995 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception)
58996 */
58997 goto __pyx_L4_break;
58998
58999 /* "rbd.pyx":5018
59000 * &self.num_images)
59001 *
59002 * if ret >= 0: # <<<<<<<<<<<<<<
59003 * break
59004 * elif ret != -errno.ERANGE:
59005 */
59006 }
59007
59008 /* "rbd.pyx":5020
59009 * if ret >= 0:
59010 * break
59011 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
59012 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception)
59013 *
59014 */
59015 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
59016 if (__pyx_t_2) {
59017
59018 /* "rbd.pyx":5021
59019 * break
59020 * elif ret != -errno.ERANGE:
59021 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception) # <<<<<<<<<<<<<<
59022 *
59023 * def __iter__(self):
59024 */
59025 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5021; __pyx_clineno = __LINE__59025; goto __pyx_L1_error;}
59026 __Pyx_GOTREF(__pyx_t_3);
59027 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_listing_images_for_group_s, __pyx_v_group->name)PyString_Format(__pyx_kp_s_error_listing_images_for_group_s, __pyx_v_group
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5021; __pyx_clineno = __LINE__59027; goto __pyx_L1_error;}
59028 __Pyx_GOTREF(__pyx_t_4);
59029 __pyx_t_5 = __pyx_v_3rbd_group_errno_to_exception;
59030 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
59031 __pyx_t_7.__pyx_n = 1;
59032 __pyx_t_7.exception_map = __pyx_t_5;
59033 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, &__pyx_t_7); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5021; __pyx_clineno = __LINE__59033; goto __pyx_L1_error;}
59034 __Pyx_GOTREF(__pyx_t_6);
59035 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
59036 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59037 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
59038 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
59039 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
59040 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5021; __pyx_clineno = __LINE__59040; goto __pyx_L1_error;}
59041
59042 /* "rbd.pyx":5020
59043 * if ret >= 0:
59044 * break
59045 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
59046 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception)
59047 *
59048 */
59049 }
59050 }
59051 __pyx_L4_break:;
59052
59053 /* "rbd.pyx":5004
59054 * cdef object group
59055 *
59056 * def __init__(self, Group group): # <<<<<<<<<<<<<<
59057 * self.group = group
59058 * self.images = NULL
59059 */
59060
59061 /* function exit code */
59062 __pyx_r = 0;
59063 goto __pyx_L0;
59064 __pyx_L1_error:;
59065 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
59066 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
59067 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
59068 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
59069 __Pyx_AddTraceback("rbd.GroupImageIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59070 __pyx_r = -1;
59071 __pyx_L0:;
59072 __Pyx_RefNannyFinishContext();
59073 return __pyx_r;
59074}
59075static PyObject *__pyx_gb_3rbd_18GroupImageIterator_4generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
59076
59077/* "rbd.pyx":5023
59078 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception)
59079 *
59080 * def __iter__(self): # <<<<<<<<<<<<<<
59081 * for i in range(self.num_images):
59082 * yield {
59083 */
59084
59085/* Python wrapper */
59086static PyObject *__pyx_pw_3rbd_18GroupImageIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
59087static PyObject *__pyx_pw_3rbd_18GroupImageIterator_3__iter__(PyObject *__pyx_v_self) {
59088 PyObject *__pyx_r = 0;
59089 __Pyx_RefNannyDeclarations
59090 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
59091 __pyx_r = __pyx_pf_3rbd_18GroupImageIterator_2__iter__(((struct __pyx_obj_3rbd_GroupImageIterator *)__pyx_v_self));
59092
59093 /* function exit code */
59094 __Pyx_RefNannyFinishContext();
59095 return __pyx_r;
59096}
59097
59098static PyObject *__pyx_pf_3rbd_18GroupImageIterator_2__iter__(struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self) {
59099 struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *__pyx_cur_scope;
59100 PyObject *__pyx_r = NULL((void*)0);
59101 __Pyx_RefNannyDeclarations
59102 int __pyx_lineno = 0;
59103 const char *__pyx_filename = NULL((void*)0);
59104 int __pyx_clineno = 0;
59105 __Pyx_RefNannySetupContext("__iter__", 0);
59106 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_14___iter__(__pyx_ptype_3rbd___pyx_scope_struct_14___iter__, __pyx_empty_tuple, NULL((void*)0));
59107 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
59108 __Pyx_RefNannyFinishContext();
59109 return NULL((void*)0);
59110 }
59111 __Pyx_GOTREF(__pyx_cur_scope);
59112 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
59113 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
59114 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
59115 {
59116 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_18GroupImageIterator_4generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_GroupImageIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_18GroupImageIterator_4generator13, (PyObject *
) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_GroupImageIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5023; __pyx_clineno = __LINE__59116; goto __pyx_L1_error;}
59117 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
59118 __Pyx_RefNannyFinishContext();
59119 return (PyObject *) gen;
59120 }
59121
59122 /* function exit code */
59123 __pyx_L1_error:;
59124 __Pyx_AddTraceback("rbd.GroupImageIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59125 __pyx_r = NULL((void*)0);
59126 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
59127 __Pyx_XGIVEREF(__pyx_r);
59128 __Pyx_RefNannyFinishContext();
59129 return __pyx_r;
59130}
59131
59132static PyObject *__pyx_gb_3rbd_18GroupImageIterator_4generator13(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
59133{
59134 struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *)__pyx_generator->closure);
59135 PyObject *__pyx_r = NULL((void*)0);
59136 size_t __pyx_t_1;
59137 size_t __pyx_t_2;
59138 PyObject *__pyx_t_3 = NULL((void*)0);
59139 PyObject *__pyx_t_4 = NULL((void*)0);
59140 PyObject *__pyx_t_5 = NULL((void*)0);
59141 PyObject *__pyx_t_6 = NULL((void*)0);
59142 PyObject *__pyx_t_7 = NULL((void*)0);
59143 PyObject *__pyx_t_8 = NULL((void*)0);
59144 int __pyx_lineno = 0;
59145 const char *__pyx_filename = NULL((void*)0);
59146 int __pyx_clineno = 0;
59147 __Pyx_RefNannyDeclarations
59148 __Pyx_RefNannySetupContext("None", 0);
59149 switch (__pyx_generator->resume_label) {
59150 case 0: goto __pyx_L3_first_run;
59151 case 1: goto __pyx_L6_resume_from_yield;
59152 default: /* CPython raises the right error here */
59153 __Pyx_RefNannyFinishContext();
59154 return NULL((void*)0);
59155 }
59156 __pyx_L3_first_run:;
59157 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5023; __pyx_clineno = __LINE__59157; goto __pyx_L1_error;}
59158
59159 /* "rbd.pyx":5024
59160 *
59161 * def __iter__(self):
59162 * for i in range(self.num_images): # <<<<<<<<<<<<<<
59163 * yield {
59164 * 'name' : decode_cstr(self.images[i].name),
59165 */
59166 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_images;
59167 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
59168 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
59169
59170 /* "rbd.pyx":5026
59171 * for i in range(self.num_images):
59172 * yield {
59173 * 'name' : decode_cstr(self.images[i].name), # <<<<<<<<<<<<<<
59174 * 'pool' : self.images[i].pool,
59175 * 'state' : self.images[i].state,
59176 */
59177 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59177; goto __pyx_L1_error;}
59178 __Pyx_GOTREF(__pyx_t_3);
59179 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59179; goto __pyx_L1_error;}
59180 __Pyx_GOTREF(__pyx_t_5);
59181 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59181; goto __pyx_L1_error;}
59182 __Pyx_GOTREF(__pyx_t_6);
59183 __pyx_t_7 = NULL((void*)0);
59184 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
59185 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
59186 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
59187 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
59188 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
59189 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
59190 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
59191 }
59192 }
59193 if (!__pyx_t_7) {
59194 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59194; goto __pyx_L1_error;}
59195 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
59196 __Pyx_GOTREF(__pyx_t_4);
59197 } else {
59198 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59198; goto __pyx_L1_error;}
59199 __Pyx_GOTREF(__pyx_t_8);
59200 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
59201 __Pyx_GIVEREF(__pyx_t_6);
59202 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
59203 __pyx_t_6 = 0;
59204 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59204; goto __pyx_L1_error;}
59205 __Pyx_GOTREF(__pyx_t_4);
59206 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
59207 }
59208 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
59209 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59209; goto __pyx_L1_error;}
59210 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59211
59212 /* "rbd.pyx":5027
59213 * yield {
59214 * 'name' : decode_cstr(self.images[i].name),
59215 * 'pool' : self.images[i].pool, # <<<<<<<<<<<<<<
59216 * 'state' : self.images[i].state,
59217 * }
59218 */
59219 __pyx_t_4 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).pool); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5027; __pyx_clineno = __LINE__59219; goto __pyx_L1_error;}
59220 __Pyx_GOTREF(__pyx_t_4);
59221 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59221; goto __pyx_L1_error;}
59222 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59223
59224 /* "rbd.pyx":5028
59225 * 'name' : decode_cstr(self.images[i].name),
59226 * 'pool' : self.images[i].pool,
59227 * 'state' : self.images[i].state, # <<<<<<<<<<<<<<
59228 * }
59229 *
59230 */
59231 __pyx_t_4 = __Pyx_PyInt_From_rbd_group_image_state_t((__pyx_cur_scope->__pyx_v_self->images[__pyx_cur_scope->__pyx_v_i]).state); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5028; __pyx_clineno = __LINE__59231; goto __pyx_L1_error;}
59232 __Pyx_GOTREF(__pyx_t_4);
59233 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_state, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5026; __pyx_clineno = __LINE__59233; goto __pyx_L1_error;}
59234 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59235 __pyx_r = __pyx_t_3;
59236 __pyx_t_3 = 0;
59237 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
59238 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
59239 __Pyx_XGIVEREF(__pyx_r);
59240 __Pyx_RefNannyFinishContext();
59241 /* return from generator, yielding value */
59242 __pyx_generator->resume_label = 1;
59243 return __pyx_r;
59244 __pyx_L6_resume_from_yield:;
59245 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
59246 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
59247 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5025; __pyx_clineno = __LINE__59247; goto __pyx_L1_error;}
59248 }
59249
59250 /* "rbd.pyx":5023
59251 * raise make_ex(ret, 'error listing images for group %s' % group.name, group_errno_to_exception)
59252 *
59253 * def __iter__(self): # <<<<<<<<<<<<<<
59254 * for i in range(self.num_images):
59255 * yield {
59256 */
59257
59258 /* function exit code */
59259 PyErr_SetNone(PyExc_StopIteration);
59260 goto __pyx_L0;
59261 __pyx_L1_error:;
59262 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
59263 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
59264 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
59265 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
59266 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
59267 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
59268 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59269 __pyx_L0:;
59270 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
59271 __pyx_generator->resume_label = -1;
59272 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
59273 __Pyx_RefNannyFinishContext();
59274 return __pyx_r;
59275}
59276
59277/* "rbd.pyx":5031
59278 * }
59279 *
59280 * def __dealloc__(self): # <<<<<<<<<<<<<<
59281 * if self.images:
59282 * rbd_group_image_list_cleanup(self.images,
59283 */
59284
59285/* Python wrapper */
59286static void __pyx_pw_3rbd_18GroupImageIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
59287static void __pyx_pw_3rbd_18GroupImageIterator_6__dealloc__(PyObject *__pyx_v_self) {
59288 __Pyx_RefNannyDeclarations
59289 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
59290 __pyx_pf_3rbd_18GroupImageIterator_5__dealloc__(((struct __pyx_obj_3rbd_GroupImageIterator *)__pyx_v_self));
59291
59292 /* function exit code */
59293 __Pyx_RefNannyFinishContext();
59294}
59295
59296static void __pyx_pf_3rbd_18GroupImageIterator_5__dealloc__(struct __pyx_obj_3rbd_GroupImageIterator *__pyx_v_self) {
59297 __Pyx_RefNannyDeclarations
59298 int __pyx_t_1;
59299 __Pyx_RefNannySetupContext("__dealloc__", 0);
59300
59301 /* "rbd.pyx":5032
59302 *
59303 * def __dealloc__(self):
59304 * if self.images: # <<<<<<<<<<<<<<
59305 * rbd_group_image_list_cleanup(self.images,
59306 * sizeof(rbd_group_image_info_t),
59307 */
59308 __pyx_t_1 = (__pyx_v_self->images != 0);
59309 if (__pyx_t_1) {
59310
59311 /* "rbd.pyx":5033
59312 * def __dealloc__(self):
59313 * if self.images:
59314 * rbd_group_image_list_cleanup(self.images, # <<<<<<<<<<<<<<
59315 * sizeof(rbd_group_image_info_t),
59316 * self.num_images)
59317 */
59318 rbd_group_image_list_cleanup(__pyx_v_self->images, (sizeof(rbd_group_image_info_t)), __pyx_v_self->num_images);
59319
59320 /* "rbd.pyx":5036
59321 * sizeof(rbd_group_image_info_t),
59322 * self.num_images)
59323 * free(self.images) # <<<<<<<<<<<<<<
59324 *
59325 * cdef class GroupSnapIterator(object):
59326 */
59327 free(__pyx_v_self->images);
59328
59329 /* "rbd.pyx":5032
59330 *
59331 * def __dealloc__(self):
59332 * if self.images: # <<<<<<<<<<<<<<
59333 * rbd_group_image_list_cleanup(self.images,
59334 * sizeof(rbd_group_image_info_t),
59335 */
59336 }
59337
59338 /* "rbd.pyx":5031
59339 * }
59340 *
59341 * def __dealloc__(self): # <<<<<<<<<<<<<<
59342 * if self.images:
59343 * rbd_group_image_list_cleanup(self.images,
59344 */
59345
59346 /* function exit code */
59347 __Pyx_RefNannyFinishContext();
59348}
59349
59350/* "rbd.pyx":5055
59351 * cdef object group
59352 *
59353 * def __init__(self, Group group): # <<<<<<<<<<<<<<
59354 * self.group = group
59355 * self.snaps = NULL
59356 */
59357
59358/* Python wrapper */
59359static int __pyx_pw_3rbd_17GroupSnapIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
59360static int __pyx_pw_3rbd_17GroupSnapIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
59361 struct __pyx_obj_3rbd_Group *__pyx_v_group = 0;
59362 int __pyx_lineno = 0;
59363 const char *__pyx_filename = NULL((void*)0);
59364 int __pyx_clineno = 0;
59365 int __pyx_r;
59366 __Pyx_RefNannyDeclarations
59367 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
59368 {
59369 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0};
59370 PyObject* values[1] = {0};
59371 if (unlikely(__pyx_kwds)__builtin_expect(!!(__pyx_kwds), 0)) {
59372 Py_ssize_t kw_args;
59373 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size);
59374 switch (pos_args) {
59375 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
59376 case 0: break;
59377 default: goto __pyx_L5_argtuple_error;
59378 }
59379 kw_args = PyDict_Size(__pyx_kwds);
59380 switch (pos_args) {
59381 case 0:
59382 if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_group)) != 0)__builtin_expect(!!((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_group
)) != 0), 1)
) kw_args--;
59383 else goto __pyx_L5_argtuple_error;
59384 }
59385 if (unlikely(kw_args > 0)__builtin_expect(!!(kw_args > 0), 0)) {
59386 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)__builtin_expect(!!(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames
, 0, values, pos_args, "__init__") < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5055; __pyx_clineno = __LINE__59386; goto __pyx_L3_error;}
59387 }
59388 } else if (PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size) != 1) {
59389 goto __pyx_L5_argtuple_error;
59390 } else {
59391 values[0] = PyTuple_GET_ITEM(__pyx_args, 0)(((PyTupleObject *)(__pyx_args))->ob_item[0]);
59392 }
59393 __pyx_v_group = ((struct __pyx_obj_3rbd_Group *)values[0]);
59394 }
59395 goto __pyx_L4_argument_unpacking_done;
59396 __pyx_L5_argtuple_error:;
59397 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)(((PyVarObject*)(__pyx_args))->ob_size)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5055; __pyx_clineno = __LINE__59397; goto __pyx_L3_error;}
59398 __pyx_L3_error:;
59399 __Pyx_AddTraceback("rbd.GroupSnapIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59400 __Pyx_RefNannyFinishContext();
59401 return -1;
59402 __pyx_L4_argument_unpacking_done:;
59403 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_3rbd_Group, 1, "group", 0))__builtin_expect(!!(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group
), __pyx_ptype_3rbd_Group, 1, "group", 0)), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5055; __pyx_clineno = __LINE__59403; goto __pyx_L1_error;}
59404 __pyx_r = __pyx_pf_3rbd_17GroupSnapIterator___init__(((struct __pyx_obj_3rbd_GroupSnapIterator *)__pyx_v_self), __pyx_v_group);
59405
59406 /* function exit code */
59407 goto __pyx_L0;
59408 __pyx_L1_error:;
59409 __pyx_r = -1;
59410 __pyx_L0:;
59411 __Pyx_RefNannyFinishContext();
59412 return __pyx_r;
59413}
59414
59415static int __pyx_pf_3rbd_17GroupSnapIterator___init__(struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self, struct __pyx_obj_3rbd_Group *__pyx_v_group) {
59416 int __pyx_v_ret;
59417 int __pyx_r;
59418 __Pyx_RefNannyDeclarations
59419 void *__pyx_t_1;
59420 int __pyx_t_2;
59421 PyObject *__pyx_t_3 = NULL((void*)0);
59422 PyObject *__pyx_t_4 = NULL((void*)0);
59423 PyObject *__pyx_t_5 = NULL((void*)0);
59424 PyObject *__pyx_t_6 = NULL((void*)0);
59425 struct __pyx_opt_args_3rbd_make_ex __pyx_t_7;
59426 int __pyx_lineno = 0;
59427 const char *__pyx_filename = NULL((void*)0);
59428 int __pyx_clineno = 0;
59429 __Pyx_RefNannySetupContext("__init__", 0);
59430
59431 /* "rbd.pyx":5056
59432 *
59433 * def __init__(self, Group group):
59434 * self.group = group # <<<<<<<<<<<<<<
59435 * self.snaps = NULL
59436 * self.num_snaps = 10
59437 */
59438 __Pyx_INCREF(((PyObject *)__pyx_v_group))( ((PyObject*)(((PyObject *)__pyx_v_group)))->ob_refcnt++);
59439 __Pyx_GIVEREF(((PyObject *)__pyx_v_group));
59440 __Pyx_GOTREF(__pyx_v_self->group);
59441 __Pyx_DECREF(__pyx_v_self->group)do { if ( --((PyObject*)(__pyx_v_self->group))->ob_refcnt
!= 0) ; else ( (*(((PyObject*)((PyObject *)(__pyx_v_self->
group)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(__pyx_v_self->group)))); } while (0)
;
59442 __pyx_v_self->group = ((PyObject *)__pyx_v_group);
59443
59444 /* "rbd.pyx":5057
59445 * def __init__(self, Group group):
59446 * self.group = group
59447 * self.snaps = NULL # <<<<<<<<<<<<<<
59448 * self.num_snaps = 10
59449 * while True:
59450 */
59451 __pyx_v_self->snaps = NULL((void*)0);
59452
59453 /* "rbd.pyx":5058
59454 * self.group = group
59455 * self.snaps = NULL
59456 * self.num_snaps = 10 # <<<<<<<<<<<<<<
59457 * while True:
59458 * self.snaps = <rbd_group_snap_info_t*>realloc_chk(self.snaps,
59459 */
59460 __pyx_v_self->num_snaps = 10;
59461
59462 /* "rbd.pyx":5059
59463 * self.snaps = NULL
59464 * self.num_snaps = 10
59465 * while True: # <<<<<<<<<<<<<<
59466 * self.snaps = <rbd_group_snap_info_t*>realloc_chk(self.snaps,
59467 * self.num_snaps *
59468 */
59469 while (1) {
59470
59471 /* "rbd.pyx":5060
59472 * self.num_snaps = 10
59473 * while True:
59474 * self.snaps = <rbd_group_snap_info_t*>realloc_chk(self.snaps, # <<<<<<<<<<<<<<
59475 * self.num_snaps *
59476 * sizeof(rbd_group_snap_info_t))
59477 */
59478 __pyx_t_1 = __pyx_f_3rbd_realloc_chk(__pyx_v_self->snaps, (__pyx_v_self->num_snaps * (sizeof(rbd_group_snap_info_t)))); if (unlikely(__pyx_t_1 == NULL)__builtin_expect(!!(__pyx_t_1 == ((void*)0)), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5060; __pyx_clineno = __LINE__59478; goto __pyx_L1_error;}
59479 __pyx_v_self->snaps = ((rbd_group_snap_info_t *)__pyx_t_1);
59480
59481 /* "rbd.pyx":5063
59482 * self.num_snaps *
59483 * sizeof(rbd_group_snap_info_t))
59484 * with nogil: # <<<<<<<<<<<<<<
59485 * ret = rbd_group_snap_list(group._ioctx, group._name, self.snaps,
59486 * sizeof(rbd_group_snap_info_t),
59487 */
59488 {
59489 #ifdef WITH_THREAD1
59490 PyThreadState *_save;
59491 Py_UNBLOCK_THREADS_save = PyEval_SaveThread();
59492 #endif
59493 /*try:*/ {
59494
59495 /* "rbd.pyx":5064
59496 * sizeof(rbd_group_snap_info_t))
59497 * with nogil:
59498 * ret = rbd_group_snap_list(group._ioctx, group._name, self.snaps, # <<<<<<<<<<<<<<
59499 * sizeof(rbd_group_snap_info_t),
59500 * &self.num_snaps)
59501 */
59502 __pyx_v_ret = rbd_group_snap_list(__pyx_v_group->_ioctx, __pyx_v_group->_name, __pyx_v_self->snaps, (sizeof(rbd_group_snap_info_t)), (&__pyx_v_self->num_snaps));
59503 }
59504
59505 /* "rbd.pyx":5063
59506 * self.num_snaps *
59507 * sizeof(rbd_group_snap_info_t))
59508 * with nogil: # <<<<<<<<<<<<<<
59509 * ret = rbd_group_snap_list(group._ioctx, group._name, self.snaps,
59510 * sizeof(rbd_group_snap_info_t),
59511 */
59512 /*finally:*/ {
59513 /*normal exit:*/{
59514 #ifdef WITH_THREAD1
59515 Py_BLOCK_THREADSPyEval_RestoreThread(_save);
59516 #endif
59517 goto __pyx_L9;
59518 }
59519 __pyx_L9:;
59520 }
59521 }
59522
59523 /* "rbd.pyx":5068
59524 * &self.num_snaps)
59525 *
59526 * if ret >= 0: # <<<<<<<<<<<<<<
59527 * break
59528 * elif ret != -errno.ERANGE:
59529 */
59530 __pyx_t_2 = ((__pyx_v_ret >= 0) != 0);
59531 if (__pyx_t_2) {
59532
59533 /* "rbd.pyx":5069
59534 *
59535 * if ret >= 0:
59536 * break # <<<<<<<<<<<<<<
59537 * elif ret != -errno.ERANGE:
59538 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception)
59539 */
59540 goto __pyx_L4_break;
59541
59542 /* "rbd.pyx":5068
59543 * &self.num_snaps)
59544 *
59545 * if ret >= 0: # <<<<<<<<<<<<<<
59546 * break
59547 * elif ret != -errno.ERANGE:
59548 */
59549 }
59550
59551 /* "rbd.pyx":5070
59552 * if ret >= 0:
59553 * break
59554 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
59555 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception)
59556 *
59557 */
59558 __pyx_t_2 = ((__pyx_v_ret != (-ERANGE34)) != 0);
59559 if (__pyx_t_2) {
59560
59561 /* "rbd.pyx":5071
59562 * break
59563 * elif ret != -errno.ERANGE:
59564 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception) # <<<<<<<<<<<<<<
59565 *
59566 * def __iter__(self):
59567 */
59568 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5071; __pyx_clineno = __LINE__59568; goto __pyx_L1_error;}
59569 __Pyx_GOTREF(__pyx_t_3);
59570 __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_error_listing_snapshots_for_grou, __pyx_v_group->name)PyString_Format(__pyx_kp_s_error_listing_snapshots_for_grou, __pyx_v_group
->name)
; if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5071; __pyx_clineno = __LINE__59570; goto __pyx_L1_error;}
59571 __Pyx_GOTREF(__pyx_t_4);
59572 __pyx_t_5 = __pyx_v_3rbd_group_errno_to_exception;
59573 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
59574 __pyx_t_7.__pyx_n = 1;
59575 __pyx_t_7.exception_map = __pyx_t_5;
59576 __pyx_t_6 = __pyx_f_3rbd_make_ex(__pyx_t_3, __pyx_t_4, &__pyx_t_7); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5071; __pyx_clineno = __LINE__59576; goto __pyx_L1_error;}
59577 __Pyx_GOTREF(__pyx_t_6);
59578 __Pyx_DECREF(__pyx_t_3)do { if ( --((PyObject*)(__pyx_t_3))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_3)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_3)))); } while (
0)
; __pyx_t_3 = 0;
59579 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59580 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
59581 __Pyx_Raise(__pyx_t_6, 0, 0, 0);
59582 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
59583 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5071; __pyx_clineno = __LINE__59583; goto __pyx_L1_error;}
59584
59585 /* "rbd.pyx":5070
59586 * if ret >= 0:
59587 * break
59588 * elif ret != -errno.ERANGE: # <<<<<<<<<<<<<<
59589 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception)
59590 *
59591 */
59592 }
59593 }
59594 __pyx_L4_break:;
59595
59596 /* "rbd.pyx":5055
59597 * cdef object group
59598 *
59599 * def __init__(self, Group group): # <<<<<<<<<<<<<<
59600 * self.group = group
59601 * self.snaps = NULL
59602 */
59603
59604 /* function exit code */
59605 __pyx_r = 0;
59606 goto __pyx_L0;
59607 __pyx_L1_error:;
59608 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
59609 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
59610 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
59611 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
59612 __Pyx_AddTraceback("rbd.GroupSnapIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59613 __pyx_r = -1;
59614 __pyx_L0:;
59615 __Pyx_RefNannyFinishContext();
59616 return __pyx_r;
59617}
59618static PyObject *__pyx_gb_3rbd_17GroupSnapIterator_4generator14(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
59619
59620/* "rbd.pyx":5073
59621 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception)
59622 *
59623 * def __iter__(self): # <<<<<<<<<<<<<<
59624 * for i in range(self.num_snaps):
59625 * yield {
59626 */
59627
59628/* Python wrapper */
59629static PyObject *__pyx_pw_3rbd_17GroupSnapIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
59630static PyObject *__pyx_pw_3rbd_17GroupSnapIterator_3__iter__(PyObject *__pyx_v_self) {
59631 PyObject *__pyx_r = 0;
59632 __Pyx_RefNannyDeclarations
59633 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
59634 __pyx_r = __pyx_pf_3rbd_17GroupSnapIterator_2__iter__(((struct __pyx_obj_3rbd_GroupSnapIterator *)__pyx_v_self));
59635
59636 /* function exit code */
59637 __Pyx_RefNannyFinishContext();
59638 return __pyx_r;
59639}
59640
59641static PyObject *__pyx_pf_3rbd_17GroupSnapIterator_2__iter__(struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self) {
59642 struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *__pyx_cur_scope;
59643 PyObject *__pyx_r = NULL((void*)0);
59644 __Pyx_RefNannyDeclarations
59645 int __pyx_lineno = 0;
59646 const char *__pyx_filename = NULL((void*)0);
59647 int __pyx_clineno = 0;
59648 __Pyx_RefNannySetupContext("__iter__", 0);
59649 __pyx_cur_scope = (struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *)__pyx_tp_new_3rbd___pyx_scope_struct_15___iter__(__pyx_ptype_3rbd___pyx_scope_struct_15___iter__, __pyx_empty_tuple, NULL((void*)0));
59650 if (unlikely(!__pyx_cur_scope)__builtin_expect(!!(!__pyx_cur_scope), 0)) {
59651 __Pyx_RefNannyFinishContext();
59652 return NULL((void*)0);
59653 }
59654 __Pyx_GOTREF(__pyx_cur_scope);
59655 __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
59656 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self)( ((PyObject*)((PyObject *)__pyx_cur_scope->__pyx_v_self))
->ob_refcnt++)
;
59657 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
59658 {
59659 __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3rbd_17GroupSnapIterator_4generator14, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_GroupSnapIterator___iter)__Pyx__Coroutine_New(__pyx_GeneratorType, (__pyx_coroutine_body_t
) __pyx_gb_3rbd_17GroupSnapIterator_4generator14, (PyObject *
) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_GroupSnapIterator___iter
)
; if (unlikely(!gen)__builtin_expect(!!(!gen), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5073; __pyx_clineno = __LINE__59659; goto __pyx_L1_error;}
59660 __Pyx_DECREF(__pyx_cur_scope)do { if ( --((PyObject*)(__pyx_cur_scope))->ob_refcnt != 0
) ; else ( (*(((PyObject*)((PyObject *)(__pyx_cur_scope)))->
ob_type)->tp_dealloc)((PyObject *)((PyObject *)(__pyx_cur_scope
)))); } while (0)
;
59661 __Pyx_RefNannyFinishContext();
59662 return (PyObject *) gen;
59663 }
59664
59665 /* function exit code */
59666 __pyx_L1_error:;
59667 __Pyx_AddTraceback("rbd.GroupSnapIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59668 __pyx_r = NULL((void*)0);
59669 __Pyx_DECREF(((PyObject *)__pyx_cur_scope))do { if ( --((PyObject*)(((PyObject *)__pyx_cur_scope)))->
ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(((PyObject
*)__pyx_cur_scope))))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(((PyObject *)__pyx_cur_scope))))); } while (
0)
;
59670 __Pyx_XGIVEREF(__pyx_r);
59671 __Pyx_RefNannyFinishContext();
59672 return __pyx_r;
59673}
59674
59675static PyObject *__pyx_gb_3rbd_17GroupSnapIterator_4generator14(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
59676{
59677 struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *__pyx_cur_scope = ((struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *)__pyx_generator->closure);
59678 PyObject *__pyx_r = NULL((void*)0);
59679 size_t __pyx_t_1;
59680 size_t __pyx_t_2;
59681 PyObject *__pyx_t_3 = NULL((void*)0);
59682 PyObject *__pyx_t_4 = NULL((void*)0);
59683 PyObject *__pyx_t_5 = NULL((void*)0);
59684 PyObject *__pyx_t_6 = NULL((void*)0);
59685 PyObject *__pyx_t_7 = NULL((void*)0);
59686 PyObject *__pyx_t_8 = NULL((void*)0);
59687 int __pyx_lineno = 0;
59688 const char *__pyx_filename = NULL((void*)0);
59689 int __pyx_clineno = 0;
59690 __Pyx_RefNannyDeclarations
59691 __Pyx_RefNannySetupContext("None", 0);
59692 switch (__pyx_generator->resume_label) {
59693 case 0: goto __pyx_L3_first_run;
59694 case 1: goto __pyx_L6_resume_from_yield;
59695 default: /* CPython raises the right error here */
59696 __Pyx_RefNannyFinishContext();
59697 return NULL((void*)0);
59698 }
59699 __pyx_L3_first_run:;
59700 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5073; __pyx_clineno = __LINE__59700; goto __pyx_L1_error;}
59701
59702 /* "rbd.pyx":5074
59703 *
59704 * def __iter__(self):
59705 * for i in range(self.num_snaps): # <<<<<<<<<<<<<<
59706 * yield {
59707 * 'name' : decode_cstr(self.snaps[i].name),
59708 */
59709 __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->num_snaps;
59710 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
59711 __pyx_cur_scope->__pyx_v_i = __pyx_t_2;
59712
59713 /* "rbd.pyx":5076
59714 * for i in range(self.num_snaps):
59715 * yield {
59716 * 'name' : decode_cstr(self.snaps[i].name), # <<<<<<<<<<<<<<
59717 * 'state' : self.snaps[i].state,
59718 * }
59719 */
59720 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)__builtin_expect(!!(!__pyx_t_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59720; goto __pyx_L1_error;}
59721 __Pyx_GOTREF(__pyx_t_3);
59722 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59722; goto __pyx_L1_error;}
59723 __Pyx_GOTREF(__pyx_t_5);
59724 __pyx_t_6 = __Pyx_PyBytes_FromStringPyString_FromString((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).name); if (unlikely(!__pyx_t_6)__builtin_expect(!!(!__pyx_t_6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59724; goto __pyx_L1_error;}
59725 __Pyx_GOTREF(__pyx_t_6);
59726 __pyx_t_7 = NULL((void*)0);
59727 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_5))__builtin_expect(!!(((__pyx_t_5)->ob_type == &PyMethod_Type
)), 0)
) {
59728 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_self);
59729 if (likely(__pyx_t_7)__builtin_expect(!!(__pyx_t_7), 1)) {
59730 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5)(((PyMethodObject *)__pyx_t_5) -> im_func);
59731 __Pyx_INCREF(__pyx_t_7)( ((PyObject*)(__pyx_t_7))->ob_refcnt++);
59732 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
59733 __Pyx_DECREF_SET(__pyx_t_5, function)do { PyObject *tmp = (PyObject *) __pyx_t_5; __pyx_t_5 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
59734 }
59735 }
59736 if (!__pyx_t_7) {
59737 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59737; goto __pyx_L1_error;}
59738 __Pyx_DECREF(__pyx_t_6)do { if ( --((PyObject*)(__pyx_t_6))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_6)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_6)))); } while (
0)
; __pyx_t_6 = 0;
59739 __Pyx_GOTREF(__pyx_t_4);
59740 } else {
59741 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59741; goto __pyx_L1_error;}
59742 __Pyx_GOTREF(__pyx_t_8);
59743 __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_7); __pyx_t_7 = NULL((void*)0);
59744 __Pyx_GIVEREF(__pyx_t_6);
59745 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_6);
59746 __pyx_t_6 = 0;
59747 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59747; goto __pyx_L1_error;}
59748 __Pyx_GOTREF(__pyx_t_4);
59749 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
59750 }
59751 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
59752 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59752; goto __pyx_L1_error;}
59753 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59754
59755 /* "rbd.pyx":5077
59756 * yield {
59757 * 'name' : decode_cstr(self.snaps[i].name),
59758 * 'state' : self.snaps[i].state, # <<<<<<<<<<<<<<
59759 * }
59760 *
59761 */
59762 __pyx_t_4 = __Pyx_PyInt_From_rbd_group_snap_state_t((__pyx_cur_scope->__pyx_v_self->snaps[__pyx_cur_scope->__pyx_v_i]).state); if (unlikely(!__pyx_t_4)__builtin_expect(!!(!__pyx_t_4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5077; __pyx_clineno = __LINE__59762; goto __pyx_L1_error;}
59763 __Pyx_GOTREF(__pyx_t_4);
59764 if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_state, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__59764; goto __pyx_L1_error;}
59765 __Pyx_DECREF(__pyx_t_4)do { if ( --((PyObject*)(__pyx_t_4))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_4)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_4)))); } while (
0)
; __pyx_t_4 = 0;
59766 __pyx_r = __pyx_t_3;
59767 __pyx_t_3 = 0;
59768 __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
59769 __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
59770 __Pyx_XGIVEREF(__pyx_r);
59771 __Pyx_RefNannyFinishContext();
59772 /* return from generator, yielding value */
59773 __pyx_generator->resume_label = 1;
59774 return __pyx_r;
59775 __pyx_L6_resume_from_yield:;
59776 __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
59777 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
59778 if (unlikely(!__pyx_sent_value)__builtin_expect(!!(!__pyx_sent_value), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5075; __pyx_clineno = __LINE__59778; goto __pyx_L1_error;}
59779 }
59780
59781 /* "rbd.pyx":5073
59782 * raise make_ex(ret, 'error listing snapshots for group %s' % group.name, group_errno_to_exception)
59783 *
59784 * def __iter__(self): # <<<<<<<<<<<<<<
59785 * for i in range(self.num_snaps):
59786 * yield {
59787 */
59788
59789 /* function exit code */
59790 PyErr_SetNone(PyExc_StopIteration);
59791 goto __pyx_L0;
59792 __pyx_L1_error:;
59793 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
;
59794 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
;
59795 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
59796 __Pyx_XDECREF(__pyx_t_6)do { if ((__pyx_t_6) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_6))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_6)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_6)))); } while (0); } while (0)
;
59797 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
59798 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
59799 __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
59800 __pyx_L0:;
59801 __Pyx_XDECREF(__pyx_r)do { if ((__pyx_r) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_r))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(__pyx_r)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(__pyx_r)))); } while (0); } while (0)
; __pyx_r = 0;
59802 __pyx_generator->resume_label = -1;
59803 __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
59804 __Pyx_RefNannyFinishContext();
59805 return __pyx_r;
59806}
59807
59808/* "rbd.pyx":5080
59809 * }
59810 *
59811 * def __dealloc__(self): # <<<<<<<<<<<<<<
59812 * if self.snaps:
59813 * rbd_group_snap_list_cleanup(self.snaps,
59814 */
59815
59816/* Python wrapper */
59817static void __pyx_pw_3rbd_17GroupSnapIterator_6__dealloc__(PyObject *__pyx_v_self); /*proto*/
59818static void __pyx_pw_3rbd_17GroupSnapIterator_6__dealloc__(PyObject *__pyx_v_self) {
59819 __Pyx_RefNannyDeclarations
59820 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
59821 __pyx_pf_3rbd_17GroupSnapIterator_5__dealloc__(((struct __pyx_obj_3rbd_GroupSnapIterator *)__pyx_v_self));
59822
59823 /* function exit code */
59824 __Pyx_RefNannyFinishContext();
59825}
59826
59827static void __pyx_pf_3rbd_17GroupSnapIterator_5__dealloc__(struct __pyx_obj_3rbd_GroupSnapIterator *__pyx_v_self) {
59828 __Pyx_RefNannyDeclarations
59829 int __pyx_t_1;
59830 __Pyx_RefNannySetupContext("__dealloc__", 0);
59831
59832 /* "rbd.pyx":5081
59833 *
59834 * def __dealloc__(self):
59835 * if self.snaps: # <<<<<<<<<<<<<<
59836 * rbd_group_snap_list_cleanup(self.snaps,
59837 * sizeof(rbd_group_snap_info_t),
59838 */
59839 __pyx_t_1 = (__pyx_v_self->snaps != 0);
59840 if (__pyx_t_1) {
59841
59842 /* "rbd.pyx":5082
59843 * def __dealloc__(self):
59844 * if self.snaps:
59845 * rbd_group_snap_list_cleanup(self.snaps, # <<<<<<<<<<<<<<
59846 * sizeof(rbd_group_snap_info_t),
59847 * self.num_snaps)
59848 */
59849 rbd_group_snap_list_cleanup(__pyx_v_self->snaps, (sizeof(rbd_group_snap_info_t)), __pyx_v_self->num_snaps);
59850
59851 /* "rbd.pyx":5085
59852 * sizeof(rbd_group_snap_info_t),
59853 * self.num_snaps)
59854 * free(self.snaps) # <<<<<<<<<<<<<<
59855 */
59856 free(__pyx_v_self->snaps);
59857
59858 /* "rbd.pyx":5081
59859 *
59860 * def __dealloc__(self):
59861 * if self.snaps: # <<<<<<<<<<<<<<
59862 * rbd_group_snap_list_cleanup(self.snaps,
59863 * sizeof(rbd_group_snap_info_t),
59864 */
59865 }
59866
59867 /* "rbd.pyx":5080
59868 * }
59869 *
59870 * def __dealloc__(self): # <<<<<<<<<<<<<<
59871 * if self.snaps:
59872 * rbd_group_snap_list_cleanup(self.snaps,
59873 */
59874
59875 /* function exit code */
59876 __Pyx_RefNannyFinishContext();
59877}
59878static struct __pyx_vtabstruct_3rbd_Completion __pyx_vtable_3rbd_Completion;
59879
59880static PyObject *__pyx_tp_new_3rbd_Completion(PyTypeObject *t, PyObject *a, PyObject *k) {
59881 struct __pyx_obj_3rbd_Completion *p;
59882 PyObject *o;
59883 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
59884 o = (*t->tp_alloc)(t, 0);
59885 } else {
59886 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
59887 }
59888 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
59889 p = ((struct __pyx_obj_3rbd_Completion *)o);
59890 p->__pyx_vtab = __pyx_vtabptr_3rbd_Completion;
59891 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
59892 p->oncomplete = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
59893 p->exc_info = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
59894 if (unlikely(__pyx_pw_3rbd_10Completion_1__cinit__(o, a, k) < 0)__builtin_expect(!!(__pyx_pw_3rbd_10Completion_1__cinit__(o, a
, k) < 0), 0)
) {
59895 Py_DECREF(o)do { if ( --((PyObject*)(o))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(o)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(o)))); } while (0)
; o = 0;
59896 }
59897 return o;
59898}
59899
59900static void __pyx_tp_dealloc_3rbd_Completion(PyObject *o) {
59901 struct __pyx_obj_3rbd_Completion *p = (struct __pyx_obj_3rbd_Completion *)o;
59902 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
59903 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
59904 if (PyObject_CallFinalizerFromDealloc(o)) return;
59905 }
59906 #endif
59907 PyObject_GC_UnTrack(o);
59908 {
59909 PyObject *etype, *eval, *etb;
59910 PyErr_Fetch(&etype, &eval, &etb);
59911 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
59912 __pyx_pw_3rbd_10Completion_9__dealloc__(o);
59913 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
59914 PyErr_Restore(etype, eval, etb);
59915 }
59916 Py_CLEAR(p->image)do { if (p->image) { PyObject *_py_tmp = (PyObject *)(p->
image); (p->image) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
59917 Py_CLEAR(p->oncomplete)do { if (p->oncomplete) { PyObject *_py_tmp = (PyObject *)
(p->oncomplete); (p->oncomplete) = ((void*)0); do { if (
--((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
59918 Py_CLEAR(p->exc_info)do { if (p->exc_info) { PyObject *_py_tmp = (PyObject *)(p
->exc_info); (p->exc_info) = ((void*)0); do { if ( --((
PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
59919 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
59920}
59921
59922static int __pyx_tp_traverse_3rbd_Completion(PyObject *o, visitproc v, void *a) {
59923 int e;
59924 struct __pyx_obj_3rbd_Completion *p = (struct __pyx_obj_3rbd_Completion *)o;
59925 if (p->image) {
59926 e = (*v)(p->image, a); if (e) return e;
59927 }
59928 if (p->oncomplete) {
59929 e = (*v)(p->oncomplete, a); if (e) return e;
59930 }
59931 if (p->exc_info) {
59932 e = (*v)(p->exc_info, a); if (e) return e;
59933 }
59934 return 0;
59935}
59936
59937static int __pyx_tp_clear_3rbd_Completion(PyObject *o) {
59938 PyObject* tmp;
59939 struct __pyx_obj_3rbd_Completion *p = (struct __pyx_obj_3rbd_Completion *)o;
59940 tmp = ((PyObject*)p->image);
59941 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
59942 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
59943 tmp = ((PyObject*)p->oncomplete);
59944 p->oncomplete = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
59945 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
59946 tmp = ((PyObject*)p->exc_info);
59947 p->exc_info = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
59948 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
59949 return 0;
59950}
59951
59952static PyMethodDef __pyx_methods_3rbd_Completion[] = {
59953 {"is_complete", (PyCFunction)__pyx_pw_3rbd_10Completion_3is_complete, METH_NOARGS0x0004, __pyx_doc_3rbd_10Completion_2is_complete},
59954 {"wait_for_complete_and_cb", (PyCFunction)__pyx_pw_3rbd_10Completion_5wait_for_complete_and_cb, METH_NOARGS0x0004, __pyx_doc_3rbd_10Completion_4wait_for_complete_and_cb},
59955 {"get_return_value", (PyCFunction)__pyx_pw_3rbd_10Completion_7get_return_value, METH_NOARGS0x0004, __pyx_doc_3rbd_10Completion_6get_return_value},
59956 {0, 0, 0, 0}
59957};
59958
59959static PyTypeObject __pyx_type_3rbd_Completion = {
59960 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
59961 "rbd.Completion", /*tp_name*/
59962 sizeof(struct __pyx_obj_3rbd_Completion), /*tp_basicsize*/
59963 0, /*tp_itemsize*/
59964 __pyx_tp_dealloc_3rbd_Completion, /*tp_dealloc*/
59965 0, /*tp_print*/
59966 0, /*tp_getattr*/
59967 0, /*tp_setattr*/
59968 #if PY_MAJOR_VERSION2 < 3
59969 0, /*tp_compare*/
59970 #endif
59971 #if PY_MAJOR_VERSION2 >= 3
59972 0, /*tp_as_async*/
59973 #endif
59974 0, /*tp_repr*/
59975 0, /*tp_as_number*/
59976 0, /*tp_as_sequence*/
59977 0, /*tp_as_mapping*/
59978 0, /*tp_hash*/
59979 0, /*tp_call*/
59980 0, /*tp_str*/
59981 0, /*tp_getattro*/
59982 0, /*tp_setattro*/
59983 0, /*tp_as_buffer*/
59984 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
59985 "completion object", /*tp_doc*/
59986 __pyx_tp_traverse_3rbd_Completion, /*tp_traverse*/
59987 __pyx_tp_clear_3rbd_Completion, /*tp_clear*/
59988 0, /*tp_richcompare*/
59989 0, /*tp_weaklistoffset*/
59990 0, /*tp_iter*/
59991 0, /*tp_iternext*/
59992 __pyx_methods_3rbd_Completion, /*tp_methods*/
59993 0, /*tp_members*/
59994 0, /*tp_getset*/
59995 0, /*tp_base*/
59996 0, /*tp_dict*/
59997 0, /*tp_descr_get*/
59998 0, /*tp_descr_set*/
59999 0, /*tp_dictoffset*/
60000 0, /*tp_init*/
60001 0, /*tp_alloc*/
60002 __pyx_tp_new_3rbd_Completion, /*tp_new*/
60003 0, /*tp_free*/
60004 0, /*tp_is_gc*/
60005 0, /*tp_bases*/
60006 0, /*tp_mro*/
60007 0, /*tp_cache*/
60008 0, /*tp_subclasses*/
60009 0, /*tp_weaklist*/
60010 0, /*tp_del*/
60011 0, /*tp_version_tag*/
60012 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60013 0, /*tp_finalize*/
60014 #endif
60015};
60016
60017static PyObject *__pyx_tp_new_3rbd_MirrorPeerIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60018 PyObject *o;
60019 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60020 o = (*t->tp_alloc)(t, 0);
60021 } else {
60022 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60023 }
60024 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60025 return o;
60026}
60027
60028static void __pyx_tp_dealloc_3rbd_MirrorPeerIterator(PyObject *o) {
60029 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60030 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
60031 if (PyObject_CallFinalizerFromDealloc(o)) return;
60032 }
60033 #endif
60034 {
60035 PyObject *etype, *eval, *etb;
60036 PyErr_Fetch(&etype, &eval, &etb);
60037 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60038 __pyx_pw_3rbd_18MirrorPeerIterator_6__dealloc__(o);
60039 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60040 PyErr_Restore(etype, eval, etb);
60041 }
60042 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60043}
60044
60045static PyMethodDef __pyx_methods_3rbd_MirrorPeerIterator[] = {
60046 {0, 0, 0, 0}
60047};
60048
60049static PyTypeObject __pyx_type_3rbd_MirrorPeerIterator = {
60050 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60051 "rbd.MirrorPeerIterator", /*tp_name*/
60052 sizeof(struct __pyx_obj_3rbd_MirrorPeerIterator), /*tp_basicsize*/
60053 0, /*tp_itemsize*/
60054 __pyx_tp_dealloc_3rbd_MirrorPeerIterator, /*tp_dealloc*/
60055 0, /*tp_print*/
60056 0, /*tp_getattr*/
60057 0, /*tp_setattr*/
60058 #if PY_MAJOR_VERSION2 < 3
60059 0, /*tp_compare*/
60060 #endif
60061 #if PY_MAJOR_VERSION2 >= 3
60062 0, /*tp_as_async*/
60063 #endif
60064 0, /*tp_repr*/
60065 0, /*tp_as_number*/
60066 0, /*tp_as_sequence*/
60067 0, /*tp_as_mapping*/
60068 0, /*tp_hash*/
60069 0, /*tp_call*/
60070 0, /*tp_str*/
60071 0, /*tp_getattro*/
60072 0, /*tp_setattro*/
60073 0, /*tp_as_buffer*/
60074 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
60075 "MirrorPeerIterator(ioctx)\n\n Iterator over mirror peer info for a pool.\n\n Yields a dictionary containing information about a peer.\n\n Keys are:\n\n * ``uuid`` (str) - uuid of the peer\n\n * ``cluster_name`` (str) - cluster name of the peer\n\n * ``client_name`` (str) - client name of the peer\n ", /*tp_doc*/
60076 0, /*tp_traverse*/
60077 0, /*tp_clear*/
60078 0, /*tp_richcompare*/
60079 0, /*tp_weaklistoffset*/
60080 __pyx_pw_3rbd_18MirrorPeerIterator_3__iter__, /*tp_iter*/
60081 0, /*tp_iternext*/
60082 __pyx_methods_3rbd_MirrorPeerIterator, /*tp_methods*/
60083 0, /*tp_members*/
60084 0, /*tp_getset*/
60085 0, /*tp_base*/
60086 0, /*tp_dict*/
60087 0, /*tp_descr_get*/
60088 0, /*tp_descr_set*/
60089 0, /*tp_dictoffset*/
60090 __pyx_pw_3rbd_18MirrorPeerIterator_1__init__, /*tp_init*/
60091 0, /*tp_alloc*/
60092 __pyx_tp_new_3rbd_MirrorPeerIterator, /*tp_new*/
60093 0, /*tp_free*/
60094 0, /*tp_is_gc*/
60095 0, /*tp_bases*/
60096 0, /*tp_mro*/
60097 0, /*tp_cache*/
60098 0, /*tp_subclasses*/
60099 0, /*tp_weaklist*/
60100 0, /*tp_del*/
60101 0, /*tp_version_tag*/
60102 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60103 0, /*tp_finalize*/
60104 #endif
60105};
60106
60107static PyObject *__pyx_tp_new_3rbd_MirrorImageStatusIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60108 PyObject *o;
60109 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60110 o = (*t->tp_alloc)(t, 0);
60111 } else {
60112 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60113 }
60114 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60115 return o;
60116}
60117
60118static void __pyx_tp_dealloc_3rbd_MirrorImageStatusIterator(PyObject *o) {
60119 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60120 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
60121 if (PyObject_CallFinalizerFromDealloc(o)) return;
60122 }
60123 #endif
60124 {
60125 PyObject *etype, *eval, *etb;
60126 PyErr_Fetch(&etype, &eval, &etb);
60127 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60128 __pyx_pw_3rbd_25MirrorImageStatusIterator_6__dealloc__(o);
60129 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60130 PyErr_Restore(etype, eval, etb);
60131 }
60132 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60133}
60134
60135static PyMethodDef __pyx_methods_3rbd_MirrorImageStatusIterator[] = {
60136 {"get_next_chunk", (PyCFunction)__pyx_pw_3rbd_25MirrorImageStatusIterator_8get_next_chunk, METH_NOARGS0x0004, __pyx_doc_3rbd_25MirrorImageStatusIterator_7get_next_chunk},
60137 {0, 0, 0, 0}
60138};
60139
60140static PyTypeObject __pyx_type_3rbd_MirrorImageStatusIterator = {
60141 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60142 "rbd.MirrorImageStatusIterator", /*tp_name*/
60143 sizeof(struct __pyx_obj_3rbd_MirrorImageStatusIterator), /*tp_basicsize*/
60144 0, /*tp_itemsize*/
60145 __pyx_tp_dealloc_3rbd_MirrorImageStatusIterator, /*tp_dealloc*/
60146 0, /*tp_print*/
60147 0, /*tp_getattr*/
60148 0, /*tp_setattr*/
60149 #if PY_MAJOR_VERSION2 < 3
60150 0, /*tp_compare*/
60151 #endif
60152 #if PY_MAJOR_VERSION2 >= 3
60153 0, /*tp_as_async*/
60154 #endif
60155 0, /*tp_repr*/
60156 0, /*tp_as_number*/
60157 0, /*tp_as_sequence*/
60158 0, /*tp_as_mapping*/
60159 0, /*tp_hash*/
60160 0, /*tp_call*/
60161 0, /*tp_str*/
60162 0, /*tp_getattro*/
60163 0, /*tp_setattro*/
60164 0, /*tp_as_buffer*/
60165 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
60166 "MirrorImageStatusIterator(ioctx)\n\n Iterator over mirror image status for a pool.\n\n Yields a dictionary containing mirror status of an image.\n\n Keys are:\n\n * ``name`` (str) - mirror image name\n\n * ``id`` (str) - mirror image id\n\n * `info` (dict) - mirror image info\n\n * `state` (int) - mirror state\n\n * `description` (str) - status description\n\n * `last_update` (datetime) - last status update time\n\n * ``up`` (bool) - is mirroring agent up\n ", /*tp_doc*/
60167 0, /*tp_traverse*/
60168 0, /*tp_clear*/
60169 0, /*tp_richcompare*/
60170 0, /*tp_weaklistoffset*/
60171 __pyx_pw_3rbd_25MirrorImageStatusIterator_3__iter__, /*tp_iter*/
60172 0, /*tp_iternext*/
60173 __pyx_methods_3rbd_MirrorImageStatusIterator, /*tp_methods*/
60174 0, /*tp_members*/
60175 0, /*tp_getset*/
60176 0, /*tp_base*/
60177 0, /*tp_dict*/
60178 0, /*tp_descr_get*/
60179 0, /*tp_descr_set*/
60180 0, /*tp_dictoffset*/
60181 __pyx_pw_3rbd_25MirrorImageStatusIterator_1__init__, /*tp_init*/
60182 0, /*tp_alloc*/
60183 __pyx_tp_new_3rbd_MirrorImageStatusIterator, /*tp_new*/
60184 0, /*tp_free*/
60185 0, /*tp_is_gc*/
60186 0, /*tp_bases*/
60187 0, /*tp_mro*/
60188 0, /*tp_cache*/
60189 0, /*tp_subclasses*/
60190 0, /*tp_weaklist*/
60191 0, /*tp_del*/
60192 0, /*tp_version_tag*/
60193 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60194 0, /*tp_finalize*/
60195 #endif
60196};
60197
60198static PyObject *__pyx_tp_new_3rbd_MirrorImageInstanceIdIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60199 PyObject *o;
60200 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60201 o = (*t->tp_alloc)(t, 0);
60202 } else {
60203 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60204 }
60205 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60206 return o;
60207}
60208
60209static void __pyx_tp_dealloc_3rbd_MirrorImageInstanceIdIterator(PyObject *o) {
60210 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60211 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
60212 if (PyObject_CallFinalizerFromDealloc(o)) return;
60213 }
60214 #endif
60215 {
60216 PyObject *etype, *eval, *etb;
60217 PyErr_Fetch(&etype, &eval, &etb);
60218 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60219 __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_6__dealloc__(o);
60220 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60221 PyErr_Restore(etype, eval, etb);
60222 }
60223 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60224}
60225
60226static PyMethodDef __pyx_methods_3rbd_MirrorImageInstanceIdIterator[] = {
60227 {"get_next_chunk", (PyCFunction)__pyx_pw_3rbd_29MirrorImageInstanceIdIterator_8get_next_chunk, METH_NOARGS0x0004, __pyx_doc_3rbd_29MirrorImageInstanceIdIterator_7get_next_chunk},
60228 {0, 0, 0, 0}
60229};
60230
60231static PyTypeObject __pyx_type_3rbd_MirrorImageInstanceIdIterator = {
60232 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60233 "rbd.MirrorImageInstanceIdIterator", /*tp_name*/
60234 sizeof(struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator), /*tp_basicsize*/
60235 0, /*tp_itemsize*/
60236 __pyx_tp_dealloc_3rbd_MirrorImageInstanceIdIterator, /*tp_dealloc*/
60237 0, /*tp_print*/
60238 0, /*tp_getattr*/
60239 0, /*tp_setattr*/
60240 #if PY_MAJOR_VERSION2 < 3
60241 0, /*tp_compare*/
60242 #endif
60243 #if PY_MAJOR_VERSION2 >= 3
60244 0, /*tp_as_async*/
60245 #endif
60246 0, /*tp_repr*/
60247 0, /*tp_as_number*/
60248 0, /*tp_as_sequence*/
60249 0, /*tp_as_mapping*/
60250 0, /*tp_hash*/
60251 0, /*tp_call*/
60252 0, /*tp_str*/
60253 0, /*tp_getattro*/
60254 0, /*tp_setattro*/
60255 0, /*tp_as_buffer*/
60256 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
60257 "MirrorImageInstanceIdIterator(ioctx)\n\n Iterator over mirror image instance id for a pool.\n\n Yields ``(image_id, instance_id)`` tuple.\n ", /*tp_doc*/
60258 0, /*tp_traverse*/
60259 0, /*tp_clear*/
60260 0, /*tp_richcompare*/
60261 0, /*tp_weaklistoffset*/
60262 __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_3__iter__, /*tp_iter*/
60263 0, /*tp_iternext*/
60264 __pyx_methods_3rbd_MirrorImageInstanceIdIterator, /*tp_methods*/
60265 0, /*tp_members*/
60266 0, /*tp_getset*/
60267 0, /*tp_base*/
60268 0, /*tp_dict*/
60269 0, /*tp_descr_get*/
60270 0, /*tp_descr_set*/
60271 0, /*tp_dictoffset*/
60272 __pyx_pw_3rbd_29MirrorImageInstanceIdIterator_1__init__, /*tp_init*/
60273 0, /*tp_alloc*/
60274 __pyx_tp_new_3rbd_MirrorImageInstanceIdIterator, /*tp_new*/
60275 0, /*tp_free*/
60276 0, /*tp_is_gc*/
60277 0, /*tp_bases*/
60278 0, /*tp_mro*/
60279 0, /*tp_cache*/
60280 0, /*tp_subclasses*/
60281 0, /*tp_weaklist*/
60282 0, /*tp_del*/
60283 0, /*tp_version_tag*/
60284 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60285 0, /*tp_finalize*/
60286 #endif
60287};
60288
60289static PyObject *__pyx_tp_new_3rbd_PoolMetadataIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60290 struct __pyx_obj_3rbd_PoolMetadataIterator *p;
60291 PyObject *o;
60292 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60293 o = (*t->tp_alloc)(t, 0);
60294 } else {
60295 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60296 }
60297 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60298 p = ((struct __pyx_obj_3rbd_PoolMetadataIterator *)o);
60299 p->next_chunk = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60300 return o;
60301}
60302
60303static void __pyx_tp_dealloc_3rbd_PoolMetadataIterator(PyObject *o) {
60304 struct __pyx_obj_3rbd_PoolMetadataIterator *p = (struct __pyx_obj_3rbd_PoolMetadataIterator *)o;
60305 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60306 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
60307 if (PyObject_CallFinalizerFromDealloc(o)) return;
60308 }
60309 #endif
60310 PyObject_GC_UnTrack(o);
60311 {
60312 PyObject *etype, *eval, *etb;
60313 PyErr_Fetch(&etype, &eval, &etb);
60314 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60315 __pyx_pw_3rbd_20PoolMetadataIterator_6__dealloc__(o);
60316 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60317 PyErr_Restore(etype, eval, etb);
60318 }
60319 Py_CLEAR(p->next_chunk)do { if (p->next_chunk) { PyObject *_py_tmp = (PyObject *)
(p->next_chunk); (p->next_chunk) = ((void*)0); do { if (
--((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
60320 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60321}
60322
60323static int __pyx_tp_traverse_3rbd_PoolMetadataIterator(PyObject *o, visitproc v, void *a) {
60324 int e;
60325 struct __pyx_obj_3rbd_PoolMetadataIterator *p = (struct __pyx_obj_3rbd_PoolMetadataIterator *)o;
60326 if (p->next_chunk) {
60327 e = (*v)(p->next_chunk, a); if (e) return e;
60328 }
60329 return 0;
60330}
60331
60332static int __pyx_tp_clear_3rbd_PoolMetadataIterator(PyObject *o) {
60333 PyObject* tmp;
60334 struct __pyx_obj_3rbd_PoolMetadataIterator *p = (struct __pyx_obj_3rbd_PoolMetadataIterator *)o;
60335 tmp = ((PyObject*)p->next_chunk);
60336 p->next_chunk = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60337 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
60338 return 0;
60339}
60340
60341static PyMethodDef __pyx_methods_3rbd_PoolMetadataIterator[] = {
60342 {"get_next_chunk", (PyCFunction)__pyx_pw_3rbd_20PoolMetadataIterator_8get_next_chunk, METH_NOARGS0x0004, __pyx_doc_3rbd_20PoolMetadataIterator_7get_next_chunk},
60343 {0, 0, 0, 0}
60344};
60345
60346static PyTypeObject __pyx_type_3rbd_PoolMetadataIterator = {
60347 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60348 "rbd.PoolMetadataIterator", /*tp_name*/
60349 sizeof(struct __pyx_obj_3rbd_PoolMetadataIterator), /*tp_basicsize*/
60350 0, /*tp_itemsize*/
60351 __pyx_tp_dealloc_3rbd_PoolMetadataIterator, /*tp_dealloc*/
60352 0, /*tp_print*/
60353 0, /*tp_getattr*/
60354 0, /*tp_setattr*/
60355 #if PY_MAJOR_VERSION2 < 3
60356 0, /*tp_compare*/
60357 #endif
60358 #if PY_MAJOR_VERSION2 >= 3
60359 0, /*tp_as_async*/
60360 #endif
60361 0, /*tp_repr*/
60362 0, /*tp_as_number*/
60363 0, /*tp_as_sequence*/
60364 0, /*tp_as_mapping*/
60365 0, /*tp_hash*/
60366 0, /*tp_call*/
60367 0, /*tp_str*/
60368 0, /*tp_getattro*/
60369 0, /*tp_setattro*/
60370 0, /*tp_as_buffer*/
60371 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
60372 "PoolMetadataIterator(ioctx)\n\n Iterator over pool metadata list.\n\n Yields ``(key, value)`` tuple.\n\n * ``key`` (str) - metadata key\n * ``value`` (str) - metadata value\n ", /*tp_doc*/
60373 __pyx_tp_traverse_3rbd_PoolMetadataIterator, /*tp_traverse*/
60374 __pyx_tp_clear_3rbd_PoolMetadataIterator, /*tp_clear*/
60375 0, /*tp_richcompare*/
60376 0, /*tp_weaklistoffset*/
60377 __pyx_pw_3rbd_20PoolMetadataIterator_3__iter__, /*tp_iter*/
60378 0, /*tp_iternext*/
60379 __pyx_methods_3rbd_PoolMetadataIterator, /*tp_methods*/
60380 0, /*tp_members*/
60381 0, /*tp_getset*/
60382 0, /*tp_base*/
60383 0, /*tp_dict*/
60384 0, /*tp_descr_get*/
60385 0, /*tp_descr_set*/
60386 0, /*tp_dictoffset*/
60387 __pyx_pw_3rbd_20PoolMetadataIterator_1__init__, /*tp_init*/
60388 0, /*tp_alloc*/
60389 __pyx_tp_new_3rbd_PoolMetadataIterator, /*tp_new*/
60390 0, /*tp_free*/
60391 0, /*tp_is_gc*/
60392 0, /*tp_bases*/
60393 0, /*tp_mro*/
60394 0, /*tp_cache*/
60395 0, /*tp_subclasses*/
60396 0, /*tp_weaklist*/
60397 0, /*tp_del*/
60398 0, /*tp_version_tag*/
60399 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60400 0, /*tp_finalize*/
60401 #endif
60402};
60403
60404static PyObject *__pyx_tp_new_3rbd_ConfigPoolIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60405 PyObject *o;
60406 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60407 o = (*t->tp_alloc)(t, 0);
60408 } else {
60409 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60410 }
60411 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60412 return o;
60413}
60414
60415static void __pyx_tp_dealloc_3rbd_ConfigPoolIterator(PyObject *o) {
60416 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60417 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
60418 if (PyObject_CallFinalizerFromDealloc(o)) return;
60419 }
60420 #endif
60421 {
60422 PyObject *etype, *eval, *etb;
60423 PyErr_Fetch(&etype, &eval, &etb);
60424 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60425 __pyx_pw_3rbd_18ConfigPoolIterator_6__dealloc__(o);
60426 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60427 PyErr_Restore(etype, eval, etb);
60428 }
60429 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60430}
60431
60432static PyMethodDef __pyx_methods_3rbd_ConfigPoolIterator[] = {
60433 {0, 0, 0, 0}
60434};
60435
60436static PyTypeObject __pyx_type_3rbd_ConfigPoolIterator = {
60437 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60438 "rbd.ConfigPoolIterator", /*tp_name*/
60439 sizeof(struct __pyx_obj_3rbd_ConfigPoolIterator), /*tp_basicsize*/
60440 0, /*tp_itemsize*/
60441 __pyx_tp_dealloc_3rbd_ConfigPoolIterator, /*tp_dealloc*/
60442 0, /*tp_print*/
60443 0, /*tp_getattr*/
60444 0, /*tp_setattr*/
60445 #if PY_MAJOR_VERSION2 < 3
60446 0, /*tp_compare*/
60447 #endif
60448 #if PY_MAJOR_VERSION2 >= 3
60449 0, /*tp_as_async*/
60450 #endif
60451 0, /*tp_repr*/
60452 0, /*tp_as_number*/
60453 0, /*tp_as_sequence*/
60454 0, /*tp_as_mapping*/
60455 0, /*tp_hash*/
60456 0, /*tp_call*/
60457 0, /*tp_str*/
60458 0, /*tp_getattro*/
60459 0, /*tp_setattro*/
60460 0, /*tp_as_buffer*/
60461 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
60462 "ConfigPoolIterator(ioctx)\n\n Iterator over pool-level overrides for a pool.\n\n Yields a dictionary containing information about an override.\n\n Keys are:\n\n * ``name`` (str) - override name\n\n * ``value`` (str) - override value\n\n * ``source`` (str) - override source\n ", /*tp_doc*/
60463 0, /*tp_traverse*/
60464 0, /*tp_clear*/
60465 0, /*tp_richcompare*/
60466 0, /*tp_weaklistoffset*/
60467 __pyx_pw_3rbd_18ConfigPoolIterator_3__iter__, /*tp_iter*/
60468 0, /*tp_iternext*/
60469 __pyx_methods_3rbd_ConfigPoolIterator, /*tp_methods*/
60470 0, /*tp_members*/
60471 0, /*tp_getset*/
60472 0, /*tp_base*/
60473 0, /*tp_dict*/
60474 0, /*tp_descr_get*/
60475 0, /*tp_descr_set*/
60476 0, /*tp_dictoffset*/
60477 __pyx_pw_3rbd_18ConfigPoolIterator_1__init__, /*tp_init*/
60478 0, /*tp_alloc*/
60479 __pyx_tp_new_3rbd_ConfigPoolIterator, /*tp_new*/
60480 0, /*tp_free*/
60481 0, /*tp_is_gc*/
60482 0, /*tp_bases*/
60483 0, /*tp_mro*/
60484 0, /*tp_cache*/
60485 0, /*tp_subclasses*/
60486 0, /*tp_weaklist*/
60487 0, /*tp_del*/
60488 0, /*tp_version_tag*/
60489 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60490 0, /*tp_finalize*/
60491 #endif
60492};
60493
60494static PyObject *__pyx_tp_new_3rbd_Group(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60495 struct __pyx_obj_3rbd_Group *p;
60496 PyObject *o;
60497 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60498 o = (*t->tp_alloc)(t, 0);
60499 } else {
60500 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60501 }
60502 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60503 p = ((struct __pyx_obj_3rbd_Group *)o);
60504 p->name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60505 p->ioctx = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60506 return o;
60507}
60508
60509static void __pyx_tp_dealloc_3rbd_Group(PyObject *o) {
60510 struct __pyx_obj_3rbd_Group *p = (struct __pyx_obj_3rbd_Group *)o;
60511 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60512 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
60513 if (PyObject_CallFinalizerFromDealloc(o)) return;
60514 }
60515 #endif
60516 PyObject_GC_UnTrack(o);
60517 Py_CLEAR(p->name)do { if (p->name) { PyObject *_py_tmp = (PyObject *)(p->
name); (p->name) = ((void*)0); do { if ( --((PyObject*)(_py_tmp
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
60518 Py_CLEAR(p->ioctx)do { if (p->ioctx) { PyObject *_py_tmp = (PyObject *)(p->
ioctx); (p->ioctx) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
60519 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60520}
60521
60522static int __pyx_tp_traverse_3rbd_Group(PyObject *o, visitproc v, void *a) {
60523 int e;
60524 struct __pyx_obj_3rbd_Group *p = (struct __pyx_obj_3rbd_Group *)o;
60525 if (p->name) {
60526 e = (*v)(p->name, a); if (e) return e;
60527 }
60528 if (p->ioctx) {
60529 e = (*v)(p->ioctx, a); if (e) return e;
60530 }
60531 return 0;
60532}
60533
60534static int __pyx_tp_clear_3rbd_Group(PyObject *o) {
60535 PyObject* tmp;
60536 struct __pyx_obj_3rbd_Group *p = (struct __pyx_obj_3rbd_Group *)o;
60537 tmp = ((PyObject*)p->name);
60538 p->name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60539 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
60540 tmp = ((PyObject*)p->ioctx);
60541 p->ioctx = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60542 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
60543 return 0;
60544}
60545
60546static PyMethodDef __pyx_methods_3rbd_Group[] = {
60547 {"__enter__", (PyCFunction)__pyx_pw_3rbd_5Group_3__enter__, METH_NOARGS0x0004, __pyx_doc_3rbd_5Group_2__enter__},
60548 {"__exit__", (PyCFunction)__pyx_pw_3rbd_5Group_5__exit__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Group_4__exit__},
60549 {"add_image", (PyCFunction)__pyx_pw_3rbd_5Group_7add_image, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Group_6add_image},
60550 {"remove_image", (PyCFunction)__pyx_pw_3rbd_5Group_9remove_image, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Group_8remove_image},
60551 {"list_images", (PyCFunction)__pyx_pw_3rbd_5Group_11list_images, METH_NOARGS0x0004, __pyx_doc_3rbd_5Group_10list_images},
60552 {"create_snap", (PyCFunction)__pyx_pw_3rbd_5Group_13create_snap, METH_O0x0008, __pyx_doc_3rbd_5Group_12create_snap},
60553 {"remove_snap", (PyCFunction)__pyx_pw_3rbd_5Group_15remove_snap, METH_O0x0008, __pyx_doc_3rbd_5Group_14remove_snap},
60554 {"rename_snap", (PyCFunction)__pyx_pw_3rbd_5Group_17rename_snap, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Group_16rename_snap},
60555 {"list_snaps", (PyCFunction)__pyx_pw_3rbd_5Group_19list_snaps, METH_NOARGS0x0004, __pyx_doc_3rbd_5Group_18list_snaps},
60556 {"rollback_to_snap", (PyCFunction)__pyx_pw_3rbd_5Group_21rollback_to_snap, METH_O0x0008, __pyx_doc_3rbd_5Group_20rollback_to_snap},
60557 {0, 0, 0, 0}
60558};
60559
60560static PyTypeObject __pyx_type_3rbd_Group = {
60561 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60562 "rbd.Group", /*tp_name*/
60563 sizeof(struct __pyx_obj_3rbd_Group), /*tp_basicsize*/
60564 0, /*tp_itemsize*/
60565 __pyx_tp_dealloc_3rbd_Group, /*tp_dealloc*/
60566 0, /*tp_print*/
60567 0, /*tp_getattr*/
60568 0, /*tp_setattr*/
60569 #if PY_MAJOR_VERSION2 < 3
60570 0, /*tp_compare*/
60571 #endif
60572 #if PY_MAJOR_VERSION2 >= 3
60573 0, /*tp_as_async*/
60574 #endif
60575 0, /*tp_repr*/
60576 0, /*tp_as_number*/
60577 0, /*tp_as_sequence*/
60578 0, /*tp_as_mapping*/
60579 0, /*tp_hash*/
60580 0, /*tp_call*/
60581 0, /*tp_str*/
60582 0, /*tp_getattro*/
60583 0, /*tp_setattro*/
60584 0, /*tp_as_buffer*/
60585 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
60586 "Group(ioctx, name)\n\n This class represents an RBD group. It is used to interact with\n snapshots and images members.\n ", /*tp_doc*/
60587 __pyx_tp_traverse_3rbd_Group, /*tp_traverse*/
60588 __pyx_tp_clear_3rbd_Group, /*tp_clear*/
60589 0, /*tp_richcompare*/
60590 0, /*tp_weaklistoffset*/
60591 0, /*tp_iter*/
60592 0, /*tp_iternext*/
60593 __pyx_methods_3rbd_Group, /*tp_methods*/
60594 0, /*tp_members*/
60595 0, /*tp_getset*/
60596 0, /*tp_base*/
60597 0, /*tp_dict*/
60598 0, /*tp_descr_get*/
60599 0, /*tp_descr_set*/
60600 0, /*tp_dictoffset*/
60601 __pyx_pw_3rbd_5Group_1__init__, /*tp_init*/
60602 0, /*tp_alloc*/
60603 __pyx_tp_new_3rbd_Group, /*tp_new*/
60604 0, /*tp_free*/
60605 0, /*tp_is_gc*/
60606 0, /*tp_bases*/
60607 0, /*tp_mro*/
60608 0, /*tp_cache*/
60609 0, /*tp_subclasses*/
60610 0, /*tp_weaklist*/
60611 0, /*tp_del*/
60612 0, /*tp_version_tag*/
60613 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60614 0, /*tp_finalize*/
60615 #endif
60616};
60617
60618static PyObject *__pyx_tp_new_3rbd_Image(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60619 struct __pyx_obj_3rbd_Image *p;
60620 PyObject *o;
60621 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60622 o = (*t->tp_alloc)(t, 0);
60623 } else {
60624 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60625 }
60626 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60627 p = ((struct __pyx_obj_3rbd_Image *)o);
60628 p->name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60629 p->ioctx = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60630 return o;
60631}
60632
60633static void __pyx_tp_dealloc_3rbd_Image(PyObject *o) {
60634 struct __pyx_obj_3rbd_Image *p = (struct __pyx_obj_3rbd_Image *)o;
60635 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60636 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
60637 if (PyObject_CallFinalizerFromDealloc(o)) return;
60638 }
60639 #endif
60640 PyObject_GC_UnTrack(o);
60641 {
60642 PyObject *etype, *eval, *etb;
60643 PyErr_Fetch(&etype, &eval, &etb);
60644 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60645 __pyx_pw_3rbd_5Image_11__dealloc__(o);
60646 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60647 PyErr_Restore(etype, eval, etb);
60648 }
60649 Py_CLEAR(p->name)do { if (p->name) { PyObject *_py_tmp = (PyObject *)(p->
name); (p->name) = ((void*)0); do { if ( --((PyObject*)(_py_tmp
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
60650 Py_CLEAR(p->ioctx)do { if (p->ioctx) { PyObject *_py_tmp = (PyObject *)(p->
ioctx); (p->ioctx) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
60651 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60652}
60653
60654static int __pyx_tp_traverse_3rbd_Image(PyObject *o, visitproc v, void *a) {
60655 int e;
60656 struct __pyx_obj_3rbd_Image *p = (struct __pyx_obj_3rbd_Image *)o;
60657 if (p->name) {
60658 e = (*v)(p->name, a); if (e) return e;
60659 }
60660 if (p->ioctx) {
60661 e = (*v)(p->ioctx, a); if (e) return e;
60662 }
60663 return 0;
60664}
60665
60666static int __pyx_tp_clear_3rbd_Image(PyObject *o) {
60667 PyObject* tmp;
60668 struct __pyx_obj_3rbd_Image *p = (struct __pyx_obj_3rbd_Image *)o;
60669 tmp = ((PyObject*)p->name);
60670 p->name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60671 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
60672 tmp = ((PyObject*)p->ioctx);
60673 p->ioctx = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60674 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
60675 return 0;
60676}
60677
60678static PyMethodDef __pyx_methods_3rbd_Image[] = {
60679 {"__enter__", (PyCFunction)__pyx_pw_3rbd_5Image_3__enter__, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_2__enter__},
60680 {"__exit__", (PyCFunction)__pyx_pw_3rbd_5Image_5__exit__, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_4__exit__},
60681 {"__get_completion", (PyCFunction)__pyx_pw_3rbd_5Image_7__get_completion, METH_O0x0008, __pyx_doc_3rbd_5Image_6__get_completion},
60682 {"close", (PyCFunction)__pyx_pw_3rbd_5Image_9close, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_8close},
60683 {"resize", (PyCFunction)__pyx_pw_3rbd_5Image_15resize, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_14resize},
60684 {"stat", (PyCFunction)__pyx_pw_3rbd_5Image_17stat, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_16stat},
60685 {"get_name", (PyCFunction)__pyx_pw_3rbd_5Image_19get_name, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_18get_name},
60686 {"id", (PyCFunction)__pyx_pw_3rbd_5Image_21id, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_20id},
60687 {"block_name_prefix", (PyCFunction)__pyx_pw_3rbd_5Image_23block_name_prefix, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_22block_name_prefix},
60688 {"data_pool_id", (PyCFunction)__pyx_pw_3rbd_5Image_25data_pool_id, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_24data_pool_id},
60689 {"parent_info", (PyCFunction)__pyx_pw_3rbd_5Image_27parent_info, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_26parent_info},
60690 {"parent_id", (PyCFunction)__pyx_pw_3rbd_5Image_29parent_id, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_28parent_id},
60691 {"old_format", (PyCFunction)__pyx_pw_3rbd_5Image_31old_format, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_30old_format},
60692 {"size", (PyCFunction)__pyx_pw_3rbd_5Image_33size, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_32size},
60693 {"features", (PyCFunction)__pyx_pw_3rbd_5Image_35features, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_34features},
60694 {"update_features", (PyCFunction)__pyx_pw_3rbd_5Image_37update_features, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_36update_features},
60695 {"op_features", (PyCFunction)__pyx_pw_3rbd_5Image_39op_features, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_38op_features},
60696 {"overlap", (PyCFunction)__pyx_pw_3rbd_5Image_41overlap, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_40overlap},
60697 {"flags", (PyCFunction)__pyx_pw_3rbd_5Image_43flags, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_42flags},
60698 {"group", (PyCFunction)__pyx_pw_3rbd_5Image_45group, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_44group},
60699 {"is_exclusive_lock_owner", (PyCFunction)__pyx_pw_3rbd_5Image_47is_exclusive_lock_owner, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_46is_exclusive_lock_owner},
60700 {"copy", (PyCFunction)__pyx_pw_3rbd_5Image_49copy, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_48copy},
60701 {"deep_copy", (PyCFunction)__pyx_pw_3rbd_5Image_51deep_copy, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_50deep_copy},
60702 {"list_snaps", (PyCFunction)__pyx_pw_3rbd_5Image_53list_snaps, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_52list_snaps},
60703 {"create_snap", (PyCFunction)__pyx_pw_3rbd_5Image_55create_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_54create_snap},
60704 {"rename_snap", (PyCFunction)__pyx_pw_3rbd_5Image_57rename_snap, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_56rename_snap},
60705 {"remove_snap", (PyCFunction)__pyx_pw_3rbd_5Image_59remove_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_58remove_snap},
60706 {"remove_snap2", (PyCFunction)__pyx_pw_3rbd_5Image_61remove_snap2, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_60remove_snap2},
60707 {"remove_snap_by_id", (PyCFunction)__pyx_pw_3rbd_5Image_63remove_snap_by_id, METH_O0x0008, __pyx_doc_3rbd_5Image_62remove_snap_by_id},
60708 {"rollback_to_snap", (PyCFunction)__pyx_pw_3rbd_5Image_65rollback_to_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_64rollback_to_snap},
60709 {"protect_snap", (PyCFunction)__pyx_pw_3rbd_5Image_67protect_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_66protect_snap},
60710 {"unprotect_snap", (PyCFunction)__pyx_pw_3rbd_5Image_69unprotect_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_68unprotect_snap},
60711 {"is_protected_snap", (PyCFunction)__pyx_pw_3rbd_5Image_71is_protected_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_70is_protected_snap},
60712 {"get_snap_limit", (PyCFunction)__pyx_pw_3rbd_5Image_73get_snap_limit, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_72get_snap_limit},
60713 {"set_snap_limit", (PyCFunction)__pyx_pw_3rbd_5Image_75set_snap_limit, METH_O0x0008, __pyx_doc_3rbd_5Image_74set_snap_limit},
60714 {"get_snap_timestamp", (PyCFunction)__pyx_pw_3rbd_5Image_77get_snap_timestamp, METH_O0x0008, __pyx_doc_3rbd_5Image_76get_snap_timestamp},
60715 {"remove_snap_limit", (PyCFunction)__pyx_pw_3rbd_5Image_79remove_snap_limit, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_78remove_snap_limit},
60716 {"set_snap", (PyCFunction)__pyx_pw_3rbd_5Image_81set_snap, METH_O0x0008, __pyx_doc_3rbd_5Image_80set_snap},
60717 {"set_snap_by_id", (PyCFunction)__pyx_pw_3rbd_5Image_83set_snap_by_id, METH_O0x0008, __pyx_doc_3rbd_5Image_82set_snap_by_id},
60718 {"read", (PyCFunction)__pyx_pw_3rbd_5Image_85read, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_84read},
60719 {"diff_iterate", (PyCFunction)__pyx_pw_3rbd_5Image_87diff_iterate, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_86diff_iterate},
60720 {"write", (PyCFunction)__pyx_pw_3rbd_5Image_89write, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_88write},
60721 {"discard", (PyCFunction)__pyx_pw_3rbd_5Image_91discard, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_90discard},
60722 {"flush", (PyCFunction)__pyx_pw_3rbd_5Image_93flush, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_92flush},
60723 {"invalidate_cache", (PyCFunction)__pyx_pw_3rbd_5Image_95invalidate_cache, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_94invalidate_cache},
60724 {"stripe_unit", (PyCFunction)__pyx_pw_3rbd_5Image_97stripe_unit, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_96stripe_unit},
60725 {"stripe_count", (PyCFunction)__pyx_pw_3rbd_5Image_99stripe_count, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_98stripe_count},
60726 {"create_timestamp", (PyCFunction)__pyx_pw_3rbd_5Image_101create_timestamp, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_100create_timestamp},
60727 {"access_timestamp", (PyCFunction)__pyx_pw_3rbd_5Image_103access_timestamp, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_102access_timestamp},
60728 {"modify_timestamp", (PyCFunction)__pyx_pw_3rbd_5Image_105modify_timestamp, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_104modify_timestamp},
60729 {"flatten", (PyCFunction)__pyx_pw_3rbd_5Image_107flatten, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_106flatten},
60730 {"sparsify", (PyCFunction)__pyx_pw_3rbd_5Image_109sparsify, METH_O0x0008, __pyx_doc_3rbd_5Image_108sparsify},
60731 {"rebuild_object_map", (PyCFunction)__pyx_pw_3rbd_5Image_111rebuild_object_map, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_110rebuild_object_map},
60732 {"list_children", (PyCFunction)__pyx_pw_3rbd_5Image_113list_children, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_112list_children},
60733 {"list_children2", (PyCFunction)__pyx_pw_3rbd_5Image_115list_children2, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_114list_children2},
60734 {"list_descendants", (PyCFunction)__pyx_pw_3rbd_5Image_117list_descendants, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_116list_descendants},
60735 {"list_lockers", (PyCFunction)__pyx_pw_3rbd_5Image_119list_lockers, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_118list_lockers},
60736 {"lock_acquire", (PyCFunction)__pyx_pw_3rbd_5Image_121lock_acquire, METH_O0x0008, __pyx_doc_3rbd_5Image_120lock_acquire},
60737 {"lock_release", (PyCFunction)__pyx_pw_3rbd_5Image_123lock_release, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_122lock_release},
60738 {"lock_get_owners", (PyCFunction)__pyx_pw_3rbd_5Image_125lock_get_owners, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_124lock_get_owners},
60739 {"lock_break", (PyCFunction)__pyx_pw_3rbd_5Image_127lock_break, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_126lock_break},
60740 {"lock_exclusive", (PyCFunction)__pyx_pw_3rbd_5Image_129lock_exclusive, METH_O0x0008, __pyx_doc_3rbd_5Image_128lock_exclusive},
60741 {"lock_shared", (PyCFunction)__pyx_pw_3rbd_5Image_131lock_shared, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_130lock_shared},
60742 {"unlock", (PyCFunction)__pyx_pw_3rbd_5Image_133unlock, METH_O0x0008, __pyx_doc_3rbd_5Image_132unlock},
60743 {"break_lock", (PyCFunction)__pyx_pw_3rbd_5Image_135break_lock, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_134break_lock},
60744 {"mirror_image_enable", (PyCFunction)__pyx_pw_3rbd_5Image_137mirror_image_enable, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_136mirror_image_enable},
60745 {"mirror_image_disable", (PyCFunction)__pyx_pw_3rbd_5Image_139mirror_image_disable, METH_O0x0008, __pyx_doc_3rbd_5Image_138mirror_image_disable},
60746 {"mirror_image_promote", (PyCFunction)__pyx_pw_3rbd_5Image_141mirror_image_promote, METH_O0x0008, __pyx_doc_3rbd_5Image_140mirror_image_promote},
60747 {"mirror_image_demote", (PyCFunction)__pyx_pw_3rbd_5Image_143mirror_image_demote, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_142mirror_image_demote},
60748 {"mirror_image_resync", (PyCFunction)__pyx_pw_3rbd_5Image_145mirror_image_resync, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_144mirror_image_resync},
60749 {"mirror_image_get_info", (PyCFunction)__pyx_pw_3rbd_5Image_147mirror_image_get_info, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_146mirror_image_get_info},
60750 {"mirror_image_get_status", (PyCFunction)__pyx_pw_3rbd_5Image_149mirror_image_get_status, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_148mirror_image_get_status},
60751 {"mirror_image_get_instance_id", (PyCFunction)__pyx_pw_3rbd_5Image_151mirror_image_get_instance_id, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_150mirror_image_get_instance_id},
60752 {"aio_read", (PyCFunction)__pyx_pw_3rbd_5Image_153aio_read, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_152aio_read},
60753 {"aio_write", (PyCFunction)__pyx_pw_3rbd_5Image_155aio_write, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_154aio_write},
60754 {"aio_discard", (PyCFunction)__pyx_pw_3rbd_5Image_157aio_discard, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_156aio_discard},
60755 {"aio_flush", (PyCFunction)__pyx_pw_3rbd_5Image_159aio_flush, METH_O0x0008, __pyx_doc_3rbd_5Image_158aio_flush},
60756 {"metadata_get", (PyCFunction)__pyx_pw_3rbd_5Image_161metadata_get, METH_O0x0008, __pyx_doc_3rbd_5Image_160metadata_get},
60757 {"metadata_set", (PyCFunction)__pyx_pw_3rbd_5Image_163metadata_set, METH_VARARGS0x0001|METH_KEYWORDS0x0002, __pyx_doc_3rbd_5Image_162metadata_set},
60758 {"metadata_remove", (PyCFunction)__pyx_pw_3rbd_5Image_165metadata_remove, METH_O0x0008, __pyx_doc_3rbd_5Image_164metadata_remove},
60759 {"metadata_list", (PyCFunction)__pyx_pw_3rbd_5Image_167metadata_list, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_166metadata_list},
60760 {"watchers_list", (PyCFunction)__pyx_pw_3rbd_5Image_169watchers_list, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_168watchers_list},
60761 {"config_list", (PyCFunction)__pyx_pw_3rbd_5Image_171config_list, METH_NOARGS0x0004, __pyx_doc_3rbd_5Image_170config_list},
60762 {"snap_get_namespace_type", (PyCFunction)__pyx_pw_3rbd_5Image_173snap_get_namespace_type, METH_O0x0008, __pyx_doc_3rbd_5Image_172snap_get_namespace_type},
60763 {"snap_get_group_namespace", (PyCFunction)__pyx_pw_3rbd_5Image_175snap_get_group_namespace, METH_O0x0008, __pyx_doc_3rbd_5Image_174snap_get_group_namespace},
60764 {"snap_get_trash_namespace", (PyCFunction)__pyx_pw_3rbd_5Image_177snap_get_trash_namespace, METH_O0x0008, __pyx_doc_3rbd_5Image_176snap_get_trash_namespace},
60765 {0, 0, 0, 0}
60766};
60767
60768static PyTypeObject __pyx_type_3rbd_Image = {
60769 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60770 "rbd.Image", /*tp_name*/
60771 sizeof(struct __pyx_obj_3rbd_Image), /*tp_basicsize*/
60772 0, /*tp_itemsize*/
60773 __pyx_tp_dealloc_3rbd_Image, /*tp_dealloc*/
60774 0, /*tp_print*/
60775 0, /*tp_getattr*/
60776 0, /*tp_setattr*/
60777 #if PY_MAJOR_VERSION2 < 3
60778 0, /*tp_compare*/
60779 #endif
60780 #if PY_MAJOR_VERSION2 >= 3
60781 0, /*tp_as_async*/
60782 #endif
60783 __pyx_pw_3rbd_5Image_13__repr__, /*tp_repr*/
60784 0, /*tp_as_number*/
60785 0, /*tp_as_sequence*/
60786 0, /*tp_as_mapping*/
60787 0, /*tp_hash*/
60788 0, /*tp_call*/
60789 0, /*tp_str*/
60790 0, /*tp_getattro*/
60791 0, /*tp_setattro*/
60792 0, /*tp_as_buffer*/
60793 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
60794 "Image(ioctx, name=None, snapshot=None, read_only=False, image_id=None)\n\n This class represents an RBD image. It is used to perform I/O on\n the image and interact with snapshots.\n\n **Note**: Any method of this class may raise :class:`ImageNotFound`\n if the image has been deleted.\n ", /*tp_doc*/
60795 __pyx_tp_traverse_3rbd_Image, /*tp_traverse*/
60796 __pyx_tp_clear_3rbd_Image, /*tp_clear*/
60797 0, /*tp_richcompare*/
60798 0, /*tp_weaklistoffset*/
60799 0, /*tp_iter*/
60800 0, /*tp_iternext*/
60801 __pyx_methods_3rbd_Image, /*tp_methods*/
60802 0, /*tp_members*/
60803 0, /*tp_getset*/
60804 0, /*tp_base*/
60805 0, /*tp_dict*/
60806 0, /*tp_descr_get*/
60807 0, /*tp_descr_set*/
60808 0, /*tp_dictoffset*/
60809 __pyx_pw_3rbd_5Image_1__init__, /*tp_init*/
60810 0, /*tp_alloc*/
60811 __pyx_tp_new_3rbd_Image, /*tp_new*/
60812 0, /*tp_free*/
60813 0, /*tp_is_gc*/
60814 0, /*tp_bases*/
60815 0, /*tp_mro*/
60816 0, /*tp_cache*/
60817 0, /*tp_subclasses*/
60818 0, /*tp_weaklist*/
60819 0, /*tp_del*/
60820 0, /*tp_version_tag*/
60821 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60822 0, /*tp_finalize*/
60823 #endif
60824};
60825
60826static PyObject *__pyx_tp_new_3rbd_ImageIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60827 PyObject *o;
60828 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60829 o = (*t->tp_alloc)(t, 0);
60830 } else {
60831 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60832 }
60833 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60834 return o;
60835}
60836
60837static void __pyx_tp_dealloc_3rbd_ImageIterator(PyObject *o) {
60838 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60839 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
60840 if (PyObject_CallFinalizerFromDealloc(o)) return;
60841 }
60842 #endif
60843 {
60844 PyObject *etype, *eval, *etb;
60845 PyErr_Fetch(&etype, &eval, &etb);
60846 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60847 __pyx_pw_3rbd_13ImageIterator_6__dealloc__(o);
60848 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60849 PyErr_Restore(etype, eval, etb);
60850 }
60851 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60852}
60853
60854static PyMethodDef __pyx_methods_3rbd_ImageIterator[] = {
60855 {0, 0, 0, 0}
60856};
60857
60858static PyTypeObject __pyx_type_3rbd_ImageIterator = {
60859 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60860 "rbd.ImageIterator", /*tp_name*/
60861 sizeof(struct __pyx_obj_3rbd_ImageIterator), /*tp_basicsize*/
60862 0, /*tp_itemsize*/
60863 __pyx_tp_dealloc_3rbd_ImageIterator, /*tp_dealloc*/
60864 0, /*tp_print*/
60865 0, /*tp_getattr*/
60866 0, /*tp_setattr*/
60867 #if PY_MAJOR_VERSION2 < 3
60868 0, /*tp_compare*/
60869 #endif
60870 #if PY_MAJOR_VERSION2 >= 3
60871 0, /*tp_as_async*/
60872 #endif
60873 0, /*tp_repr*/
60874 0, /*tp_as_number*/
60875 0, /*tp_as_sequence*/
60876 0, /*tp_as_mapping*/
60877 0, /*tp_hash*/
60878 0, /*tp_call*/
60879 0, /*tp_str*/
60880 0, /*tp_getattro*/
60881 0, /*tp_setattro*/
60882 0, /*tp_as_buffer*/
60883 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
60884 "ImageIterator(ioctx)\n\n Iterator over RBD images in a pool\n\n Yields a dictionary containing information about the images\n\n Keys are:\n\n * ``id`` (str) - image id\n\n * ``name`` (str) - image name\n ", /*tp_doc*/
60885 0, /*tp_traverse*/
60886 0, /*tp_clear*/
60887 0, /*tp_richcompare*/
60888 0, /*tp_weaklistoffset*/
60889 __pyx_pw_3rbd_13ImageIterator_3__iter__, /*tp_iter*/
60890 0, /*tp_iternext*/
60891 __pyx_methods_3rbd_ImageIterator, /*tp_methods*/
60892 0, /*tp_members*/
60893 0, /*tp_getset*/
60894 0, /*tp_base*/
60895 0, /*tp_dict*/
60896 0, /*tp_descr_get*/
60897 0, /*tp_descr_set*/
60898 0, /*tp_dictoffset*/
60899 __pyx_pw_3rbd_13ImageIterator_1__init__, /*tp_init*/
60900 0, /*tp_alloc*/
60901 __pyx_tp_new_3rbd_ImageIterator, /*tp_new*/
60902 0, /*tp_free*/
60903 0, /*tp_is_gc*/
60904 0, /*tp_bases*/
60905 0, /*tp_mro*/
60906 0, /*tp_cache*/
60907 0, /*tp_subclasses*/
60908 0, /*tp_weaklist*/
60909 0, /*tp_del*/
60910 0, /*tp_version_tag*/
60911 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60912 0, /*tp_finalize*/
60913 #endif
60914};
60915
60916static PyObject *__pyx_tp_new_3rbd_LockOwnerIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
60917 struct __pyx_obj_3rbd_LockOwnerIterator *p;
60918 PyObject *o;
60919 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
60920 o = (*t->tp_alloc)(t, 0);
60921 } else {
60922 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
60923 }
60924 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
60925 p = ((struct __pyx_obj_3rbd_LockOwnerIterator *)o);
60926 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60927 return o;
60928}
60929
60930static void __pyx_tp_dealloc_3rbd_LockOwnerIterator(PyObject *o) {
60931 struct __pyx_obj_3rbd_LockOwnerIterator *p = (struct __pyx_obj_3rbd_LockOwnerIterator *)o;
60932 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
60933 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
60934 if (PyObject_CallFinalizerFromDealloc(o)) return;
60935 }
60936 #endif
60937 PyObject_GC_UnTrack(o);
60938 {
60939 PyObject *etype, *eval, *etb;
60940 PyErr_Fetch(&etype, &eval, &etb);
60941 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60942 __pyx_pw_3rbd_17LockOwnerIterator_6__dealloc__(o);
60943 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
60944 PyErr_Restore(etype, eval, etb);
60945 }
60946 Py_CLEAR(p->image)do { if (p->image) { PyObject *_py_tmp = (PyObject *)(p->
image); (p->image) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
60947 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
60948}
60949
60950static int __pyx_tp_traverse_3rbd_LockOwnerIterator(PyObject *o, visitproc v, void *a) {
60951 int e;
60952 struct __pyx_obj_3rbd_LockOwnerIterator *p = (struct __pyx_obj_3rbd_LockOwnerIterator *)o;
60953 if (p->image) {
60954 e = (*v)(p->image, a); if (e) return e;
60955 }
60956 return 0;
60957}
60958
60959static int __pyx_tp_clear_3rbd_LockOwnerIterator(PyObject *o) {
60960 PyObject* tmp;
60961 struct __pyx_obj_3rbd_LockOwnerIterator *p = (struct __pyx_obj_3rbd_LockOwnerIterator *)o;
60962 tmp = ((PyObject*)p->image);
60963 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
60964 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
60965 return 0;
60966}
60967
60968static PyMethodDef __pyx_methods_3rbd_LockOwnerIterator[] = {
60969 {0, 0, 0, 0}
60970};
60971
60972static PyTypeObject __pyx_type_3rbd_LockOwnerIterator = {
60973 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
60974 "rbd.LockOwnerIterator", /*tp_name*/
60975 sizeof(struct __pyx_obj_3rbd_LockOwnerIterator), /*tp_basicsize*/
60976 0, /*tp_itemsize*/
60977 __pyx_tp_dealloc_3rbd_LockOwnerIterator, /*tp_dealloc*/
60978 0, /*tp_print*/
60979 0, /*tp_getattr*/
60980 0, /*tp_setattr*/
60981 #if PY_MAJOR_VERSION2 < 3
60982 0, /*tp_compare*/
60983 #endif
60984 #if PY_MAJOR_VERSION2 >= 3
60985 0, /*tp_as_async*/
60986 #endif
60987 0, /*tp_repr*/
60988 0, /*tp_as_number*/
60989 0, /*tp_as_sequence*/
60990 0, /*tp_as_mapping*/
60991 0, /*tp_hash*/
60992 0, /*tp_call*/
60993 0, /*tp_str*/
60994 0, /*tp_getattro*/
60995 0, /*tp_setattro*/
60996 0, /*tp_as_buffer*/
60997 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
60998 "LockOwnerIterator(Image image)\n\n Iterator over managed lock owners for an image\n\n Yields a dictionary containing information about the image's lock\n\n Keys are:\n\n * ``mode`` (int) - active lock mode\n\n * ``owner`` (str) - lock owner name\n ", /*tp_doc*/
60999 __pyx_tp_traverse_3rbd_LockOwnerIterator, /*tp_traverse*/
61000 __pyx_tp_clear_3rbd_LockOwnerIterator, /*tp_clear*/
61001 0, /*tp_richcompare*/
61002 0, /*tp_weaklistoffset*/
61003 __pyx_pw_3rbd_17LockOwnerIterator_3__iter__, /*tp_iter*/
61004 0, /*tp_iternext*/
61005 __pyx_methods_3rbd_LockOwnerIterator, /*tp_methods*/
61006 0, /*tp_members*/
61007 0, /*tp_getset*/
61008 0, /*tp_base*/
61009 0, /*tp_dict*/
61010 0, /*tp_descr_get*/
61011 0, /*tp_descr_set*/
61012 0, /*tp_dictoffset*/
61013 __pyx_pw_3rbd_17LockOwnerIterator_1__init__, /*tp_init*/
61014 0, /*tp_alloc*/
61015 __pyx_tp_new_3rbd_LockOwnerIterator, /*tp_new*/
61016 0, /*tp_free*/
61017 0, /*tp_is_gc*/
61018 0, /*tp_bases*/
61019 0, /*tp_mro*/
61020 0, /*tp_cache*/
61021 0, /*tp_subclasses*/
61022 0, /*tp_weaklist*/
61023 0, /*tp_del*/
61024 0, /*tp_version_tag*/
61025 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61026 0, /*tp_finalize*/
61027 #endif
61028};
61029
61030static PyObject *__pyx_tp_new_3rbd_MetadataIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61031 struct __pyx_obj_3rbd_MetadataIterator *p;
61032 PyObject *o;
61033 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61034 o = (*t->tp_alloc)(t, 0);
61035 } else {
61036 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61037 }
61038 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61039 p = ((struct __pyx_obj_3rbd_MetadataIterator *)o);
61040 p->image_name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61041 p->next_chunk = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61042 return o;
61043}
61044
61045static void __pyx_tp_dealloc_3rbd_MetadataIterator(PyObject *o) {
61046 struct __pyx_obj_3rbd_MetadataIterator *p = (struct __pyx_obj_3rbd_MetadataIterator *)o;
61047 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61048 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
61049 if (PyObject_CallFinalizerFromDealloc(o)) return;
61050 }
61051 #endif
61052 PyObject_GC_UnTrack(o);
61053 {
61054 PyObject *etype, *eval, *etb;
61055 PyErr_Fetch(&etype, &eval, &etb);
61056 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61057 __pyx_pw_3rbd_16MetadataIterator_6__dealloc__(o);
61058 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61059 PyErr_Restore(etype, eval, etb);
61060 }
61061 Py_CLEAR(p->image_name)do { if (p->image_name) { PyObject *_py_tmp = (PyObject *)
(p->image_name); (p->image_name) = ((void*)0); do { if (
--((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
61062 Py_CLEAR(p->next_chunk)do { if (p->next_chunk) { PyObject *_py_tmp = (PyObject *)
(p->next_chunk); (p->next_chunk) = ((void*)0); do { if (
--((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
61063 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61064}
61065
61066static int __pyx_tp_traverse_3rbd_MetadataIterator(PyObject *o, visitproc v, void *a) {
61067 int e;
61068 struct __pyx_obj_3rbd_MetadataIterator *p = (struct __pyx_obj_3rbd_MetadataIterator *)o;
61069 if (p->image_name) {
61070 e = (*v)(p->image_name, a); if (e) return e;
61071 }
61072 if (p->next_chunk) {
61073 e = (*v)(p->next_chunk, a); if (e) return e;
61074 }
61075 return 0;
61076}
61077
61078static int __pyx_tp_clear_3rbd_MetadataIterator(PyObject *o) {
61079 PyObject* tmp;
61080 struct __pyx_obj_3rbd_MetadataIterator *p = (struct __pyx_obj_3rbd_MetadataIterator *)o;
61081 tmp = ((PyObject*)p->image_name);
61082 p->image_name = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61083 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61084 tmp = ((PyObject*)p->next_chunk);
61085 p->next_chunk = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61086 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61087 return 0;
61088}
61089
61090static PyMethodDef __pyx_methods_3rbd_MetadataIterator[] = {
61091 {"get_next_chunk", (PyCFunction)__pyx_pw_3rbd_16MetadataIterator_8get_next_chunk, METH_NOARGS0x0004, __pyx_doc_3rbd_16MetadataIterator_7get_next_chunk},
61092 {0, 0, 0, 0}
61093};
61094
61095static PyTypeObject __pyx_type_3rbd_MetadataIterator = {
61096 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61097 "rbd.MetadataIterator", /*tp_name*/
61098 sizeof(struct __pyx_obj_3rbd_MetadataIterator), /*tp_basicsize*/
61099 0, /*tp_itemsize*/
61100 __pyx_tp_dealloc_3rbd_MetadataIterator, /*tp_dealloc*/
61101 0, /*tp_print*/
61102 0, /*tp_getattr*/
61103 0, /*tp_setattr*/
61104 #if PY_MAJOR_VERSION2 < 3
61105 0, /*tp_compare*/
61106 #endif
61107 #if PY_MAJOR_VERSION2 >= 3
61108 0, /*tp_as_async*/
61109 #endif
61110 0, /*tp_repr*/
61111 0, /*tp_as_number*/
61112 0, /*tp_as_sequence*/
61113 0, /*tp_as_mapping*/
61114 0, /*tp_hash*/
61115 0, /*tp_call*/
61116 0, /*tp_str*/
61117 0, /*tp_getattro*/
61118 0, /*tp_setattro*/
61119 0, /*tp_as_buffer*/
61120 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61121 "MetadataIterator(Image image)\n\n Iterator over metadata list for an image.\n\n Yields ``(key, value)`` tuple.\n\n * ``key`` (str) - metadata key\n * ``value`` (str) - metadata value\n ", /*tp_doc*/
61122 __pyx_tp_traverse_3rbd_MetadataIterator, /*tp_traverse*/
61123 __pyx_tp_clear_3rbd_MetadataIterator, /*tp_clear*/
61124 0, /*tp_richcompare*/
61125 0, /*tp_weaklistoffset*/
61126 __pyx_pw_3rbd_16MetadataIterator_3__iter__, /*tp_iter*/
61127 0, /*tp_iternext*/
61128 __pyx_methods_3rbd_MetadataIterator, /*tp_methods*/
61129 0, /*tp_members*/
61130 0, /*tp_getset*/
61131 0, /*tp_base*/
61132 0, /*tp_dict*/
61133 0, /*tp_descr_get*/
61134 0, /*tp_descr_set*/
61135 0, /*tp_dictoffset*/
61136 __pyx_pw_3rbd_16MetadataIterator_1__init__, /*tp_init*/
61137 0, /*tp_alloc*/
61138 __pyx_tp_new_3rbd_MetadataIterator, /*tp_new*/
61139 0, /*tp_free*/
61140 0, /*tp_is_gc*/
61141 0, /*tp_bases*/
61142 0, /*tp_mro*/
61143 0, /*tp_cache*/
61144 0, /*tp_subclasses*/
61145 0, /*tp_weaklist*/
61146 0, /*tp_del*/
61147 0, /*tp_version_tag*/
61148 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61149 0, /*tp_finalize*/
61150 #endif
61151};
61152
61153static PyObject *__pyx_tp_new_3rbd_SnapIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61154 struct __pyx_obj_3rbd_SnapIterator *p;
61155 PyObject *o;
61156 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61157 o = (*t->tp_alloc)(t, 0);
61158 } else {
61159 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61160 }
61161 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61162 p = ((struct __pyx_obj_3rbd_SnapIterator *)o);
61163 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61164 return o;
61165}
61166
61167static void __pyx_tp_dealloc_3rbd_SnapIterator(PyObject *o) {
61168 struct __pyx_obj_3rbd_SnapIterator *p = (struct __pyx_obj_3rbd_SnapIterator *)o;
61169 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61170 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
61171 if (PyObject_CallFinalizerFromDealloc(o)) return;
61172 }
61173 #endif
61174 PyObject_GC_UnTrack(o);
61175 {
61176 PyObject *etype, *eval, *etb;
61177 PyErr_Fetch(&etype, &eval, &etb);
61178 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61179 __pyx_pw_3rbd_12SnapIterator_6__dealloc__(o);
61180 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61181 PyErr_Restore(etype, eval, etb);
61182 }
61183 Py_CLEAR(p->image)do { if (p->image) { PyObject *_py_tmp = (PyObject *)(p->
image); (p->image) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
61184 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61185}
61186
61187static int __pyx_tp_traverse_3rbd_SnapIterator(PyObject *o, visitproc v, void *a) {
61188 int e;
61189 struct __pyx_obj_3rbd_SnapIterator *p = (struct __pyx_obj_3rbd_SnapIterator *)o;
61190 if (p->image) {
61191 e = (*v)(p->image, a); if (e) return e;
61192 }
61193 return 0;
61194}
61195
61196static int __pyx_tp_clear_3rbd_SnapIterator(PyObject *o) {
61197 PyObject* tmp;
61198 struct __pyx_obj_3rbd_SnapIterator *p = (struct __pyx_obj_3rbd_SnapIterator *)o;
61199 tmp = ((PyObject*)p->image);
61200 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61201 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61202 return 0;
61203}
61204
61205static PyMethodDef __pyx_methods_3rbd_SnapIterator[] = {
61206 {0, 0, 0, 0}
61207};
61208
61209static PyTypeObject __pyx_type_3rbd_SnapIterator = {
61210 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61211 "rbd.SnapIterator", /*tp_name*/
61212 sizeof(struct __pyx_obj_3rbd_SnapIterator), /*tp_basicsize*/
61213 0, /*tp_itemsize*/
61214 __pyx_tp_dealloc_3rbd_SnapIterator, /*tp_dealloc*/
61215 0, /*tp_print*/
61216 0, /*tp_getattr*/
61217 0, /*tp_setattr*/
61218 #if PY_MAJOR_VERSION2 < 3
61219 0, /*tp_compare*/
61220 #endif
61221 #if PY_MAJOR_VERSION2 >= 3
61222 0, /*tp_as_async*/
61223 #endif
61224 0, /*tp_repr*/
61225 0, /*tp_as_number*/
61226 0, /*tp_as_sequence*/
61227 0, /*tp_as_mapping*/
61228 0, /*tp_hash*/
61229 0, /*tp_call*/
61230 0, /*tp_str*/
61231 0, /*tp_getattro*/
61232 0, /*tp_setattro*/
61233 0, /*tp_as_buffer*/
61234 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61235 "SnapIterator(Image image)\n\n Iterator over snapshot info for an image.\n\n Yields a dictionary containing information about a snapshot.\n\n Keys are:\n\n * ``id`` (int) - numeric identifier of the snapshot\n\n * ``size`` (int) - size of the image at the time of snapshot (in bytes)\n\n * ``name`` (str) - name of the snapshot\n\n * ``namespace`` (int) - enum for snap namespace\n\n * ``group`` (dict) - optional for group namespace snapshots\n\n * ``trash`` (dict) - optional for trash namespace snapshots\n ", /*tp_doc*/
61236 __pyx_tp_traverse_3rbd_SnapIterator, /*tp_traverse*/
61237 __pyx_tp_clear_3rbd_SnapIterator, /*tp_clear*/
61238 0, /*tp_richcompare*/
61239 0, /*tp_weaklistoffset*/
61240 __pyx_pw_3rbd_12SnapIterator_3__iter__, /*tp_iter*/
61241 0, /*tp_iternext*/
61242 __pyx_methods_3rbd_SnapIterator, /*tp_methods*/
61243 0, /*tp_members*/
61244 0, /*tp_getset*/
61245 0, /*tp_base*/
61246 0, /*tp_dict*/
61247 0, /*tp_descr_get*/
61248 0, /*tp_descr_set*/
61249 0, /*tp_dictoffset*/
61250 __pyx_pw_3rbd_12SnapIterator_1__init__, /*tp_init*/
61251 0, /*tp_alloc*/
61252 __pyx_tp_new_3rbd_SnapIterator, /*tp_new*/
61253 0, /*tp_free*/
61254 0, /*tp_is_gc*/
61255 0, /*tp_bases*/
61256 0, /*tp_mro*/
61257 0, /*tp_cache*/
61258 0, /*tp_subclasses*/
61259 0, /*tp_weaklist*/
61260 0, /*tp_del*/
61261 0, /*tp_version_tag*/
61262 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61263 0, /*tp_finalize*/
61264 #endif
61265};
61266
61267static PyObject *__pyx_tp_new_3rbd_TrashIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61268 PyObject *o;
61269 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61270 o = (*t->tp_alloc)(t, 0);
61271 } else {
61272 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61273 }
61274 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61275 return o;
61276}
61277
61278static void __pyx_tp_dealloc_3rbd_TrashIterator(PyObject *o) {
61279 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61280 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
61281 if (PyObject_CallFinalizerFromDealloc(o)) return;
61282 }
61283 #endif
61284 {
61285 PyObject *etype, *eval, *etb;
61286 PyErr_Fetch(&etype, &eval, &etb);
61287 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61288 __pyx_pw_3rbd_13TrashIterator_6__dealloc__(o);
61289 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61290 PyErr_Restore(etype, eval, etb);
61291 }
61292 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61293}
61294
61295static PyMethodDef __pyx_methods_3rbd_TrashIterator[] = {
61296 {0, 0, 0, 0}
61297};
61298
61299static PyTypeObject __pyx_type_3rbd_TrashIterator = {
61300 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61301 "rbd.TrashIterator", /*tp_name*/
61302 sizeof(struct __pyx_obj_3rbd_TrashIterator), /*tp_basicsize*/
61303 0, /*tp_itemsize*/
61304 __pyx_tp_dealloc_3rbd_TrashIterator, /*tp_dealloc*/
61305 0, /*tp_print*/
61306 0, /*tp_getattr*/
61307 0, /*tp_setattr*/
61308 #if PY_MAJOR_VERSION2 < 3
61309 0, /*tp_compare*/
61310 #endif
61311 #if PY_MAJOR_VERSION2 >= 3
61312 0, /*tp_as_async*/
61313 #endif
61314 0, /*tp_repr*/
61315 0, /*tp_as_number*/
61316 0, /*tp_as_sequence*/
61317 0, /*tp_as_mapping*/
61318 0, /*tp_hash*/
61319 0, /*tp_call*/
61320 0, /*tp_str*/
61321 0, /*tp_getattro*/
61322 0, /*tp_setattro*/
61323 0, /*tp_as_buffer*/
61324 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
61325 "TrashIterator(ioctx)\n\n Iterator over trash entries.\n\n Yields a dictionary containing trash info of an image.\n\n Keys are:\n\n * `id` (str) - image id\n\n * `name` (str) - image name\n\n * `source` (str) - source of deletion\n\n * `deletion_time` (datetime) - time of deletion\n\n * `deferment_end_time` (datetime) - time that an image is allowed to be\n removed from trash\n ", /*tp_doc*/
61326 0, /*tp_traverse*/
61327 0, /*tp_clear*/
61328 0, /*tp_richcompare*/
61329 0, /*tp_weaklistoffset*/
61330 __pyx_pw_3rbd_13TrashIterator_3__iter__, /*tp_iter*/
61331 0, /*tp_iternext*/
61332 __pyx_methods_3rbd_TrashIterator, /*tp_methods*/
61333 0, /*tp_members*/
61334 0, /*tp_getset*/
61335 0, /*tp_base*/
61336 0, /*tp_dict*/
61337 0, /*tp_descr_get*/
61338 0, /*tp_descr_set*/
61339 0, /*tp_dictoffset*/
61340 __pyx_pw_3rbd_13TrashIterator_1__init__, /*tp_init*/
61341 0, /*tp_alloc*/
61342 __pyx_tp_new_3rbd_TrashIterator, /*tp_new*/
61343 0, /*tp_free*/
61344 0, /*tp_is_gc*/
61345 0, /*tp_bases*/
61346 0, /*tp_mro*/
61347 0, /*tp_cache*/
61348 0, /*tp_subclasses*/
61349 0, /*tp_weaklist*/
61350 0, /*tp_del*/
61351 0, /*tp_version_tag*/
61352 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61353 0, /*tp_finalize*/
61354 #endif
61355};
61356
61357static PyObject *__pyx_tp_new_3rbd_ChildIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61358 struct __pyx_obj_3rbd_ChildIterator *p;
61359 PyObject *o;
61360 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61361 o = (*t->tp_alloc)(t, 0);
61362 } else {
61363 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61364 }
61365 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61366 p = ((struct __pyx_obj_3rbd_ChildIterator *)o);
61367 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61368 return o;
61369}
61370
61371static void __pyx_tp_dealloc_3rbd_ChildIterator(PyObject *o) {
61372 struct __pyx_obj_3rbd_ChildIterator *p = (struct __pyx_obj_3rbd_ChildIterator *)o;
61373 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61374 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
61375 if (PyObject_CallFinalizerFromDealloc(o)) return;
61376 }
61377 #endif
61378 PyObject_GC_UnTrack(o);
61379 {
61380 PyObject *etype, *eval, *etb;
61381 PyErr_Fetch(&etype, &eval, &etb);
61382 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61383 __pyx_pw_3rbd_13ChildIterator_6__dealloc__(o);
61384 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61385 PyErr_Restore(etype, eval, etb);
61386 }
61387 Py_CLEAR(p->image)do { if (p->image) { PyObject *_py_tmp = (PyObject *)(p->
image); (p->image) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
61388 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61389}
61390
61391static int __pyx_tp_traverse_3rbd_ChildIterator(PyObject *o, visitproc v, void *a) {
61392 int e;
61393 struct __pyx_obj_3rbd_ChildIterator *p = (struct __pyx_obj_3rbd_ChildIterator *)o;
61394 if (p->image) {
61395 e = (*v)(p->image, a); if (e) return e;
61396 }
61397 return 0;
61398}
61399
61400static int __pyx_tp_clear_3rbd_ChildIterator(PyObject *o) {
61401 PyObject* tmp;
61402 struct __pyx_obj_3rbd_ChildIterator *p = (struct __pyx_obj_3rbd_ChildIterator *)o;
61403 tmp = ((PyObject*)p->image);
61404 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61405 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61406 return 0;
61407}
61408
61409static PyMethodDef __pyx_methods_3rbd_ChildIterator[] = {
61410 {0, 0, 0, 0}
61411};
61412
61413static PyTypeObject __pyx_type_3rbd_ChildIterator = {
61414 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61415 "rbd.ChildIterator", /*tp_name*/
61416 sizeof(struct __pyx_obj_3rbd_ChildIterator), /*tp_basicsize*/
61417 0, /*tp_itemsize*/
61418 __pyx_tp_dealloc_3rbd_ChildIterator, /*tp_dealloc*/
61419 0, /*tp_print*/
61420 0, /*tp_getattr*/
61421 0, /*tp_setattr*/
61422 #if PY_MAJOR_VERSION2 < 3
61423 0, /*tp_compare*/
61424 #endif
61425 #if PY_MAJOR_VERSION2 >= 3
61426 0, /*tp_as_async*/
61427 #endif
61428 0, /*tp_repr*/
61429 0, /*tp_as_number*/
61430 0, /*tp_as_sequence*/
61431 0, /*tp_as_mapping*/
61432 0, /*tp_hash*/
61433 0, /*tp_call*/
61434 0, /*tp_str*/
61435 0, /*tp_getattro*/
61436 0, /*tp_setattro*/
61437 0, /*tp_as_buffer*/
61438 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61439 "ChildIterator(Image image, descendants=False)\n\n Iterator over child info for the image or its snapshot.\n\n Yields a dictionary containing information about a child.\n\n Keys are:\n\n * ``pool`` (str) - name of the pool\n\n * ``pool_namespace`` (str) - namespace of the pool\n\n * ``image`` (str) - name of the child\n\n * ``id`` (str) - id of the child\n\n * ``trash`` (bool) - True if child is in trash bin\n ", /*tp_doc*/
61440 __pyx_tp_traverse_3rbd_ChildIterator, /*tp_traverse*/
61441 __pyx_tp_clear_3rbd_ChildIterator, /*tp_clear*/
61442 0, /*tp_richcompare*/
61443 0, /*tp_weaklistoffset*/
61444 __pyx_pw_3rbd_13ChildIterator_3__iter__, /*tp_iter*/
61445 0, /*tp_iternext*/
61446 __pyx_methods_3rbd_ChildIterator, /*tp_methods*/
61447 0, /*tp_members*/
61448 0, /*tp_getset*/
61449 0, /*tp_base*/
61450 0, /*tp_dict*/
61451 0, /*tp_descr_get*/
61452 0, /*tp_descr_set*/
61453 0, /*tp_dictoffset*/
61454 __pyx_pw_3rbd_13ChildIterator_1__init__, /*tp_init*/
61455 0, /*tp_alloc*/
61456 __pyx_tp_new_3rbd_ChildIterator, /*tp_new*/
61457 0, /*tp_free*/
61458 0, /*tp_is_gc*/
61459 0, /*tp_bases*/
61460 0, /*tp_mro*/
61461 0, /*tp_cache*/
61462 0, /*tp_subclasses*/
61463 0, /*tp_weaklist*/
61464 0, /*tp_del*/
61465 0, /*tp_version_tag*/
61466 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61467 0, /*tp_finalize*/
61468 #endif
61469};
61470
61471static PyObject *__pyx_tp_new_3rbd_WatcherIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61472 struct __pyx_obj_3rbd_WatcherIterator *p;
61473 PyObject *o;
61474 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61475 o = (*t->tp_alloc)(t, 0);
61476 } else {
61477 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61478 }
61479 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61480 p = ((struct __pyx_obj_3rbd_WatcherIterator *)o);
61481 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61482 return o;
61483}
61484
61485static void __pyx_tp_dealloc_3rbd_WatcherIterator(PyObject *o) {
61486 struct __pyx_obj_3rbd_WatcherIterator *p = (struct __pyx_obj_3rbd_WatcherIterator *)o;
61487 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61488 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
61489 if (PyObject_CallFinalizerFromDealloc(o)) return;
61490 }
61491 #endif
61492 PyObject_GC_UnTrack(o);
61493 {
61494 PyObject *etype, *eval, *etb;
61495 PyErr_Fetch(&etype, &eval, &etb);
61496 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61497 __pyx_pw_3rbd_15WatcherIterator_6__dealloc__(o);
61498 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61499 PyErr_Restore(etype, eval, etb);
61500 }
61501 Py_CLEAR(p->image)do { if (p->image) { PyObject *_py_tmp = (PyObject *)(p->
image); (p->image) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
61502 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61503}
61504
61505static int __pyx_tp_traverse_3rbd_WatcherIterator(PyObject *o, visitproc v, void *a) {
61506 int e;
61507 struct __pyx_obj_3rbd_WatcherIterator *p = (struct __pyx_obj_3rbd_WatcherIterator *)o;
61508 if (p->image) {
61509 e = (*v)(p->image, a); if (e) return e;
61510 }
61511 return 0;
61512}
61513
61514static int __pyx_tp_clear_3rbd_WatcherIterator(PyObject *o) {
61515 PyObject* tmp;
61516 struct __pyx_obj_3rbd_WatcherIterator *p = (struct __pyx_obj_3rbd_WatcherIterator *)o;
61517 tmp = ((PyObject*)p->image);
61518 p->image = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61519 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61520 return 0;
61521}
61522
61523static PyMethodDef __pyx_methods_3rbd_WatcherIterator[] = {
61524 {0, 0, 0, 0}
61525};
61526
61527static PyTypeObject __pyx_type_3rbd_WatcherIterator = {
61528 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61529 "rbd.WatcherIterator", /*tp_name*/
61530 sizeof(struct __pyx_obj_3rbd_WatcherIterator), /*tp_basicsize*/
61531 0, /*tp_itemsize*/
61532 __pyx_tp_dealloc_3rbd_WatcherIterator, /*tp_dealloc*/
61533 0, /*tp_print*/
61534 0, /*tp_getattr*/
61535 0, /*tp_setattr*/
61536 #if PY_MAJOR_VERSION2 < 3
61537 0, /*tp_compare*/
61538 #endif
61539 #if PY_MAJOR_VERSION2 >= 3
61540 0, /*tp_as_async*/
61541 #endif
61542 0, /*tp_repr*/
61543 0, /*tp_as_number*/
61544 0, /*tp_as_sequence*/
61545 0, /*tp_as_mapping*/
61546 0, /*tp_hash*/
61547 0, /*tp_call*/
61548 0, /*tp_str*/
61549 0, /*tp_getattro*/
61550 0, /*tp_setattro*/
61551 0, /*tp_as_buffer*/
61552 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61553 "WatcherIterator(Image image)\n\n Iterator over watchers of an image.\n\n Yields a dictionary containing information about a watcher.\n\n Keys are:\n\n * ``addr`` (str) - address of the watcher\n\n * ``id`` (int) - id of the watcher\n\n * ``cookie`` (int) - the watcher's cookie\n ", /*tp_doc*/
61554 __pyx_tp_traverse_3rbd_WatcherIterator, /*tp_traverse*/
61555 __pyx_tp_clear_3rbd_WatcherIterator, /*tp_clear*/
61556 0, /*tp_richcompare*/
61557 0, /*tp_weaklistoffset*/
61558 __pyx_pw_3rbd_15WatcherIterator_3__iter__, /*tp_iter*/
61559 0, /*tp_iternext*/
61560 __pyx_methods_3rbd_WatcherIterator, /*tp_methods*/
61561 0, /*tp_members*/
61562 0, /*tp_getset*/
61563 0, /*tp_base*/
61564 0, /*tp_dict*/
61565 0, /*tp_descr_get*/
61566 0, /*tp_descr_set*/
61567 0, /*tp_dictoffset*/
61568 __pyx_pw_3rbd_15WatcherIterator_1__init__, /*tp_init*/
61569 0, /*tp_alloc*/
61570 __pyx_tp_new_3rbd_WatcherIterator, /*tp_new*/
61571 0, /*tp_free*/
61572 0, /*tp_is_gc*/
61573 0, /*tp_bases*/
61574 0, /*tp_mro*/
61575 0, /*tp_cache*/
61576 0, /*tp_subclasses*/
61577 0, /*tp_weaklist*/
61578 0, /*tp_del*/
61579 0, /*tp_version_tag*/
61580 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61581 0, /*tp_finalize*/
61582 #endif
61583};
61584
61585static PyObject *__pyx_tp_new_3rbd_ConfigImageIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61586 PyObject *o;
61587 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61588 o = (*t->tp_alloc)(t, 0);
61589 } else {
61590 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61591 }
61592 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61593 return o;
61594}
61595
61596static void __pyx_tp_dealloc_3rbd_ConfigImageIterator(PyObject *o) {
61597 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61598 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& (!PyType_IS_GC(Py_TYPE(o))(((((((PyObject*)(o))->ob_type)))->tp_flags & ((1L<<
14))) != 0)
|| !_PyGC_FINALIZED(o))) {
61599 if (PyObject_CallFinalizerFromDealloc(o)) return;
61600 }
61601 #endif
61602 {
61603 PyObject *etype, *eval, *etb;
61604 PyErr_Fetch(&etype, &eval, &etb);
61605 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61606 __pyx_pw_3rbd_19ConfigImageIterator_6__dealloc__(o);
61607 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61608 PyErr_Restore(etype, eval, etb);
61609 }
61610 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61611}
61612
61613static PyMethodDef __pyx_methods_3rbd_ConfigImageIterator[] = {
61614 {0, 0, 0, 0}
61615};
61616
61617static PyTypeObject __pyx_type_3rbd_ConfigImageIterator = {
61618 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61619 "rbd.ConfigImageIterator", /*tp_name*/
61620 sizeof(struct __pyx_obj_3rbd_ConfigImageIterator), /*tp_basicsize*/
61621 0, /*tp_itemsize*/
61622 __pyx_tp_dealloc_3rbd_ConfigImageIterator, /*tp_dealloc*/
61623 0, /*tp_print*/
61624 0, /*tp_getattr*/
61625 0, /*tp_setattr*/
61626 #if PY_MAJOR_VERSION2 < 3
61627 0, /*tp_compare*/
61628 #endif
61629 #if PY_MAJOR_VERSION2 >= 3
61630 0, /*tp_as_async*/
61631 #endif
61632 0, /*tp_repr*/
61633 0, /*tp_as_number*/
61634 0, /*tp_as_sequence*/
61635 0, /*tp_as_mapping*/
61636 0, /*tp_hash*/
61637 0, /*tp_call*/
61638 0, /*tp_str*/
61639 0, /*tp_getattro*/
61640 0, /*tp_setattro*/
61641 0, /*tp_as_buffer*/
61642 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10), /*tp_flags*/
61643 "ConfigImageIterator(Image image)\n\n Iterator over image-level overrides for an image.\n\n Yields a dictionary containing information about an override.\n\n Keys are:\n\n * ``name`` (str) - override name\n\n * ``value`` (str) - override value\n\n * ``source`` (str) - override source\n ", /*tp_doc*/
61644 0, /*tp_traverse*/
61645 0, /*tp_clear*/
61646 0, /*tp_richcompare*/
61647 0, /*tp_weaklistoffset*/
61648 __pyx_pw_3rbd_19ConfigImageIterator_3__iter__, /*tp_iter*/
61649 0, /*tp_iternext*/
61650 __pyx_methods_3rbd_ConfigImageIterator, /*tp_methods*/
61651 0, /*tp_members*/
61652 0, /*tp_getset*/
61653 0, /*tp_base*/
61654 0, /*tp_dict*/
61655 0, /*tp_descr_get*/
61656 0, /*tp_descr_set*/
61657 0, /*tp_dictoffset*/
61658 __pyx_pw_3rbd_19ConfigImageIterator_1__init__, /*tp_init*/
61659 0, /*tp_alloc*/
61660 __pyx_tp_new_3rbd_ConfigImageIterator, /*tp_new*/
61661 0, /*tp_free*/
61662 0, /*tp_is_gc*/
61663 0, /*tp_bases*/
61664 0, /*tp_mro*/
61665 0, /*tp_cache*/
61666 0, /*tp_subclasses*/
61667 0, /*tp_weaklist*/
61668 0, /*tp_del*/
61669 0, /*tp_version_tag*/
61670 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61671 0, /*tp_finalize*/
61672 #endif
61673};
61674
61675static PyObject *__pyx_tp_new_3rbd_GroupImageIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61676 struct __pyx_obj_3rbd_GroupImageIterator *p;
61677 PyObject *o;
61678 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61679 o = (*t->tp_alloc)(t, 0);
61680 } else {
61681 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61682 }
61683 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61684 p = ((struct __pyx_obj_3rbd_GroupImageIterator *)o);
61685 p->group = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61686 return o;
61687}
61688
61689static void __pyx_tp_dealloc_3rbd_GroupImageIterator(PyObject *o) {
61690 struct __pyx_obj_3rbd_GroupImageIterator *p = (struct __pyx_obj_3rbd_GroupImageIterator *)o;
61691 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61692 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
61693 if (PyObject_CallFinalizerFromDealloc(o)) return;
61694 }
61695 #endif
61696 PyObject_GC_UnTrack(o);
61697 {
61698 PyObject *etype, *eval, *etb;
61699 PyErr_Fetch(&etype, &eval, &etb);
61700 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61701 __pyx_pw_3rbd_18GroupImageIterator_6__dealloc__(o);
61702 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61703 PyErr_Restore(etype, eval, etb);
61704 }
61705 Py_CLEAR(p->group)do { if (p->group) { PyObject *_py_tmp = (PyObject *)(p->
group); (p->group) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
61706 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61707}
61708
61709static int __pyx_tp_traverse_3rbd_GroupImageIterator(PyObject *o, visitproc v, void *a) {
61710 int e;
61711 struct __pyx_obj_3rbd_GroupImageIterator *p = (struct __pyx_obj_3rbd_GroupImageIterator *)o;
61712 if (p->group) {
61713 e = (*v)(p->group, a); if (e) return e;
61714 }
61715 return 0;
61716}
61717
61718static int __pyx_tp_clear_3rbd_GroupImageIterator(PyObject *o) {
61719 PyObject* tmp;
61720 struct __pyx_obj_3rbd_GroupImageIterator *p = (struct __pyx_obj_3rbd_GroupImageIterator *)o;
61721 tmp = ((PyObject*)p->group);
61722 p->group = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61723 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61724 return 0;
61725}
61726
61727static PyMethodDef __pyx_methods_3rbd_GroupImageIterator[] = {
61728 {0, 0, 0, 0}
61729};
61730
61731static PyTypeObject __pyx_type_3rbd_GroupImageIterator = {
61732 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61733 "rbd.GroupImageIterator", /*tp_name*/
61734 sizeof(struct __pyx_obj_3rbd_GroupImageIterator), /*tp_basicsize*/
61735 0, /*tp_itemsize*/
61736 __pyx_tp_dealloc_3rbd_GroupImageIterator, /*tp_dealloc*/
61737 0, /*tp_print*/
61738 0, /*tp_getattr*/
61739 0, /*tp_setattr*/
61740 #if PY_MAJOR_VERSION2 < 3
61741 0, /*tp_compare*/
61742 #endif
61743 #if PY_MAJOR_VERSION2 >= 3
61744 0, /*tp_as_async*/
61745 #endif
61746 0, /*tp_repr*/
61747 0, /*tp_as_number*/
61748 0, /*tp_as_sequence*/
61749 0, /*tp_as_mapping*/
61750 0, /*tp_hash*/
61751 0, /*tp_call*/
61752 0, /*tp_str*/
61753 0, /*tp_getattro*/
61754 0, /*tp_setattro*/
61755 0, /*tp_as_buffer*/
61756 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61757 "GroupImageIterator(Group group)\n\n Iterator over image info for a group.\n\n Yields a dictionary containing information about an image.\n\n Keys are:\n\n * ``name`` (str) - name of the image\n\n * ``pool`` (int) - id of the pool this image belongs to\n\n * ``state`` (int) - state of the image\n ", /*tp_doc*/
61758 __pyx_tp_traverse_3rbd_GroupImageIterator, /*tp_traverse*/
61759 __pyx_tp_clear_3rbd_GroupImageIterator, /*tp_clear*/
61760 0, /*tp_richcompare*/
61761 0, /*tp_weaklistoffset*/
61762 __pyx_pw_3rbd_18GroupImageIterator_3__iter__, /*tp_iter*/
61763 0, /*tp_iternext*/
61764 __pyx_methods_3rbd_GroupImageIterator, /*tp_methods*/
61765 0, /*tp_members*/
61766 0, /*tp_getset*/
61767 0, /*tp_base*/
61768 0, /*tp_dict*/
61769 0, /*tp_descr_get*/
61770 0, /*tp_descr_set*/
61771 0, /*tp_dictoffset*/
61772 __pyx_pw_3rbd_18GroupImageIterator_1__init__, /*tp_init*/
61773 0, /*tp_alloc*/
61774 __pyx_tp_new_3rbd_GroupImageIterator, /*tp_new*/
61775 0, /*tp_free*/
61776 0, /*tp_is_gc*/
61777 0, /*tp_bases*/
61778 0, /*tp_mro*/
61779 0, /*tp_cache*/
61780 0, /*tp_subclasses*/
61781 0, /*tp_weaklist*/
61782 0, /*tp_del*/
61783 0, /*tp_version_tag*/
61784 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61785 0, /*tp_finalize*/
61786 #endif
61787};
61788
61789static PyObject *__pyx_tp_new_3rbd_GroupSnapIterator(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61790 struct __pyx_obj_3rbd_GroupSnapIterator *p;
61791 PyObject *o;
61792 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)__builtin_expect(!!((t->tp_flags & (1L<<20)) == 0
), 1)
) {
61793 o = (*t->tp_alloc)(t, 0);
61794 } else {
61795 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
61796 }
61797 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61798 p = ((struct __pyx_obj_3rbd_GroupSnapIterator *)o);
61799 p->group = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61800 return o;
61801}
61802
61803static void __pyx_tp_dealloc_3rbd_GroupSnapIterator(PyObject *o) {
61804 struct __pyx_obj_3rbd_GroupSnapIterator *p = (struct __pyx_obj_3rbd_GroupSnapIterator *)o;
61805 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61806 if (unlikely(Py_TYPE(o)->tp_finalize)__builtin_expect(!!((((PyObject*)(o))->ob_type)->tp_finalize
), 0)
&& !_PyGC_FINALIZED(o)) {
61807 if (PyObject_CallFinalizerFromDealloc(o)) return;
61808 }
61809 #endif
61810 PyObject_GC_UnTrack(o);
61811 {
61812 PyObject *etype, *eval, *etb;
61813 PyErr_Fetch(&etype, &eval, &etb);
61814 ++Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61815 __pyx_pw_3rbd_17GroupSnapIterator_6__dealloc__(o);
61816 --Py_REFCNT(o)(((PyObject*)(o))->ob_refcnt);
61817 PyErr_Restore(etype, eval, etb);
61818 }
61819 Py_CLEAR(p->group)do { if (p->group) { PyObject *_py_tmp = (PyObject *)(p->
group); (p->group) = ((void*)0); do { if ( --((PyObject*)(
_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
61820 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61821}
61822
61823static int __pyx_tp_traverse_3rbd_GroupSnapIterator(PyObject *o, visitproc v, void *a) {
61824 int e;
61825 struct __pyx_obj_3rbd_GroupSnapIterator *p = (struct __pyx_obj_3rbd_GroupSnapIterator *)o;
61826 if (p->group) {
61827 e = (*v)(p->group, a); if (e) return e;
61828 }
61829 return 0;
61830}
61831
61832static int __pyx_tp_clear_3rbd_GroupSnapIterator(PyObject *o) {
61833 PyObject* tmp;
61834 struct __pyx_obj_3rbd_GroupSnapIterator *p = (struct __pyx_obj_3rbd_GroupSnapIterator *)o;
61835 tmp = ((PyObject*)p->group);
61836 p->group = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61837 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61838 return 0;
61839}
61840
61841static PyMethodDef __pyx_methods_3rbd_GroupSnapIterator[] = {
61842 {0, 0, 0, 0}
61843};
61844
61845static PyTypeObject __pyx_type_3rbd_GroupSnapIterator = {
61846 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61847 "rbd.GroupSnapIterator", /*tp_name*/
61848 sizeof(struct __pyx_obj_3rbd_GroupSnapIterator), /*tp_basicsize*/
61849 0, /*tp_itemsize*/
61850 __pyx_tp_dealloc_3rbd_GroupSnapIterator, /*tp_dealloc*/
61851 0, /*tp_print*/
61852 0, /*tp_getattr*/
61853 0, /*tp_setattr*/
61854 #if PY_MAJOR_VERSION2 < 3
61855 0, /*tp_compare*/
61856 #endif
61857 #if PY_MAJOR_VERSION2 >= 3
61858 0, /*tp_as_async*/
61859 #endif
61860 0, /*tp_repr*/
61861 0, /*tp_as_number*/
61862 0, /*tp_as_sequence*/
61863 0, /*tp_as_mapping*/
61864 0, /*tp_hash*/
61865 0, /*tp_call*/
61866 0, /*tp_str*/
61867 0, /*tp_getattro*/
61868 0, /*tp_setattro*/
61869 0, /*tp_as_buffer*/
61870 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_BASETYPE(1L<<10)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61871 "GroupSnapIterator(Group group)\n\n Iterator over snaps specs for a group.\n\n Yields a dictionary containing information about a snapshot.\n\n Keys are:\n\n * ``name`` (str) - name of the snapshot\n\n * ``state`` (int) - state of the snapshot\n ", /*tp_doc*/
61872 __pyx_tp_traverse_3rbd_GroupSnapIterator, /*tp_traverse*/
61873 __pyx_tp_clear_3rbd_GroupSnapIterator, /*tp_clear*/
61874 0, /*tp_richcompare*/
61875 0, /*tp_weaklistoffset*/
61876 __pyx_pw_3rbd_17GroupSnapIterator_3__iter__, /*tp_iter*/
61877 0, /*tp_iternext*/
61878 __pyx_methods_3rbd_GroupSnapIterator, /*tp_methods*/
61879 0, /*tp_members*/
61880 0, /*tp_getset*/
61881 0, /*tp_base*/
61882 0, /*tp_dict*/
61883 0, /*tp_descr_get*/
61884 0, /*tp_descr_set*/
61885 0, /*tp_dictoffset*/
61886 __pyx_pw_3rbd_17GroupSnapIterator_1__init__, /*tp_init*/
61887 0, /*tp_alloc*/
61888 __pyx_tp_new_3rbd_GroupSnapIterator, /*tp_new*/
61889 0, /*tp_free*/
61890 0, /*tp_is_gc*/
61891 0, /*tp_bases*/
61892 0, /*tp_mro*/
61893 0, /*tp_cache*/
61894 0, /*tp_subclasses*/
61895 0, /*tp_weaklist*/
61896 0, /*tp_del*/
61897 0, /*tp_version_tag*/
61898 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
61899 0, /*tp_finalize*/
61900 #endif
61901};
61902
61903static struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *__pyx_freelist_3rbd___pyx_scope_struct____iter__[8];
61904static int __pyx_freecount_3rbd___pyx_scope_struct____iter__ = 0;
61905
61906static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
61907 PyObject *o;
61908 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct____iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct____iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct____iter__
))), 1)
) {
61909 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct____iter__[--__pyx_freecount_3rbd___pyx_scope_struct____iter__];
61910 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct____iter__));
61911 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
61912 PyObject_GC_Track(o);
61913 } else {
61914 o = (*t->tp_alloc)(t, 0);
61915 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
61916 }
61917 return o;
61918}
61919
61920static void __pyx_tp_dealloc_3rbd___pyx_scope_struct____iter__(PyObject *o) {
61921 struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *)o;
61922 PyObject_GC_UnTrack(o);
61923 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
61924 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct____iter__)))) {
61925 __pyx_freelist_3rbd___pyx_scope_struct____iter__[__pyx_freecount_3rbd___pyx_scope_struct____iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *)o);
61926 } else {
61927 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
61928 }
61929}
61930
61931static int __pyx_tp_traverse_3rbd___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
61932 int e;
61933 struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *)o;
61934 if (p->__pyx_v_self) {
61935 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
61936 }
61937 return 0;
61938}
61939
61940static int __pyx_tp_clear_3rbd___pyx_scope_struct____iter__(PyObject *o) {
61941 PyObject* tmp;
61942 struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct____iter__ *)o;
61943 tmp = ((PyObject*)p->__pyx_v_self);
61944 p->__pyx_v_self = ((struct __pyx_obj_3rbd_MirrorPeerIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
61945 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
61946 return 0;
61947}
61948
61949static PyTypeObject __pyx_type_3rbd___pyx_scope_struct____iter__ = {
61950 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
61951 "rbd.__pyx_scope_struct____iter__", /*tp_name*/
61952 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct____iter__), /*tp_basicsize*/
61953 0, /*tp_itemsize*/
61954 __pyx_tp_dealloc_3rbd___pyx_scope_struct____iter__, /*tp_dealloc*/
61955 0, /*tp_print*/
61956 0, /*tp_getattr*/
61957 0, /*tp_setattr*/
61958 #if PY_MAJOR_VERSION2 < 3
61959 0, /*tp_compare*/
61960 #endif
61961 #if PY_MAJOR_VERSION2 >= 3
61962 0, /*tp_as_async*/
61963 #endif
61964 0, /*tp_repr*/
61965 0, /*tp_as_number*/
61966 0, /*tp_as_sequence*/
61967 0, /*tp_as_mapping*/
61968 0, /*tp_hash*/
61969 0, /*tp_call*/
61970 0, /*tp_str*/
61971 0, /*tp_getattro*/
61972 0, /*tp_setattro*/
61973 0, /*tp_as_buffer*/
61974 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
61975 0, /*tp_doc*/
61976 __pyx_tp_traverse_3rbd___pyx_scope_struct____iter__, /*tp_traverse*/
61977 __pyx_tp_clear_3rbd___pyx_scope_struct____iter__, /*tp_clear*/
61978 0, /*tp_richcompare*/
61979 0, /*tp_weaklistoffset*/
61980 0, /*tp_iter*/
61981 0, /*tp_iternext*/
61982 0, /*tp_methods*/
61983 0, /*tp_members*/
61984 0, /*tp_getset*/
61985 0, /*tp_base*/
61986 0, /*tp_dict*/
61987 0, /*tp_descr_get*/
61988 0, /*tp_descr_set*/
61989 0, /*tp_dictoffset*/
61990 0, /*tp_init*/
61991 0, /*tp_alloc*/
61992 __pyx_tp_new_3rbd___pyx_scope_struct____iter__, /*tp_new*/
61993 0, /*tp_free*/
61994 0, /*tp_is_gc*/
61995 0, /*tp_bases*/
61996 0, /*tp_mro*/
61997 0, /*tp_cache*/
61998 0, /*tp_subclasses*/
61999 0, /*tp_weaklist*/
62000 0, /*tp_del*/
62001 0, /*tp_version_tag*/
62002 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62003 0, /*tp_finalize*/
62004 #endif
62005};
62006
62007static struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_1___iter__[8];
62008static int __pyx_freecount_3rbd___pyx_scope_struct_1___iter__ = 0;
62009
62010static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62011 PyObject *o;
62012 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_1___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__
))), 1)
) {
62013 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_1___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_1___iter__];
62014 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__));
62015 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62016 PyObject_GC_Track(o);
62017 } else {
62018 o = (*t->tp_alloc)(t, 0);
62019 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62020 }
62021 return o;
62022}
62023
62024static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_1___iter__(PyObject *o) {
62025 struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *)o;
62026 PyObject_GC_UnTrack(o);
62027 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62028 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__)))) {
62029 __pyx_freelist_3rbd___pyx_scope_struct_1___iter__[__pyx_freecount_3rbd___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *)o);
62030 } else {
62031 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62032 }
62033}
62034
62035static int __pyx_tp_traverse_3rbd___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) {
62036 int e;
62037 struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *)o;
62038 if (p->__pyx_v_self) {
62039 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62040 }
62041 return 0;
62042}
62043
62044static int __pyx_tp_clear_3rbd___pyx_scope_struct_1___iter__(PyObject *o) {
62045 PyObject* tmp;
62046 struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__ *)o;
62047 tmp = ((PyObject*)p->__pyx_v_self);
62048 p->__pyx_v_self = ((struct __pyx_obj_3rbd_MirrorImageStatusIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62049 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62050 return 0;
62051}
62052
62053static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_1___iter__ = {
62054 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62055 "rbd.__pyx_scope_struct_1___iter__", /*tp_name*/
62056 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_1___iter__), /*tp_basicsize*/
62057 0, /*tp_itemsize*/
62058 __pyx_tp_dealloc_3rbd___pyx_scope_struct_1___iter__, /*tp_dealloc*/
62059 0, /*tp_print*/
62060 0, /*tp_getattr*/
62061 0, /*tp_setattr*/
62062 #if PY_MAJOR_VERSION2 < 3
62063 0, /*tp_compare*/
62064 #endif
62065 #if PY_MAJOR_VERSION2 >= 3
62066 0, /*tp_as_async*/
62067 #endif
62068 0, /*tp_repr*/
62069 0, /*tp_as_number*/
62070 0, /*tp_as_sequence*/
62071 0, /*tp_as_mapping*/
62072 0, /*tp_hash*/
62073 0, /*tp_call*/
62074 0, /*tp_str*/
62075 0, /*tp_getattro*/
62076 0, /*tp_setattro*/
62077 0, /*tp_as_buffer*/
62078 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62079 0, /*tp_doc*/
62080 __pyx_tp_traverse_3rbd___pyx_scope_struct_1___iter__, /*tp_traverse*/
62081 __pyx_tp_clear_3rbd___pyx_scope_struct_1___iter__, /*tp_clear*/
62082 0, /*tp_richcompare*/
62083 0, /*tp_weaklistoffset*/
62084 0, /*tp_iter*/
62085 0, /*tp_iternext*/
62086 0, /*tp_methods*/
62087 0, /*tp_members*/
62088 0, /*tp_getset*/
62089 0, /*tp_base*/
62090 0, /*tp_dict*/
62091 0, /*tp_descr_get*/
62092 0, /*tp_descr_set*/
62093 0, /*tp_dictoffset*/
62094 0, /*tp_init*/
62095 0, /*tp_alloc*/
62096 __pyx_tp_new_3rbd___pyx_scope_struct_1___iter__, /*tp_new*/
62097 0, /*tp_free*/
62098 0, /*tp_is_gc*/
62099 0, /*tp_bases*/
62100 0, /*tp_mro*/
62101 0, /*tp_cache*/
62102 0, /*tp_subclasses*/
62103 0, /*tp_weaklist*/
62104 0, /*tp_del*/
62105 0, /*tp_version_tag*/
62106 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62107 0, /*tp_finalize*/
62108 #endif
62109};
62110
62111static struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_2___iter__[8];
62112static int __pyx_freecount_3rbd___pyx_scope_struct_2___iter__ = 0;
62113
62114static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_2___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62115 PyObject *o;
62116 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_2___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_2___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__
))), 1)
) {
62117 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_2___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_2___iter__];
62118 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__));
62119 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62120 PyObject_GC_Track(o);
62121 } else {
62122 o = (*t->tp_alloc)(t, 0);
62123 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62124 }
62125 return o;
62126}
62127
62128static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_2___iter__(PyObject *o) {
62129 struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *)o;
62130 PyObject_GC_UnTrack(o);
62131 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62132 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_2___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__)))) {
62133 __pyx_freelist_3rbd___pyx_scope_struct_2___iter__[__pyx_freecount_3rbd___pyx_scope_struct_2___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *)o);
62134 } else {
62135 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62136 }
62137}
62138
62139static int __pyx_tp_traverse_3rbd___pyx_scope_struct_2___iter__(PyObject *o, visitproc v, void *a) {
62140 int e;
62141 struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *)o;
62142 if (p->__pyx_v_self) {
62143 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62144 }
62145 return 0;
62146}
62147
62148static int __pyx_tp_clear_3rbd___pyx_scope_struct_2___iter__(PyObject *o) {
62149 PyObject* tmp;
62150 struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__ *)o;
62151 tmp = ((PyObject*)p->__pyx_v_self);
62152 p->__pyx_v_self = ((struct __pyx_obj_3rbd_MirrorImageInstanceIdIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62153 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62154 return 0;
62155}
62156
62157static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_2___iter__ = {
62158 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62159 "rbd.__pyx_scope_struct_2___iter__", /*tp_name*/
62160 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_2___iter__), /*tp_basicsize*/
62161 0, /*tp_itemsize*/
62162 __pyx_tp_dealloc_3rbd___pyx_scope_struct_2___iter__, /*tp_dealloc*/
62163 0, /*tp_print*/
62164 0, /*tp_getattr*/
62165 0, /*tp_setattr*/
62166 #if PY_MAJOR_VERSION2 < 3
62167 0, /*tp_compare*/
62168 #endif
62169 #if PY_MAJOR_VERSION2 >= 3
62170 0, /*tp_as_async*/
62171 #endif
62172 0, /*tp_repr*/
62173 0, /*tp_as_number*/
62174 0, /*tp_as_sequence*/
62175 0, /*tp_as_mapping*/
62176 0, /*tp_hash*/
62177 0, /*tp_call*/
62178 0, /*tp_str*/
62179 0, /*tp_getattro*/
62180 0, /*tp_setattro*/
62181 0, /*tp_as_buffer*/
62182 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62183 0, /*tp_doc*/
62184 __pyx_tp_traverse_3rbd___pyx_scope_struct_2___iter__, /*tp_traverse*/
62185 __pyx_tp_clear_3rbd___pyx_scope_struct_2___iter__, /*tp_clear*/
62186 0, /*tp_richcompare*/
62187 0, /*tp_weaklistoffset*/
62188 0, /*tp_iter*/
62189 0, /*tp_iternext*/
62190 0, /*tp_methods*/
62191 0, /*tp_members*/
62192 0, /*tp_getset*/
62193 0, /*tp_base*/
62194 0, /*tp_dict*/
62195 0, /*tp_descr_get*/
62196 0, /*tp_descr_set*/
62197 0, /*tp_dictoffset*/
62198 0, /*tp_init*/
62199 0, /*tp_alloc*/
62200 __pyx_tp_new_3rbd___pyx_scope_struct_2___iter__, /*tp_new*/
62201 0, /*tp_free*/
62202 0, /*tp_is_gc*/
62203 0, /*tp_bases*/
62204 0, /*tp_mro*/
62205 0, /*tp_cache*/
62206 0, /*tp_subclasses*/
62207 0, /*tp_weaklist*/
62208 0, /*tp_del*/
62209 0, /*tp_version_tag*/
62210 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62211 0, /*tp_finalize*/
62212 #endif
62213};
62214
62215static struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_3___iter__[8];
62216static int __pyx_freecount_3rbd___pyx_scope_struct_3___iter__ = 0;
62217
62218static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_3___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62219 PyObject *o;
62220 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_3___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_3___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__
))), 1)
) {
62221 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_3___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_3___iter__];
62222 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__));
62223 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62224 PyObject_GC_Track(o);
62225 } else {
62226 o = (*t->tp_alloc)(t, 0);
62227 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62228 }
62229 return o;
62230}
62231
62232static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_3___iter__(PyObject *o) {
62233 struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *)o;
62234 PyObject_GC_UnTrack(o);
62235 Py_CLEAR(p->__pyx_v_pair)do { if (p->__pyx_v_pair) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_pair); (p->__pyx_v_pair) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62236 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62237 Py_CLEAR(p->__pyx_t_0)do { if (p->__pyx_t_0) { PyObject *_py_tmp = (PyObject *)(
p->__pyx_t_0); (p->__pyx_t_0) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
62238 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_3___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__)))) {
62239 __pyx_freelist_3rbd___pyx_scope_struct_3___iter__[__pyx_freecount_3rbd___pyx_scope_struct_3___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *)o);
62240 } else {
62241 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62242 }
62243}
62244
62245static int __pyx_tp_traverse_3rbd___pyx_scope_struct_3___iter__(PyObject *o, visitproc v, void *a) {
62246 int e;
62247 struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *)o;
62248 if (p->__pyx_v_pair) {
62249 e = (*v)(p->__pyx_v_pair, a); if (e) return e;
62250 }
62251 if (p->__pyx_v_self) {
62252 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62253 }
62254 if (p->__pyx_t_0) {
62255 e = (*v)(p->__pyx_t_0, a); if (e) return e;
62256 }
62257 return 0;
62258}
62259
62260static int __pyx_tp_clear_3rbd___pyx_scope_struct_3___iter__(PyObject *o) {
62261 PyObject* tmp;
62262 struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__ *)o;
62263 tmp = ((PyObject*)p->__pyx_v_pair);
62264 p->__pyx_v_pair = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62265 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62266 tmp = ((PyObject*)p->__pyx_v_self);
62267 p->__pyx_v_self = ((struct __pyx_obj_3rbd_PoolMetadataIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62268 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62269 tmp = ((PyObject*)p->__pyx_t_0);
62270 p->__pyx_t_0 = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62271 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62272 return 0;
62273}
62274
62275static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_3___iter__ = {
62276 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62277 "rbd.__pyx_scope_struct_3___iter__", /*tp_name*/
62278 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_3___iter__), /*tp_basicsize*/
62279 0, /*tp_itemsize*/
62280 __pyx_tp_dealloc_3rbd___pyx_scope_struct_3___iter__, /*tp_dealloc*/
62281 0, /*tp_print*/
62282 0, /*tp_getattr*/
62283 0, /*tp_setattr*/
62284 #if PY_MAJOR_VERSION2 < 3
62285 0, /*tp_compare*/
62286 #endif
62287 #if PY_MAJOR_VERSION2 >= 3
62288 0, /*tp_as_async*/
62289 #endif
62290 0, /*tp_repr*/
62291 0, /*tp_as_number*/
62292 0, /*tp_as_sequence*/
62293 0, /*tp_as_mapping*/
62294 0, /*tp_hash*/
62295 0, /*tp_call*/
62296 0, /*tp_str*/
62297 0, /*tp_getattro*/
62298 0, /*tp_setattro*/
62299 0, /*tp_as_buffer*/
62300 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62301 0, /*tp_doc*/
62302 __pyx_tp_traverse_3rbd___pyx_scope_struct_3___iter__, /*tp_traverse*/
62303 __pyx_tp_clear_3rbd___pyx_scope_struct_3___iter__, /*tp_clear*/
62304 0, /*tp_richcompare*/
62305 0, /*tp_weaklistoffset*/
62306 0, /*tp_iter*/
62307 0, /*tp_iternext*/
62308 0, /*tp_methods*/
62309 0, /*tp_members*/
62310 0, /*tp_getset*/
62311 0, /*tp_base*/
62312 0, /*tp_dict*/
62313 0, /*tp_descr_get*/
62314 0, /*tp_descr_set*/
62315 0, /*tp_dictoffset*/
62316 0, /*tp_init*/
62317 0, /*tp_alloc*/
62318 __pyx_tp_new_3rbd___pyx_scope_struct_3___iter__, /*tp_new*/
62319 0, /*tp_free*/
62320 0, /*tp_is_gc*/
62321 0, /*tp_bases*/
62322 0, /*tp_mro*/
62323 0, /*tp_cache*/
62324 0, /*tp_subclasses*/
62325 0, /*tp_weaklist*/
62326 0, /*tp_del*/
62327 0, /*tp_version_tag*/
62328 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62329 0, /*tp_finalize*/
62330 #endif
62331};
62332
62333static struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_4___iter__[8];
62334static int __pyx_freecount_3rbd___pyx_scope_struct_4___iter__ = 0;
62335
62336static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_4___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62337 PyObject *o;
62338 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_4___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_4___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__
))), 1)
) {
62339 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_4___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_4___iter__];
62340 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__));
62341 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62342 PyObject_GC_Track(o);
62343 } else {
62344 o = (*t->tp_alloc)(t, 0);
62345 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62346 }
62347 return o;
62348}
62349
62350static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_4___iter__(PyObject *o) {
62351 struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *)o;
62352 PyObject_GC_UnTrack(o);
62353 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62354 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_4___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__)))) {
62355 __pyx_freelist_3rbd___pyx_scope_struct_4___iter__[__pyx_freecount_3rbd___pyx_scope_struct_4___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *)o);
62356 } else {
62357 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62358 }
62359}
62360
62361static int __pyx_tp_traverse_3rbd___pyx_scope_struct_4___iter__(PyObject *o, visitproc v, void *a) {
62362 int e;
62363 struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *)o;
62364 if (p->__pyx_v_self) {
62365 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62366 }
62367 return 0;
62368}
62369
62370static int __pyx_tp_clear_3rbd___pyx_scope_struct_4___iter__(PyObject *o) {
62371 PyObject* tmp;
62372 struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__ *)o;
62373 tmp = ((PyObject*)p->__pyx_v_self);
62374 p->__pyx_v_self = ((struct __pyx_obj_3rbd_ConfigPoolIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62375 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62376 return 0;
62377}
62378
62379static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_4___iter__ = {
62380 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62381 "rbd.__pyx_scope_struct_4___iter__", /*tp_name*/
62382 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_4___iter__), /*tp_basicsize*/
62383 0, /*tp_itemsize*/
62384 __pyx_tp_dealloc_3rbd___pyx_scope_struct_4___iter__, /*tp_dealloc*/
62385 0, /*tp_print*/
62386 0, /*tp_getattr*/
62387 0, /*tp_setattr*/
62388 #if PY_MAJOR_VERSION2 < 3
62389 0, /*tp_compare*/
62390 #endif
62391 #if PY_MAJOR_VERSION2 >= 3
62392 0, /*tp_as_async*/
62393 #endif
62394 0, /*tp_repr*/
62395 0, /*tp_as_number*/
62396 0, /*tp_as_sequence*/
62397 0, /*tp_as_mapping*/
62398 0, /*tp_hash*/
62399 0, /*tp_call*/
62400 0, /*tp_str*/
62401 0, /*tp_getattro*/
62402 0, /*tp_setattro*/
62403 0, /*tp_as_buffer*/
62404 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62405 0, /*tp_doc*/
62406 __pyx_tp_traverse_3rbd___pyx_scope_struct_4___iter__, /*tp_traverse*/
62407 __pyx_tp_clear_3rbd___pyx_scope_struct_4___iter__, /*tp_clear*/
62408 0, /*tp_richcompare*/
62409 0, /*tp_weaklistoffset*/
62410 0, /*tp_iter*/
62411 0, /*tp_iternext*/
62412 0, /*tp_methods*/
62413 0, /*tp_members*/
62414 0, /*tp_getset*/
62415 0, /*tp_base*/
62416 0, /*tp_dict*/
62417 0, /*tp_descr_get*/
62418 0, /*tp_descr_set*/
62419 0, /*tp_dictoffset*/
62420 0, /*tp_init*/
62421 0, /*tp_alloc*/
62422 __pyx_tp_new_3rbd___pyx_scope_struct_4___iter__, /*tp_new*/
62423 0, /*tp_free*/
62424 0, /*tp_is_gc*/
62425 0, /*tp_bases*/
62426 0, /*tp_mro*/
62427 0, /*tp_cache*/
62428 0, /*tp_subclasses*/
62429 0, /*tp_weaklist*/
62430 0, /*tp_del*/
62431 0, /*tp_version_tag*/
62432 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62433 0, /*tp_finalize*/
62434 #endif
62435};
62436
62437static struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *__pyx_freelist_3rbd___pyx_scope_struct_5_aio_read[8];
62438static int __pyx_freecount_3rbd___pyx_scope_struct_5_aio_read = 0;
62439
62440static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_5_aio_read(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62441 PyObject *o;
62442 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_5_aio_read > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_5_aio_read
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read
))), 1)
) {
62443 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_5_aio_read[--__pyx_freecount_3rbd___pyx_scope_struct_5_aio_read];
62444 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read));
62445 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62446 PyObject_GC_Track(o);
62447 } else {
62448 o = (*t->tp_alloc)(t, 0);
62449 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62450 }
62451 return o;
62452}
62453
62454static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_5_aio_read(PyObject *o) {
62455 struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *p = (struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *)o;
62456 PyObject_GC_UnTrack(o);
62457 Py_CLEAR(p->__pyx_v_length)do { if (p->__pyx_v_length) { PyObject *_py_tmp = (PyObject
*)(p->__pyx_v_length); (p->__pyx_v_length) = ((void*)0
); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62458 Py_CLEAR(p->__pyx_v_oncomplete)do { if (p->__pyx_v_oncomplete) { PyObject *_py_tmp = (PyObject
*)(p->__pyx_v_oncomplete); (p->__pyx_v_oncomplete) = (
(void*)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt !=
0) ; else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while
(0); } } while (0)
;
62459 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_5_aio_read < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read)))) {
62460 __pyx_freelist_3rbd___pyx_scope_struct_5_aio_read[__pyx_freecount_3rbd___pyx_scope_struct_5_aio_read++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *)o);
62461 } else {
62462 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62463 }
62464}
62465
62466static int __pyx_tp_traverse_3rbd___pyx_scope_struct_5_aio_read(PyObject *o, visitproc v, void *a) {
62467 int e;
62468 struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *p = (struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *)o;
62469 if (p->__pyx_v_length) {
62470 e = (*v)(p->__pyx_v_length, a); if (e) return e;
62471 }
62472 if (p->__pyx_v_oncomplete) {
62473 e = (*v)(p->__pyx_v_oncomplete, a); if (e) return e;
62474 }
62475 return 0;
62476}
62477
62478static int __pyx_tp_clear_3rbd___pyx_scope_struct_5_aio_read(PyObject *o) {
62479 PyObject* tmp;
62480 struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *p = (struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read *)o;
62481 tmp = ((PyObject*)p->__pyx_v_length);
62482 p->__pyx_v_length = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62483 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62484 tmp = ((PyObject*)p->__pyx_v_oncomplete);
62485 p->__pyx_v_oncomplete = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62486 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62487 return 0;
62488}
62489
62490static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_5_aio_read = {
62491 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62492 "rbd.__pyx_scope_struct_5_aio_read", /*tp_name*/
62493 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_5_aio_read), /*tp_basicsize*/
62494 0, /*tp_itemsize*/
62495 __pyx_tp_dealloc_3rbd___pyx_scope_struct_5_aio_read, /*tp_dealloc*/
62496 0, /*tp_print*/
62497 0, /*tp_getattr*/
62498 0, /*tp_setattr*/
62499 #if PY_MAJOR_VERSION2 < 3
62500 0, /*tp_compare*/
62501 #endif
62502 #if PY_MAJOR_VERSION2 >= 3
62503 0, /*tp_as_async*/
62504 #endif
62505 0, /*tp_repr*/
62506 0, /*tp_as_number*/
62507 0, /*tp_as_sequence*/
62508 0, /*tp_as_mapping*/
62509 0, /*tp_hash*/
62510 0, /*tp_call*/
62511 0, /*tp_str*/
62512 0, /*tp_getattro*/
62513 0, /*tp_setattro*/
62514 0, /*tp_as_buffer*/
62515 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62516 0, /*tp_doc*/
62517 __pyx_tp_traverse_3rbd___pyx_scope_struct_5_aio_read, /*tp_traverse*/
62518 __pyx_tp_clear_3rbd___pyx_scope_struct_5_aio_read, /*tp_clear*/
62519 0, /*tp_richcompare*/
62520 0, /*tp_weaklistoffset*/
62521 0, /*tp_iter*/
62522 0, /*tp_iternext*/
62523 0, /*tp_methods*/
62524 0, /*tp_members*/
62525 0, /*tp_getset*/
62526 0, /*tp_base*/
62527 0, /*tp_dict*/
62528 0, /*tp_descr_get*/
62529 0, /*tp_descr_set*/
62530 0, /*tp_dictoffset*/
62531 0, /*tp_init*/
62532 0, /*tp_alloc*/
62533 __pyx_tp_new_3rbd___pyx_scope_struct_5_aio_read, /*tp_new*/
62534 0, /*tp_free*/
62535 0, /*tp_is_gc*/
62536 0, /*tp_bases*/
62537 0, /*tp_mro*/
62538 0, /*tp_cache*/
62539 0, /*tp_subclasses*/
62540 0, /*tp_weaklist*/
62541 0, /*tp_del*/
62542 0, /*tp_version_tag*/
62543 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62544 0, /*tp_finalize*/
62545 #endif
62546};
62547
62548static struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_6___iter__[8];
62549static int __pyx_freecount_3rbd___pyx_scope_struct_6___iter__ = 0;
62550
62551static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_6___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62552 PyObject *o;
62553 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_6___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_6___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__
))), 1)
) {
62554 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_6___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_6___iter__];
62555 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__));
62556 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62557 PyObject_GC_Track(o);
62558 } else {
62559 o = (*t->tp_alloc)(t, 0);
62560 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62561 }
62562 return o;
62563}
62564
62565static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_6___iter__(PyObject *o) {
62566 struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *)o;
62567 PyObject_GC_UnTrack(o);
62568 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62569 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_6___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__)))) {
62570 __pyx_freelist_3rbd___pyx_scope_struct_6___iter__[__pyx_freecount_3rbd___pyx_scope_struct_6___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *)o);
62571 } else {
62572 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62573 }
62574}
62575
62576static int __pyx_tp_traverse_3rbd___pyx_scope_struct_6___iter__(PyObject *o, visitproc v, void *a) {
62577 int e;
62578 struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *)o;
62579 if (p->__pyx_v_self) {
62580 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62581 }
62582 return 0;
62583}
62584
62585static int __pyx_tp_clear_3rbd___pyx_scope_struct_6___iter__(PyObject *o) {
62586 PyObject* tmp;
62587 struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__ *)o;
62588 tmp = ((PyObject*)p->__pyx_v_self);
62589 p->__pyx_v_self = ((struct __pyx_obj_3rbd_ImageIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62590 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62591 return 0;
62592}
62593
62594static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_6___iter__ = {
62595 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62596 "rbd.__pyx_scope_struct_6___iter__", /*tp_name*/
62597 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_6___iter__), /*tp_basicsize*/
62598 0, /*tp_itemsize*/
62599 __pyx_tp_dealloc_3rbd___pyx_scope_struct_6___iter__, /*tp_dealloc*/
62600 0, /*tp_print*/
62601 0, /*tp_getattr*/
62602 0, /*tp_setattr*/
62603 #if PY_MAJOR_VERSION2 < 3
62604 0, /*tp_compare*/
62605 #endif
62606 #if PY_MAJOR_VERSION2 >= 3
62607 0, /*tp_as_async*/
62608 #endif
62609 0, /*tp_repr*/
62610 0, /*tp_as_number*/
62611 0, /*tp_as_sequence*/
62612 0, /*tp_as_mapping*/
62613 0, /*tp_hash*/
62614 0, /*tp_call*/
62615 0, /*tp_str*/
62616 0, /*tp_getattro*/
62617 0, /*tp_setattro*/
62618 0, /*tp_as_buffer*/
62619 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62620 0, /*tp_doc*/
62621 __pyx_tp_traverse_3rbd___pyx_scope_struct_6___iter__, /*tp_traverse*/
62622 __pyx_tp_clear_3rbd___pyx_scope_struct_6___iter__, /*tp_clear*/
62623 0, /*tp_richcompare*/
62624 0, /*tp_weaklistoffset*/
62625 0, /*tp_iter*/
62626 0, /*tp_iternext*/
62627 0, /*tp_methods*/
62628 0, /*tp_members*/
62629 0, /*tp_getset*/
62630 0, /*tp_base*/
62631 0, /*tp_dict*/
62632 0, /*tp_descr_get*/
62633 0, /*tp_descr_set*/
62634 0, /*tp_dictoffset*/
62635 0, /*tp_init*/
62636 0, /*tp_alloc*/
62637 __pyx_tp_new_3rbd___pyx_scope_struct_6___iter__, /*tp_new*/
62638 0, /*tp_free*/
62639 0, /*tp_is_gc*/
62640 0, /*tp_bases*/
62641 0, /*tp_mro*/
62642 0, /*tp_cache*/
62643 0, /*tp_subclasses*/
62644 0, /*tp_weaklist*/
62645 0, /*tp_del*/
62646 0, /*tp_version_tag*/
62647 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62648 0, /*tp_finalize*/
62649 #endif
62650};
62651
62652static struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_7___iter__[8];
62653static int __pyx_freecount_3rbd___pyx_scope_struct_7___iter__ = 0;
62654
62655static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62656 PyObject *o;
62657 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_7___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__
))), 1)
) {
62658 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_7___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_7___iter__];
62659 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__));
62660 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62661 PyObject_GC_Track(o);
62662 } else {
62663 o = (*t->tp_alloc)(t, 0);
62664 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62665 }
62666 return o;
62667}
62668
62669static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_7___iter__(PyObject *o) {
62670 struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *)o;
62671 PyObject_GC_UnTrack(o);
62672 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62673 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__)))) {
62674 __pyx_freelist_3rbd___pyx_scope_struct_7___iter__[__pyx_freecount_3rbd___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *)o);
62675 } else {
62676 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62677 }
62678}
62679
62680static int __pyx_tp_traverse_3rbd___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) {
62681 int e;
62682 struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *)o;
62683 if (p->__pyx_v_self) {
62684 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62685 }
62686 return 0;
62687}
62688
62689static int __pyx_tp_clear_3rbd___pyx_scope_struct_7___iter__(PyObject *o) {
62690 PyObject* tmp;
62691 struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__ *)o;
62692 tmp = ((PyObject*)p->__pyx_v_self);
62693 p->__pyx_v_self = ((struct __pyx_obj_3rbd_LockOwnerIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62694 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62695 return 0;
62696}
62697
62698static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_7___iter__ = {
62699 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62700 "rbd.__pyx_scope_struct_7___iter__", /*tp_name*/
62701 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_7___iter__), /*tp_basicsize*/
62702 0, /*tp_itemsize*/
62703 __pyx_tp_dealloc_3rbd___pyx_scope_struct_7___iter__, /*tp_dealloc*/
62704 0, /*tp_print*/
62705 0, /*tp_getattr*/
62706 0, /*tp_setattr*/
62707 #if PY_MAJOR_VERSION2 < 3
62708 0, /*tp_compare*/
62709 #endif
62710 #if PY_MAJOR_VERSION2 >= 3
62711 0, /*tp_as_async*/
62712 #endif
62713 0, /*tp_repr*/
62714 0, /*tp_as_number*/
62715 0, /*tp_as_sequence*/
62716 0, /*tp_as_mapping*/
62717 0, /*tp_hash*/
62718 0, /*tp_call*/
62719 0, /*tp_str*/
62720 0, /*tp_getattro*/
62721 0, /*tp_setattro*/
62722 0, /*tp_as_buffer*/
62723 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62724 0, /*tp_doc*/
62725 __pyx_tp_traverse_3rbd___pyx_scope_struct_7___iter__, /*tp_traverse*/
62726 __pyx_tp_clear_3rbd___pyx_scope_struct_7___iter__, /*tp_clear*/
62727 0, /*tp_richcompare*/
62728 0, /*tp_weaklistoffset*/
62729 0, /*tp_iter*/
62730 0, /*tp_iternext*/
62731 0, /*tp_methods*/
62732 0, /*tp_members*/
62733 0, /*tp_getset*/
62734 0, /*tp_base*/
62735 0, /*tp_dict*/
62736 0, /*tp_descr_get*/
62737 0, /*tp_descr_set*/
62738 0, /*tp_dictoffset*/
62739 0, /*tp_init*/
62740 0, /*tp_alloc*/
62741 __pyx_tp_new_3rbd___pyx_scope_struct_7___iter__, /*tp_new*/
62742 0, /*tp_free*/
62743 0, /*tp_is_gc*/
62744 0, /*tp_bases*/
62745 0, /*tp_mro*/
62746 0, /*tp_cache*/
62747 0, /*tp_subclasses*/
62748 0, /*tp_weaklist*/
62749 0, /*tp_del*/
62750 0, /*tp_version_tag*/
62751 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62752 0, /*tp_finalize*/
62753 #endif
62754};
62755
62756static struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_8___iter__[8];
62757static int __pyx_freecount_3rbd___pyx_scope_struct_8___iter__ = 0;
62758
62759static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_8___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62760 PyObject *o;
62761 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_8___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_8___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__
))), 1)
) {
62762 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_8___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_8___iter__];
62763 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__));
62764 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62765 PyObject_GC_Track(o);
62766 } else {
62767 o = (*t->tp_alloc)(t, 0);
62768 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62769 }
62770 return o;
62771}
62772
62773static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_8___iter__(PyObject *o) {
62774 struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *)o;
62775 PyObject_GC_UnTrack(o);
62776 Py_CLEAR(p->__pyx_v_pair)do { if (p->__pyx_v_pair) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_pair); (p->__pyx_v_pair) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62777 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62778 Py_CLEAR(p->__pyx_t_0)do { if (p->__pyx_t_0) { PyObject *_py_tmp = (PyObject *)(
p->__pyx_t_0); (p->__pyx_t_0) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
62779 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_8___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__)))) {
62780 __pyx_freelist_3rbd___pyx_scope_struct_8___iter__[__pyx_freecount_3rbd___pyx_scope_struct_8___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *)o);
62781 } else {
62782 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62783 }
62784}
62785
62786static int __pyx_tp_traverse_3rbd___pyx_scope_struct_8___iter__(PyObject *o, visitproc v, void *a) {
62787 int e;
62788 struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *)o;
62789 if (p->__pyx_v_pair) {
62790 e = (*v)(p->__pyx_v_pair, a); if (e) return e;
62791 }
62792 if (p->__pyx_v_self) {
62793 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62794 }
62795 if (p->__pyx_t_0) {
62796 e = (*v)(p->__pyx_t_0, a); if (e) return e;
62797 }
62798 return 0;
62799}
62800
62801static int __pyx_tp_clear_3rbd___pyx_scope_struct_8___iter__(PyObject *o) {
62802 PyObject* tmp;
62803 struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__ *)o;
62804 tmp = ((PyObject*)p->__pyx_v_pair);
62805 p->__pyx_v_pair = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62806 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62807 tmp = ((PyObject*)p->__pyx_v_self);
62808 p->__pyx_v_self = ((struct __pyx_obj_3rbd_MetadataIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62809 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62810 tmp = ((PyObject*)p->__pyx_t_0);
62811 p->__pyx_t_0 = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62812 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62813 return 0;
62814}
62815
62816static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_8___iter__ = {
62817 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62818 "rbd.__pyx_scope_struct_8___iter__", /*tp_name*/
62819 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_8___iter__), /*tp_basicsize*/
62820 0, /*tp_itemsize*/
62821 __pyx_tp_dealloc_3rbd___pyx_scope_struct_8___iter__, /*tp_dealloc*/
62822 0, /*tp_print*/
62823 0, /*tp_getattr*/
62824 0, /*tp_setattr*/
62825 #if PY_MAJOR_VERSION2 < 3
62826 0, /*tp_compare*/
62827 #endif
62828 #if PY_MAJOR_VERSION2 >= 3
62829 0, /*tp_as_async*/
62830 #endif
62831 0, /*tp_repr*/
62832 0, /*tp_as_number*/
62833 0, /*tp_as_sequence*/
62834 0, /*tp_as_mapping*/
62835 0, /*tp_hash*/
62836 0, /*tp_call*/
62837 0, /*tp_str*/
62838 0, /*tp_getattro*/
62839 0, /*tp_setattro*/
62840 0, /*tp_as_buffer*/
62841 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62842 0, /*tp_doc*/
62843 __pyx_tp_traverse_3rbd___pyx_scope_struct_8___iter__, /*tp_traverse*/
62844 __pyx_tp_clear_3rbd___pyx_scope_struct_8___iter__, /*tp_clear*/
62845 0, /*tp_richcompare*/
62846 0, /*tp_weaklistoffset*/
62847 0, /*tp_iter*/
62848 0, /*tp_iternext*/
62849 0, /*tp_methods*/
62850 0, /*tp_members*/
62851 0, /*tp_getset*/
62852 0, /*tp_base*/
62853 0, /*tp_dict*/
62854 0, /*tp_descr_get*/
62855 0, /*tp_descr_set*/
62856 0, /*tp_dictoffset*/
62857 0, /*tp_init*/
62858 0, /*tp_alloc*/
62859 __pyx_tp_new_3rbd___pyx_scope_struct_8___iter__, /*tp_new*/
62860 0, /*tp_free*/
62861 0, /*tp_is_gc*/
62862 0, /*tp_bases*/
62863 0, /*tp_mro*/
62864 0, /*tp_cache*/
62865 0, /*tp_subclasses*/
62866 0, /*tp_weaklist*/
62867 0, /*tp_del*/
62868 0, /*tp_version_tag*/
62869 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62870 0, /*tp_finalize*/
62871 #endif
62872};
62873
62874static struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_9___iter__[8];
62875static int __pyx_freecount_3rbd___pyx_scope_struct_9___iter__ = 0;
62876
62877static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_9___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
62878 PyObject *o;
62879 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_9___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_9___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__
))), 1)
) {
62880 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_9___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_9___iter__];
62881 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__));
62882 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
62883 PyObject_GC_Track(o);
62884 } else {
62885 o = (*t->tp_alloc)(t, 0);
62886 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
62887 }
62888 return o;
62889}
62890
62891static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_9___iter__(PyObject *o) {
62892 struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *)o;
62893 PyObject_GC_UnTrack(o);
62894 Py_CLEAR(p->__pyx_v_group)do { if (p->__pyx_v_group) { PyObject *_py_tmp = (PyObject
*)(p->__pyx_v_group); (p->__pyx_v_group) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62895 Py_CLEAR(p->__pyx_v_s)do { if (p->__pyx_v_s) { PyObject *_py_tmp = (PyObject *)(
p->__pyx_v_s); (p->__pyx_v_s) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
62896 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62897 Py_CLEAR(p->__pyx_v_trash)do { if (p->__pyx_v_trash) { PyObject *_py_tmp = (PyObject
*)(p->__pyx_v_trash); (p->__pyx_v_trash) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
62898 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_9___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__)))) {
62899 __pyx_freelist_3rbd___pyx_scope_struct_9___iter__[__pyx_freecount_3rbd___pyx_scope_struct_9___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *)o);
62900 } else {
62901 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
62902 }
62903}
62904
62905static int __pyx_tp_traverse_3rbd___pyx_scope_struct_9___iter__(PyObject *o, visitproc v, void *a) {
62906 int e;
62907 struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *)o;
62908 if (p->__pyx_v_group) {
62909 e = (*v)(p->__pyx_v_group, a); if (e) return e;
62910 }
62911 if (p->__pyx_v_s) {
62912 e = (*v)(p->__pyx_v_s, a); if (e) return e;
62913 }
62914 if (p->__pyx_v_self) {
62915 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
62916 }
62917 if (p->__pyx_v_trash) {
62918 e = (*v)(p->__pyx_v_trash, a); if (e) return e;
62919 }
62920 return 0;
62921}
62922
62923static int __pyx_tp_clear_3rbd___pyx_scope_struct_9___iter__(PyObject *o) {
62924 PyObject* tmp;
62925 struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__ *)o;
62926 tmp = ((PyObject*)p->__pyx_v_group);
62927 p->__pyx_v_group = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62928 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62929 tmp = ((PyObject*)p->__pyx_v_s);
62930 p->__pyx_v_s = ((PyObject*)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62931 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62932 tmp = ((PyObject*)p->__pyx_v_self);
62933 p->__pyx_v_self = ((struct __pyx_obj_3rbd_SnapIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62934 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62935 tmp = ((PyObject*)p->__pyx_v_trash);
62936 p->__pyx_v_trash = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
62937 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
62938 return 0;
62939}
62940
62941static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_9___iter__ = {
62942 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
62943 "rbd.__pyx_scope_struct_9___iter__", /*tp_name*/
62944 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_9___iter__), /*tp_basicsize*/
62945 0, /*tp_itemsize*/
62946 __pyx_tp_dealloc_3rbd___pyx_scope_struct_9___iter__, /*tp_dealloc*/
62947 0, /*tp_print*/
62948 0, /*tp_getattr*/
62949 0, /*tp_setattr*/
62950 #if PY_MAJOR_VERSION2 < 3
62951 0, /*tp_compare*/
62952 #endif
62953 #if PY_MAJOR_VERSION2 >= 3
62954 0, /*tp_as_async*/
62955 #endif
62956 0, /*tp_repr*/
62957 0, /*tp_as_number*/
62958 0, /*tp_as_sequence*/
62959 0, /*tp_as_mapping*/
62960 0, /*tp_hash*/
62961 0, /*tp_call*/
62962 0, /*tp_str*/
62963 0, /*tp_getattro*/
62964 0, /*tp_setattro*/
62965 0, /*tp_as_buffer*/
62966 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
62967 0, /*tp_doc*/
62968 __pyx_tp_traverse_3rbd___pyx_scope_struct_9___iter__, /*tp_traverse*/
62969 __pyx_tp_clear_3rbd___pyx_scope_struct_9___iter__, /*tp_clear*/
62970 0, /*tp_richcompare*/
62971 0, /*tp_weaklistoffset*/
62972 0, /*tp_iter*/
62973 0, /*tp_iternext*/
62974 0, /*tp_methods*/
62975 0, /*tp_members*/
62976 0, /*tp_getset*/
62977 0, /*tp_base*/
62978 0, /*tp_dict*/
62979 0, /*tp_descr_get*/
62980 0, /*tp_descr_set*/
62981 0, /*tp_dictoffset*/
62982 0, /*tp_init*/
62983 0, /*tp_alloc*/
62984 __pyx_tp_new_3rbd___pyx_scope_struct_9___iter__, /*tp_new*/
62985 0, /*tp_free*/
62986 0, /*tp_is_gc*/
62987 0, /*tp_bases*/
62988 0, /*tp_mro*/
62989 0, /*tp_cache*/
62990 0, /*tp_subclasses*/
62991 0, /*tp_weaklist*/
62992 0, /*tp_del*/
62993 0, /*tp_version_tag*/
62994 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
62995 0, /*tp_finalize*/
62996 #endif
62997};
62998
62999static struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_10___iter__[8];
63000static int __pyx_freecount_3rbd___pyx_scope_struct_10___iter__ = 0;
63001
63002static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_10___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
63003 PyObject *o;
63004 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_10___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_10___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__
))), 1)
) {
63005 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_10___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_10___iter__];
63006 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__));
63007 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
63008 PyObject_GC_Track(o);
63009 } else {
63010 o = (*t->tp_alloc)(t, 0);
63011 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
63012 }
63013 return o;
63014}
63015
63016static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_10___iter__(PyObject *o) {
63017 struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *)o;
63018 PyObject_GC_UnTrack(o);
63019 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
63020 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_10___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__)))) {
63021 __pyx_freelist_3rbd___pyx_scope_struct_10___iter__[__pyx_freecount_3rbd___pyx_scope_struct_10___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *)o);
63022 } else {
63023 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
63024 }
63025}
63026
63027static int __pyx_tp_traverse_3rbd___pyx_scope_struct_10___iter__(PyObject *o, visitproc v, void *a) {
63028 int e;
63029 struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *)o;
63030 if (p->__pyx_v_self) {
63031 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
63032 }
63033 return 0;
63034}
63035
63036static int __pyx_tp_clear_3rbd___pyx_scope_struct_10___iter__(PyObject *o) {
63037 PyObject* tmp;
63038 struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__ *)o;
63039 tmp = ((PyObject*)p->__pyx_v_self);
63040 p->__pyx_v_self = ((struct __pyx_obj_3rbd_TrashIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
63041 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
63042 return 0;
63043}
63044
63045static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_10___iter__ = {
63046 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
63047 "rbd.__pyx_scope_struct_10___iter__", /*tp_name*/
63048 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_10___iter__), /*tp_basicsize*/
63049 0, /*tp_itemsize*/
63050 __pyx_tp_dealloc_3rbd___pyx_scope_struct_10___iter__, /*tp_dealloc*/
63051 0, /*tp_print*/
63052 0, /*tp_getattr*/
63053 0, /*tp_setattr*/
63054 #if PY_MAJOR_VERSION2 < 3
63055 0, /*tp_compare*/
63056 #endif
63057 #if PY_MAJOR_VERSION2 >= 3
63058 0, /*tp_as_async*/
63059 #endif
63060 0, /*tp_repr*/
63061 0, /*tp_as_number*/
63062 0, /*tp_as_sequence*/
63063 0, /*tp_as_mapping*/
63064 0, /*tp_hash*/
63065 0, /*tp_call*/
63066 0, /*tp_str*/
63067 0, /*tp_getattro*/
63068 0, /*tp_setattro*/
63069 0, /*tp_as_buffer*/
63070 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
63071 0, /*tp_doc*/
63072 __pyx_tp_traverse_3rbd___pyx_scope_struct_10___iter__, /*tp_traverse*/
63073 __pyx_tp_clear_3rbd___pyx_scope_struct_10___iter__, /*tp_clear*/
63074 0, /*tp_richcompare*/
63075 0, /*tp_weaklistoffset*/
63076 0, /*tp_iter*/
63077 0, /*tp_iternext*/
63078 0, /*tp_methods*/
63079 0, /*tp_members*/
63080 0, /*tp_getset*/
63081 0, /*tp_base*/
63082 0, /*tp_dict*/
63083 0, /*tp_descr_get*/
63084 0, /*tp_descr_set*/
63085 0, /*tp_dictoffset*/
63086 0, /*tp_init*/
63087 0, /*tp_alloc*/
63088 __pyx_tp_new_3rbd___pyx_scope_struct_10___iter__, /*tp_new*/
63089 0, /*tp_free*/
63090 0, /*tp_is_gc*/
63091 0, /*tp_bases*/
63092 0, /*tp_mro*/
63093 0, /*tp_cache*/
63094 0, /*tp_subclasses*/
63095 0, /*tp_weaklist*/
63096 0, /*tp_del*/
63097 0, /*tp_version_tag*/
63098 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
63099 0, /*tp_finalize*/
63100 #endif
63101};
63102
63103static struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_11___iter__[8];
63104static int __pyx_freecount_3rbd___pyx_scope_struct_11___iter__ = 0;
63105
63106static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_11___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
63107 PyObject *o;
63108 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_11___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_11___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__
))), 1)
) {
63109 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_11___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_11___iter__];
63110 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__));
63111 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
63112 PyObject_GC_Track(o);
63113 } else {
63114 o = (*t->tp_alloc)(t, 0);
63115 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
63116 }
63117 return o;
63118}
63119
63120static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_11___iter__(PyObject *o) {
63121 struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *)o;
63122 PyObject_GC_UnTrack(o);
63123 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
63124 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_11___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__)))) {
63125 __pyx_freelist_3rbd___pyx_scope_struct_11___iter__[__pyx_freecount_3rbd___pyx_scope_struct_11___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *)o);
63126 } else {
63127 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
63128 }
63129}
63130
63131static int __pyx_tp_traverse_3rbd___pyx_scope_struct_11___iter__(PyObject *o, visitproc v, void *a) {
63132 int e;
63133 struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *)o;
63134 if (p->__pyx_v_self) {
63135 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
63136 }
63137 return 0;
63138}
63139
63140static int __pyx_tp_clear_3rbd___pyx_scope_struct_11___iter__(PyObject *o) {
63141 PyObject* tmp;
63142 struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__ *)o;
63143 tmp = ((PyObject*)p->__pyx_v_self);
63144 p->__pyx_v_self = ((struct __pyx_obj_3rbd_ChildIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
63145 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
63146 return 0;
63147}
63148
63149static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_11___iter__ = {
63150 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
63151 "rbd.__pyx_scope_struct_11___iter__", /*tp_name*/
63152 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_11___iter__), /*tp_basicsize*/
63153 0, /*tp_itemsize*/
63154 __pyx_tp_dealloc_3rbd___pyx_scope_struct_11___iter__, /*tp_dealloc*/
63155 0, /*tp_print*/
63156 0, /*tp_getattr*/
63157 0, /*tp_setattr*/
63158 #if PY_MAJOR_VERSION2 < 3
63159 0, /*tp_compare*/
63160 #endif
63161 #if PY_MAJOR_VERSION2 >= 3
63162 0, /*tp_as_async*/
63163 #endif
63164 0, /*tp_repr*/
63165 0, /*tp_as_number*/
63166 0, /*tp_as_sequence*/
63167 0, /*tp_as_mapping*/
63168 0, /*tp_hash*/
63169 0, /*tp_call*/
63170 0, /*tp_str*/
63171 0, /*tp_getattro*/
63172 0, /*tp_setattro*/
63173 0, /*tp_as_buffer*/
63174 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
63175 0, /*tp_doc*/
63176 __pyx_tp_traverse_3rbd___pyx_scope_struct_11___iter__, /*tp_traverse*/
63177 __pyx_tp_clear_3rbd___pyx_scope_struct_11___iter__, /*tp_clear*/
63178 0, /*tp_richcompare*/
63179 0, /*tp_weaklistoffset*/
63180 0, /*tp_iter*/
63181 0, /*tp_iternext*/
63182 0, /*tp_methods*/
63183 0, /*tp_members*/
63184 0, /*tp_getset*/
63185 0, /*tp_base*/
63186 0, /*tp_dict*/
63187 0, /*tp_descr_get*/
63188 0, /*tp_descr_set*/
63189 0, /*tp_dictoffset*/
63190 0, /*tp_init*/
63191 0, /*tp_alloc*/
63192 __pyx_tp_new_3rbd___pyx_scope_struct_11___iter__, /*tp_new*/
63193 0, /*tp_free*/
63194 0, /*tp_is_gc*/
63195 0, /*tp_bases*/
63196 0, /*tp_mro*/
63197 0, /*tp_cache*/
63198 0, /*tp_subclasses*/
63199 0, /*tp_weaklist*/
63200 0, /*tp_del*/
63201 0, /*tp_version_tag*/
63202 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
63203 0, /*tp_finalize*/
63204 #endif
63205};
63206
63207static struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_12___iter__[8];
63208static int __pyx_freecount_3rbd___pyx_scope_struct_12___iter__ = 0;
63209
63210static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_12___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
63211 PyObject *o;
63212 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_12___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_12___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__
))), 1)
) {
63213 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_12___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_12___iter__];
63214 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__));
63215 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
63216 PyObject_GC_Track(o);
63217 } else {
63218 o = (*t->tp_alloc)(t, 0);
63219 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
63220 }
63221 return o;
63222}
63223
63224static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_12___iter__(PyObject *o) {
63225 struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *)o;
63226 PyObject_GC_UnTrack(o);
63227 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
63228 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_12___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__)))) {
63229 __pyx_freelist_3rbd___pyx_scope_struct_12___iter__[__pyx_freecount_3rbd___pyx_scope_struct_12___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *)o);
63230 } else {
63231 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
63232 }
63233}
63234
63235static int __pyx_tp_traverse_3rbd___pyx_scope_struct_12___iter__(PyObject *o, visitproc v, void *a) {
63236 int e;
63237 struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *)o;
63238 if (p->__pyx_v_self) {
63239 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
63240 }
63241 return 0;
63242}
63243
63244static int __pyx_tp_clear_3rbd___pyx_scope_struct_12___iter__(PyObject *o) {
63245 PyObject* tmp;
63246 struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__ *)o;
63247 tmp = ((PyObject*)p->__pyx_v_self);
63248 p->__pyx_v_self = ((struct __pyx_obj_3rbd_WatcherIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
63249 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
63250 return 0;
63251}
63252
63253static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_12___iter__ = {
63254 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
63255 "rbd.__pyx_scope_struct_12___iter__", /*tp_name*/
63256 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_12___iter__), /*tp_basicsize*/
63257 0, /*tp_itemsize*/
63258 __pyx_tp_dealloc_3rbd___pyx_scope_struct_12___iter__, /*tp_dealloc*/
63259 0, /*tp_print*/
63260 0, /*tp_getattr*/
63261 0, /*tp_setattr*/
63262 #if PY_MAJOR_VERSION2 < 3
63263 0, /*tp_compare*/
63264 #endif
63265 #if PY_MAJOR_VERSION2 >= 3
63266 0, /*tp_as_async*/
63267 #endif
63268 0, /*tp_repr*/
63269 0, /*tp_as_number*/
63270 0, /*tp_as_sequence*/
63271 0, /*tp_as_mapping*/
63272 0, /*tp_hash*/
63273 0, /*tp_call*/
63274 0, /*tp_str*/
63275 0, /*tp_getattro*/
63276 0, /*tp_setattro*/
63277 0, /*tp_as_buffer*/
63278 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
63279 0, /*tp_doc*/
63280 __pyx_tp_traverse_3rbd___pyx_scope_struct_12___iter__, /*tp_traverse*/
63281 __pyx_tp_clear_3rbd___pyx_scope_struct_12___iter__, /*tp_clear*/
63282 0, /*tp_richcompare*/
63283 0, /*tp_weaklistoffset*/
63284 0, /*tp_iter*/
63285 0, /*tp_iternext*/
63286 0, /*tp_methods*/
63287 0, /*tp_members*/
63288 0, /*tp_getset*/
63289 0, /*tp_base*/
63290 0, /*tp_dict*/
63291 0, /*tp_descr_get*/
63292 0, /*tp_descr_set*/
63293 0, /*tp_dictoffset*/
63294 0, /*tp_init*/
63295 0, /*tp_alloc*/
63296 __pyx_tp_new_3rbd___pyx_scope_struct_12___iter__, /*tp_new*/
63297 0, /*tp_free*/
63298 0, /*tp_is_gc*/
63299 0, /*tp_bases*/
63300 0, /*tp_mro*/
63301 0, /*tp_cache*/
63302 0, /*tp_subclasses*/
63303 0, /*tp_weaklist*/
63304 0, /*tp_del*/
63305 0, /*tp_version_tag*/
63306 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
63307 0, /*tp_finalize*/
63308 #endif
63309};
63310
63311static struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_13___iter__[8];
63312static int __pyx_freecount_3rbd___pyx_scope_struct_13___iter__ = 0;
63313
63314static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_13___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
63315 PyObject *o;
63316 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_13___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_13___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__
))), 1)
) {
63317 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_13___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_13___iter__];
63318 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__));
63319 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
63320 PyObject_GC_Track(o);
63321 } else {
63322 o = (*t->tp_alloc)(t, 0);
63323 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
63324 }
63325 return o;
63326}
63327
63328static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_13___iter__(PyObject *o) {
63329 struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *)o;
63330 PyObject_GC_UnTrack(o);
63331 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
63332 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_13___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__)))) {
63333 __pyx_freelist_3rbd___pyx_scope_struct_13___iter__[__pyx_freecount_3rbd___pyx_scope_struct_13___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *)o);
63334 } else {
63335 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
63336 }
63337}
63338
63339static int __pyx_tp_traverse_3rbd___pyx_scope_struct_13___iter__(PyObject *o, visitproc v, void *a) {
63340 int e;
63341 struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *)o;
63342 if (p->__pyx_v_self) {
63343 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
63344 }
63345 return 0;
63346}
63347
63348static int __pyx_tp_clear_3rbd___pyx_scope_struct_13___iter__(PyObject *o) {
63349 PyObject* tmp;
63350 struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__ *)o;
63351 tmp = ((PyObject*)p->__pyx_v_self);
63352 p->__pyx_v_self = ((struct __pyx_obj_3rbd_ConfigImageIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
63353 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
63354 return 0;
63355}
63356
63357static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_13___iter__ = {
63358 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
63359 "rbd.__pyx_scope_struct_13___iter__", /*tp_name*/
63360 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_13___iter__), /*tp_basicsize*/
63361 0, /*tp_itemsize*/
63362 __pyx_tp_dealloc_3rbd___pyx_scope_struct_13___iter__, /*tp_dealloc*/
63363 0, /*tp_print*/
63364 0, /*tp_getattr*/
63365 0, /*tp_setattr*/
63366 #if PY_MAJOR_VERSION2 < 3
63367 0, /*tp_compare*/
63368 #endif
63369 #if PY_MAJOR_VERSION2 >= 3
63370 0, /*tp_as_async*/
63371 #endif
63372 0, /*tp_repr*/
63373 0, /*tp_as_number*/
63374 0, /*tp_as_sequence*/
63375 0, /*tp_as_mapping*/
63376 0, /*tp_hash*/
63377 0, /*tp_call*/
63378 0, /*tp_str*/
63379 0, /*tp_getattro*/
63380 0, /*tp_setattro*/
63381 0, /*tp_as_buffer*/
63382 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
63383 0, /*tp_doc*/
63384 __pyx_tp_traverse_3rbd___pyx_scope_struct_13___iter__, /*tp_traverse*/
63385 __pyx_tp_clear_3rbd___pyx_scope_struct_13___iter__, /*tp_clear*/
63386 0, /*tp_richcompare*/
63387 0, /*tp_weaklistoffset*/
63388 0, /*tp_iter*/
63389 0, /*tp_iternext*/
63390 0, /*tp_methods*/
63391 0, /*tp_members*/
63392 0, /*tp_getset*/
63393 0, /*tp_base*/
63394 0, /*tp_dict*/
63395 0, /*tp_descr_get*/
63396 0, /*tp_descr_set*/
63397 0, /*tp_dictoffset*/
63398 0, /*tp_init*/
63399 0, /*tp_alloc*/
63400 __pyx_tp_new_3rbd___pyx_scope_struct_13___iter__, /*tp_new*/
63401 0, /*tp_free*/
63402 0, /*tp_is_gc*/
63403 0, /*tp_bases*/
63404 0, /*tp_mro*/
63405 0, /*tp_cache*/
63406 0, /*tp_subclasses*/
63407 0, /*tp_weaklist*/
63408 0, /*tp_del*/
63409 0, /*tp_version_tag*/
63410 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
63411 0, /*tp_finalize*/
63412 #endif
63413};
63414
63415static struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_14___iter__[8];
63416static int __pyx_freecount_3rbd___pyx_scope_struct_14___iter__ = 0;
63417
63418static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_14___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
63419 PyObject *o;
63420 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_14___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_14___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__
))), 1)
) {
63421 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_14___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_14___iter__];
63422 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__));
63423 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
63424 PyObject_GC_Track(o);
63425 } else {
63426 o = (*t->tp_alloc)(t, 0);
63427 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
63428 }
63429 return o;
63430}
63431
63432static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_14___iter__(PyObject *o) {
63433 struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *)o;
63434 PyObject_GC_UnTrack(o);
63435 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
63436 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_14___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__)))) {
63437 __pyx_freelist_3rbd___pyx_scope_struct_14___iter__[__pyx_freecount_3rbd___pyx_scope_struct_14___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *)o);
63438 } else {
63439 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
63440 }
63441}
63442
63443static int __pyx_tp_traverse_3rbd___pyx_scope_struct_14___iter__(PyObject *o, visitproc v, void *a) {
63444 int e;
63445 struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *)o;
63446 if (p->__pyx_v_self) {
63447 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
63448 }
63449 return 0;
63450}
63451
63452static int __pyx_tp_clear_3rbd___pyx_scope_struct_14___iter__(PyObject *o) {
63453 PyObject* tmp;
63454 struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__ *)o;
63455 tmp = ((PyObject*)p->__pyx_v_self);
63456 p->__pyx_v_self = ((struct __pyx_obj_3rbd_GroupImageIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
63457 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
63458 return 0;
63459}
63460
63461static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_14___iter__ = {
63462 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
63463 "rbd.__pyx_scope_struct_14___iter__", /*tp_name*/
63464 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_14___iter__), /*tp_basicsize*/
63465 0, /*tp_itemsize*/
63466 __pyx_tp_dealloc_3rbd___pyx_scope_struct_14___iter__, /*tp_dealloc*/
63467 0, /*tp_print*/
63468 0, /*tp_getattr*/
63469 0, /*tp_setattr*/
63470 #if PY_MAJOR_VERSION2 < 3
63471 0, /*tp_compare*/
63472 #endif
63473 #if PY_MAJOR_VERSION2 >= 3
63474 0, /*tp_as_async*/
63475 #endif
63476 0, /*tp_repr*/
63477 0, /*tp_as_number*/
63478 0, /*tp_as_sequence*/
63479 0, /*tp_as_mapping*/
63480 0, /*tp_hash*/
63481 0, /*tp_call*/
63482 0, /*tp_str*/
63483 0, /*tp_getattro*/
63484 0, /*tp_setattro*/
63485 0, /*tp_as_buffer*/
63486 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
63487 0, /*tp_doc*/
63488 __pyx_tp_traverse_3rbd___pyx_scope_struct_14___iter__, /*tp_traverse*/
63489 __pyx_tp_clear_3rbd___pyx_scope_struct_14___iter__, /*tp_clear*/
63490 0, /*tp_richcompare*/
63491 0, /*tp_weaklistoffset*/
63492 0, /*tp_iter*/
63493 0, /*tp_iternext*/
63494 0, /*tp_methods*/
63495 0, /*tp_members*/
63496 0, /*tp_getset*/
63497 0, /*tp_base*/
63498 0, /*tp_dict*/
63499 0, /*tp_descr_get*/
63500 0, /*tp_descr_set*/
63501 0, /*tp_dictoffset*/
63502 0, /*tp_init*/
63503 0, /*tp_alloc*/
63504 __pyx_tp_new_3rbd___pyx_scope_struct_14___iter__, /*tp_new*/
63505 0, /*tp_free*/
63506 0, /*tp_is_gc*/
63507 0, /*tp_bases*/
63508 0, /*tp_mro*/
63509 0, /*tp_cache*/
63510 0, /*tp_subclasses*/
63511 0, /*tp_weaklist*/
63512 0, /*tp_del*/
63513 0, /*tp_version_tag*/
63514 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
63515 0, /*tp_finalize*/
63516 #endif
63517};
63518
63519static struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *__pyx_freelist_3rbd___pyx_scope_struct_15___iter__[8];
63520static int __pyx_freecount_3rbd___pyx_scope_struct_15___iter__ = 0;
63521
63522static PyObject *__pyx_tp_new_3rbd___pyx_scope_struct_15___iter__(PyTypeObject *t, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *a, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *k) {
63523 PyObject *o;
63524 if (CYTHON_COMPILING_IN_CPYTHON1 && likely((__pyx_freecount_3rbd___pyx_scope_struct_15___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__)))__builtin_expect(!!((__pyx_freecount_3rbd___pyx_scope_struct_15___iter__
> 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__
))), 1)
) {
63525 o = (PyObject*)__pyx_freelist_3rbd___pyx_scope_struct_15___iter__[--__pyx_freecount_3rbd___pyx_scope_struct_15___iter__];
63526 memset(o, 0, sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__));
63527 (void) PyObject_INIT(o, t)( (((PyObject*)(o))->ob_type) = (t), ( (((PyObject*)((PyObject
*)(o)))->ob_refcnt) = 1), (o) )
;
63528 PyObject_GC_Track(o);
63529 } else {
63530 o = (*t->tp_alloc)(t, 0);
63531 if (unlikely(!o)__builtin_expect(!!(!o), 0)) return 0;
63532 }
63533 return o;
63534}
63535
63536static void __pyx_tp_dealloc_3rbd___pyx_scope_struct_15___iter__(PyObject *o) {
63537 struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *)o;
63538 PyObject_GC_UnTrack(o);
63539 Py_CLEAR(p->__pyx_v_self)do { if (p->__pyx_v_self) { PyObject *_py_tmp = (PyObject *
)(p->__pyx_v_self); (p->__pyx_v_self) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
63540 if (CYTHON_COMPILING_IN_CPYTHON1 && ((__pyx_freecount_3rbd___pyx_scope_struct_15___iter__ < 8) & (Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_basicsize == sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__)))) {
63541 __pyx_freelist_3rbd___pyx_scope_struct_15___iter__[__pyx_freecount_3rbd___pyx_scope_struct_15___iter__++] = ((struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *)o);
63542 } else {
63543 (*Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_free)(o);
63544 }
63545}
63546
63547static int __pyx_tp_traverse_3rbd___pyx_scope_struct_15___iter__(PyObject *o, visitproc v, void *a) {
63548 int e;
63549 struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *)o;
63550 if (p->__pyx_v_self) {
63551 e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
63552 }
63553 return 0;
63554}
63555
63556static int __pyx_tp_clear_3rbd___pyx_scope_struct_15___iter__(PyObject *o) {
63557 PyObject* tmp;
63558 struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *p = (struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__ *)o;
63559 tmp = ((PyObject*)p->__pyx_v_self);
63560 p->__pyx_v_self = ((struct __pyx_obj_3rbd_GroupSnapIterator *)Py_None(&_Py_NoneStruct)); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
63561 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
63562 return 0;
63563}
63564
63565static PyTypeObject __pyx_type_3rbd___pyx_scope_struct_15___iter__ = {
63566 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
63567 "rbd.__pyx_scope_struct_15___iter__", /*tp_name*/
63568 sizeof(struct __pyx_obj_3rbd___pyx_scope_struct_15___iter__), /*tp_basicsize*/
63569 0, /*tp_itemsize*/
63570 __pyx_tp_dealloc_3rbd___pyx_scope_struct_15___iter__, /*tp_dealloc*/
63571 0, /*tp_print*/
63572 0, /*tp_getattr*/
63573 0, /*tp_setattr*/
63574 #if PY_MAJOR_VERSION2 < 3
63575 0, /*tp_compare*/
63576 #endif
63577 #if PY_MAJOR_VERSION2 >= 3
63578 0, /*tp_as_async*/
63579 #endif
63580 0, /*tp_repr*/
63581 0, /*tp_as_number*/
63582 0, /*tp_as_sequence*/
63583 0, /*tp_as_mapping*/
63584 0, /*tp_hash*/
63585 0, /*tp_call*/
63586 0, /*tp_str*/
63587 0, /*tp_getattro*/
63588 0, /*tp_setattro*/
63589 0, /*tp_as_buffer*/
63590 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
|Py_TPFLAGS_HAVE_VERSION_TAG(1L<<18)|Py_TPFLAGS_CHECKTYPES(1L<<4)|Py_TPFLAGS_HAVE_NEWBUFFER(1L<<21)|Py_TPFLAGS_HAVE_GC(1L<<14), /*tp_flags*/
63591 0, /*tp_doc*/
63592 __pyx_tp_traverse_3rbd___pyx_scope_struct_15___iter__, /*tp_traverse*/
63593 __pyx_tp_clear_3rbd___pyx_scope_struct_15___iter__, /*tp_clear*/
63594 0, /*tp_richcompare*/
63595 0, /*tp_weaklistoffset*/
63596 0, /*tp_iter*/
63597 0, /*tp_iternext*/
63598 0, /*tp_methods*/
63599 0, /*tp_members*/
63600 0, /*tp_getset*/
63601 0, /*tp_base*/
63602 0, /*tp_dict*/
63603 0, /*tp_descr_get*/
63604 0, /*tp_descr_set*/
63605 0, /*tp_dictoffset*/
63606 0, /*tp_init*/
63607 0, /*tp_alloc*/
63608 __pyx_tp_new_3rbd___pyx_scope_struct_15___iter__, /*tp_new*/
63609 0, /*tp_free*/
63610 0, /*tp_is_gc*/
63611 0, /*tp_bases*/
63612 0, /*tp_mro*/
63613 0, /*tp_cache*/
63614 0, /*tp_subclasses*/
63615 0, /*tp_weaklist*/
63616 0, /*tp_del*/
63617 0, /*tp_version_tag*/
63618 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
63619 0, /*tp_finalize*/
63620 #endif
63621};
63622
63623static PyMethodDef __pyx_methods[] = {
63624 {0, 0, 0, 0}
63625};
63626
63627#if PY_MAJOR_VERSION2 >= 3
63628static struct PyModuleDef __pyx_moduledef = {
63629 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03020000
63630 { PyObject_HEAD_INIT(NULL)1, ((void*)0), NULL((void*)0), 0, NULL((void*)0) },
63631 #else
63632 PyModuleDef_HEAD_INIT,
63633 #endif
63634 "rbd",
63635 __pyx_k_This_module_is_a_thin_wrapper_a, /* m_doc */
63636 -1, /* m_size */
63637 __pyx_methods /* m_methods */,
63638 NULL((void*)0), /* m_reload */
63639 NULL((void*)0), /* m_traverse */
63640 NULL((void*)0), /* m_clear */
63641 NULL((void*)0) /* m_free */
63642};
63643#endif
63644
63645static __Pyx_StringTabEntry __pyx_string_tab[] = {
63646 {&__pyx_n_s_ArgumentOutOfRange, __pyx_k_ArgumentOutOfRange, sizeof(__pyx_k_ArgumentOutOfRange), 0, 0, 1, 1},
63647 {&__pyx_n_s_ArgumentOutOfRange___init, __pyx_k_ArgumentOutOfRange___init, sizeof(__pyx_k_ArgumentOutOfRange___init), 0, 0, 1, 1},
63648 {&__pyx_n_s_ChildIterator___iter, __pyx_k_ChildIterator___iter, sizeof(__pyx_k_ChildIterator___iter), 0, 0, 1, 1},
63649 {&__pyx_n_s_ConfigImageIterator___iter, __pyx_k_ConfigImageIterator___iter, sizeof(__pyx_k_ConfigImageIterator___iter), 0, 0, 1, 1},
63650 {&__pyx_n_s_ConfigPoolIterator___iter, __pyx_k_ConfigPoolIterator___iter, sizeof(__pyx_k_ConfigPoolIterator___iter), 0, 0, 1, 1},
63651 {&__pyx_n_s_ConnectionShutdown, __pyx_k_ConnectionShutdown, sizeof(__pyx_k_ConnectionShutdown), 0, 0, 1, 1},
63652 {&__pyx_n_s_ConnectionShutdown___init, __pyx_k_ConnectionShutdown___init, sizeof(__pyx_k_ConnectionShutdown___init), 0, 0, 1, 1},
63653 {&__pyx_n_s_DiskQuotaExceeded, __pyx_k_DiskQuotaExceeded, sizeof(__pyx_k_DiskQuotaExceeded), 0, 0, 1, 1},
63654 {&__pyx_n_s_DiskQuotaExceeded___init, __pyx_k_DiskQuotaExceeded___init, sizeof(__pyx_k_DiskQuotaExceeded___init), 0, 0, 1, 1},
63655 {&__pyx_n_s_ECANCELED, __pyx_k_ECANCELED, sizeof(__pyx_k_ECANCELED), 0, 0, 1, 1},
63656 {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
63657 {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
63658 {&__pyx_n_s_FunctionNotSupported, __pyx_k_FunctionNotSupported, sizeof(__pyx_k_FunctionNotSupported), 0, 0, 1, 1},
63659 {&__pyx_n_s_FunctionNotSupported___init, __pyx_k_FunctionNotSupported___init, sizeof(__pyx_k_FunctionNotSupported___init), 0, 0, 1, 1},
63660 {&__pyx_n_s_GroupImageIterator___iter, __pyx_k_GroupImageIterator___iter, sizeof(__pyx_k_GroupImageIterator___iter), 0, 0, 1, 1},
63661 {&__pyx_n_s_GroupSnapIterator___iter, __pyx_k_GroupSnapIterator___iter, sizeof(__pyx_k_GroupSnapIterator___iter), 0, 0, 1, 1},
63662 {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
63663 {&__pyx_n_s_IOError___init, __pyx_k_IOError___init, sizeof(__pyx_k_IOError___init), 0, 0, 1, 1},
63664 {&__pyx_n_s_ImageBusy, __pyx_k_ImageBusy, sizeof(__pyx_k_ImageBusy), 0, 0, 1, 1},
63665 {&__pyx_n_s_ImageBusy___init, __pyx_k_ImageBusy___init, sizeof(__pyx_k_ImageBusy___init), 0, 0, 1, 1},
63666 {&__pyx_n_s_ImageExists, __pyx_k_ImageExists, sizeof(__pyx_k_ImageExists), 0, 0, 1, 1},
63667 {&__pyx_n_s_ImageExists___init, __pyx_k_ImageExists___init, sizeof(__pyx_k_ImageExists___init), 0, 0, 1, 1},
63668 {&__pyx_n_s_ImageHasSnapshots, __pyx_k_ImageHasSnapshots, sizeof(__pyx_k_ImageHasSnapshots), 0, 0, 1, 1},
63669 {&__pyx_n_s_ImageHasSnapshots___init, __pyx_k_ImageHasSnapshots___init, sizeof(__pyx_k_ImageHasSnapshots___init), 0, 0, 1, 1},
63670 {&__pyx_n_s_ImageIterator___iter, __pyx_k_ImageIterator___iter, sizeof(__pyx_k_ImageIterator___iter), 0, 0, 1, 1},
63671 {&__pyx_n_s_ImageNotFound, __pyx_k_ImageNotFound, sizeof(__pyx_k_ImageNotFound), 0, 0, 1, 1},
63672 {&__pyx_n_s_ImageNotFound___init, __pyx_k_ImageNotFound___init, sizeof(__pyx_k_ImageNotFound___init), 0, 0, 1, 1},
63673 {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
63674 {&__pyx_n_s_IncompleteWriteError, __pyx_k_IncompleteWriteError, sizeof(__pyx_k_IncompleteWriteError), 0, 0, 1, 1},
63675 {&__pyx_n_s_IncompleteWriteError___init, __pyx_k_IncompleteWriteError___init, sizeof(__pyx_k_IncompleteWriteError___init), 0, 0, 1, 1},
63676 {&__pyx_n_s_InvalidArgument, __pyx_k_InvalidArgument, sizeof(__pyx_k_InvalidArgument), 0, 0, 1, 1},
63677 {&__pyx_n_s_InvalidArgument___init, __pyx_k_InvalidArgument___init, sizeof(__pyx_k_InvalidArgument___init), 0, 0, 1, 1},
63678 {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
63679 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
63680 {&__pyx_n_s_LockOwnerIterator___iter, __pyx_k_LockOwnerIterator___iter, sizeof(__pyx_k_LockOwnerIterator___iter), 0, 0, 1, 1},
63681 {&__pyx_n_s_LogicError, __pyx_k_LogicError, sizeof(__pyx_k_LogicError), 0, 0, 1, 1},
63682 {&__pyx_n_s_LogicError___init, __pyx_k_LogicError___init, sizeof(__pyx_k_LogicError___init), 0, 0, 1, 1},
63683 {&__pyx_n_s_MIGRATION, __pyx_k_MIGRATION, sizeof(__pyx_k_MIGRATION), 0, 0, 1, 1},
63684 {&__pyx_n_s_MIRRORING, __pyx_k_MIRRORING, sizeof(__pyx_k_MIRRORING), 0, 0, 1, 1},
63685 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_ERROR, __pyx_k_MIRROR_IMAGE_STATUS_STATE_ERROR, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_ERROR), 0, 0, 1, 1},
63686 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_REPLAY, __pyx_k_MIRROR_IMAGE_STATUS_STATE_REPLAY, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_REPLAY), 0, 0, 1, 1},
63687 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STARTI, __pyx_k_MIRROR_IMAGE_STATUS_STATE_STARTI, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_STARTI), 0, 0, 1, 1},
63688 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STOPPE, __pyx_k_MIRROR_IMAGE_STATUS_STATE_STOPPE, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_STOPPE), 0, 0, 1, 1},
63689 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STOPPI, __pyx_k_MIRROR_IMAGE_STATUS_STATE_STOPPI, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_STOPPI), 0, 0, 1, 1},
63690 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_SYNCIN, __pyx_k_MIRROR_IMAGE_STATUS_STATE_SYNCIN, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_SYNCIN), 0, 0, 1, 1},
63691 {&__pyx_n_s_MIRROR_IMAGE_STATUS_STATE_UNKNOW, __pyx_k_MIRROR_IMAGE_STATUS_STATE_UNKNOW, sizeof(__pyx_k_MIRROR_IMAGE_STATUS_STATE_UNKNOW), 0, 0, 1, 1},
63692 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
63693 {&__pyx_n_s_MetadataIterator___iter, __pyx_k_MetadataIterator___iter, sizeof(__pyx_k_MetadataIterator___iter), 0, 0, 1, 1},
63694 {&__pyx_n_s_MirrorImageInstanceIdIterator, __pyx_k_MirrorImageInstanceIdIterator, sizeof(__pyx_k_MirrorImageInstanceIdIterator), 0, 0, 1, 1},
63695 {&__pyx_n_s_MirrorImageStatusIterator___iter, __pyx_k_MirrorImageStatusIterator___iter, sizeof(__pyx_k_MirrorImageStatusIterator___iter), 0, 0, 1, 1},
63696 {&__pyx_n_s_MirrorPeerIterator___iter, __pyx_k_MirrorPeerIterator___iter, sizeof(__pyx_k_MirrorPeerIterator___iter), 0, 0, 1, 1},
63697 {&__pyx_n_s_NoSpace, __pyx_k_NoSpace, sizeof(__pyx_k_NoSpace), 0, 0, 1, 1},
63698 {&__pyx_n_s_NoSpace___init, __pyx_k_NoSpace___init, sizeof(__pyx_k_NoSpace___init), 0, 0, 1, 1},
63699 {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
63700 {&__pyx_n_s_OSError___init, __pyx_k_OSError___init, sizeof(__pyx_k_OSError___init), 0, 0, 1, 1},
63701 {&__pyx_n_s_OSError___reduce, __pyx_k_OSError___reduce, sizeof(__pyx_k_OSError___reduce), 0, 0, 1, 1},
63702 {&__pyx_n_s_OSError___str, __pyx_k_OSError___str, sizeof(__pyx_k_OSError___str), 0, 0, 1, 1},
63703 {&__pyx_kp_s_OSError_class_derived_from_Erro, __pyx_k_OSError_class_derived_from_Erro, sizeof(__pyx_k_OSError_class_derived_from_Erro), 0, 0, 1, 0},
63704 {&__pyx_n_s_ObjectExists, __pyx_k_ObjectExists, sizeof(__pyx_k_ObjectExists), 0, 0, 1, 1},
63705 {&__pyx_n_s_ObjectExists___init, __pyx_k_ObjectExists___init, sizeof(__pyx_k_ObjectExists___init), 0, 0, 1, 1},
63706 {&__pyx_n_s_ObjectNotFound, __pyx_k_ObjectNotFound, sizeof(__pyx_k_ObjectNotFound), 0, 0, 1, 1},
63707 {&__pyx_n_s_ObjectNotFound___init, __pyx_k_ObjectNotFound___init, sizeof(__pyx_k_ObjectNotFound___init), 0, 0, 1, 1},
63708 {&__pyx_n_s_OperationCanceled, __pyx_k_OperationCanceled, sizeof(__pyx_k_OperationCanceled), 0, 0, 1, 1},
63709 {&__pyx_n_s_OperationCanceled___init, __pyx_k_OperationCanceled___init, sizeof(__pyx_k_OperationCanceled___init), 0, 0, 1, 1},
63710 {&__pyx_n_s_PermissionError, __pyx_k_PermissionError, sizeof(__pyx_k_PermissionError), 0, 0, 1, 1},
63711 {&__pyx_n_s_PermissionError___init, __pyx_k_PermissionError___init, sizeof(__pyx_k_PermissionError___init), 0, 0, 1, 1},
63712 {&__pyx_n_s_PoolMetadataIterator___iter, __pyx_k_PoolMetadataIterator___iter, sizeof(__pyx_k_PoolMetadataIterator___iter), 0, 0, 1, 1},
63713 {&__pyx_n_s_RBD, __pyx_k_RBD, sizeof(__pyx_k_RBD), 0, 0, 1, 1},
63714 {&__pyx_n_s_RBD_CONFIG_SOURCE_CONFIG, __pyx_k_RBD_CONFIG_SOURCE_CONFIG, sizeof(__pyx_k_RBD_CONFIG_SOURCE_CONFIG), 0, 0, 1, 1},
63715 {&__pyx_n_s_RBD_CONFIG_SOURCE_IMAGE, __pyx_k_RBD_CONFIG_SOURCE_IMAGE, sizeof(__pyx_k_RBD_CONFIG_SOURCE_IMAGE), 0, 0, 1, 1},
63716 {&__pyx_n_s_RBD_CONFIG_SOURCE_POOL, __pyx_k_RBD_CONFIG_SOURCE_POOL, sizeof(__pyx_k_RBD_CONFIG_SOURCE_POOL), 0, 0, 1, 1},
63717 {&__pyx_n_s_RBD_FEATURES_ALL, __pyx_k_RBD_FEATURES_ALL, sizeof(__pyx_k_RBD_FEATURES_ALL), 0, 0, 1, 1},
63718 {&__pyx_n_s_RBD_FEATURES_INCOMPATIBLE, __pyx_k_RBD_FEATURES_INCOMPATIBLE, sizeof(__pyx_k_RBD_FEATURES_INCOMPATIBLE), 0, 0, 1, 1},
63719 {&__pyx_n_s_RBD_FEATURES_MUTABLE, __pyx_k_RBD_FEATURES_MUTABLE, sizeof(__pyx_k_RBD_FEATURES_MUTABLE), 0, 0, 1, 1},
63720 {&__pyx_n_s_RBD_FEATURES_RW_INCOMPATIBLE, __pyx_k_RBD_FEATURES_RW_INCOMPATIBLE, sizeof(__pyx_k_RBD_FEATURES_RW_INCOMPATIBLE), 0, 0, 1, 1},
63721 {&__pyx_n_s_RBD_FEATURES_SINGLE_CLIENT, __pyx_k_RBD_FEATURES_SINGLE_CLIENT, sizeof(__pyx_k_RBD_FEATURES_SINGLE_CLIENT), 0, 0, 1, 1},
63722 {&__pyx_n_s_RBD_FEATURE_DATA_POOL, __pyx_k_RBD_FEATURE_DATA_POOL, sizeof(__pyx_k_RBD_FEATURE_DATA_POOL), 0, 0, 1, 1},
63723 {&__pyx_n_s_RBD_FEATURE_DEEP_FLATTEN, __pyx_k_RBD_FEATURE_DEEP_FLATTEN, sizeof(__pyx_k_RBD_FEATURE_DEEP_FLATTEN), 0, 0, 1, 1},
63724 {&__pyx_n_s_RBD_FEATURE_EXCLUSIVE_LOCK, __pyx_k_RBD_FEATURE_EXCLUSIVE_LOCK, sizeof(__pyx_k_RBD_FEATURE_EXCLUSIVE_LOCK), 0, 0, 1, 1},
63725 {&__pyx_n_s_RBD_FEATURE_FAST_DIFF, __pyx_k_RBD_FEATURE_FAST_DIFF, sizeof(__pyx_k_RBD_FEATURE_FAST_DIFF), 0, 0, 1, 1},
63726 {&__pyx_n_s_RBD_FEATURE_JOURNALING, __pyx_k_RBD_FEATURE_JOURNALING, sizeof(__pyx_k_RBD_FEATURE_JOURNALING), 0, 0, 1, 1},
63727 {&__pyx_n_s_RBD_FEATURE_LAYERING, __pyx_k_RBD_FEATURE_LAYERING, sizeof(__pyx_k_RBD_FEATURE_LAYERING), 0, 0, 1, 1},
63728 {&__pyx_n_s_RBD_FEATURE_MIGRATING, __pyx_k_RBD_FEATURE_MIGRATING, sizeof(__pyx_k_RBD_FEATURE_MIGRATING), 0, 0, 1, 1},
63729 {&__pyx_n_s_RBD_FEATURE_OBJECT_MAP, __pyx_k_RBD_FEATURE_OBJECT_MAP, sizeof(__pyx_k_RBD_FEATURE_OBJECT_MAP), 0, 0, 1, 1},
63730 {&__pyx_n_s_RBD_FEATURE_OPERATIONS, __pyx_k_RBD_FEATURE_OPERATIONS, sizeof(__pyx_k_RBD_FEATURE_OPERATIONS), 0, 0, 1, 1},
63731 {&__pyx_n_s_RBD_FEATURE_STRIPINGV2, __pyx_k_RBD_FEATURE_STRIPINGV2, sizeof(__pyx_k_RBD_FEATURE_STRIPINGV2), 0, 0, 1, 1},
63732 {&__pyx_n_s_RBD_FLAG_FAST_DIFF_INVALID, __pyx_k_RBD_FLAG_FAST_DIFF_INVALID, sizeof(__pyx_k_RBD_FLAG_FAST_DIFF_INVALID), 0, 0, 1, 1},
63733 {&__pyx_n_s_RBD_FLAG_OBJECT_MAP_INVALID, __pyx_k_RBD_FLAG_OBJECT_MAP_INVALID, sizeof(__pyx_k_RBD_FLAG_OBJECT_MAP_INVALID), 0, 0, 1, 1},
63734 {&__pyx_n_s_RBD_GROUP_IMAGE_STATE_ATTACHED, __pyx_k_RBD_GROUP_IMAGE_STATE_ATTACHED, sizeof(__pyx_k_RBD_GROUP_IMAGE_STATE_ATTACHED), 0, 0, 1, 1},
63735 {&__pyx_n_s_RBD_GROUP_IMAGE_STATE_INCOMPLETE, __pyx_k_RBD_GROUP_IMAGE_STATE_INCOMPLETE, sizeof(__pyx_k_RBD_GROUP_IMAGE_STATE_INCOMPLETE), 0, 0, 1, 1},
63736 {&__pyx_n_s_RBD_GROUP_SNAP_STATE_COMPLETE, __pyx_k_RBD_GROUP_SNAP_STATE_COMPLETE, sizeof(__pyx_k_RBD_GROUP_SNAP_STATE_COMPLETE), 0, 0, 1, 1},
63737 {&__pyx_n_s_RBD_GROUP_SNAP_STATE_INCOMPLETE, __pyx_k_RBD_GROUP_SNAP_STATE_INCOMPLETE, sizeof(__pyx_k_RBD_GROUP_SNAP_STATE_INCOMPLETE), 0, 0, 1, 1},
63738 {&__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_ERROR, __pyx_k_RBD_IMAGE_MIGRATION_STATE_ERROR, sizeof(__pyx_k_RBD_IMAGE_MIGRATION_STATE_ERROR), 0, 0, 1, 1},
63739 {&__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_EXECUT, __pyx_k_RBD_IMAGE_MIGRATION_STATE_EXECUT, sizeof(__pyx_k_RBD_IMAGE_MIGRATION_STATE_EXECUT), 0, 0, 1, 1},
63740 {&__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_EXECUT_2, __pyx_k_RBD_IMAGE_MIGRATION_STATE_EXECUT_2, sizeof(__pyx_k_RBD_IMAGE_MIGRATION_STATE_EXECUT_2), 0, 0, 1, 1},
63741 {&__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_PREPAR, __pyx_k_RBD_IMAGE_MIGRATION_STATE_PREPAR, sizeof(__pyx_k_RBD_IMAGE_MIGRATION_STATE_PREPAR), 0, 0, 1, 1},
63742 {&__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_PREPAR_2, __pyx_k_RBD_IMAGE_MIGRATION_STATE_PREPAR_2, sizeof(__pyx_k_RBD_IMAGE_MIGRATION_STATE_PREPAR_2), 0, 0, 1, 1},
63743 {&__pyx_n_s_RBD_IMAGE_MIGRATION_STATE_UNKNOW, __pyx_k_RBD_IMAGE_MIGRATION_STATE_UNKNOW, sizeof(__pyx_k_RBD_IMAGE_MIGRATION_STATE_UNKNOW), 0, 0, 1, 1},
63744 {&__pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL, __pyx_k_RBD_IMAGE_OPTION_DATA_POOL, sizeof(__pyx_k_RBD_IMAGE_OPTION_DATA_POOL), 0, 0, 1, 1},
63745 {&__pyx_n_s_RBD_IMAGE_OPTION_FEATURES, __pyx_k_RBD_IMAGE_OPTION_FEATURES, sizeof(__pyx_k_RBD_IMAGE_OPTION_FEATURES), 0, 0, 1, 1},
63746 {&__pyx_n_s_RBD_IMAGE_OPTION_FORMAT, __pyx_k_RBD_IMAGE_OPTION_FORMAT, sizeof(__pyx_k_RBD_IMAGE_OPTION_FORMAT), 0, 0, 1, 1},
63747 {&__pyx_n_s_RBD_IMAGE_OPTION_ORDER, __pyx_k_RBD_IMAGE_OPTION_ORDER, sizeof(__pyx_k_RBD_IMAGE_OPTION_ORDER), 0, 0, 1, 1},
63748 {&__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT, __pyx_k_RBD_IMAGE_OPTION_STRIPE_COUNT, sizeof(__pyx_k_RBD_IMAGE_OPTION_STRIPE_COUNT), 0, 0, 1, 1},
63749 {&__pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT, __pyx_k_RBD_IMAGE_OPTION_STRIPE_UNIT, sizeof(__pyx_k_RBD_IMAGE_OPTION_STRIPE_UNIT), 0, 0, 1, 1},
63750 {&__pyx_kp_s_RBD_I_O_error_s, __pyx_k_RBD_I_O_error_s, sizeof(__pyx_k_RBD_I_O_error_s), 0, 0, 1, 0},
63751 {&__pyx_n_s_RBD_LOCK_MODE_EXCLUSIVE, __pyx_k_RBD_LOCK_MODE_EXCLUSIVE, sizeof(__pyx_k_RBD_LOCK_MODE_EXCLUSIVE), 0, 0, 1, 1},
63752 {&__pyx_n_s_RBD_LOCK_MODE_SHARED, __pyx_k_RBD_LOCK_MODE_SHARED, sizeof(__pyx_k_RBD_LOCK_MODE_SHARED), 0, 0, 1, 1},
63753 {&__pyx_n_s_RBD_MIRROR_IMAGE_DISABLED, __pyx_k_RBD_MIRROR_IMAGE_DISABLED, sizeof(__pyx_k_RBD_MIRROR_IMAGE_DISABLED), 0, 0, 1, 1},
63754 {&__pyx_n_s_RBD_MIRROR_IMAGE_DISABLING, __pyx_k_RBD_MIRROR_IMAGE_DISABLING, sizeof(__pyx_k_RBD_MIRROR_IMAGE_DISABLING), 0, 0, 1, 1},
63755 {&__pyx_n_s_RBD_MIRROR_IMAGE_ENABLED, __pyx_k_RBD_MIRROR_IMAGE_ENABLED, sizeof(__pyx_k_RBD_MIRROR_IMAGE_ENABLED), 0, 0, 1, 1},
63756 {&__pyx_n_s_RBD_MIRROR_MODE_DISABLED, __pyx_k_RBD_MIRROR_MODE_DISABLED, sizeof(__pyx_k_RBD_MIRROR_MODE_DISABLED), 0, 0, 1, 1},
63757 {&__pyx_n_s_RBD_MIRROR_MODE_IMAGE, __pyx_k_RBD_MIRROR_MODE_IMAGE, sizeof(__pyx_k_RBD_MIRROR_MODE_IMAGE), 0, 0, 1, 1},
63758 {&__pyx_n_s_RBD_MIRROR_MODE_POOL, __pyx_k_RBD_MIRROR_MODE_POOL, sizeof(__pyx_k_RBD_MIRROR_MODE_POOL), 0, 0, 1, 1},
63759 {&__pyx_n_s_RBD_MIRROR_PEER_ATTRIBUTE_NAME_K, __pyx_k_RBD_MIRROR_PEER_ATTRIBUTE_NAME_K, sizeof(__pyx_k_RBD_MIRROR_PEER_ATTRIBUTE_NAME_K), 0, 0, 1, 1},
63760 {&__pyx_n_s_RBD_MIRROR_PEER_ATTRIBUTE_NAME_M, __pyx_k_RBD_MIRROR_PEER_ATTRIBUTE_NAME_M, sizeof(__pyx_k_RBD_MIRROR_PEER_ATTRIBUTE_NAME_M), 0, 0, 1, 1},
63761 {&__pyx_n_s_RBD_OPERATION_FEATURE_CLONE_CHIL, __pyx_k_RBD_OPERATION_FEATURE_CLONE_CHIL, sizeof(__pyx_k_RBD_OPERATION_FEATURE_CLONE_CHIL), 0, 0, 1, 1},
63762 {&__pyx_n_s_RBD_OPERATION_FEATURE_CLONE_PARE, __pyx_k_RBD_OPERATION_FEATURE_CLONE_PARE, sizeof(__pyx_k_RBD_OPERATION_FEATURE_CLONE_PARE), 0, 0, 1, 1},
63763 {&__pyx_n_s_RBD_OPERATION_FEATURE_GROUP, __pyx_k_RBD_OPERATION_FEATURE_GROUP, sizeof(__pyx_k_RBD_OPERATION_FEATURE_GROUP), 0, 0, 1, 1},
63764 {&__pyx_n_s_RBD_OPERATION_FEATURE_SNAP_TRASH, __pyx_k_RBD_OPERATION_FEATURE_SNAP_TRASH, sizeof(__pyx_k_RBD_OPERATION_FEATURE_SNAP_TRASH), 0, 0, 1, 1},
63765 {&__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGES, __pyx_k_RBD_POOL_STAT_OPTION_IMAGES, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_IMAGES), 0, 0, 1, 1},
63766 {&__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_MAX_P, __pyx_k_RBD_POOL_STAT_OPTION_IMAGE_MAX_P, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_IMAGE_MAX_P), 0, 0, 1, 1},
63767 {&__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_PROVI, __pyx_k_RBD_POOL_STAT_OPTION_IMAGE_PROVI, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_IMAGE_PROVI), 0, 0, 1, 1},
63768 {&__pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_SNAPS, __pyx_k_RBD_POOL_STAT_OPTION_IMAGE_SNAPS, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_IMAGE_SNAPS), 0, 0, 1, 1},
63769 {&__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_IMAGE, __pyx_k_RBD_POOL_STAT_OPTION_TRASH_IMAGE, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_TRASH_IMAGE), 0, 0, 1, 1},
63770 {&__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_MAX_P, __pyx_k_RBD_POOL_STAT_OPTION_TRASH_MAX_P, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_TRASH_MAX_P), 0, 0, 1, 1},
63771 {&__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_PROVI, __pyx_k_RBD_POOL_STAT_OPTION_TRASH_PROVI, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_TRASH_PROVI), 0, 0, 1, 1},
63772 {&__pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_SNAPS, __pyx_k_RBD_POOL_STAT_OPTION_TRASH_SNAPS, sizeof(__pyx_k_RBD_POOL_STAT_OPTION_TRASH_SNAPS), 0, 0, 1, 1},
63773 {&__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_GROUP, __pyx_k_RBD_SNAP_NAMESPACE_TYPE_GROUP, sizeof(__pyx_k_RBD_SNAP_NAMESPACE_TYPE_GROUP), 0, 0, 1, 1},
63774 {&__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_TRASH, __pyx_k_RBD_SNAP_NAMESPACE_TYPE_TRASH, sizeof(__pyx_k_RBD_SNAP_NAMESPACE_TYPE_TRASH), 0, 0, 1, 1},
63775 {&__pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_USER, __pyx_k_RBD_SNAP_NAMESPACE_TYPE_USER, sizeof(__pyx_k_RBD_SNAP_NAMESPACE_TYPE_USER), 0, 0, 1, 1},
63776 {&__pyx_kp_s_RBD_arguments_out_of_range_s, __pyx_k_RBD_arguments_out_of_range_s, sizeof(__pyx_k_RBD_arguments_out_of_range_s), 0, 0, 1, 0},
63777 {&__pyx_n_s_RBD_clone, __pyx_k_RBD_clone, sizeof(__pyx_k_RBD_clone), 0, 0, 1, 1},
63778 {&__pyx_n_s_RBD_config_list, __pyx_k_RBD_config_list, sizeof(__pyx_k_RBD_config_list), 0, 0, 1, 1},
63779 {&__pyx_kp_s_RBD_connection_was_shutdown_s, __pyx_k_RBD_connection_was_shutdown_s, sizeof(__pyx_k_RBD_connection_was_shutdown_s), 0, 0, 1, 0},
63780 {&__pyx_n_s_RBD_create, __pyx_k_RBD_create, sizeof(__pyx_k_RBD_create), 0, 0, 1, 1},
63781 {&__pyx_kp_s_RBD_disk_quota_exceeded_s, __pyx_k_RBD_disk_quota_exceeded_s, sizeof(__pyx_k_RBD_disk_quota_exceeded_s), 0, 0, 1, 0},
63782 {&__pyx_kp_s_RBD_function_not_supported_s, __pyx_k_RBD_function_not_supported_s, sizeof(__pyx_k_RBD_function_not_supported_s), 0, 0, 1, 0},
63783 {&__pyx_n_s_RBD_group_create, __pyx_k_RBD_group_create, sizeof(__pyx_k_RBD_group_create), 0, 0, 1, 1},
63784 {&__pyx_n_s_RBD_group_list, __pyx_k_RBD_group_list, sizeof(__pyx_k_RBD_group_list), 0, 0, 1, 1},
63785 {&__pyx_n_s_RBD_group_remove, __pyx_k_RBD_group_remove, sizeof(__pyx_k_RBD_group_remove), 0, 0, 1, 1},
63786 {&__pyx_n_s_RBD_group_rename, __pyx_k_RBD_group_rename, sizeof(__pyx_k_RBD_group_rename), 0, 0, 1, 1},
63787 {&__pyx_kp_s_RBD_image_already_exists_s, __pyx_k_RBD_image_already_exists_s, sizeof(__pyx_k_RBD_image_already_exists_s), 0, 0, 1, 0},
63788 {&__pyx_kp_s_RBD_image_has_snapshots_s, __pyx_k_RBD_image_has_snapshots_s, sizeof(__pyx_k_RBD_image_has_snapshots_s), 0, 0, 1, 0},
63789 {&__pyx_kp_s_RBD_image_is_busy_s, __pyx_k_RBD_image_is_busy_s, sizeof(__pyx_k_RBD_image_is_busy_s), 0, 0, 1, 0},
63790 {&__pyx_kp_s_RBD_image_not_found_s, __pyx_k_RBD_image_not_found_s, sizeof(__pyx_k_RBD_image_not_found_s), 0, 0, 1, 0},
63791 {&__pyx_kp_s_RBD_incomplete_write_s, __pyx_k_RBD_incomplete_write_s, sizeof(__pyx_k_RBD_incomplete_write_s), 0, 0, 1, 0},
63792 {&__pyx_kp_s_RBD_insufficient_space_available, __pyx_k_RBD_insufficient_space_available, sizeof(__pyx_k_RBD_insufficient_space_available), 0, 0, 1, 0},
63793 {&__pyx_kp_s_RBD_invalid_argument_s, __pyx_k_RBD_invalid_argument_s, sizeof(__pyx_k_RBD_invalid_argument_s), 0, 0, 1, 0},
63794 {&__pyx_n_s_RBD_list, __pyx_k_RBD_list, sizeof(__pyx_k_RBD_list), 0, 0, 1, 1},
63795 {&__pyx_n_s_RBD_list2, __pyx_k_RBD_list2, sizeof(__pyx_k_RBD_list2), 0, 0, 1, 1},
63796 {&__pyx_kp_s_RBD_logic_error_s, __pyx_k_RBD_logic_error_s, sizeof(__pyx_k_RBD_logic_error_s), 0, 0, 1, 0},
63797 {&__pyx_n_s_RBD_migration_abort, __pyx_k_RBD_migration_abort, sizeof(__pyx_k_RBD_migration_abort), 0, 0, 1, 1},
63798 {&__pyx_n_s_RBD_migration_commit, __pyx_k_RBD_migration_commit, sizeof(__pyx_k_RBD_migration_commit), 0, 0, 1, 1},
63799 {&__pyx_n_s_RBD_migration_execute, __pyx_k_RBD_migration_execute, sizeof(__pyx_k_RBD_migration_execute), 0, 0, 1, 1},
63800 {&__pyx_n_s_RBD_migration_prepare, __pyx_k_RBD_migration_prepare, sizeof(__pyx_k_RBD_migration_prepare), 0, 0, 1, 1},
63801 {&__pyx_n_s_RBD_migration_status, __pyx_k_RBD_migration_status, sizeof(__pyx_k_RBD_migration_status), 0, 0, 1, 1},
63802 {&__pyx_n_s_RBD_mirror_image_instance_id_lis, __pyx_k_RBD_mirror_image_instance_id_lis, sizeof(__pyx_k_RBD_mirror_image_instance_id_lis), 0, 0, 1, 1},
63803 {&__pyx_n_s_RBD_mirror_image_status_list, __pyx_k_RBD_mirror_image_status_list, sizeof(__pyx_k_RBD_mirror_image_status_list), 0, 0, 1, 1},
63804 {&__pyx_n_s_RBD_mirror_image_status_summary, __pyx_k_RBD_mirror_image_status_summary, sizeof(__pyx_k_RBD_mirror_image_status_summary), 0, 0, 1, 1},
63805 {&__pyx_n_s_RBD_mirror_mode_get, __pyx_k_RBD_mirror_mode_get, sizeof(__pyx_k_RBD_mirror_mode_get), 0, 0, 1, 1},
63806 {&__pyx_n_s_RBD_mirror_mode_set, __pyx_k_RBD_mirror_mode_set, sizeof(__pyx_k_RBD_mirror_mode_set), 0, 0, 1, 1},
63807 {&__pyx_n_s_RBD_mirror_peer_add, __pyx_k_RBD_mirror_peer_add, sizeof(__pyx_k_RBD_mirror_peer_add), 0, 0, 1, 1},
63808 {&__pyx_n_s_RBD_mirror_peer_get_attributes, __pyx_k_RBD_mirror_peer_get_attributes, sizeof(__pyx_k_RBD_mirror_peer_get_attributes), 0, 0, 1, 1},
63809 {&__pyx_n_s_RBD_mirror_peer_list, __pyx_k_RBD_mirror_peer_list, sizeof(__pyx_k_RBD_mirror_peer_list), 0, 0, 1, 1},
63810 {&__pyx_n_s_RBD_mirror_peer_remove, __pyx_k_RBD_mirror_peer_remove, sizeof(__pyx_k_RBD_mirror_peer_remove), 0, 0, 1, 1},
63811 {&__pyx_n_s_RBD_mirror_peer_set_attributes, __pyx_k_RBD_mirror_peer_set_attributes, sizeof(__pyx_k_RBD_mirror_peer_set_attributes), 0, 0, 1, 1},
63812 {&__pyx_n_s_RBD_mirror_peer_set_client, __pyx_k_RBD_mirror_peer_set_client, sizeof(__pyx_k_RBD_mirror_peer_set_client), 0, 0, 1, 1},
63813 {&__pyx_n_s_RBD_mirror_peer_set_cluster, __pyx_k_RBD_mirror_peer_set_cluster, sizeof(__pyx_k_RBD_mirror_peer_set_cluster), 0, 0, 1, 1},
63814 {&__pyx_n_s_RBD_namespace_create, __pyx_k_RBD_namespace_create, sizeof(__pyx_k_RBD_namespace_create), 0, 0, 1, 1},
63815 {&__pyx_n_s_RBD_namespace_exists, __pyx_k_RBD_namespace_exists, sizeof(__pyx_k_RBD_namespace_exists), 0, 0, 1, 1},
63816 {&__pyx_n_s_RBD_namespace_list, __pyx_k_RBD_namespace_list, sizeof(__pyx_k_RBD_namespace_list), 0, 0, 1, 1},
63817 {&__pyx_n_s_RBD_namespace_remove, __pyx_k_RBD_namespace_remove, sizeof(__pyx_k_RBD_namespace_remove), 0, 0, 1, 1},
63818 {&__pyx_kp_s_RBD_object_already_exists_s, __pyx_k_RBD_object_already_exists_s, sizeof(__pyx_k_RBD_object_already_exists_s), 0, 0, 1, 0},
63819 {&__pyx_kp_s_RBD_object_not_found_s, __pyx_k_RBD_object_not_found_s, sizeof(__pyx_k_RBD_object_not_found_s), 0, 0, 1, 0},
63820 {&__pyx_kp_s_RBD_operation_canceled_s, __pyx_k_RBD_operation_canceled_s, sizeof(__pyx_k_RBD_operation_canceled_s), 0, 0, 1, 0},
63821 {&__pyx_kp_s_RBD_operation_timeout_s, __pyx_k_RBD_operation_timeout_s, sizeof(__pyx_k_RBD_operation_timeout_s), 0, 0, 1, 0},
63822 {&__pyx_kp_s_RBD_permission_error_s, __pyx_k_RBD_permission_error_s, sizeof(__pyx_k_RBD_permission_error_s), 0, 0, 1, 0},
63823 {&__pyx_n_s_RBD_pool_init, __pyx_k_RBD_pool_init, sizeof(__pyx_k_RBD_pool_init), 0, 0, 1, 1},
63824 {&__pyx_n_s_RBD_pool_metadata_get, __pyx_k_RBD_pool_metadata_get, sizeof(__pyx_k_RBD_pool_metadata_get), 0, 0, 1, 1},
63825 {&__pyx_n_s_RBD_pool_metadata_list, __pyx_k_RBD_pool_metadata_list, sizeof(__pyx_k_RBD_pool_metadata_list), 0, 0, 1, 1},
63826 {&__pyx_n_s_RBD_pool_metadata_remove, __pyx_k_RBD_pool_metadata_remove, sizeof(__pyx_k_RBD_pool_metadata_remove), 0, 0, 1, 1},
63827 {&__pyx_n_s_RBD_pool_metadata_set, __pyx_k_RBD_pool_metadata_set, sizeof(__pyx_k_RBD_pool_metadata_set), 0, 0, 1, 1},
63828 {&__pyx_n_s_RBD_pool_stats_get, __pyx_k_RBD_pool_stats_get, sizeof(__pyx_k_RBD_pool_stats_get), 0, 0, 1, 1},
63829 {&__pyx_kp_s_RBD_read_only_image_s, __pyx_k_RBD_read_only_image_s, sizeof(__pyx_k_RBD_read_only_image_s), 0, 0, 1, 0},
63830 {&__pyx_n_s_RBD_remove, __pyx_k_RBD_remove, sizeof(__pyx_k_RBD_remove), 0, 0, 1, 1},
63831 {&__pyx_n_s_RBD_rename, __pyx_k_RBD_rename, sizeof(__pyx_k_RBD_rename), 0, 0, 1, 1},
63832 {&__pyx_n_s_RBD_trash_get, __pyx_k_RBD_trash_get, sizeof(__pyx_k_RBD_trash_get), 0, 0, 1, 1},
63833 {&__pyx_n_s_RBD_trash_list, __pyx_k_RBD_trash_list, sizeof(__pyx_k_RBD_trash_list), 0, 0, 1, 1},
63834 {&__pyx_n_s_RBD_trash_move, __pyx_k_RBD_trash_move, sizeof(__pyx_k_RBD_trash_move), 0, 0, 1, 1},
63835 {&__pyx_n_s_RBD_trash_purge, __pyx_k_RBD_trash_purge, sizeof(__pyx_k_RBD_trash_purge), 0, 0, 1, 1},
63836 {&__pyx_n_s_RBD_trash_remove, __pyx_k_RBD_trash_remove, sizeof(__pyx_k_RBD_trash_remove), 0, 0, 1, 1},
63837 {&__pyx_n_s_RBD_trash_restore, __pyx_k_RBD_trash_restore, sizeof(__pyx_k_RBD_trash_restore), 0, 0, 1, 1},
63838 {&__pyx_n_s_RBD_version, __pyx_k_RBD_version, sizeof(__pyx_k_RBD_version), 0, 0, 1, 1},
63839 {&__pyx_n_s_REMOVING, __pyx_k_REMOVING, sizeof(__pyx_k_REMOVING), 0, 0, 1, 1},
63840 {&__pyx_n_s_ReadOnlyImage, __pyx_k_ReadOnlyImage, sizeof(__pyx_k_ReadOnlyImage), 0, 0, 1, 1},
63841 {&__pyx_n_s_ReadOnlyImage___init, __pyx_k_ReadOnlyImage___init, sizeof(__pyx_k_ReadOnlyImage___init), 0, 0, 1, 1},
63842 {&__pyx_n_s_SnapIterator___iter, __pyx_k_SnapIterator___iter, sizeof(__pyx_k_SnapIterator___iter), 0, 0, 1, 1},
63843 {&__pyx_kp_s_This_class_wraps_librbd_CRUD_fu, __pyx_k_This_class_wraps_librbd_CRUD_fu, sizeof(__pyx_k_This_class_wraps_librbd_CRUD_fu), 0, 0, 1, 0},
63844 {&__pyx_n_s_Timeout, __pyx_k_Timeout, sizeof(__pyx_k_Timeout), 0, 0, 1, 1},
63845 {&__pyx_n_s_Timeout___init, __pyx_k_Timeout___init, sizeof(__pyx_k_Timeout___init), 0, 0, 1, 1},
63846 {&__pyx_n_s_TrashIterator___iter, __pyx_k_TrashIterator___iter, sizeof(__pyx_k_TrashIterator___iter), 0, 0, 1, 1},
63847 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
63848 {&__pyx_n_s_USER, __pyx_k_USER, sizeof(__pyx_k_USER), 0, 0, 1, 1},
63849 {&__pyx_n_s_WatcherIterator___iter, __pyx_k_WatcherIterator___iter, sizeof(__pyx_k_WatcherIterator___iter), 0, 0, 1, 1},
63850 {&__pyx_kp_s_Wrote_only_ld_out_of_ld_bytes, __pyx_k_Wrote_only_ld_out_of_ld_bytes, sizeof(__pyx_k_Wrote_only_ld_out_of_ld_bytes), 0, 0, 1, 0},
63851 {&__pyx_kp_b__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 0, 0},
63852 {&__pyx_n_s_addr, __pyx_k_addr, sizeof(__pyx_k_addr), 0, 0, 1, 1},
63853 {&__pyx_n_s_aio_read_locals_oncomplete, __pyx_k_aio_read_locals_oncomplete, sizeof(__pyx_k_aio_read_locals_oncomplete), 0, 0, 1, 1},
63854 {&__pyx_n_s_allow_shrink, __pyx_k_allow_shrink, sizeof(__pyx_k_allow_shrink), 0, 0, 1, 1},
63855 {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
63856 {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
63857 {&__pyx_n_s_block_name_prefix, __pyx_k_block_name_prefix, sizeof(__pyx_k_block_name_prefix), 0, 0, 1, 1},
63858 {&__pyx_n_s_c_info, __pyx_k_c_info, sizeof(__pyx_k_c_info), 0, 0, 1, 1},
63859 {&__pyx_n_s_c_ioctx, __pyx_k_c_ioctx, sizeof(__pyx_k_c_ioctx), 0, 0, 1, 1},
63860 {&__pyx_n_s_c_ioctx_2, __pyx_k_c_ioctx_2, sizeof(__pyx_k_c_ioctx_2), 0, 0, 1, 1},
63861 {&__pyx_n_s_c_name, __pyx_k_c_name, sizeof(__pyx_k_c_name), 0, 0, 1, 1},
63862 {&__pyx_n_s_c_name_2, __pyx_k_c_name_2, sizeof(__pyx_k_c_name_2), 0, 0, 1, 1},
63863 {&__pyx_n_s_c_names, __pyx_k_c_names, sizeof(__pyx_k_c_names), 0, 0, 1, 1},
63864 {&__pyx_n_s_c_status, __pyx_k_c_status, sizeof(__pyx_k_c_status), 0, 0, 1, 1},
63865 {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1},
63866 {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
63867 {&__pyx_n_s_client, __pyx_k_client, sizeof(__pyx_k_client), 0, 0, 1, 1},
63868 {&__pyx_n_s_client_name, __pyx_k_client_name, sizeof(__pyx_k_client_name), 0, 0, 1, 1},
63869 {&__pyx_n_s_client_name_2, __pyx_k_client_name_2, sizeof(__pyx_k_client_name_2), 0, 0, 1, 1},
63870 {&__pyx_n_s_clone, __pyx_k_clone, sizeof(__pyx_k_clone), 0, 0, 1, 1},
63871 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
63872 {&__pyx_n_s_cluster_name, __pyx_k_cluster_name, sizeof(__pyx_k_cluster_name), 0, 0, 1, 1},
63873 {&__pyx_n_s_cluster_name_2, __pyx_k_cluster_name_2, sizeof(__pyx_k_cluster_name_2), 0, 0, 1, 1},
63874 {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
63875 {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1},
63876 {&__pyx_n_s_completion_v, __pyx_k_completion_v, sizeof(__pyx_k_completion_v), 0, 0, 1, 1},
63877 {&__pyx_n_s_completion_v_2, __pyx_k_completion_v_2, sizeof(__pyx_k_completion_v_2), 0, 0, 1, 1},
63878 {&__pyx_n_s_config_list, __pyx_k_config_list, sizeof(__pyx_k_config_list), 0, 0, 1, 1},
63879 {&__pyx_n_s_cookie, __pyx_k_cookie, sizeof(__pyx_k_cookie), 0, 0, 1, 1},
63880 {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
63881 {&__pyx_n_s_counts, __pyx_k_counts, sizeof(__pyx_k_counts), 0, 0, 1, 1},
63882 {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
63883 {&__pyx_n_s_cstr, __pyx_k_cstr, sizeof(__pyx_k_cstr), 0, 0, 1, 1},
63884 {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
63885 {&__pyx_kp_s_data_must_be_a_byte_string, __pyx_k_data_must_be_a_byte_string, sizeof(__pyx_k_data_must_be_a_byte_string), 0, 0, 1, 0},
63886 {&__pyx_n_s_data_pool, __pyx_k_data_pool, sizeof(__pyx_k_data_pool), 0, 0, 1, 1},
63887 {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
63888 {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
63889 {&__pyx_n_s_decode_cstr, __pyx_k_decode_cstr, sizeof(__pyx_k_decode_cstr), 0, 0, 1, 1},
63890 {&__pyx_n_s_deferment_end_time, __pyx_k_deferment_end_time, sizeof(__pyx_k_deferment_end_time), 0, 0, 1, 1},
63891 {&__pyx_n_s_delay, __pyx_k_delay, sizeof(__pyx_k_delay), 0, 0, 1, 1},
63892 {&__pyx_n_s_delay_2, __pyx_k_delay_2, sizeof(__pyx_k_delay_2), 0, 0, 1, 1},
63893 {&__pyx_n_s_deletion_time, __pyx_k_deletion_time, sizeof(__pyx_k_deletion_time), 0, 0, 1, 1},
63894 {&__pyx_n_s_descendants, __pyx_k_descendants, sizeof(__pyx_k_descendants), 0, 0, 1, 1},
63895 {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1},
63896 {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1},
63897 {&__pyx_n_s_dest_2, __pyx_k_dest_2, sizeof(__pyx_k_dest_2), 0, 0, 1, 1},
63898 {&__pyx_n_s_dest_image_id, __pyx_k_dest_image_id, sizeof(__pyx_k_dest_image_id), 0, 0, 1, 1},
63899 {&__pyx_n_s_dest_image_name, __pyx_k_dest_image_name, sizeof(__pyx_k_dest_image_name), 0, 0, 1, 1},
63900 {&__pyx_n_s_dest_image_name_2, __pyx_k_dest_image_name_2, sizeof(__pyx_k_dest_image_name_2), 0, 0, 1, 1},
63901 {&__pyx_n_s_dest_ioctx, __pyx_k_dest_ioctx, sizeof(__pyx_k_dest_ioctx), 0, 0, 1, 1},
63902 {&__pyx_n_s_dest_ioctx_2, __pyx_k_dest_ioctx_2, sizeof(__pyx_k_dest_ioctx_2), 0, 0, 1, 1},
63903 {&__pyx_n_s_dest_name, __pyx_k_dest_name, sizeof(__pyx_k_dest_name), 0, 0, 1, 1},
63904 {&__pyx_n_s_dest_pool_id, __pyx_k_dest_pool_id, sizeof(__pyx_k_dest_pool_id), 0, 0, 1, 1},
63905 {&__pyx_n_s_dest_pool_namespace, __pyx_k_dest_pool_namespace, sizeof(__pyx_k_dest_pool_namespace), 0, 0, 1, 1},
63906 {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
63907 {&__pyx_n_s_dstname, __pyx_k_dstname, sizeof(__pyx_k_dstname), 0, 0, 1, 1},
63908 {&__pyx_n_s_enabled, __pyx_k_enabled, sizeof(__pyx_k_enabled), 0, 0, 1, 1},
63909 {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
63910 {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
63911 {&__pyx_n_s_errno, __pyx_k_errno, sizeof(__pyx_k_errno), 0, 0, 1, 1},
63912 {&__pyx_kp_s_errno_0_1, __pyx_k_errno_0_1, sizeof(__pyx_k_errno_0_1), 0, 0, 1, 0},
63913 {&__pyx_kp_s_error_aborting_migration, __pyx_k_error_aborting_migration, sizeof(__pyx_k_error_aborting_migration), 0, 0, 1, 0},
63914 {&__pyx_kp_s_error_acquiring_exclusive_lock_o, __pyx_k_error_acquiring_exclusive_lock_o, sizeof(__pyx_k_error_acquiring_exclusive_lock_o), 0, 0, 1, 0},
63915 {&__pyx_kp_s_error_acquiring_lock_on_image, __pyx_k_error_acquiring_lock_on_image, sizeof(__pyx_k_error_acquiring_lock_on_image), 0, 0, 1, 0},
63916 {&__pyx_kp_s_error_acquiring_shared_lock_on_i, __pyx_k_error_acquiring_shared_lock_on_i, sizeof(__pyx_k_error_acquiring_shared_lock_on_i), 0, 0, 1, 0},
63917 {&__pyx_kp_s_error_adding_image_to_group, __pyx_k_error_adding_image_to_group, sizeof(__pyx_k_error_adding_image_to_group), 0, 0, 1, 0},
63918 {&__pyx_kp_s_error_adding_mirror_peer, __pyx_k_error_adding_mirror_peer, sizeof(__pyx_k_error_adding_mirror_peer), 0, 0, 1, 0},
63919 {&__pyx_kp_s_error_allow_shrink_is_False_but, __pyx_k_error_allow_shrink_is_False_but, sizeof(__pyx_k_error_allow_shrink_is_False_but), 0, 0, 1, 0},
63920 {&__pyx_kp_s_error_breaking_lock_on_image, __pyx_k_error_breaking_lock_on_image, sizeof(__pyx_k_error_breaking_lock_on_image), 0, 0, 1, 0},
63921 {&__pyx_kp_s_error_checking_if_snapshot_s_s_i, __pyx_k_error_checking_if_snapshot_s_s_i, sizeof(__pyx_k_error_checking_if_snapshot_s_s_i), 0, 0, 1, 0},
63922 {&__pyx_kp_s_error_copying_image_s_to_s, __pyx_k_error_copying_image_s_to_s, sizeof(__pyx_k_error_copying_image_s_to_s), 0, 0, 1, 0},
63923 {&__pyx_kp_s_error_creating_clone, __pyx_k_error_creating_clone, sizeof(__pyx_k_error_creating_clone), 0, 0, 1, 0},
63924 {&__pyx_kp_s_error_creating_group_s, __pyx_k_error_creating_group_s, sizeof(__pyx_k_error_creating_group_s), 0, 0, 1, 0},
63925 {&__pyx_kp_s_error_creating_group_snapshot, __pyx_k_error_creating_group_snapshot, sizeof(__pyx_k_error_creating_group_snapshot), 0, 0, 1, 0},
63926 {&__pyx_kp_s_error_creating_image, __pyx_k_error_creating_image, sizeof(__pyx_k_error_creating_image), 0, 0, 1, 0},
63927 {&__pyx_kp_s_error_creating_namespace, __pyx_k_error_creating_namespace, sizeof(__pyx_k_error_creating_namespace), 0, 0, 1, 0},
63928 {&__pyx_kp_s_error_creating_snapshot_s_from_s, __pyx_k_error_creating_snapshot_s_from_s, sizeof(__pyx_k_error_creating_snapshot_s_from_s), 0, 0, 1, 0},
63929 {&__pyx_kp_s_error_deleting_image_from_trash, __pyx_k_error_deleting_image_from_trash, sizeof(__pyx_k_error_deleting_image_from_trash), 0, 0, 1, 0},
63930 {&__pyx_kp_s_error_demoting_image_s_to_second, __pyx_k_error_demoting_image_s_to_second, sizeof(__pyx_k_error_demoting_image_s_to_second), 0, 0, 1, 0},
63931 {&__pyx_kp_s_error_disabling_mirroring_for_im, __pyx_k_error_disabling_mirroring_for_im, sizeof(__pyx_k_error_disabling_mirroring_for_im), 0, 0, 1, 0},
63932 {&__pyx_kp_s_error_discarding_region_d_d, __pyx_k_error_discarding_region_d_d, sizeof(__pyx_k_error_discarding_region_d_d), 0, 0, 1, 0},
63933 {&__pyx_kp_s_error_discarding_s_ld_ld, __pyx_k_error_discarding_s_ld_ld, sizeof(__pyx_k_error_discarding_s_ld_ld), 0, 0, 1, 0},
63934 {&__pyx_kp_s_error_enabling_mirroring_for_ima, __pyx_k_error_enabling_mirroring_for_ima, sizeof(__pyx_k_error_enabling_mirroring_for_ima), 0, 0, 1, 0},
63935 {&__pyx_kp_s_error_flattening_s, __pyx_k_error_flattening_s, sizeof(__pyx_k_error_flattening_s), 0, 0, 1, 0},
63936 {&__pyx_kp_s_error_flushing, __pyx_k_error_flushing, sizeof(__pyx_k_error_flushing), 0, 0, 1, 0},
63937 {&__pyx_kp_s_error_flushing_image, __pyx_k_error_flushing_image, sizeof(__pyx_k_error_flushing_image), 0, 0, 1, 0},
63938 {&__pyx_kp_s_error_generating_diff_from_snaps, __pyx_k_error_generating_diff_from_snaps, sizeof(__pyx_k_error_generating_diff_from_snaps), 0, 0, 1, 0},
63939 {&__pyx_kp_s_error_getting_a_completion, __pyx_k_error_getting_a_completion, sizeof(__pyx_k_error_getting_a_completion), 0, 0, 1, 0},
63940 {&__pyx_kp_s_error_getting_access_timestamp_f, __pyx_k_error_getting_access_timestamp_f, sizeof(__pyx_k_error_getting_access_timestamp_f), 0, 0, 1, 0},
63941 {&__pyx_kp_s_error_getting_block_name_prefix, __pyx_k_error_getting_block_name_prefix, sizeof(__pyx_k_error_getting_block_name_prefix), 0, 0, 1, 0},
63942 {&__pyx_kp_s_error_getting_create_timestamp_f, __pyx_k_error_getting_create_timestamp_f, sizeof(__pyx_k_error_getting_create_timestamp_f), 0, 0, 1, 0},
63943 {&__pyx_kp_s_error_getting_features_for_image, __pyx_k_error_getting_features_for_image, sizeof(__pyx_k_error_getting_features_for_image), 0, 0, 1, 0},
63944 {&__pyx_kp_s_error_getting_flags_for_image_s, __pyx_k_error_getting_flags_for_image_s, sizeof(__pyx_k_error_getting_flags_for_image_s), 0, 0, 1, 0},
63945 {&__pyx_kp_s_error_getting_group_for_image_s, __pyx_k_error_getting_group_for_image_s, sizeof(__pyx_k_error_getting_group_for_image_s), 0, 0, 1, 0},
63946 {&__pyx_kp_s_error_getting_id_for_image_s, __pyx_k_error_getting_id_for_image_s, sizeof(__pyx_k_error_getting_id_for_image_s), 0, 0, 1, 0},
63947 {&__pyx_kp_s_error_getting_info_for_image_s, __pyx_k_error_getting_info_for_image_s, sizeof(__pyx_k_error_getting_info_for_image_s), 0, 0, 1, 0},
63948 {&__pyx_kp_s_error_getting_lock_status_for_im, __pyx_k_error_getting_lock_status_for_im, sizeof(__pyx_k_error_getting_lock_status_for_im), 0, 0, 1, 0},
63949 {&__pyx_kp_s_error_getting_metadata_s, __pyx_k_error_getting_metadata_s, sizeof(__pyx_k_error_getting_metadata_s), 0, 0, 1, 0},
63950 {&__pyx_kp_s_error_getting_metadata_s_for_ima, __pyx_k_error_getting_metadata_s_for_ima, sizeof(__pyx_k_error_getting_metadata_s_for_ima), 0, 0, 1, 0},
63951 {&__pyx_kp_s_error_getting_migration_status, __pyx_k_error_getting_migration_status, sizeof(__pyx_k_error_getting_migration_status), 0, 0, 1, 0},
63952 {&__pyx_kp_s_error_getting_mirror_image_statu, __pyx_k_error_getting_mirror_image_statu, sizeof(__pyx_k_error_getting_mirror_image_statu), 0, 0, 1, 0},
63953 {&__pyx_kp_s_error_getting_mirror_info_for_im, __pyx_k_error_getting_mirror_info_for_im, sizeof(__pyx_k_error_getting_mirror_info_for_im), 0, 0, 1, 0},
63954 {&__pyx_kp_s_error_getting_mirror_instance_id, __pyx_k_error_getting_mirror_instance_id, sizeof(__pyx_k_error_getting_mirror_instance_id), 0, 0, 1, 0},
63955 {&__pyx_kp_s_error_getting_mirror_mode, __pyx_k_error_getting_mirror_mode, sizeof(__pyx_k_error_getting_mirror_mode), 0, 0, 1, 0},
63956 {&__pyx_kp_s_error_getting_mirror_peer_attrib, __pyx_k_error_getting_mirror_peer_attrib, sizeof(__pyx_k_error_getting_mirror_peer_attrib), 0, 0, 1, 0},
63957 {&__pyx_kp_s_error_getting_mirror_status_for, __pyx_k_error_getting_mirror_status_for, sizeof(__pyx_k_error_getting_mirror_status_for), 0, 0, 1, 0},
63958 {&__pyx_kp_s_error_getting_modify_timestamp_f, __pyx_k_error_getting_modify_timestamp_f, sizeof(__pyx_k_error_getting_modify_timestamp_f), 0, 0, 1, 0},
63959 {&__pyx_kp_s_error_getting_name_for_image_s, __pyx_k_error_getting_name_for_image_s, sizeof(__pyx_k_error_getting_name_for_image_s), 0, 0, 1, 0},
63960 {&__pyx_kp_s_error_getting_old_format_for_ima, __pyx_k_error_getting_old_format_for_ima, sizeof(__pyx_k_error_getting_old_format_for_ima), 0, 0, 1, 0},
63961 {&__pyx_kp_s_error_getting_op_features_for_im, __pyx_k_error_getting_op_features_for_im, sizeof(__pyx_k_error_getting_op_features_for_im), 0, 0, 1, 0},
63962 {&__pyx_kp_s_error_getting_overlap_for_image, __pyx_k_error_getting_overlap_for_image, sizeof(__pyx_k_error_getting_overlap_for_image), 0, 0, 1, 0},
63963 {&__pyx_kp_s_error_getting_parent_info_for_im, __pyx_k_error_getting_parent_info_for_im, sizeof(__pyx_k_error_getting_parent_info_for_im), 0, 0, 1, 0},
63964 {&__pyx_kp_s_error_getting_size_for_image_s, __pyx_k_error_getting_size_for_image_s, sizeof(__pyx_k_error_getting_size_for_image_s), 0, 0, 1, 0},
63965 {&__pyx_kp_s_error_getting_snapshot_group_nam, __pyx_k_error_getting_snapshot_group_nam, sizeof(__pyx_k_error_getting_snapshot_group_nam), 0, 0, 1, 0},
63966 {&__pyx_kp_s_error_getting_snapshot_limit_for, __pyx_k_error_getting_snapshot_limit_for, sizeof(__pyx_k_error_getting_snapshot_limit_for), 0, 0, 1, 0},
63967 {&__pyx_kp_s_error_getting_snapshot_namespace, __pyx_k_error_getting_snapshot_namespace, sizeof(__pyx_k_error_getting_snapshot_namespace), 0, 0, 1, 0},
63968 {&__pyx_kp_s_error_getting_snapshot_timestamp, __pyx_k_error_getting_snapshot_timestamp, sizeof(__pyx_k_error_getting_snapshot_timestamp), 0, 0, 1, 0},
63969 {&__pyx_kp_s_error_getting_snapshot_trash_nam, __pyx_k_error_getting_snapshot_trash_nam, sizeof(__pyx_k_error_getting_snapshot_trash_nam), 0, 0, 1, 0},
63970 {&__pyx_kp_s_error_getting_stripe_count_for_i, __pyx_k_error_getting_stripe_count_for_i, sizeof(__pyx_k_error_getting_stripe_count_for_i), 0, 0, 1, 0},
63971 {&__pyx_kp_s_error_getting_stripe_unit_for_im, __pyx_k_error_getting_stripe_unit_for_im, sizeof(__pyx_k_error_getting_stripe_unit_for_im), 0, 0, 1, 0},
63972 {&__pyx_kp_s_error_initializing_pool, __pyx_k_error_initializing_pool, sizeof(__pyx_k_error_initializing_pool), 0, 0, 1, 0},
63973 {&__pyx_kp_s_error_invalidating_cache, __pyx_k_error_invalidating_cache, sizeof(__pyx_k_error_invalidating_cache), 0, 0, 1, 0},
63974 {&__pyx_kp_s_error_listing_children, __pyx_k_error_listing_children, sizeof(__pyx_k_error_listing_children), 0, 0, 1, 0},
63975 {&__pyx_kp_s_error_listing_config_options, __pyx_k_error_listing_config_options, sizeof(__pyx_k_error_listing_config_options), 0, 0, 1, 0},
63976 {&__pyx_kp_s_error_listing_groups, __pyx_k_error_listing_groups, sizeof(__pyx_k_error_listing_groups), 0, 0, 1, 0},
63977 {&__pyx_kp_s_error_listing_images, __pyx_k_error_listing_images, sizeof(__pyx_k_error_listing_images), 0, 0, 1, 0},
63978 {&__pyx_kp_s_error_listing_images_2, __pyx_k_error_listing_images_2, sizeof(__pyx_k_error_listing_images_2), 0, 0, 1, 0},
63979 {&__pyx_kp_s_error_listing_images_for_group_s, __pyx_k_error_listing_images_for_group_s, sizeof(__pyx_k_error_listing_images_for_group_s), 0, 0, 1, 0},
63980 {&__pyx_kp_s_error_listing_lock_owners_for_im, __pyx_k_error_listing_lock_owners_for_im, sizeof(__pyx_k_error_listing_lock_owners_for_im), 0, 0, 1, 0},
63981 {&__pyx_kp_s_error_listing_metadata, __pyx_k_error_listing_metadata, sizeof(__pyx_k_error_listing_metadata), 0, 0, 1, 0},
63982 {&__pyx_kp_s_error_listing_metadata_for_image, __pyx_k_error_listing_metadata_for_image, sizeof(__pyx_k_error_listing_metadata_for_image), 0, 0, 1, 0},
63983 {&__pyx_kp_s_error_listing_mirror_images_inst, __pyx_k_error_listing_mirror_images_inst, sizeof(__pyx_k_error_listing_mirror_images_inst), 0, 0, 1, 0},
63984 {&__pyx_kp_s_error_listing_mirror_images_stat, __pyx_k_error_listing_mirror_images_stat, sizeof(__pyx_k_error_listing_mirror_images_stat), 0, 0, 1, 0},
63985 {&__pyx_kp_s_error_listing_namespaces, __pyx_k_error_listing_namespaces, sizeof(__pyx_k_error_listing_namespaces), 0, 0, 1, 0},
63986 {&__pyx_kp_s_error_listing_peers, __pyx_k_error_listing_peers, sizeof(__pyx_k_error_listing_peers), 0, 0, 1, 0},
63987 {&__pyx_kp_s_error_listing_snapshots_for_grou, __pyx_k_error_listing_snapshots_for_grou, sizeof(__pyx_k_error_listing_snapshots_for_grou), 0, 0, 1, 0},
63988 {&__pyx_kp_s_error_listing_snapshots_for_imag, __pyx_k_error_listing_snapshots_for_imag, sizeof(__pyx_k_error_listing_snapshots_for_imag), 0, 0, 1, 0},
63989 {&__pyx_kp_s_error_listing_trash_entries, __pyx_k_error_listing_trash_entries, sizeof(__pyx_k_error_listing_trash_entries), 0, 0, 1, 0},
63990 {&__pyx_kp_s_error_listing_watchers, __pyx_k_error_listing_watchers, sizeof(__pyx_k_error_listing_watchers), 0, 0, 1, 0},
63991 {&__pyx_kp_s_error_migrating_image_s, __pyx_k_error_migrating_image_s, sizeof(__pyx_k_error_migrating_image_s), 0, 0, 1, 0},
63992 {&__pyx_kp_s_error_moving_image_to_trash, __pyx_k_error_moving_image_to_trash, sizeof(__pyx_k_error_moving_image_to_trash), 0, 0, 1, 0},
63993 {&__pyx_kp_s_error_opening_image_s_at_snapsho, __pyx_k_error_opening_image_s_at_snapsho, sizeof(__pyx_k_error_opening_image_s_at_snapsho), 0, 0, 1, 0},
63994 {&__pyx_kp_s_error_promoting_image_s_to_prima, __pyx_k_error_promoting_image_s_to_prima, sizeof(__pyx_k_error_promoting_image_s_to_prima), 0, 0, 1, 0},
63995 {&__pyx_kp_s_error_protecting_snapshot_s_s, __pyx_k_error_protecting_snapshot_s_s, sizeof(__pyx_k_error_protecting_snapshot_s_s), 0, 0, 1, 0},
63996 {&__pyx_kp_s_error_purging_images_from_trash, __pyx_k_error_purging_images_from_trash, sizeof(__pyx_k_error_purging_images_from_trash), 0, 0, 1, 0},
63997 {&__pyx_kp_s_error_reading_s_ld_ld, __pyx_k_error_reading_s_ld_ld, sizeof(__pyx_k_error_reading_s_ld_ld), 0, 0, 1, 0},
63998 {&__pyx_kp_s_error_rebuilding_object_map_s, __pyx_k_error_rebuilding_object_map_s, sizeof(__pyx_k_error_rebuilding_object_map_s), 0, 0, 1, 0},
63999 {&__pyx_kp_s_error_releasing_lock_on_image, __pyx_k_error_releasing_lock_on_image, sizeof(__pyx_k_error_releasing_lock_on_image), 0, 0, 1, 0},
64000 {&__pyx_kp_s_error_removing_group, __pyx_k_error_removing_group, sizeof(__pyx_k_error_removing_group), 0, 0, 1, 0},
64001 {&__pyx_kp_s_error_removing_group_snapshot, __pyx_k_error_removing_group_snapshot, sizeof(__pyx_k_error_removing_group_snapshot), 0, 0, 1, 0},
64002 {&__pyx_kp_s_error_removing_image, __pyx_k_error_removing_image, sizeof(__pyx_k_error_removing_image), 0, 0, 1, 0},
64003 {&__pyx_kp_s_error_removing_image_from_group, __pyx_k_error_removing_image_from_group, sizeof(__pyx_k_error_removing_image_from_group), 0, 0, 1, 0},
64004 {&__pyx_kp_s_error_removing_metadata_s, __pyx_k_error_removing_metadata_s, sizeof(__pyx_k_error_removing_metadata_s), 0, 0, 1, 0},
64005 {&__pyx_kp_s_error_removing_metadata_s_for_im, __pyx_k_error_removing_metadata_s_for_im, sizeof(__pyx_k_error_removing_metadata_s_for_im), 0, 0, 1, 0},
64006 {&__pyx_kp_s_error_removing_mirror_peer, __pyx_k_error_removing_mirror_peer, sizeof(__pyx_k_error_removing_mirror_peer), 0, 0, 1, 0},
64007 {&__pyx_kp_s_error_removing_namespace, __pyx_k_error_removing_namespace, sizeof(__pyx_k_error_removing_namespace), 0, 0, 1, 0},
64008 {&__pyx_kp_s_error_removing_snapshot_limit_fo, __pyx_k_error_removing_snapshot_limit_fo, sizeof(__pyx_k_error_removing_snapshot_limit_fo), 0, 0, 1, 0},
64009 {&__pyx_kp_s_error_removing_snapshot_s_from_s, __pyx_k_error_removing_snapshot_s_from_s, sizeof(__pyx_k_error_removing_snapshot_s_from_s), 0, 0, 1, 0},
64010 {&__pyx_kp_s_error_removing_snapshot_s_from_s_2, __pyx_k_error_removing_snapshot_s_from_s_2, sizeof(__pyx_k_error_removing_snapshot_s_from_s_2), 0, 0, 1, 0},
64011 {&__pyx_kp_s_error_renaming_group, __pyx_k_error_renaming_group, sizeof(__pyx_k_error_renaming_group), 0, 0, 1, 0},
64012 {&__pyx_kp_s_error_renaming_group_snapshot, __pyx_k_error_renaming_group_snapshot, sizeof(__pyx_k_error_renaming_group_snapshot), 0, 0, 1, 0},
64013 {&__pyx_kp_s_error_renaming_image, __pyx_k_error_renaming_image, sizeof(__pyx_k_error_renaming_image), 0, 0, 1, 0},
64014 {&__pyx_kp_s_error_renaming_snapshot_of_s_fro, __pyx_k_error_renaming_snapshot_of_s_fro, sizeof(__pyx_k_error_renaming_snapshot_of_s_fro), 0, 0, 1, 0},
64015 {&__pyx_kp_s_error_resizing_image_s, __pyx_k_error_resizing_image_s, sizeof(__pyx_k_error_resizing_image_s), 0, 0, 1, 0},
64016 {&__pyx_kp_s_error_restoring_image_from_trash, __pyx_k_error_restoring_image_from_trash, sizeof(__pyx_k_error_restoring_image_from_trash), 0, 0, 1, 0},
64017 {&__pyx_kp_s_error_retrieving_image_from_tras, __pyx_k_error_retrieving_image_from_tras, sizeof(__pyx_k_error_retrieving_image_from_tras), 0, 0, 1, 0},
64018 {&__pyx_kp_s_error_retrieving_pool_stats, __pyx_k_error_retrieving_pool_stats, sizeof(__pyx_k_error_retrieving_pool_stats), 0, 0, 1, 0},
64019 {&__pyx_kp_s_error_rolling_back_group_to_snap, __pyx_k_error_rolling_back_group_to_snap, sizeof(__pyx_k_error_rolling_back_group_to_snap), 0, 0, 1, 0},
64020 {&__pyx_kp_s_error_rolling_back_image_s_to_sn, __pyx_k_error_rolling_back_image_s_to_sn, sizeof(__pyx_k_error_rolling_back_image_s_to_sn), 0, 0, 1, 0},
64021 {&__pyx_kp_s_error_setting_image_s_to_snapsho, __pyx_k_error_setting_image_s_to_snapsho, sizeof(__pyx_k_error_setting_image_s_to_snapsho), 0, 0, 1, 0},
64022 {&__pyx_kp_s_error_setting_image_s_to_snapsho_2, __pyx_k_error_setting_image_s_to_snapsho_2, sizeof(__pyx_k_error_setting_image_s_to_snapsho_2), 0, 0, 1, 0},
64023 {&__pyx_kp_s_error_setting_metadata_s, __pyx_k_error_setting_metadata_s, sizeof(__pyx_k_error_setting_metadata_s), 0, 0, 1, 0},
64024 {&__pyx_kp_s_error_setting_metadata_s_for_ima, __pyx_k_error_setting_metadata_s_for_ima, sizeof(__pyx_k_error_setting_metadata_s_for_ima), 0, 0, 1, 0},
64025 {&__pyx_kp_s_error_setting_mirror_mode, __pyx_k_error_setting_mirror_mode, sizeof(__pyx_k_error_setting_mirror_mode), 0, 0, 1, 0},
64026 {&__pyx_kp_s_error_setting_mirror_peer_attrib, __pyx_k_error_setting_mirror_peer_attrib, sizeof(__pyx_k_error_setting_mirror_peer_attrib), 0, 0, 1, 0},
64027 {&__pyx_kp_s_error_setting_mirror_peer_client, __pyx_k_error_setting_mirror_peer_client, sizeof(__pyx_k_error_setting_mirror_peer_client), 0, 0, 1, 0},
64028 {&__pyx_kp_s_error_setting_mirror_peer_cluste, __pyx_k_error_setting_mirror_peer_cluste, sizeof(__pyx_k_error_setting_mirror_peer_cluste), 0, 0, 1, 0},
64029 {&__pyx_kp_s_error_setting_snapshot_limit_for, __pyx_k_error_setting_snapshot_limit_for, sizeof(__pyx_k_error_setting_snapshot_limit_for), 0, 0, 1, 0},
64030 {&__pyx_kp_s_error_sparsifying_s, __pyx_k_error_sparsifying_s, sizeof(__pyx_k_error_sparsifying_s), 0, 0, 1, 0},
64031 {&__pyx_kp_s_error_to_resync_image_s, __pyx_k_error_to_resync_image_s, sizeof(__pyx_k_error_to_resync_image_s), 0, 0, 1, 0},
64032 {&__pyx_kp_s_error_unlocking_image, __pyx_k_error_unlocking_image, sizeof(__pyx_k_error_unlocking_image), 0, 0, 1, 0},
64033 {&__pyx_kp_s_error_unprotecting_snapshot_s_s, __pyx_k_error_unprotecting_snapshot_s_s, sizeof(__pyx_k_error_unprotecting_snapshot_s_s), 0, 0, 1, 0},
64034 {&__pyx_kp_s_error_updating_features_for_imag, __pyx_k_error_updating_features_for_imag, sizeof(__pyx_k_error_updating_features_for_imag), 0, 0, 1, 0},
64035 {&__pyx_kp_s_error_verifying_namespace, __pyx_k_error_verifying_namespace, sizeof(__pyx_k_error_verifying_namespace), 0, 0, 1, 0},
64036 {&__pyx_kp_s_error_while_closing_image_s, __pyx_k_error_while_closing_image_s, sizeof(__pyx_k_error_while_closing_image_s), 0, 0, 1, 0},
64037 {&__pyx_kp_s_error_writing_s_ld_ld, __pyx_k_error_writing_s_ld_ld, sizeof(__pyx_k_error_writing_s_ld_ld), 0, 0, 1, 0},
64038 {&__pyx_kp_s_error_writing_to_s, __pyx_k_error_writing_to_s, sizeof(__pyx_k_error_writing_to_s), 0, 0, 1, 0},
64039 {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
64040 {&__pyx_n_s_exclusive, __pyx_k_exclusive, sizeof(__pyx_k_exclusive), 0, 0, 1, 1},
64041 {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
64042 {&__pyx_n_s_expire_epoch_ts, __pyx_k_expire_epoch_ts, sizeof(__pyx_k_expire_epoch_ts), 0, 0, 1, 1},
64043 {&__pyx_n_s_expire_ts, __pyx_k_expire_ts, sizeof(__pyx_k_expire_ts), 0, 0, 1, 1},
64044 {&__pyx_n_s_expire_ts_2, __pyx_k_expire_ts_2, sizeof(__pyx_k_expire_ts_2), 0, 0, 1, 1},
64045 {&__pyx_n_s_extra, __pyx_k_extra, sizeof(__pyx_k_extra), 0, 0, 1, 1},
64046 {&__pyx_n_s_fadvise_flags, __pyx_k_fadvise_flags, sizeof(__pyx_k_fadvise_flags), 0, 0, 1, 1},
64047 {&__pyx_n_s_features, __pyx_k_features, sizeof(__pyx_k_features), 0, 0, 1, 1},
64048 {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
64049 {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
64050 {&__pyx_n_s_force_2, __pyx_k_force_2, sizeof(__pyx_k_force_2), 0, 0, 1, 1},
64051 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
64052 {&__pyx_kp_s_format_1_images_do_not_support_f, __pyx_k_format_1_images_do_not_support_f, sizeof(__pyx_k_format_1_images_do_not_support_f), 0, 0, 1, 0},
64053 {&__pyx_n_s_from_snapshot, __pyx_k_from_snapshot, sizeof(__pyx_k_from_snapshot), 0, 0, 1, 1},
64054 {&__pyx_n_s_fromtimestamp, __pyx_k_fromtimestamp, sizeof(__pyx_k_fromtimestamp), 0, 0, 1, 1},
64055 {&__pyx_n_s_get_completion, __pyx_k_get_completion, sizeof(__pyx_k_get_completion), 0, 0, 1, 1},
64056 {&__pyx_n_s_get_name, __pyx_k_get_name, sizeof(__pyx_k_get_name), 0, 0, 1, 1},
64057 {&__pyx_n_s_get_next_chunk, __pyx_k_get_next_chunk, sizeof(__pyx_k_get_next_chunk), 0, 0, 1, 1},
64058 {&__pyx_n_s_get_return_value, __pyx_k_get_return_value, sizeof(__pyx_k_get_return_value), 0, 0, 1, 1},
64059 {&__pyx_n_s_global_id, __pyx_k_global_id, sizeof(__pyx_k_global_id), 0, 0, 1, 1},
64060 {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
64061 {&__pyx_n_s_group_create, __pyx_k_group_create, sizeof(__pyx_k_group_create), 0, 0, 1, 1},
64062 {&__pyx_n_s_group_list, __pyx_k_group_list, sizeof(__pyx_k_group_list), 0, 0, 1, 1},
64063 {&__pyx_n_s_group_remove, __pyx_k_group_remove, sizeof(__pyx_k_group_remove), 0, 0, 1, 1},
64064 {&__pyx_n_s_group_rename, __pyx_k_group_rename, sizeof(__pyx_k_group_rename), 0, 0, 1, 1},
64065 {&__pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_k_home_bhubbard_working_src_ceph, sizeof(__pyx_k_home_bhubbard_working_src_ceph), 0, 0, 1, 0},
64066 {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
64067 {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
64068 {&__pyx_n_s_image, __pyx_k_image, sizeof(__pyx_k_image), 0, 0, 1, 1},
64069 {&__pyx_n_s_image_count, __pyx_k_image_count, sizeof(__pyx_k_image_count), 0, 0, 1, 1},
64070 {&__pyx_n_s_image_count_2, __pyx_k_image_count_2, sizeof(__pyx_k_image_count_2), 0, 0, 1, 1},
64071 {&__pyx_n_s_image_id, __pyx_k_image_id, sizeof(__pyx_k_image_id), 0, 0, 1, 1},
64072 {&__pyx_n_s_image_id_2, __pyx_k_image_id_2, sizeof(__pyx_k_image_id_2), 0, 0, 1, 1},
64073 {&__pyx_n_s_image_ioctx, __pyx_k_image_ioctx, sizeof(__pyx_k_image_ioctx), 0, 0, 1, 1},
64074 {&__pyx_n_s_image_max_provisioned_bytes, __pyx_k_image_max_provisioned_bytes, sizeof(__pyx_k_image_max_provisioned_bytes), 0, 0, 1, 1},
64075 {&__pyx_n_s_image_max_provisioned_bytes_2, __pyx_k_image_max_provisioned_bytes_2, sizeof(__pyx_k_image_max_provisioned_bytes_2), 0, 0, 1, 1},
64076 {&__pyx_n_s_image_name, __pyx_k_image_name, sizeof(__pyx_k_image_name), 0, 0, 1, 1},
64077 {&__pyx_n_s_image_name_2, __pyx_k_image_name_2, sizeof(__pyx_k_image_name_2), 0, 0, 1, 1},
64078 {&__pyx_kp_s_image_name_or_image_id_was_not_s, __pyx_k_image_name_or_image_id_was_not_s, sizeof(__pyx_k_image_name_or_image_id_was_not_s), 0, 0, 1, 0},
64079 {&__pyx_n_s_image_provisioned_bytes, __pyx_k_image_provisioned_bytes, sizeof(__pyx_k_image_provisioned_bytes), 0, 0, 1, 1},
64080 {&__pyx_n_s_image_provisioned_bytes_2, __pyx_k_image_provisioned_bytes_2, sizeof(__pyx_k_image_provisioned_bytes_2), 0, 0, 1, 1},
64081 {&__pyx_n_s_image_snap_count, __pyx_k_image_snap_count, sizeof(__pyx_k_image_snap_count), 0, 0, 1, 1},
64082 {&__pyx_n_s_image_snap_count_2, __pyx_k_image_snap_count_2, sizeof(__pyx_k_image_snap_count_2), 0, 0, 1, 1},
64083 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
64084 {&__pyx_n_s_include_parent, __pyx_k_include_parent, sizeof(__pyx_k_include_parent), 0, 0, 1, 1},
64085 {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
64086 {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
64087 {&__pyx_n_s_ioctx, __pyx_k_ioctx, sizeof(__pyx_k_ioctx), 0, 0, 1, 1},
64088 {&__pyx_n_s_ioctx_2, __pyx_k_ioctx_2, sizeof(__pyx_k_ioctx_2), 0, 0, 1, 1},
64089 {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
64090 {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
64091 {&__pyx_n_s_iterate_cb, __pyx_k_iterate_cb, sizeof(__pyx_k_iterate_cb), 0, 0, 1, 1},
64092 {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
64093 {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
64094 {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
64095 {&__pyx_n_s_key_2, __pyx_k_key_2, sizeof(__pyx_k_key_2), 0, 0, 1, 1},
64096 {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
64097 {&__pyx_n_s_keys_2, __pyx_k_keys_2, sizeof(__pyx_k_keys_2), 0, 0, 1, 1},
64098 {&__pyx_n_s_keys_size, __pyx_k_keys_size, sizeof(__pyx_k_keys_size), 0, 0, 1, 1},
64099 {&__pyx_n_s_keys_str, __pyx_k_keys_str, sizeof(__pyx_k_keys_str), 0, 0, 1, 1},
64100 {&__pyx_n_s_last_read, __pyx_k_last_read, sizeof(__pyx_k_last_read), 0, 0, 1, 1},
64101 {&__pyx_n_s_last_update, __pyx_k_last_update, sizeof(__pyx_k_last_update), 0, 0, 1, 1},
64102 {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
64103 {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
64104 {&__pyx_n_s_list2, __pyx_k_list2, sizeof(__pyx_k_list2), 0, 0, 1, 1},
64105 {&__pyx_n_s_lock_mode, __pyx_k_lock_mode, sizeof(__pyx_k_lock_mode), 0, 0, 1, 1},
64106 {&__pyx_n_s_lock_owner, __pyx_k_lock_owner, sizeof(__pyx_k_lock_owner), 0, 0, 1, 1},
64107 {&__pyx_n_s_lockers, __pyx_k_lockers, sizeof(__pyx_k_lockers), 0, 0, 1, 1},
64108 {&__pyx_kp_s_logic_error_rbd_write_s_returned, __pyx_k_logic_error_rbd_write_s_returned, sizeof(__pyx_k_logic_error_rbd_write_s_returned), 0, 0, 1, 0},
64109 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
64110 {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
64111 {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
64112 {&__pyx_n_s_maxlen, __pyx_k_maxlen, sizeof(__pyx_k_maxlen), 0, 0, 1, 1},
64113 {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
64114 {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
64115 {&__pyx_n_s_migration_abort, __pyx_k_migration_abort, sizeof(__pyx_k_migration_abort), 0, 0, 1, 1},
64116 {&__pyx_n_s_migration_commit, __pyx_k_migration_commit, sizeof(__pyx_k_migration_commit), 0, 0, 1, 1},
64117 {&__pyx_n_s_migration_execute, __pyx_k_migration_execute, sizeof(__pyx_k_migration_execute), 0, 0, 1, 1},
64118 {&__pyx_n_s_migration_prepare, __pyx_k_migration_prepare, sizeof(__pyx_k_migration_prepare), 0, 0, 1, 1},
64119 {&__pyx_n_s_migration_status, __pyx_k_migration_status, sizeof(__pyx_k_migration_status), 0, 0, 1, 1},
64120 {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
64121 {&__pyx_n_s_mirror_image_instance_id_list, __pyx_k_mirror_image_instance_id_list, sizeof(__pyx_k_mirror_image_instance_id_list), 0, 0, 1, 1},
64122 {&__pyx_n_s_mirror_image_status_list, __pyx_k_mirror_image_status_list, sizeof(__pyx_k_mirror_image_status_list), 0, 0, 1, 1},
64123 {&__pyx_n_s_mirror_image_status_summary, __pyx_k_mirror_image_status_summary, sizeof(__pyx_k_mirror_image_status_summary), 0, 0, 1, 1},
64124 {&__pyx_n_s_mirror_mode, __pyx_k_mirror_mode, sizeof(__pyx_k_mirror_mode), 0, 0, 1, 1},
64125 {&__pyx_n_s_mirror_mode_2, __pyx_k_mirror_mode_2, sizeof(__pyx_k_mirror_mode_2), 0, 0, 1, 1},
64126 {&__pyx_n_s_mirror_mode_get, __pyx_k_mirror_mode_get, sizeof(__pyx_k_mirror_mode_get), 0, 0, 1, 1},
64127 {&__pyx_n_s_mirror_mode_set, __pyx_k_mirror_mode_set, sizeof(__pyx_k_mirror_mode_set), 0, 0, 1, 1},
64128 {&__pyx_n_s_mirror_peer_add, __pyx_k_mirror_peer_add, sizeof(__pyx_k_mirror_peer_add), 0, 0, 1, 1},
64129 {&__pyx_n_s_mirror_peer_get_attributes, __pyx_k_mirror_peer_get_attributes, sizeof(__pyx_k_mirror_peer_get_attributes), 0, 0, 1, 1},
64130 {&__pyx_n_s_mirror_peer_list, __pyx_k_mirror_peer_list, sizeof(__pyx_k_mirror_peer_list), 0, 0, 1, 1},
64131 {&__pyx_n_s_mirror_peer_remove, __pyx_k_mirror_peer_remove, sizeof(__pyx_k_mirror_peer_remove), 0, 0, 1, 1},
64132 {&__pyx_n_s_mirror_peer_set_attributes, __pyx_k_mirror_peer_set_attributes, sizeof(__pyx_k_mirror_peer_set_attributes), 0, 0, 1, 1},
64133 {&__pyx_n_s_mirror_peer_set_client, __pyx_k_mirror_peer_set_client, sizeof(__pyx_k_mirror_peer_set_client), 0, 0, 1, 1},
64134 {&__pyx_n_s_mirror_peer_set_cluster, __pyx_k_mirror_peer_set_cluster, sizeof(__pyx_k_mirror_peer_set_cluster), 0, 0, 1, 1},
64135 {&__pyx_n_s_mktime, __pyx_k_mktime, sizeof(__pyx_k_mktime), 0, 0, 1, 1},
64136 {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
64137 {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
64138 {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
64139 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
64140 {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
64141 {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
64142 {&__pyx_n_s_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 0, 0, 1, 1},
64143 {&__pyx_n_s_namespace_create, __pyx_k_namespace_create, sizeof(__pyx_k_namespace_create), 0, 0, 1, 1},
64144 {&__pyx_n_s_namespace_exists, __pyx_k_namespace_exists, sizeof(__pyx_k_namespace_exists), 0, 0, 1, 1},
64145 {&__pyx_n_s_namespace_list, __pyx_k_namespace_list, sizeof(__pyx_k_namespace_list), 0, 0, 1, 1},
64146 {&__pyx_n_s_namespace_remove, __pyx_k_namespace_remove, sizeof(__pyx_k_namespace_remove), 0, 0, 1, 1},
64147 {&__pyx_n_s_new_snap_name, __pyx_k_new_snap_name, sizeof(__pyx_k_new_snap_name), 0, 0, 1, 1},
64148 {&__pyx_kp_s_no_metadata_s, __pyx_k_no_metadata_s, sizeof(__pyx_k_no_metadata_s), 0, 0, 1, 0},
64149 {&__pyx_kp_s_no_metadata_s_for_image_s, __pyx_k_no_metadata_s_for_image_s, sizeof(__pyx_k_no_metadata_s_for_image_s), 0, 0, 1, 0},
64150 {&__pyx_n_s_num_objs, __pyx_k_num_objs, sizeof(__pyx_k_num_objs), 0, 0, 1, 1},
64151 {&__pyx_n_s_obj_size, __pyx_k_obj_size, sizeof(__pyx_k_obj_size), 0, 0, 1, 1},
64152 {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
64153 {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
64154 {&__pyx_n_s_old_format, __pyx_k_old_format, sizeof(__pyx_k_old_format), 0, 0, 1, 1},
64155 {&__pyx_n_s_old_snap_name, __pyx_k_old_snap_name, sizeof(__pyx_k_old_snap_name), 0, 0, 1, 1},
64156 {&__pyx_n_s_on_progress, __pyx_k_on_progress, sizeof(__pyx_k_on_progress), 0, 0, 1, 1},
64157 {&__pyx_n_s_oncomplete, __pyx_k_oncomplete, sizeof(__pyx_k_oncomplete), 0, 0, 1, 1},
64158 {&__pyx_n_s_oncomplete_2, __pyx_k_oncomplete_2, sizeof(__pyx_k_oncomplete_2), 0, 0, 1, 1},
64159 {&__pyx_kp_s_only_need_to_specify_image_name, __pyx_k_only_need_to_specify_image_name, sizeof(__pyx_k_only_need_to_specify_image_name), 0, 0, 1, 0},
64160 {&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1},
64161 {&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1},
64162 {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
64163 {&__pyx_n_s_order_2, __pyx_k_order_2, sizeof(__pyx_k_order_2), 0, 0, 1, 1},
64164 {&__pyx_n_s_original_name, __pyx_k_original_name, sizeof(__pyx_k_original_name), 0, 0, 1, 1},
64165 {&__pyx_n_s_owner, __pyx_k_owner, sizeof(__pyx_k_owner), 0, 0, 1, 1},
64166 {&__pyx_n_s_p_ioctx, __pyx_k_p_ioctx, sizeof(__pyx_k_p_ioctx), 0, 0, 1, 1},
64167 {&__pyx_n_s_p_ioctx_2, __pyx_k_p_ioctx_2, sizeof(__pyx_k_p_ioctx_2), 0, 0, 1, 1},
64168 {&__pyx_n_s_p_name, __pyx_k_p_name, sizeof(__pyx_k_p_name), 0, 0, 1, 1},
64169 {&__pyx_n_s_p_name_2, __pyx_k_p_name_2, sizeof(__pyx_k_p_name_2), 0, 0, 1, 1},
64170 {&__pyx_n_s_p_snapname, __pyx_k_p_snapname, sizeof(__pyx_k_p_snapname), 0, 0, 1, 1},
64171 {&__pyx_n_s_p_snapname_2, __pyx_k_p_snapname_2, sizeof(__pyx_k_p_snapname_2), 0, 0, 1, 1},
64172 {&__pyx_n_s_parent_name, __pyx_k_parent_name, sizeof(__pyx_k_parent_name), 0, 0, 1, 1},
64173 {&__pyx_n_s_parent_pool, __pyx_k_parent_pool, sizeof(__pyx_k_parent_pool), 0, 0, 1, 1},
64174 {&__pyx_n_s_pool, __pyx_k_pool, sizeof(__pyx_k_pool), 0, 0, 1, 1},
64175 {&__pyx_n_s_pool_init, __pyx_k_pool_init, sizeof(__pyx_k_pool_init), 0, 0, 1, 1},
64176 {&__pyx_n_s_pool_metadata_get, __pyx_k_pool_metadata_get, sizeof(__pyx_k_pool_metadata_get), 0, 0, 1, 1},
64177 {&__pyx_n_s_pool_metadata_list, __pyx_k_pool_metadata_list, sizeof(__pyx_k_pool_metadata_list), 0, 0, 1, 1},
64178 {&__pyx_n_s_pool_metadata_remove, __pyx_k_pool_metadata_remove, sizeof(__pyx_k_pool_metadata_remove), 0, 0, 1, 1},
64179 {&__pyx_n_s_pool_metadata_set, __pyx_k_pool_metadata_set, sizeof(__pyx_k_pool_metadata_set), 0, 0, 1, 1},
64180 {&__pyx_n_s_pool_namespace, __pyx_k_pool_namespace, sizeof(__pyx_k_pool_namespace), 0, 0, 1, 1},
64181 {&__pyx_n_s_pool_stats_get, __pyx_k_pool_stats_get, sizeof(__pyx_k_pool_stats_get), 0, 0, 1, 1},
64182 {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
64183 {&__pyx_n_s_primary, __pyx_k_primary, sizeof(__pyx_k_primary), 0, 0, 1, 1},
64184 {&__pyx_n_s_prog_arg, __pyx_k_prog_arg, sizeof(__pyx_k_prog_arg), 0, 0, 1, 1},
64185 {&__pyx_n_s_prog_cb, __pyx_k_prog_cb, sizeof(__pyx_k_prog_cb), 0, 0, 1, 1},
64186 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
64187 {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
64188 {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
64189 {&__pyx_n_s_rbd, __pyx_k_rbd, sizeof(__pyx_k_rbd), 0, 0, 1, 1},
64190 {&__pyx_kp_s_rbd_Image_ioctx_r, __pyx_k_rbd_Image_ioctx_r, sizeof(__pyx_k_rbd_Image_ioctx_r), 0, 0, 1, 0},
64191 {&__pyx_n_s_read_only, __pyx_k_read_only, sizeof(__pyx_k_read_only), 0, 0, 1, 1},
64192 {&__pyx_kp_s_realloc_failed, __pyx_k_realloc_failed, sizeof(__pyx_k_realloc_failed), 0, 0, 1, 0},
64193 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
64194 {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
64195 {&__pyx_n_s_rename, __pyx_k_rename, sizeof(__pyx_k_rename), 0, 0, 1, 1},
64196 {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
64197 {&__pyx_n_s_return_value, __pyx_k_return_value, sizeof(__pyx_k_return_value), 0, 0, 1, 1},
64198 {&__pyx_kp_s_s_must_be_a_string, __pyx_k_s_must_be_a_string, sizeof(__pyx_k_s_must_be_a_string), 0, 0, 1, 0},
64199 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
64200 {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
64201 {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
64202 {&__pyx_n_s_size_2, __pyx_k_size_2, sizeof(__pyx_k_size_2), 0, 0, 1, 1},
64203 {&__pyx_n_s_snap_get_group_namespace, __pyx_k_snap_get_group_namespace, sizeof(__pyx_k_snap_get_group_namespace), 0, 0, 1, 1},
64204 {&__pyx_n_s_snap_get_namespace_type, __pyx_k_snap_get_namespace_type, sizeof(__pyx_k_snap_get_namespace_type), 0, 0, 1, 1},
64205 {&__pyx_n_s_snap_get_trash_namespace, __pyx_k_snap_get_trash_namespace, sizeof(__pyx_k_snap_get_trash_namespace), 0, 0, 1, 1},
64206 {&__pyx_n_s_snap_name, __pyx_k_snap_name, sizeof(__pyx_k_snap_name), 0, 0, 1, 1},
64207 {&__pyx_n_s_snapshot, __pyx_k_snapshot, sizeof(__pyx_k_snapshot), 0, 0, 1, 1},
64208 {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
64209 {&__pyx_n_s_source_image_id, __pyx_k_source_image_id, sizeof(__pyx_k_source_image_id), 0, 0, 1, 1},
64210 {&__pyx_n_s_source_image_name, __pyx_k_source_image_name, sizeof(__pyx_k_source_image_name), 0, 0, 1, 1},
64211 {&__pyx_n_s_source_pool_id, __pyx_k_source_pool_id, sizeof(__pyx_k_source_pool_id), 0, 0, 1, 1},
64212 {&__pyx_n_s_source_pool_namespace, __pyx_k_source_pool_namespace, sizeof(__pyx_k_source_pool_namespace), 0, 0, 1, 1},
64213 {&__pyx_n_s_source_string, __pyx_k_source_string, sizeof(__pyx_k_source_string), 0, 0, 1, 1},
64214 {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
64215 {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
64216 {&__pyx_n_s_src_2, __pyx_k_src_2, sizeof(__pyx_k_src_2), 0, 0, 1, 1},
64217 {&__pyx_n_s_srcname, __pyx_k_srcname, sizeof(__pyx_k_srcname), 0, 0, 1, 1},
64218 {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
64219 {&__pyx_n_s_state_description, __pyx_k_state_description, sizeof(__pyx_k_state_description), 0, 0, 1, 1},
64220 {&__pyx_n_s_states, __pyx_k_states, sizeof(__pyx_k_states), 0, 0, 1, 1},
64221 {&__pyx_n_s_stats, __pyx_k_stats, sizeof(__pyx_k_stats), 0, 0, 1, 1},
64222 {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1},
64223 {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
64224 {&__pyx_n_s_stripe_count, __pyx_k_stripe_count, sizeof(__pyx_k_stripe_count), 0, 0, 1, 1},
64225 {&__pyx_n_s_stripe_unit, __pyx_k_stripe_unit, sizeof(__pyx_k_stripe_unit), 0, 0, 1, 1},
64226 {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
64227 {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
64228 {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
64229 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
64230 {&__pyx_n_s_threshold, __pyx_k_threshold, sizeof(__pyx_k_threshold), 0, 0, 1, 1},
64231 {&__pyx_n_s_threshold_2, __pyx_k_threshold_2, sizeof(__pyx_k_threshold_2), 0, 0, 1, 1},
64232 {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
64233 {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
64234 {&__pyx_n_s_timetuple, __pyx_k_timetuple, sizeof(__pyx_k_timetuple), 0, 0, 1, 1},
64235 {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
64236 {&__pyx_n_s_trash, __pyx_k_trash, sizeof(__pyx_k_trash), 0, 0, 1, 1},
64237 {&__pyx_n_s_trash_count, __pyx_k_trash_count, sizeof(__pyx_k_trash_count), 0, 0, 1, 1},
64238 {&__pyx_n_s_trash_count_2, __pyx_k_trash_count_2, sizeof(__pyx_k_trash_count_2), 0, 0, 1, 1},
64239 {&__pyx_n_s_trash_get, __pyx_k_trash_get, sizeof(__pyx_k_trash_get), 0, 0, 1, 1},
64240 {&__pyx_n_s_trash_list, __pyx_k_trash_list, sizeof(__pyx_k_trash_list), 0, 0, 1, 1},
64241 {&__pyx_n_s_trash_max_provisioned_bytes, __pyx_k_trash_max_provisioned_bytes, sizeof(__pyx_k_trash_max_provisioned_bytes), 0, 0, 1, 1},
64242 {&__pyx_n_s_trash_max_provisioned_bytes_2, __pyx_k_trash_max_provisioned_bytes_2, sizeof(__pyx_k_trash_max_provisioned_bytes_2), 0, 0, 1, 1},
64243 {&__pyx_n_s_trash_move, __pyx_k_trash_move, sizeof(__pyx_k_trash_move), 0, 0, 1, 1},
64244 {&__pyx_n_s_trash_provisioned_bytes, __pyx_k_trash_provisioned_bytes, sizeof(__pyx_k_trash_provisioned_bytes), 0, 0, 1, 1},
64245 {&__pyx_n_s_trash_provisioned_bytes_2, __pyx_k_trash_provisioned_bytes_2, sizeof(__pyx_k_trash_provisioned_bytes_2), 0, 0, 1, 1},
64246 {&__pyx_n_s_trash_purge, __pyx_k_trash_purge, sizeof(__pyx_k_trash_purge), 0, 0, 1, 1},
64247 {&__pyx_n_s_trash_remove, __pyx_k_trash_remove, sizeof(__pyx_k_trash_remove), 0, 0, 1, 1},
64248 {&__pyx_n_s_trash_restore, __pyx_k_trash_restore, sizeof(__pyx_k_trash_restore), 0, 0, 1, 1},
64249 {&__pyx_n_s_trash_snap_count, __pyx_k_trash_snap_count, sizeof(__pyx_k_trash_snap_count), 0, 0, 1, 1},
64250 {&__pyx_n_s_trash_snap_count_2, __pyx_k_trash_snap_count_2, sizeof(__pyx_k_trash_snap_count_2), 0, 0, 1, 1},
64251 {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
64252 {&__pyx_n_s_up, __pyx_k_up, sizeof(__pyx_k_up), 0, 0, 1, 1},
64253 {&__pyx_n_s_utcfromtimestamp, __pyx_k_utcfromtimestamp, sizeof(__pyx_k_utcfromtimestamp), 0, 0, 1, 1},
64254 {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
64255 {&__pyx_n_s_uuid, __pyx_k_uuid, sizeof(__pyx_k_uuid), 0, 0, 1, 1},
64256 {&__pyx_n_s_uuid_2, __pyx_k_uuid_2, sizeof(__pyx_k_uuid_2), 0, 0, 1, 1},
64257 {&__pyx_n_s_uuid_max_length, __pyx_k_uuid_max_length, sizeof(__pyx_k_uuid_max_length), 0, 0, 1, 1},
64258 {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
64259 {&__pyx_n_s_vals, __pyx_k_vals, sizeof(__pyx_k_vals), 0, 0, 1, 1},
64260 {&__pyx_n_s_vals_2, __pyx_k_vals_2, sizeof(__pyx_k_vals_2), 0, 0, 1, 1},
64261 {&__pyx_n_s_vals_size, __pyx_k_vals_size, sizeof(__pyx_k_vals_size), 0, 0, 1, 1},
64262 {&__pyx_n_s_vals_str, __pyx_k_vals_str, sizeof(__pyx_k_vals_str), 0, 0, 1, 1},
64263 {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
64264 {&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
64265 {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
64266 {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
64267 {&__pyx_n_s_whole_object, __pyx_k_whole_object, sizeof(__pyx_k_whole_object), 0, 0, 1, 1},
64268 {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
64269 {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
64270 {0, 0, 0, 0, 0, 0, 0}
64271};
64272static int __Pyx_InitCachedBuiltins(void) {
64273 __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__64273; goto __pyx_L1_error;}
64274 __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__64274; goto __pyx_L1_error;}
64275 __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__64275; goto __pyx_L1_error;}
64276 __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__64276; goto __pyx_L1_error;}
64277 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__64277; goto __pyx_L1_error;}
64278 __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; __pyx_clineno = __LINE__64278; goto __pyx_L1_error;}
64279 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__64279; goto __pyx_L1_error;}
64280 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__64280; goto __pyx_L1_error;}
64281 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__64281; goto __pyx_L1_error;}
64282 __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__64282; goto __pyx_L1_error;}
64283 return 0;
64284 __pyx_L1_error:;
64285 return -1;
64286}
64287
64288static int __Pyx_InitCachedConstants(void) {
64289 __Pyx_RefNannyDeclarations
64290 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
64291
64292 /* "rbd.pyx":914
64293 * elif isinstance(val, str):
64294 * return val.encode(encoding)
64295 * elif sys.version_info < (3, 0) and isinstance(val, unicode): # <<<<<<<<<<<<<<
64296 * return val.encode(encoding)
64297 * else:
64298 */
64299 __pyx_tuple__2 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_0); if (unlikely(!__pyx_tuple__2)__builtin_expect(!!(!__pyx_tuple__2), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__64299; goto __pyx_L1_error;}
64300 __Pyx_GOTREF(__pyx_tuple__2);
64301 __Pyx_GIVEREF(__pyx_tuple__2);
64302
64303 /* "rbd.pyx":940
64304 * cdef void *ret = realloc(ptr, size)
64305 * if ret == NULL:
64306 * raise MemoryError("realloc failed") # <<<<<<<<<<<<<<
64307 * return ret
64308 *
64309 */
64310 __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_realloc_failed); if (unlikely(!__pyx_tuple__3)__builtin_expect(!!(!__pyx_tuple__3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__64310; goto __pyx_L1_error;}
64311 __Pyx_GOTREF(__pyx_tuple__3);
64312 __Pyx_GIVEREF(__pyx_tuple__3);
64313
64314 /* "rbd.pyx":1116
64315 * ((stripe_count is not None) and stripe_count != 0) or
64316 * data_pool):
64317 * raise InvalidArgument('format 1 images do not support feature ' # <<<<<<<<<<<<<<
64318 * 'masks, non-default striping, nor data '
64319 * 'pool')
64320 */
64321 __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_format_1_images_do_not_support_f); if (unlikely(!__pyx_tuple__4)__builtin_expect(!!(!__pyx_tuple__4), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__64321; goto __pyx_L1_error;}
64322 __Pyx_GOTREF(__pyx_tuple__4);
64323 __Pyx_GIVEREF(__pyx_tuple__4);
64324
64325 /* "rbd.pyx":1241
64326 * elif ret != -errno.ERANGE:
64327 * raise make_ex(ret, 'error listing images')
64328 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
64329 * if name]
64330 * finally:
64331 */
64332 __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__6)__builtin_expect(!!(!__pyx_tuple__6), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__64332; goto __pyx_L1_error;}
64333 __Pyx_GOTREF(__pyx_tuple__6);
64334 __Pyx_GIVEREF(__pyx_tuple__6);
64335
64336 /* "rbd.pyx":1852
64337 * elif ret != -errno.ERANGE:
64338 * raise make_ex(ret, 'error getting mirror peer attributes')
64339 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]] # <<<<<<<<<<<<<<
64340 * vals = [decode_cstr(x) for x in _vals[:_vals_size].split(b'\0')[:-1]]
64341 * return dict(zip(keys, vals))
64342 */
64343 __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__7)__builtin_expect(!!(!__pyx_tuple__7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__64343; goto __pyx_L1_error;}
64344 __Pyx_GOTREF(__pyx_tuple__7);
64345 __Pyx_GIVEREF(__pyx_tuple__7);
64346 __pyx_slice__8 = PySlice_New(Py_None(&_Py_NoneStruct), __pyx_int_neg_1, Py_None(&_Py_NoneStruct)); if (unlikely(!__pyx_slice__8)__builtin_expect(!!(!__pyx_slice__8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__64346; goto __pyx_L1_error;}
64347 __Pyx_GOTREF(__pyx_slice__8);
64348 __Pyx_GIVEREF(__pyx_slice__8);
64349
64350 /* "rbd.pyx":1853
64351 * raise make_ex(ret, 'error getting mirror peer attributes')
64352 * keys = [decode_cstr(x) for x in _keys[:_keys_size].split(b'\0')[:-1]]
64353 * vals = [decode_cstr(x) for x in _vals[:_vals_size].split(b'\0')[:-1]] # <<<<<<<<<<<<<<
64354 * return dict(zip(keys, vals))
64355 * finally:
64356 */
64357 __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__9)__builtin_expect(!!(!__pyx_tuple__9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__64357; goto __pyx_L1_error;}
64358 __Pyx_GOTREF(__pyx_tuple__9);
64359 __Pyx_GIVEREF(__pyx_tuple__9);
64360 __pyx_slice__10 = PySlice_New(Py_None(&_Py_NoneStruct), __pyx_int_neg_1, Py_None(&_Py_NoneStruct)); if (unlikely(!__pyx_slice__10)__builtin_expect(!!(!__pyx_slice__10), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__64360; goto __pyx_L1_error;}
64361 __Pyx_GOTREF(__pyx_slice__10);
64362 __Pyx_GIVEREF(__pyx_slice__10);
64363
64364 /* "rbd.pyx":2092
64365 * elif ret != -errno.ERANGE:
64366 * raise make_ex(ret, 'error listing groups', group_errno_to_exception)
64367 * return [decode_cstr(name) for name in c_names[:ret].split(b'\0') # <<<<<<<<<<<<<<
64368 * if name]
64369 * finally:
64370 */
64371 __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__11)__builtin_expect(!!(!__pyx_tuple__11), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __pyx_clineno = __LINE__64371; goto __pyx_L1_error;}
64372 __Pyx_GOTREF(__pyx_tuple__11);
64373 __Pyx_GIVEREF(__pyx_tuple__11);
64374
64375 /* "rbd.pyx":2201
64376 * elif ret != -errno.ERANGE:
64377 * raise make_ex(ret, 'error listing namespaces')
64378 * return [decode_cstr(name) for name in _names[:_size].split(b'\0') # <<<<<<<<<<<<<<
64379 * if name]
64380 * finally:
64381 */
64382 __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__12)__builtin_expect(!!(!__pyx_tuple__12), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2201; __pyx_clineno = __LINE__64382; goto __pyx_L1_error;}
64383 __Pyx_GOTREF(__pyx_tuple__12);
64384 __Pyx_GIVEREF(__pyx_tuple__12);
64385
64386 /* "rbd.pyx":2553
64387 * raise make_ex(ret, 'error listing metadata')
64388 * keys = [decode_cstr(key) for key in
64389 * c_keys[:keys_size].split(b'\0') if key] # <<<<<<<<<<<<<<
64390 * vals = [decode_cstr(val) for val in
64391 * c_vals[:vals_size].split(b'\0') if val]
64392 */
64393 __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__14)__builtin_expect(!!(!__pyx_tuple__14), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__64393; goto __pyx_L1_error;}
64394 __Pyx_GOTREF(__pyx_tuple__14);
64395 __Pyx_GIVEREF(__pyx_tuple__14);
64396
64397 /* "rbd.pyx":2555
64398 * c_keys[:keys_size].split(b'\0') if key]
64399 * vals = [decode_cstr(val) for val in
64400 * c_vals[:vals_size].split(b'\0') if val] # <<<<<<<<<<<<<<
64401 * if len(keys) > 0:
64402 * last_read = cstr(keys[-1], 'last_read')
64403 */
64404 __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__15)__builtin_expect(!!(!__pyx_tuple__15), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__64404; goto __pyx_L1_error;}
64405 __Pyx_GOTREF(__pyx_tuple__15);
64406 __Pyx_GIVEREF(__pyx_tuple__15);
64407
64408 /* "rbd.pyx":2837
64409 * self.closed = True
64410 * if name is not None and image_id is not None:
64411 * raise InvalidArgument("only need to specify image name or image id") # <<<<<<<<<<<<<<
64412 * elif name is None and image_id is None:
64413 * raise InvalidArgument("image name or image id was not specified")
64414 */
64415 __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_only_need_to_specify_image_name); if (unlikely(!__pyx_tuple__16)__builtin_expect(!!(!__pyx_tuple__16), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__64415; goto __pyx_L1_error;}
64416 __Pyx_GOTREF(__pyx_tuple__16);
64417 __Pyx_GIVEREF(__pyx_tuple__16);
64418
64419 /* "rbd.pyx":2839
64420 * raise InvalidArgument("only need to specify image name or image id")
64421 * elif name is None and image_id is None:
64422 * raise InvalidArgument("image name or image id was not specified") # <<<<<<<<<<<<<<
64423 * elif name is not None:
64424 * self.name = name
64425 */
64426 __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_image_name_or_image_id_was_not_s); if (unlikely(!__pyx_tuple__17)__builtin_expect(!!(!__pyx_tuple__17), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2839; __pyx_clineno = __LINE__64426; goto __pyx_L1_error;}
64427 __Pyx_GOTREF(__pyx_tuple__17);
64428 __Pyx_GIVEREF(__pyx_tuple__17);
64429
64430 /* "rbd.pyx":2937
64431 * return
64432 * if not allow_shrink and old_size > size:
64433 * raise InvalidArgument("error allow_shrink is False but old_size > new_size") # <<<<<<<<<<<<<<
64434 * cdef:
64435 * uint64_t _size = size
64436 */
64437 __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_error_allow_shrink_is_False_but); if (unlikely(!__pyx_tuple__18)__builtin_expect(!!(!__pyx_tuple__18), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2937; __pyx_clineno = __LINE__64437; goto __pyx_L1_error;}
64438 __Pyx_GOTREF(__pyx_tuple__18);
64439 __Pyx_GIVEREF(__pyx_tuple__18);
64440
64441 /* "rbd.pyx":3730
64442 * """
64443 * if not isinstance(data, bytes):
64444 * raise TypeError('data must be a byte string') # <<<<<<<<<<<<<<
64445 * cdef:
64446 * uint64_t _offset = offset, length = len(data)
64447 */
64448 __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_data_must_be_a_byte_string); if (unlikely(!__pyx_tuple__19)__builtin_expect(!!(!__pyx_tuple__19), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__64448; goto __pyx_L1_error;}
64449 __Pyx_GOTREF(__pyx_tuple__19);
64450 __Pyx_GIVEREF(__pyx_tuple__19);
64451
64452 /* "rbd.pyx":3961
64453 * if ret == 0:
64454 * return []
64455 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0')) # <<<<<<<<<<<<<<
64456 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
64457 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
64458 */
64459 __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__20)__builtin_expect(!!(!__pyx_tuple__20), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3961; __pyx_clineno = __LINE__64459; goto __pyx_L1_error;}
64460 __Pyx_GOTREF(__pyx_tuple__20);
64461 __Pyx_GIVEREF(__pyx_tuple__20);
64462
64463 /* "rbd.pyx":3962
64464 * return []
64465 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
64466 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0')) # <<<<<<<<<<<<<<
64467 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0'))
64468 * return {
64469 */
64470 __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__21)__builtin_expect(!!(!__pyx_tuple__21), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3962; __pyx_clineno = __LINE__64470; goto __pyx_L1_error;}
64471 __Pyx_GOTREF(__pyx_tuple__21);
64472 __Pyx_GIVEREF(__pyx_tuple__21);
64473
64474 /* "rbd.pyx":3963
64475 * clients = map(decode_cstr, c_clients[:clients_size - 1].split(b'\0'))
64476 * cookies = map(decode_cstr, c_cookies[:cookies_size - 1].split(b'\0'))
64477 * addrs = map(decode_cstr, c_addrs[:addrs_size - 1].split(b'\0')) # <<<<<<<<<<<<<<
64478 * return {
64479 * 'tag' : decode_cstr(c_tag),
64480 */
64481 __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__22)__builtin_expect(!!(!__pyx_tuple__22), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3963; __pyx_clineno = __LINE__64481; goto __pyx_L1_error;}
64482 __Pyx_GOTREF(__pyx_tuple__22);
64483 __Pyx_GIVEREF(__pyx_tuple__22);
64484
64485 /* "rbd.pyx":4257
64486 * Completion completion
64487 *
64488 * def oncomplete_(completion_v): # <<<<<<<<<<<<<<
64489 * cdef Completion _completion_v = completion_v
64490 * return_value = _completion_v.get_return_value()
64491 */
64492 __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_completion_v, __pyx_n_s_completion_v_2, __pyx_n_s_return_value); if (unlikely(!__pyx_tuple__23)__builtin_expect(!!(!__pyx_tuple__23), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4257; __pyx_clineno = __LINE__64492; goto __pyx_L1_error;}
64493 __Pyx_GOTREF(__pyx_tuple__23);
64494 __Pyx_GIVEREF(__pyx_tuple__23);
64495 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_oncomplete_2, 4257, __pyx_empty_bytes)PyCode_New(1 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_oncomplete_2
, 4257, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__24)__builtin_expect(!!(!__pyx_codeobj__24), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4257; __pyx_clineno = __LINE__64495; goto __pyx_L1_error;}
64496
64497 /* "rbd.pyx":4694
64498 * self.image_name)
64499 * keys = [decode_cstr(key) for key in
64500 * c_keys[:keys_size].split(b'\0') if key] # <<<<<<<<<<<<<<
64501 * vals = [decode_cstr(val) for val in
64502 * c_vals[:vals_size].split(b'\0') if val]
64503 */
64504 __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__25)__builtin_expect(!!(!__pyx_tuple__25), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4694; __pyx_clineno = __LINE__64504; goto __pyx_L1_error;}
64505 __Pyx_GOTREF(__pyx_tuple__25);
64506 __Pyx_GIVEREF(__pyx_tuple__25);
64507
64508 /* "rbd.pyx":4696
64509 * c_keys[:keys_size].split(b'\0') if key]
64510 * vals = [decode_cstr(val) for val in
64511 * c_vals[:vals_size].split(b'\0') if val] # <<<<<<<<<<<<<<
64512 * if len(keys) > 0:
64513 * last_read = cstr(keys[-1], 'last_read')
64514 */
64515 __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_b__5); if (unlikely(!__pyx_tuple__26)__builtin_expect(!!(!__pyx_tuple__26), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4696; __pyx_clineno = __LINE__64515; goto __pyx_L1_error;}
64516 __Pyx_GOTREF(__pyx_tuple__26);
64517 __Pyx_GIVEREF(__pyx_tuple__26);
64518
64519 /* "rbd.pyx":710
64520 * class OSError(Error):
64521 * """ `OSError` class, derived from `Error` """
64522 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64523 * super(OSError, self).__init__(message)
64524 * self.errno = errno
64525 */
64526 __pyx_tuple__27 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__27)__builtin_expect(!!(!__pyx_tuple__27), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__64526; goto __pyx_L1_error;}
64527 __Pyx_GOTREF(__pyx_tuple__27);
64528 __Pyx_GIVEREF(__pyx_tuple__27);
64529 __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 710, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 710
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__28)__builtin_expect(!!(!__pyx_codeobj__28), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__64529; goto __pyx_L1_error;}
64530 __pyx_tuple__29 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__29)__builtin_expect(!!(!__pyx_tuple__29), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__64530; goto __pyx_L1_error;}
64531 __Pyx_GOTREF(__pyx_tuple__29);
64532 __Pyx_GIVEREF(__pyx_tuple__29);
64533
64534 /* "rbd.pyx":714
64535 * self.errno = errno
64536 *
64537 * def __str__(self): # <<<<<<<<<<<<<<
64538 * msg = super(OSError, self).__str__()
64539 * if self.errno is None:
64540 */
64541 __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__30)__builtin_expect(!!(!__pyx_tuple__30), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__64541; goto __pyx_L1_error;}
64542 __Pyx_GOTREF(__pyx_tuple__30);
64543 __Pyx_GIVEREF(__pyx_tuple__30);
64544 __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_str, 714, __pyx_empty_bytes)PyCode_New(1 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_str, 714
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__31)__builtin_expect(!!(!__pyx_codeobj__31), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__64544; goto __pyx_L1_error;}
64545
64546 /* "rbd.pyx":720
64547 * return '[errno {0}] {1}'.format(self.errno, msg)
64548 *
64549 * def __reduce__(self): # <<<<<<<<<<<<<<
64550 * return (self.__class__, (self.message, self.errno))
64551 *
64552 */
64553 __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)__builtin_expect(!!(!__pyx_tuple__32), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__64553; goto __pyx_L1_error;}
64554 __Pyx_GOTREF(__pyx_tuple__32);
64555 __Pyx_GIVEREF(__pyx_tuple__32);
64556 __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_reduce, 720, __pyx_empty_bytes)PyCode_New(1 +0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_reduce
, 720, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__33)__builtin_expect(!!(!__pyx_codeobj__33), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__64556; goto __pyx_L1_error;}
64557
64558 /* "rbd.pyx":724
64559 *
64560 * class PermissionError(OSError):
64561 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64562 * super(PermissionError, self).__init__(
64563 * "RBD permission error (%s)" % message, errno)
64564 */
64565 __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__34)__builtin_expect(!!(!__pyx_tuple__34), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__64565; goto __pyx_L1_error;}
64566 __Pyx_GOTREF(__pyx_tuple__34);
64567 __Pyx_GIVEREF(__pyx_tuple__34);
64568 __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 724, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 724
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__35)__builtin_expect(!!(!__pyx_codeobj__35), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__64568; goto __pyx_L1_error;}
64569 __pyx_tuple__36 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__36)__builtin_expect(!!(!__pyx_tuple__36), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__64569; goto __pyx_L1_error;}
64570 __Pyx_GOTREF(__pyx_tuple__36);
64571 __Pyx_GIVEREF(__pyx_tuple__36);
64572
64573 /* "rbd.pyx":730
64574 *
64575 * class ImageNotFound(OSError):
64576 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64577 * super(ImageNotFound, self).__init__(
64578 * "RBD image not found (%s)" % message, errno)
64579 */
64580 __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__37)__builtin_expect(!!(!__pyx_tuple__37), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__64580; goto __pyx_L1_error;}
64581 __Pyx_GOTREF(__pyx_tuple__37);
64582 __Pyx_GIVEREF(__pyx_tuple__37);
64583 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 730, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 730
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__38)__builtin_expect(!!(!__pyx_codeobj__38), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__64583; goto __pyx_L1_error;}
64584 __pyx_tuple__39 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__39)__builtin_expect(!!(!__pyx_tuple__39), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__64584; goto __pyx_L1_error;}
64585 __Pyx_GOTREF(__pyx_tuple__39);
64586 __Pyx_GIVEREF(__pyx_tuple__39);
64587
64588 /* "rbd.pyx":736
64589 *
64590 * class ObjectNotFound(OSError):
64591 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64592 * super(ObjectNotFound, self).__init__(
64593 * "RBD object not found (%s)" % message, errno)
64594 */
64595 __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__40)__builtin_expect(!!(!__pyx_tuple__40), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__64595; goto __pyx_L1_error;}
64596 __Pyx_GOTREF(__pyx_tuple__40);
64597 __Pyx_GIVEREF(__pyx_tuple__40);
64598 __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 736, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 736
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__41)__builtin_expect(!!(!__pyx_codeobj__41), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__64598; goto __pyx_L1_error;}
64599 __pyx_tuple__42 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__42)__builtin_expect(!!(!__pyx_tuple__42), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__64599; goto __pyx_L1_error;}
64600 __Pyx_GOTREF(__pyx_tuple__42);
64601 __Pyx_GIVEREF(__pyx_tuple__42);
64602
64603 /* "rbd.pyx":742
64604 *
64605 * class ImageExists(OSError):
64606 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64607 * super(ImageExists, self).__init__(
64608 * "RBD image already exists (%s)" % message, errno)
64609 */
64610 __pyx_tuple__43 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__43)__builtin_expect(!!(!__pyx_tuple__43), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__64610; goto __pyx_L1_error;}
64611 __Pyx_GOTREF(__pyx_tuple__43);
64612 __Pyx_GIVEREF(__pyx_tuple__43);
64613 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 742, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 742
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__44)__builtin_expect(!!(!__pyx_codeobj__44), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__64613; goto __pyx_L1_error;}
64614 __pyx_tuple__45 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__45)__builtin_expect(!!(!__pyx_tuple__45), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__64614; goto __pyx_L1_error;}
64615 __Pyx_GOTREF(__pyx_tuple__45);
64616 __Pyx_GIVEREF(__pyx_tuple__45);
64617
64618 /* "rbd.pyx":748
64619 *
64620 * class ObjectExists(OSError):
64621 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64622 * super(ObjectExists, self).__init__(
64623 * "RBD object already exists (%s)" % message, errno)
64624 */
64625 __pyx_tuple__46 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__46)__builtin_expect(!!(!__pyx_tuple__46), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__64625; goto __pyx_L1_error;}
64626 __Pyx_GOTREF(__pyx_tuple__46);
64627 __Pyx_GIVEREF(__pyx_tuple__46);
64628 __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 748, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 748
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__47)__builtin_expect(!!(!__pyx_codeobj__47), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__64628; goto __pyx_L1_error;}
64629 __pyx_tuple__48 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__48)__builtin_expect(!!(!__pyx_tuple__48), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__64629; goto __pyx_L1_error;}
64630 __Pyx_GOTREF(__pyx_tuple__48);
64631 __Pyx_GIVEREF(__pyx_tuple__48);
64632
64633 /* "rbd.pyx":754
64634 *
64635 * class IOError(OSError):
64636 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64637 * super(IOError, self).__init__(
64638 * "RBD I/O error (%s)" % message, errno)
64639 */
64640 __pyx_tuple__49 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__49)__builtin_expect(!!(!__pyx_tuple__49), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__64640; goto __pyx_L1_error;}
64641 __Pyx_GOTREF(__pyx_tuple__49);
64642 __Pyx_GIVEREF(__pyx_tuple__49);
64643 __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 754, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 754
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__50)__builtin_expect(!!(!__pyx_codeobj__50), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__64643; goto __pyx_L1_error;}
64644 __pyx_tuple__51 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__51)__builtin_expect(!!(!__pyx_tuple__51), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__64644; goto __pyx_L1_error;}
64645 __Pyx_GOTREF(__pyx_tuple__51);
64646 __Pyx_GIVEREF(__pyx_tuple__51);
64647
64648 /* "rbd.pyx":760
64649 *
64650 * class NoSpace(OSError):
64651 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64652 * super(NoSpace, self).__init__(
64653 * "RBD insufficient space available (%s)" % message, errno)
64654 */
64655 __pyx_tuple__52 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__52)__builtin_expect(!!(!__pyx_tuple__52), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__64655; goto __pyx_L1_error;}
64656 __Pyx_GOTREF(__pyx_tuple__52);
64657 __Pyx_GIVEREF(__pyx_tuple__52);
64658 __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 760, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 760
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__53)__builtin_expect(!!(!__pyx_codeobj__53), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__64658; goto __pyx_L1_error;}
64659 __pyx_tuple__54 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__54)__builtin_expect(!!(!__pyx_tuple__54), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__64659; goto __pyx_L1_error;}
64660 __Pyx_GOTREF(__pyx_tuple__54);
64661 __Pyx_GIVEREF(__pyx_tuple__54);
64662
64663 /* "rbd.pyx":766
64664 *
64665 * class IncompleteWriteError(OSError):
64666 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64667 * super(IncompleteWriteError, self).__init__(
64668 * "RBD incomplete write (%s)" % message, errno)
64669 */
64670 __pyx_tuple__55 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__55)__builtin_expect(!!(!__pyx_tuple__55), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__64670; goto __pyx_L1_error;}
64671 __Pyx_GOTREF(__pyx_tuple__55);
64672 __Pyx_GIVEREF(__pyx_tuple__55);
64673 __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 766, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 766
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__56)__builtin_expect(!!(!__pyx_codeobj__56), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__64673; goto __pyx_L1_error;}
64674 __pyx_tuple__57 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__57)__builtin_expect(!!(!__pyx_tuple__57), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__64674; goto __pyx_L1_error;}
64675 __Pyx_GOTREF(__pyx_tuple__57);
64676 __Pyx_GIVEREF(__pyx_tuple__57);
64677
64678 /* "rbd.pyx":772
64679 *
64680 * class InvalidArgument(OSError):
64681 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64682 * super(InvalidArgument, self).__init__(
64683 * "RBD invalid argument (%s)" % message, errno)
64684 */
64685 __pyx_tuple__58 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__58)__builtin_expect(!!(!__pyx_tuple__58), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__64685; goto __pyx_L1_error;}
64686 __Pyx_GOTREF(__pyx_tuple__58);
64687 __Pyx_GIVEREF(__pyx_tuple__58);
64688 __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 772, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 772
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__59)__builtin_expect(!!(!__pyx_codeobj__59), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__64688; goto __pyx_L1_error;}
64689 __pyx_tuple__60 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__60)__builtin_expect(!!(!__pyx_tuple__60), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__64689; goto __pyx_L1_error;}
64690 __Pyx_GOTREF(__pyx_tuple__60);
64691 __Pyx_GIVEREF(__pyx_tuple__60);
64692
64693 /* "rbd.pyx":778
64694 *
64695 * class LogicError(OSError):
64696 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64697 * super(LogicError, self).__init__(
64698 * "RBD logic error (%s)" % message, errno)
64699 */
64700 __pyx_tuple__61 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__61)__builtin_expect(!!(!__pyx_tuple__61), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__64700; goto __pyx_L1_error;}
64701 __Pyx_GOTREF(__pyx_tuple__61);
64702 __Pyx_GIVEREF(__pyx_tuple__61);
64703 __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 778, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 778
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__62)__builtin_expect(!!(!__pyx_codeobj__62), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__64703; goto __pyx_L1_error;}
64704 __pyx_tuple__63 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__63)__builtin_expect(!!(!__pyx_tuple__63), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__64704; goto __pyx_L1_error;}
64705 __Pyx_GOTREF(__pyx_tuple__63);
64706 __Pyx_GIVEREF(__pyx_tuple__63);
64707
64708 /* "rbd.pyx":784
64709 *
64710 * class ReadOnlyImage(OSError):
64711 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64712 * super(ReadOnlyImage, self).__init__(
64713 * "RBD read-only image (%s)" % message, errno)
64714 */
64715 __pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__64)__builtin_expect(!!(!__pyx_tuple__64), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__64715; goto __pyx_L1_error;}
64716 __Pyx_GOTREF(__pyx_tuple__64);
64717 __Pyx_GIVEREF(__pyx_tuple__64);
64718 __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 784, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 784
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__65)__builtin_expect(!!(!__pyx_codeobj__65), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__64718; goto __pyx_L1_error;}
64719 __pyx_tuple__66 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__66)__builtin_expect(!!(!__pyx_tuple__66), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__64719; goto __pyx_L1_error;}
64720 __Pyx_GOTREF(__pyx_tuple__66);
64721 __Pyx_GIVEREF(__pyx_tuple__66);
64722
64723 /* "rbd.pyx":790
64724 *
64725 * class ImageBusy(OSError):
64726 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64727 * super(ImageBusy, self).__init__(
64728 * "RBD image is busy (%s)" % message, errno)
64729 */
64730 __pyx_tuple__67 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__67)__builtin_expect(!!(!__pyx_tuple__67), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__64730; goto __pyx_L1_error;}
64731 __Pyx_GOTREF(__pyx_tuple__67);
64732 __Pyx_GIVEREF(__pyx_tuple__67);
64733 __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 790, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 790
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__68)__builtin_expect(!!(!__pyx_codeobj__68), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__64733; goto __pyx_L1_error;}
64734 __pyx_tuple__69 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__69)__builtin_expect(!!(!__pyx_tuple__69), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__64734; goto __pyx_L1_error;}
64735 __Pyx_GOTREF(__pyx_tuple__69);
64736 __Pyx_GIVEREF(__pyx_tuple__69);
64737
64738 /* "rbd.pyx":796
64739 *
64740 * class ImageHasSnapshots(OSError):
64741 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64742 * super(ImageHasSnapshots, self).__init__(
64743 * "RBD image has snapshots (%s)" % message, errno)
64744 */
64745 __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__70)__builtin_expect(!!(!__pyx_tuple__70), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__64745; goto __pyx_L1_error;}
64746 __Pyx_GOTREF(__pyx_tuple__70);
64747 __Pyx_GIVEREF(__pyx_tuple__70);
64748 __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 796, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 796
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__71)__builtin_expect(!!(!__pyx_codeobj__71), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__64748; goto __pyx_L1_error;}
64749 __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__72)__builtin_expect(!!(!__pyx_tuple__72), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__64749; goto __pyx_L1_error;}
64750 __Pyx_GOTREF(__pyx_tuple__72);
64751 __Pyx_GIVEREF(__pyx_tuple__72);
64752
64753 /* "rbd.pyx":802
64754 *
64755 * class FunctionNotSupported(OSError):
64756 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64757 * super(FunctionNotSupported, self).__init__(
64758 * "RBD function not supported (%s)" % message, errno)
64759 */
64760 __pyx_tuple__73 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__73)__builtin_expect(!!(!__pyx_tuple__73), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__64760; goto __pyx_L1_error;}
64761 __Pyx_GOTREF(__pyx_tuple__73);
64762 __Pyx_GIVEREF(__pyx_tuple__73);
64763 __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 802, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 802
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__74)__builtin_expect(!!(!__pyx_codeobj__74), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__64763; goto __pyx_L1_error;}
64764 __pyx_tuple__75 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__75)__builtin_expect(!!(!__pyx_tuple__75), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__64764; goto __pyx_L1_error;}
64765 __Pyx_GOTREF(__pyx_tuple__75);
64766 __Pyx_GIVEREF(__pyx_tuple__75);
64767
64768 /* "rbd.pyx":808
64769 *
64770 * class ArgumentOutOfRange(OSError):
64771 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64772 * super(ArgumentOutOfRange, self).__init__(
64773 * "RBD arguments out of range (%s)" % message, errno)
64774 */
64775 __pyx_tuple__76 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__76)__builtin_expect(!!(!__pyx_tuple__76), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__64775; goto __pyx_L1_error;}
64776 __Pyx_GOTREF(__pyx_tuple__76);
64777 __Pyx_GIVEREF(__pyx_tuple__76);
64778 __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 808, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 808
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__77)__builtin_expect(!!(!__pyx_codeobj__77), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__64778; goto __pyx_L1_error;}
64779 __pyx_tuple__78 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__78)__builtin_expect(!!(!__pyx_tuple__78), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__64779; goto __pyx_L1_error;}
64780 __Pyx_GOTREF(__pyx_tuple__78);
64781 __Pyx_GIVEREF(__pyx_tuple__78);
64782
64783 /* "rbd.pyx":814
64784 *
64785 * class ConnectionShutdown(OSError):
64786 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64787 * super(ConnectionShutdown, self).__init__(
64788 * "RBD connection was shutdown (%s)" % message, errno)
64789 */
64790 __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__79)__builtin_expect(!!(!__pyx_tuple__79), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__64790; goto __pyx_L1_error;}
64791 __Pyx_GOTREF(__pyx_tuple__79);
64792 __Pyx_GIVEREF(__pyx_tuple__79);
64793 __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 814, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 814
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__80)__builtin_expect(!!(!__pyx_codeobj__80), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__64793; goto __pyx_L1_error;}
64794 __pyx_tuple__81 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__81)__builtin_expect(!!(!__pyx_tuple__81), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__64794; goto __pyx_L1_error;}
64795 __Pyx_GOTREF(__pyx_tuple__81);
64796 __Pyx_GIVEREF(__pyx_tuple__81);
64797
64798 /* "rbd.pyx":820
64799 *
64800 * class Timeout(OSError):
64801 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64802 * super(Timeout, self).__init__(
64803 * "RBD operation timeout (%s)" % message, errno)
64804 */
64805 __pyx_tuple__82 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__82)__builtin_expect(!!(!__pyx_tuple__82), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__64805; goto __pyx_L1_error;}
64806 __Pyx_GOTREF(__pyx_tuple__82);
64807 __Pyx_GIVEREF(__pyx_tuple__82);
64808 __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 820, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 820
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__83)__builtin_expect(!!(!__pyx_codeobj__83), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__64808; goto __pyx_L1_error;}
64809 __pyx_tuple__84 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__84)__builtin_expect(!!(!__pyx_tuple__84), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__64809; goto __pyx_L1_error;}
64810 __Pyx_GOTREF(__pyx_tuple__84);
64811 __Pyx_GIVEREF(__pyx_tuple__84);
64812
64813 /* "rbd.pyx":826
64814 *
64815 * class DiskQuotaExceeded(OSError):
64816 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64817 * super(DiskQuotaExceeded, self).__init__(
64818 * "RBD disk quota exceeded (%s)" % message, errno)
64819 */
64820 __pyx_tuple__85 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__85)__builtin_expect(!!(!__pyx_tuple__85), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__64820; goto __pyx_L1_error;}
64821 __Pyx_GOTREF(__pyx_tuple__85);
64822 __Pyx_GIVEREF(__pyx_tuple__85);
64823 __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 826, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 826
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__86)__builtin_expect(!!(!__pyx_codeobj__86), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__64823; goto __pyx_L1_error;}
64824 __pyx_tuple__87 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__87)__builtin_expect(!!(!__pyx_tuple__87), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__64824; goto __pyx_L1_error;}
64825 __Pyx_GOTREF(__pyx_tuple__87);
64826 __Pyx_GIVEREF(__pyx_tuple__87);
64827
64828 /* "rbd.pyx":831
64829 *
64830 * class OperationCanceled(OSError):
64831 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
64832 * super(OperationCanceled, self).__init__(
64833 * "RBD operation canceled (%s)" % message, errno)
64834 */
64835 __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_errno); if (unlikely(!__pyx_tuple__88)__builtin_expect(!!(!__pyx_tuple__88), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__64835; goto __pyx_L1_error;}
64836 __Pyx_GOTREF(__pyx_tuple__88);
64837 __Pyx_GIVEREF(__pyx_tuple__88);
64838 __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 831, __pyx_empty_bytes)PyCode_New(3 +0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_init, 831
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__89)__builtin_expect(!!(!__pyx_codeobj__89), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__64838; goto __pyx_L1_error;}
64839 __pyx_tuple__90 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__90)__builtin_expect(!!(!__pyx_tuple__90), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__64839; goto __pyx_L1_error;}
64840 __Pyx_GOTREF(__pyx_tuple__90);
64841 __Pyx_GIVEREF(__pyx_tuple__90);
64842
64843 /* "rbd.pyx":897
64844 * return 0
64845 *
64846 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
64847 * """
64848 * Create a byte string from a Python string
64849 */
64850 __pyx_tuple__91 = PyTuple_Pack(4, __pyx_n_s_val, __pyx_n_s_name, __pyx_n_s_encoding, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__91)__builtin_expect(!!(!__pyx_tuple__91), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__64850; goto __pyx_L1_error;}
64851 __Pyx_GOTREF(__pyx_tuple__91);
64852 __Pyx_GIVEREF(__pyx_tuple__91);
64853 __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr, 897, __pyx_empty_bytes)PyCode_New(4 +0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_cstr, 897
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__92)__builtin_expect(!!(!__pyx_codeobj__92), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__64853; goto __pyx_L1_error;}
64854
64855 /* "rbd.pyx":919
64856 * raise InvalidArgument('%s must be a string' % name)
64857 *
64858 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
64859 * """
64860 * Decode a byte string into a Python string.
64861 */
64862 __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_val, __pyx_n_s_encoding); if (unlikely(!__pyx_tuple__93)__builtin_expect(!!(!__pyx_tuple__93), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__64862; goto __pyx_L1_error;}
64863 __Pyx_GOTREF(__pyx_tuple__93);
64864 __Pyx_GIVEREF(__pyx_tuple__93);
64865 __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_decode_cstr, 919, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_decode_cstr
, 919, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__94)__builtin_expect(!!(!__pyx_codeobj__94), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__64865; goto __pyx_L1_error;}
64866
64867 /* "rbd.pyx":1057
64868 * This class wraps librbd CRUD functions.
64869 * """
64870 * def version(self): # <<<<<<<<<<<<<<
64871 * """
64872 * Get the version number of the ``librbd`` C library.
64873 */
64874 __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__95)__builtin_expect(!!(!__pyx_tuple__95), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__64874; goto __pyx_L1_error;}
64875 __Pyx_GOTREF(__pyx_tuple__95);
64876 __Pyx_GIVEREF(__pyx_tuple__95);
64877 __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_version, 1057, __pyx_empty_bytes)PyCode_New(1 +0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_version
, 1057, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__96)__builtin_expect(!!(!__pyx_codeobj__96), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__64877; goto __pyx_L1_error;}
64878
64879 /* "rbd.pyx":1070
64880 * return (major, minor, extra)
64881 *
64882 * def create(self, ioctx, name, size, order=None, old_format=True, # <<<<<<<<<<<<<<
64883 * features=None, stripe_unit=None, stripe_count=None,
64884 * data_pool=None):
64885 */
64886 __pyx_tuple__97 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_size, __pyx_n_s_order, __pyx_n_s_old_format, __pyx_n_s_features, __pyx_n_s_stripe_unit, __pyx_n_s_stripe_count, __pyx_n_s_data_pool, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_size_2, __pyx_n_s_order_2, __pyx_n_s_opts, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__97)__builtin_expect(!!(!__pyx_tuple__97), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__64886; goto __pyx_L1_error;}
64887 __Pyx_GOTREF(__pyx_tuple__97);
64888 __Pyx_GIVEREF(__pyx_tuple__97);
64889 __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(10, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_create, 1070, __pyx_empty_bytes)PyCode_New(10 +0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_create
, 1070, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__98)__builtin_expect(!!(!__pyx_codeobj__98), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__64889; goto __pyx_L1_error;}
64890 __pyx_tuple__99 = PyTuple_Pack(6, ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_True((PyObject *) &_Py_TrueStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__99)__builtin_expect(!!(!__pyx_tuple__99), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__64890; goto __pyx_L1_error;}
64891 __Pyx_GOTREF(__pyx_tuple__99);
64892 __Pyx_GIVEREF(__pyx_tuple__99);
64893
64894 /* "rbd.pyx":1151
64895 * raise make_ex(ret, 'error creating image')
64896 *
64897 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name, # <<<<<<<<<<<<<<
64898 * features=None, order=None, stripe_unit=None, stripe_count=None,
64899 * data_pool=None):
64900 */
64901 __pyx_tuple__100 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_p_ioctx, __pyx_n_s_p_name, __pyx_n_s_p_snapname, __pyx_n_s_c_ioctx, __pyx_n_s_c_name, __pyx_n_s_features, __pyx_n_s_order, __pyx_n_s_stripe_unit, __pyx_n_s_stripe_count, __pyx_n_s_data_pool, __pyx_n_s_p_ioctx_2, __pyx_n_s_c_ioctx_2, __pyx_n_s_p_name_2, __pyx_n_s_p_snapname_2, __pyx_n_s_c_name_2, __pyx_n_s_opts, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__100)__builtin_expect(!!(!__pyx_tuple__100), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__64901; goto __pyx_L1_error;}
64902 __Pyx_GOTREF(__pyx_tuple__100);
64903 __Pyx_GIVEREF(__pyx_tuple__100);
64904 __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(11, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_clone, 1151, __pyx_empty_bytes)PyCode_New(11 +0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_clone,
1151, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__101)__builtin_expect(!!(!__pyx_codeobj__101), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__64904; goto __pyx_L1_error;}
64905 __pyx_tuple__102 = PyTuple_Pack(5, ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__102)__builtin_expect(!!(!__pyx_tuple__102), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__64905; goto __pyx_L1_error;}
64906 __Pyx_GOTREF(__pyx_tuple__102);
64907 __Pyx_GIVEREF(__pyx_tuple__102);
64908
64909 /* "rbd.pyx":1220
64910 * raise make_ex(ret, 'error creating clone')
64911 *
64912 * def list(self, ioctx): # <<<<<<<<<<<<<<
64913 * """
64914 * List image names.
64915 */
64916 __pyx_tuple__103 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_ioctx_2, __pyx_n_s_size, __pyx_n_s_c_names, __pyx_n_s_ret, __pyx_n_s_name); if (unlikely(!__pyx_tuple__103)__builtin_expect(!!(!__pyx_tuple__103), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__64916; goto __pyx_L1_error;}
64917 __Pyx_GOTREF(__pyx_tuple__103);
64918 __Pyx_GIVEREF(__pyx_tuple__103);
64919 __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_list, 1220, __pyx_empty_bytes)PyCode_New(2 +0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_list, 1220
, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__104)__builtin_expect(!!(!__pyx_codeobj__104), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__64919; goto __pyx_L1_error;}
64920
64921 /* "rbd.pyx":1246
64922 * free(c_names)
64923 *
64924 * def list2(self, ioctx): # <<<<<<<<<<<<<<
64925 * """
64926 * Iterate over the images in the pool.
64927 */
64928 __pyx_tuple__105 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__105)__builtin_expect(!!(!__pyx_tuple__105), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__64928; goto __pyx_L1_error;}
64929 __Pyx_GOTREF(__pyx_tuple__105);
64930 __Pyx_GIVEREF(__pyx_tuple__105);
64931 __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_list2, 1246, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_list2,
1246, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__106)__builtin_expect(!!(!__pyx_codeobj__106), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__64931; goto __pyx_L1_error;}
64932
64933 /* "rbd.pyx":1256
64934 * return ImageIterator(ioctx)
64935 *
64936 * def remove(self, ioctx, name, on_progress=None): # <<<<<<<<<<<<<<
64937 * """
64938 * Delete an RBD image. This may take a long time, since it does
64939 */
64940 __pyx_tuple__107 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_on_progress, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_prog_cb, __pyx_n_s_prog_arg, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__107)__builtin_expect(!!(!__pyx_tuple__107), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__64940; goto __pyx_L1_error;}
64941 __Pyx_GOTREF(__pyx_tuple__107);
64942 __Pyx_GIVEREF(__pyx_tuple__107);
64943 __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_remove, 1256, __pyx_empty_bytes)PyCode_New(4 +0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_remove
, 1256, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__108)__builtin_expect(!!(!__pyx_codeobj__108), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__64943; goto __pyx_L1_error;}
64944 __pyx_tuple__109 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__109)__builtin_expect(!!(!__pyx_tuple__109), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__64944; goto __pyx_L1_error;}
64945 __Pyx_GOTREF(__pyx_tuple__109);
64946 __Pyx_GIVEREF(__pyx_tuple__109);
64947
64948 /* "rbd.pyx":1289
64949 * raise make_ex(ret, 'error removing image')
64950 *
64951 * def rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
64952 * """
64953 * Rename an RBD image.
64954 */
64955 __pyx_tuple__110 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_src, __pyx_n_s_dest, __pyx_n_s_ioctx_2, __pyx_n_s_src_2, __pyx_n_s_dest_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__110)__builtin_expect(!!(!__pyx_tuple__110), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__64955; goto __pyx_L1_error;}
64956 __Pyx_GOTREF(__pyx_tuple__110);
64957 __Pyx_GIVEREF(__pyx_tuple__110);
64958 __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_rename, 1289, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_rename
, 1289, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__111)__builtin_expect(!!(!__pyx_codeobj__111), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__64958; goto __pyx_L1_error;}
64959
64960 /* "rbd.pyx":1312
64961 * raise make_ex(ret, 'error renaming image')
64962 *
64963 * def trash_move(self, ioctx, name, delay=0): # <<<<<<<<<<<<<<
64964 * """
64965 * Move an RBD image to the trash.
64966 */
64967 __pyx_tuple__112 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_delay, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_delay_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__112)__builtin_expect(!!(!__pyx_tuple__112), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__64967; goto __pyx_L1_error;}
64968 __Pyx_GOTREF(__pyx_tuple__112);
64969 __Pyx_GIVEREF(__pyx_tuple__112);
64970 __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_move, 1312, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_move
, 1312, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__113)__builtin_expect(!!(!__pyx_codeobj__113), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__64970; goto __pyx_L1_error;}
64971 __pyx_tuple__114 = PyTuple_Pack(1, ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__114)__builtin_expect(!!(!__pyx_tuple__114), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__64971; goto __pyx_L1_error;}
64972 __Pyx_GOTREF(__pyx_tuple__114);
64973 __Pyx_GIVEREF(__pyx_tuple__114);
64974
64975 /* "rbd.pyx":1335
64976 * raise make_ex(ret, 'error moving image to trash')
64977 *
64978 * def trash_purge(self, ioctx, expire_ts=None, threshold=-1): # <<<<<<<<<<<<<<
64979 * """
64980 * Delete RBD images from trash in bulk.
64981 */
64982 __pyx_tuple__115 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_expire_ts, __pyx_n_s_threshold, __pyx_n_s_expire_epoch_ts, __pyx_n_s_ioctx_2, __pyx_n_s_expire_ts_2, __pyx_n_s_threshold_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__115)__builtin_expect(!!(!__pyx_tuple__115), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__64982; goto __pyx_L1_error;}
64983 __Pyx_GOTREF(__pyx_tuple__115);
64984 __Pyx_GIVEREF(__pyx_tuple__115);
64985 __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_purge, 1335, __pyx_empty_bytes)PyCode_New(4 +0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_purge
, 1335, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__116)__builtin_expect(!!(!__pyx_codeobj__116), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__64985; goto __pyx_L1_error;}
64986 __pyx_tuple__117 = PyTuple_Pack(2, ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)__pyx_int_neg_1)); if (unlikely(!__pyx_tuple__117)__builtin_expect(!!(!__pyx_tuple__117), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__64986; goto __pyx_L1_error;}
64987 __Pyx_GOTREF(__pyx_tuple__117);
64988 __Pyx_GIVEREF(__pyx_tuple__117);
64989
64990 /* "rbd.pyx":1367
64991 * raise make_ex(ret, 'error purging images from trash')
64992 *
64993 * def trash_remove(self, ioctx, image_id, force=False, on_progress=None): # <<<<<<<<<<<<<<
64994 * """
64995 * Delete an RBD image from trash. If image deferment time has not
64996 */
64997 __pyx_tuple__118 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_id, __pyx_n_s_force, __pyx_n_s_on_progress, __pyx_n_s_ioctx_2, __pyx_n_s_image_id_2, __pyx_n_s_force_2, __pyx_n_s_prog_cb, __pyx_n_s_prog_arg, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__118)__builtin_expect(!!(!__pyx_tuple__118), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__64997; goto __pyx_L1_error;}
64998 __Pyx_GOTREF(__pyx_tuple__118);
64999 __Pyx_GIVEREF(__pyx_tuple__118);
65000 __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(5, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_remove, 1367, __pyx_empty_bytes)PyCode_New(5 +0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_remove
, 1367, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__119)__builtin_expect(!!(!__pyx_codeobj__119), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__65000; goto __pyx_L1_error;}
65001 __pyx_tuple__120 = PyTuple_Pack(2, ((PyObject *)Py_False((PyObject *) &_Py_ZeroStruct)), ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__120)__builtin_expect(!!(!__pyx_tuple__120), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__65001; goto __pyx_L1_error;}
65002 __Pyx_GOTREF(__pyx_tuple__120);
65003 __Pyx_GIVEREF(__pyx_tuple__120);
65004
65005 /* "rbd.pyx":1398
65006 * raise make_ex(ret, 'error deleting image from trash')
65007 *
65008 * def trash_get(self, ioctx, image_id): # <<<<<<<<<<<<<<
65009 * """
65010 * Retrieve RBD image info from trash.
65011 */
65012 __pyx_tuple__121 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_id, __pyx_n_s_ioctx_2, __pyx_n_s_image_id_2, __pyx_n_s_c_info, __pyx_n_s_ret, __pyx_n_s_source_string, __pyx_n_s_info); if (unlikely(!__pyx_tuple__121)__builtin_expect(!!(!__pyx_tuple__121), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__65012; goto __pyx_L1_error;}
65013 __Pyx_GOTREF(__pyx_tuple__121);
65014 __Pyx_GIVEREF(__pyx_tuple__121);
65015 __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_get, 1398, __pyx_empty_bytes)PyCode_New(3 +0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_get
, 1398, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__122)__builtin_expect(!!(!__pyx_codeobj__122), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__65015; goto __pyx_L1_error;}
65016
65017 /* "rbd.pyx":1442
65018 * return info
65019 *
65020 * def trash_list(self, ioctx): # <<<<<<<<<<<<<<
65021 * """
65022 * List all entries from trash.
65023 */
65024 __pyx_tuple__123 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__123)__builtin_expect(!!(!__pyx_tuple__123), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__65024; goto __pyx_L1_error;}
65025 __Pyx_GOTREF(__pyx_tuple__123);
65026 __Pyx_GIVEREF(__pyx_tuple__123);
65027 __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_list, 1442, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_list
, 1442, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__124)__builtin_expect(!!(!__pyx_codeobj__124), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__65027; goto __pyx_L1_error;}
65028
65029 /* "rbd.pyx":1452
65030 * return TrashIterator(ioctx)
65031 *
65032 * def trash_restore(self, ioctx, image_id, name): # <<<<<<<<<<<<<<
65033 * """
65034 * Restore an RBD image from trash.
65035 */
65036 __pyx_tuple__125 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_id, __pyx_n_s_name, __pyx_n_s_ioctx_2, __pyx_n_s_image_id_2, __pyx_n_s_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__125)__builtin_expect(!!(!__pyx_tuple__125), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__65036; goto __pyx_L1_error;}
65037 __Pyx_GOTREF(__pyx_tuple__125);
65038 __Pyx_GIVEREF(__pyx_tuple__125);
65039 __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_restore, 1452, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_trash_restore
, 1452, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__126)__builtin_expect(!!(!__pyx_codeobj__126), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__65039; goto __pyx_L1_error;}
65040
65041 /* "rbd.pyx":1475
65042 * raise make_ex(ret, 'error restoring image from trash')
65043 *
65044 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name, # <<<<<<<<<<<<<<
65045 * features=None, order=None, stripe_unit=None, stripe_count=None,
65046 * data_pool=None):
65047 */
65048 __pyx_tuple__127 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_name, __pyx_n_s_dest_ioctx, __pyx_n_s_dest_image_name, __pyx_n_s_features, __pyx_n_s_order, __pyx_n_s_stripe_unit, __pyx_n_s_stripe_count, __pyx_n_s_data_pool, __pyx_n_s_ioctx_2, __pyx_n_s_image_name_2, __pyx_n_s_dest_ioctx_2, __pyx_n_s_dest_image_name_2, __pyx_n_s_opts, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__127)__builtin_expect(!!(!__pyx_tuple__127), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__65048; goto __pyx_L1_error;}
65049 __Pyx_GOTREF(__pyx_tuple__127);
65050 __Pyx_GIVEREF(__pyx_tuple__127);
65051 __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(10, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_prepare, 1475, __pyx_empty_bytes)PyCode_New(10 +0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_prepare
, 1475, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__128)__builtin_expect(!!(!__pyx_codeobj__128), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__65051; goto __pyx_L1_error;}
65052 __pyx_tuple__129 = PyTuple_Pack(5, ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct)), ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__129)__builtin_expect(!!(!__pyx_tuple__129), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__65052; goto __pyx_L1_error;}
65053 __Pyx_GOTREF(__pyx_tuple__129);
65054 __Pyx_GIVEREF(__pyx_tuple__129);
65055
65056 /* "rbd.pyx":1539
65057 * raise make_ex(ret, 'error migrating image %s' % (image_name))
65058 *
65059 * def migration_execute(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
65060 * """
65061 * Execute a prepared RBD image migration.
65062 */
65063 __pyx_tuple__130 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_name, __pyx_n_s_on_progress, __pyx_n_s_ioctx_2, __pyx_n_s_image_name_2, __pyx_n_s_prog_cb, __pyx_n_s_prog_arg, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__130)__builtin_expect(!!(!__pyx_tuple__130), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__65063; goto __pyx_L1_error;}
65064 __Pyx_GOTREF(__pyx_tuple__130);
65065 __Pyx_GIVEREF(__pyx_tuple__130);
65066 __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_execute, 1539, __pyx_empty_bytes)PyCode_New(4 +0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_execute
, 1539, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__131)__builtin_expect(!!(!__pyx_codeobj__131), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__65066; goto __pyx_L1_error;}
65067 __pyx_tuple__132 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__132)__builtin_expect(!!(!__pyx_tuple__132), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__65067; goto __pyx_L1_error;}
65068 __Pyx_GOTREF(__pyx_tuple__132);
65069 __Pyx_GIVEREF(__pyx_tuple__132);
65070
65071 /* "rbd.pyx":1566
65072 * raise make_ex(ret, 'error aborting migration')
65073 *
65074 * def migration_commit(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
65075 * """
65076 * Commit an executed RBD image migration.
65077 */
65078 __pyx_tuple__133 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_name, __pyx_n_s_on_progress, __pyx_n_s_ioctx_2, __pyx_n_s_image_name_2, __pyx_n_s_prog_cb, __pyx_n_s_prog_arg, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__133)__builtin_expect(!!(!__pyx_tuple__133), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__65078; goto __pyx_L1_error;}
65079 __Pyx_GOTREF(__pyx_tuple__133);
65080 __Pyx_GIVEREF(__pyx_tuple__133);
65081 __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_commit, 1566, __pyx_empty_bytes)PyCode_New(4 +0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_commit
, 1566, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__134)__builtin_expect(!!(!__pyx_codeobj__134), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__65081; goto __pyx_L1_error;}
65082 __pyx_tuple__135 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__135)__builtin_expect(!!(!__pyx_tuple__135), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__65082; goto __pyx_L1_error;}
65083 __Pyx_GOTREF(__pyx_tuple__135);
65084 __Pyx_GIVEREF(__pyx_tuple__135);
65085
65086 /* "rbd.pyx":1593
65087 * raise make_ex(ret, 'error aborting migration')
65088 *
65089 * def migration_abort(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
65090 * """
65091 * Cancel a previously started but interrupted migration.
65092 */
65093 __pyx_tuple__136 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_name, __pyx_n_s_on_progress, __pyx_n_s_ioctx_2, __pyx_n_s_image_name_2, __pyx_n_s_prog_cb, __pyx_n_s_prog_arg, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__136)__builtin_expect(!!(!__pyx_tuple__136), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__65093; goto __pyx_L1_error;}
65094 __Pyx_GOTREF(__pyx_tuple__136);
65095 __Pyx_GIVEREF(__pyx_tuple__136);
65096 __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_abort, 1593, __pyx_empty_bytes)PyCode_New(4 +0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_abort
, 1593, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__137)__builtin_expect(!!(!__pyx_codeobj__137), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__65096; goto __pyx_L1_error;}
65097 __pyx_tuple__138 = PyTuple_Pack(1, ((PyObject *)Py_None(&_Py_NoneStruct))); if (unlikely(!__pyx_tuple__138)__builtin_expect(!!(!__pyx_tuple__138), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__65097; goto __pyx_L1_error;}
65098 __Pyx_GOTREF(__pyx_tuple__138);
65099 __Pyx_GIVEREF(__pyx_tuple__138);
65100
65101 /* "rbd.pyx":1620
65102 * raise make_ex(ret, 'error aborting migration')
65103 *
65104 * def migration_status(self, ioctx, image_name): # <<<<<<<<<<<<<<
65105 * """
65106 * Return RBD image migration status.
65107 */
65108 __pyx_tuple__139 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_image_name, __pyx_n_s_ioctx_2, __pyx_n_s_image_name_2, __pyx_n_s_c_status, __pyx_n_s_ret, __pyx_n_s_status); if (unlikely(!__pyx_tuple__139)__builtin_expect(!!(!__pyx_tuple__139), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__65108; goto __pyx_L1_error;}
65109 __Pyx_GOTREF(__pyx_tuple__139);
65110 __Pyx_GIVEREF(__pyx_tuple__139);
65111 __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_status, 1620, __pyx_empty_bytes)PyCode_New(3 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_migration_status
, 1620, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__140)__builtin_expect(!!(!__pyx_codeobj__140), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__65111; goto __pyx_L1_error;}
65112
65113 /* "rbd.pyx":1680
65114 * return status
65115 *
65116 * def mirror_mode_get(self, ioctx): # <<<<<<<<<<<<<<
65117 * """
65118 * Get pool mirror mode.
65119 */
65120 __pyx_tuple__141 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_ioctx_2, __pyx_n_s_mirror_mode, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__141)__builtin_expect(!!(!__pyx_tuple__141), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__65120; goto __pyx_L1_error;}
65121 __Pyx_GOTREF(__pyx_tuple__141);
65122 __Pyx_GIVEREF(__pyx_tuple__141);
65123 __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_mode_get, 1680, __pyx_empty_bytes)PyCode_New(2 +0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_mode_get
, 1680, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__142)__builtin_expect(!!(!__pyx_codeobj__142), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__65123; goto __pyx_L1_error;}
65124
65125 /* "rbd.pyx":1697
65126 * return mirror_mode
65127 *
65128 * def mirror_mode_set(self, ioctx, mirror_mode): # <<<<<<<<<<<<<<
65129 * """
65130 * Set pool mirror mode.
65131 */
65132 __pyx_tuple__143 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_mirror_mode, __pyx_n_s_ioctx_2, __pyx_n_s_mirror_mode_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__143)__builtin_expect(!!(!__pyx_tuple__143), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__65132; goto __pyx_L1_error;}
65133 __Pyx_GOTREF(__pyx_tuple__143);
65134 __Pyx_GIVEREF(__pyx_tuple__143);
65135 __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_mode_set, 1697, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_mode_set
, 1697, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__144)__builtin_expect(!!(!__pyx_codeobj__144), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__65135; goto __pyx_L1_error;}
65136
65137 /* "rbd.pyx":1714
65138 * raise make_ex(ret, 'error setting mirror mode')
65139 *
65140 * def mirror_peer_add(self, ioctx, cluster_name, client_name): # <<<<<<<<<<<<<<
65141 * """
65142 * Add mirror peer.
65143 */
65144 __pyx_tuple__145 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_cluster_name, __pyx_n_s_client_name, __pyx_n_s_ioctx_2, __pyx_n_s_uuid_2, __pyx_n_s_uuid_max_length, __pyx_n_s_cluster_name_2, __pyx_n_s_client_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__145)__builtin_expect(!!(!__pyx_tuple__145), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__65144; goto __pyx_L1_error;}
65145 __Pyx_GOTREF(__pyx_tuple__145);
65146 __Pyx_GIVEREF(__pyx_tuple__145);
65147 __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_add, 1714, __pyx_empty_bytes)PyCode_New(4 +0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_add
, 1714, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__146)__builtin_expect(!!(!__pyx_codeobj__146), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__65147; goto __pyx_L1_error;}
65148
65149 /* "rbd.pyx":1744
65150 * free(_uuid)
65151 *
65152 * def mirror_peer_remove(self, ioctx, uuid): # <<<<<<<<<<<<<<
65153 * """
65154 * Remove mirror peer.
65155 */
65156 __pyx_tuple__147 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_uuid, __pyx_n_s_ioctx_2, __pyx_n_s_uuid_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__147)__builtin_expect(!!(!__pyx_tuple__147), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__65156; goto __pyx_L1_error;}
65157 __Pyx_GOTREF(__pyx_tuple__147);
65158 __Pyx_GIVEREF(__pyx_tuple__147);
65159 __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_remove, 1744, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_remove
, 1744, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__148)__builtin_expect(!!(!__pyx_codeobj__148), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__65159; goto __pyx_L1_error;}
65160
65161 /* "rbd.pyx":1762
65162 * raise make_ex(ret, 'error removing mirror peer')
65163 *
65164 * def mirror_peer_list(self, ioctx): # <<<<<<<<<<<<<<
65165 * """
65166 * Iterate over the peers of a pool.
65167 */
65168 __pyx_tuple__149 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__149)__builtin_expect(!!(!__pyx_tuple__149), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__65168; goto __pyx_L1_error;}
65169 __Pyx_GOTREF(__pyx_tuple__149);
65170 __Pyx_GIVEREF(__pyx_tuple__149);
65171 __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_list, 1762, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_list
, 1762, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__150)__builtin_expect(!!(!__pyx_codeobj__150), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__65171; goto __pyx_L1_error;}
65172
65173 /* "rbd.pyx":1772
65174 * return MirrorPeerIterator(ioctx)
65175 *
65176 * def mirror_peer_set_client(self, ioctx, uuid, client_name): # <<<<<<<<<<<<<<
65177 * """
65178 * Set mirror peer client name
65179 */
65180 __pyx_tuple__151 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_uuid, __pyx_n_s_client_name, __pyx_n_s_ioctx_2, __pyx_n_s_uuid_2, __pyx_n_s_client_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__151)__builtin_expect(!!(!__pyx_tuple__151), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__65180; goto __pyx_L1_error;}
65181 __Pyx_GOTREF(__pyx_tuple__151);
65182 __Pyx_GIVEREF(__pyx_tuple__151);
65183 __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_set_client, 1772, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_set_client
, 1772, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__152)__builtin_expect(!!(!__pyx_codeobj__152), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__65183; goto __pyx_L1_error;}
65184
65185 /* "rbd.pyx":1794
65186 * raise make_ex(ret, 'error setting mirror peer client')
65187 *
65188 * def mirror_peer_set_cluster(self, ioctx, uuid, cluster_name): # <<<<<<<<<<<<<<
65189 * """
65190 * Set mirror peer cluster name
65191 */
65192 __pyx_tuple__153 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_uuid, __pyx_n_s_cluster_name, __pyx_n_s_ioctx_2, __pyx_n_s_uuid_2, __pyx_n_s_cluster_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__153)__builtin_expect(!!(!__pyx_tuple__153), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__65192; goto __pyx_L1_error;}
65193 __Pyx_GOTREF(__pyx_tuple__153);
65194 __Pyx_GIVEREF(__pyx_tuple__153);
65195 __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_set_cluster, 1794, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_set_cluster
, 1794, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__154)__builtin_expect(!!(!__pyx_codeobj__154), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__65195; goto __pyx_L1_error;}
65196
65197 /* "rbd.pyx":1816
65198 * raise make_ex(ret, 'error setting mirror peer cluster')
65199 *
65200 * def mirror_peer_get_attributes(self, ioctx, uuid): # <<<<<<<<<<<<<<
65201 * """
65202 * Get optional mirror peer attributes
65203 */
65204 __pyx_tuple__155 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_uuid, __pyx_n_s_ioctx_2, __pyx_n_s_uuid_2, __pyx_n_s_keys, __pyx_n_s_vals, __pyx_n_s_keys_size, __pyx_n_s_vals_size, __pyx_n_s_count, __pyx_n_s_ret, __pyx_n_s_keys_2, __pyx_n_s_vals_2, __pyx_n_s_x); if (unlikely(!__pyx_tuple__155)__builtin_expect(!!(!__pyx_tuple__155), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__65204; goto __pyx_L1_error;}
65205 __Pyx_GOTREF(__pyx_tuple__155);
65206 __Pyx_GIVEREF(__pyx_tuple__155);
65207 __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(3, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_get_attributes, 1816, __pyx_empty_bytes)PyCode_New(3 +0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_get_attributes
, 1816, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__156)__builtin_expect(!!(!__pyx_codeobj__156), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__65207; goto __pyx_L1_error;}
65208
65209 /* "rbd.pyx":1859
65210 * free(_vals)
65211 *
65212 * def mirror_peer_set_attributes(self, ioctx, uuid, attributes): # <<<<<<<<<<<<<<
65213 * """
65214 * Set optional mirror peer attributes
65215 */
65216 __pyx_tuple__157 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_uuid, __pyx_n_s_attributes, __pyx_n_s_keys_str, __pyx_n_s_vals_str, __pyx_n_s_ioctx_2, __pyx_n_s_uuid_2, __pyx_n_s_keys, __pyx_n_s_vals, __pyx_n_s_count, __pyx_n_s_ret, __pyx_n_s_x); if (unlikely(!__pyx_tuple__157)__builtin_expect(!!(!__pyx_tuple__157), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__65216; goto __pyx_L1_error;}
65217 __Pyx_GOTREF(__pyx_tuple__157);
65218 __Pyx_GIVEREF(__pyx_tuple__157);
65219 __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_set_attributes, 1859, __pyx_empty_bytes)PyCode_New(4 +0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_peer_set_attributes
, 1859, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__158)__builtin_expect(!!(!__pyx_codeobj__158), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__65219; goto __pyx_L1_error;}
65220
65221 /* "rbd.pyx":1886
65222 * raise make_ex(ret, 'error setting mirror peer attributes')
65223 *
65224 * def mirror_image_status_list(self, ioctx): # <<<<<<<<<<<<<<
65225 * """
65226 * Iterate over the mirror image statuses of a pool.
65227 */
65228 __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__159)__builtin_expect(!!(!__pyx_tuple__159), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__65228; goto __pyx_L1_error;}
65229 __Pyx_GOTREF(__pyx_tuple__159);
65230 __Pyx_GIVEREF(__pyx_tuple__159);
65231 __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_image_status_list, 1886, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_image_status_list
, 1886, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__160)__builtin_expect(!!(!__pyx_codeobj__160), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__65231; goto __pyx_L1_error;}
65232
65233 /* "rbd.pyx":1896
65234 * return MirrorImageStatusIterator(ioctx)
65235 *
65236 * def mirror_image_status_summary(self, ioctx): # <<<<<<<<<<<<<<
65237 * """
65238 * Get mirror image status summary of a pool.
65239 */
65240 __pyx_tuple__161 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_ioctx_2, __pyx_n_s_states, __pyx_n_s_counts, __pyx_n_s_maxlen, __pyx_n_s_ret, __pyx_n_s_i); if (unlikely(!__pyx_tuple__161)__builtin_expect(!!(!__pyx_tuple__161), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__65240; goto __pyx_L1_error;}
65241 __Pyx_GOTREF(__pyx_tuple__161);
65242 __Pyx_GIVEREF(__pyx_tuple__161);
65243 __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_image_status_summary, 1896, __pyx_empty_bytes)PyCode_New(2 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_image_status_summary
, 1896, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__162)__builtin_expect(!!(!__pyx_codeobj__162), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__65243; goto __pyx_L1_error;}
65244
65245 /* "rbd.pyx":1923
65246 * free(counts)
65247 *
65248 * def mirror_image_instance_id_list(self, ioctx): # <<<<<<<<<<<<<<
65249 * """
65250 * Iterate over the mirror image instance ids of a pool.
65251 */
65252 __pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__163)__builtin_expect(!!(!__pyx_tuple__163), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__65252; goto __pyx_L1_error;}
65253 __Pyx_GOTREF(__pyx_tuple__163);
65254 __Pyx_GIVEREF(__pyx_tuple__163);
65255 __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_image_instance_id_list, 1923, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_mirror_image_instance_id_list
, 1923, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__164)__builtin_expect(!!(!__pyx_codeobj__164), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__65255; goto __pyx_L1_error;}
65256
65257 /* "rbd.pyx":1933
65258 * return MirrorImageInstanceIdIterator(ioctx)
65259 *
65260 * def pool_metadata_get(self, ioctx, key): # <<<<<<<<<<<<<<
65261 * """
65262 * Get pool metadata for the given key.
65263 */
65264 __pyx_tuple__165 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_key, __pyx_n_s_ioctx_2, __pyx_n_s_key_2, __pyx_n_s_size, __pyx_n_s_value, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__165)__builtin_expect(!!(!__pyx_tuple__165), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__65264; goto __pyx_L1_error;}
65265 __Pyx_GOTREF(__pyx_tuple__165);
65266 __Pyx_GIVEREF(__pyx_tuple__165);
65267 __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_get, 1933, __pyx_empty_bytes)PyCode_New(3 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_get
, 1933, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__166)__builtin_expect(!!(!__pyx_codeobj__166), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__65267; goto __pyx_L1_error;}
65268
65269 /* "rbd.pyx":1965
65270 * free(value)
65271 *
65272 * def pool_metadata_set(self, ioctx, key, value): # <<<<<<<<<<<<<<
65273 * """
65274 * Set pool metadata for the given key.
65275 */
65276 __pyx_tuple__167 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_ioctx_2, __pyx_n_s_key_2, __pyx_n_s_value_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__167)__builtin_expect(!!(!__pyx_tuple__167), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__65276; goto __pyx_L1_error;}
65277 __Pyx_GOTREF(__pyx_tuple__167);
65278 __Pyx_GIVEREF(__pyx_tuple__167);
65279 __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_set, 1965, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_set
, 1965, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__168)__builtin_expect(!!(!__pyx_codeobj__168), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__65279; goto __pyx_L1_error;}
65280
65281 /* "rbd.pyx":1988
65282 * raise make_ex(ret, 'error setting metadata %s' % (key))
65283 *
65284 * def pool_metadata_remove(self, ioctx, key): # <<<<<<<<<<<<<<
65285 * """
65286 * Remove pool metadata for the given key.
65287 */
65288 __pyx_tuple__169 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_key, __pyx_n_s_ioctx_2, __pyx_n_s_key_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__169)__builtin_expect(!!(!__pyx_tuple__169), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__65288; goto __pyx_L1_error;}
65289 __Pyx_GOTREF(__pyx_tuple__169);
65290 __Pyx_GIVEREF(__pyx_tuple__169);
65291 __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_remove, 1988, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_remove
, 1988, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__170)__builtin_expect(!!(!__pyx_codeobj__170), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__65291; goto __pyx_L1_error;}
65292
65293 /* "rbd.pyx":2010
65294 * raise make_ex(ret, 'error removing metadata %s' % (key))
65295 *
65296 * def pool_metadata_list(self, ioctx): # <<<<<<<<<<<<<<
65297 * """
65298 * List pool metadata.
65299 */
65300 __pyx_tuple__171 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__171)__builtin_expect(!!(!__pyx_tuple__171), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__65300; goto __pyx_L1_error;}
65301 __Pyx_GOTREF(__pyx_tuple__171);
65302 __Pyx_GIVEREF(__pyx_tuple__171);
65303 __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_list, 2010, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_metadata_list
, 2010, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__172)__builtin_expect(!!(!__pyx_codeobj__172), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__65303; goto __pyx_L1_error;}
65304
65305 /* "rbd.pyx":2018
65306 * return PoolMetadataIterator(ioctx)
65307 *
65308 * def config_list(self, ioctx): # <<<<<<<<<<<<<<
65309 * """
65310 * List pool-level config overrides.
65311 */
65312 __pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ioctx); if (unlikely(!__pyx_tuple__173)__builtin_expect(!!(!__pyx_tuple__173), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__65312; goto __pyx_L1_error;}
65313 __Pyx_GOTREF(__pyx_tuple__173);
65314 __Pyx_GIVEREF(__pyx_tuple__173);
65315 __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_config_list, 2018, __pyx_empty_bytes)PyCode_New(2 +0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_config_list
, 2018, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__174)__builtin_expect(!!(!__pyx_codeobj__174), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__65315; goto __pyx_L1_error;}
65316
65317 /* "rbd.pyx":2026
65318 * return ConfigPoolIterator(ioctx)
65319 *
65320 * def group_create(self, ioctx, name): # <<<<<<<<<<<<<<
65321 * """
65322 * Create a group.
65323 */
65324 __pyx_tuple__175 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_name_2, __pyx_n_s_ioctx_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__175)__builtin_expect(!!(!__pyx_tuple__175), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__65324; goto __pyx_L1_error;}
65325 __Pyx_GOTREF(__pyx_tuple__175);
65326 __Pyx_GIVEREF(__pyx_tuple__175);
65327 __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_create, 2026, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_create
, 2026, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__176)__builtin_expect(!!(!__pyx_codeobj__176), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__65327; goto __pyx_L1_error;}
65328
65329 /* "rbd.pyx":2047
65330 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
65331 *
65332 * def group_remove(self, ioctx, name): # <<<<<<<<<<<<<<
65333 * """
65334 * Delete an RBD group. This may take a long time, since it does
65335 */
65336 __pyx_tuple__177 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__177)__builtin_expect(!!(!__pyx_tuple__177), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__65336; goto __pyx_L1_error;}
65337 __Pyx_GOTREF(__pyx_tuple__177);
65338 __Pyx_GIVEREF(__pyx_tuple__177);
65339 __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_remove, 2047, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_remove
, 2047, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__178)__builtin_expect(!!(!__pyx_codeobj__178), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__65339; goto __pyx_L1_error;}
65340
65341 /* "rbd.pyx":2070
65342 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
65343 *
65344 * def group_list(self, ioctx): # <<<<<<<<<<<<<<
65345 * """
65346 * List groups.
65347 */
65348 __pyx_tuple__179 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_ioctx_2, __pyx_n_s_size, __pyx_n_s_c_names, __pyx_n_s_ret, __pyx_n_s_name); if (unlikely(!__pyx_tuple__179)__builtin_expect(!!(!__pyx_tuple__179), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__65348; goto __pyx_L1_error;}
65349 __Pyx_GOTREF(__pyx_tuple__179);
65350 __Pyx_GIVEREF(__pyx_tuple__179);
65351 __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_list, 2070, __pyx_empty_bytes)PyCode_New(2 +0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_list
, 2070, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__180)__builtin_expect(!!(!__pyx_codeobj__180), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__65351; goto __pyx_L1_error;}
65352
65353 /* "rbd.pyx":2097
65354 * free(c_names)
65355 *
65356 * def group_rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
65357 * """
65358 * Rename an RBD group.
65359 */
65360 __pyx_tuple__181 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_src, __pyx_n_s_dest, __pyx_n_s_ioctx_2, __pyx_n_s_src_2, __pyx_n_s_dest_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__181)__builtin_expect(!!(!__pyx_tuple__181), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__65360; goto __pyx_L1_error;}
65361 __Pyx_GOTREF(__pyx_tuple__181);
65362 __Pyx_GIVEREF(__pyx_tuple__181);
65363 __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_rename, 2097, __pyx_empty_bytes)PyCode_New(4 +0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_group_rename
, 2097, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__182)__builtin_expect(!!(!__pyx_codeobj__182), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__65363; goto __pyx_L1_error;}
65364
65365 /* "rbd.pyx":2123
65366 * raise make_ex(ret, 'error renaming group')
65367 *
65368 * def namespace_create(self, ioctx, name): # <<<<<<<<<<<<<<
65369 * """
65370 * Create an RBD namespace within a pool
65371 */
65372 __pyx_tuple__183 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__183)__builtin_expect(!!(!__pyx_tuple__183), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__65372; goto __pyx_L1_error;}
65373 __Pyx_GOTREF(__pyx_tuple__183);
65374 __Pyx_GIVEREF(__pyx_tuple__183);
65375 __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_create, 2123, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_create
, 2123, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__184)__builtin_expect(!!(!__pyx_codeobj__184), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__65375; goto __pyx_L1_error;}
65376
65377 /* "rbd.pyx":2141
65378 * raise make_ex(ret, 'error creating namespace')
65379 *
65380 * def namespace_remove(self, ioctx, name): # <<<<<<<<<<<<<<
65381 * """
65382 * Remove an RBD namespace from a pool
65383 */
65384 __pyx_tuple__185 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__185)__builtin_expect(!!(!__pyx_tuple__185), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__65384; goto __pyx_L1_error;}
65385 __Pyx_GOTREF(__pyx_tuple__185);
65386 __Pyx_GIVEREF(__pyx_tuple__185);
65387 __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_remove, 2141, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_remove
, 2141, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__186)__builtin_expect(!!(!__pyx_codeobj__186), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__65387; goto __pyx_L1_error;}
65388
65389 /* "rbd.pyx":2159
65390 * raise make_ex(ret, 'error removing namespace')
65391 *
65392 * def namespace_exists(self, ioctx, name): # <<<<<<<<<<<<<<
65393 * """
65394 * Verifies if a namespace exists within a pool
65395 */
65396 __pyx_tuple__187 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_name, __pyx_n_s_ioctx_2, __pyx_n_s_name_2, __pyx_n_s_exists, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__187)__builtin_expect(!!(!__pyx_tuple__187), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__65396; goto __pyx_L1_error;}
65397 __Pyx_GOTREF(__pyx_tuple__187);
65398 __Pyx_GIVEREF(__pyx_tuple__187);
65399 __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_exists, 2159, __pyx_empty_bytes)PyCode_New(3 +0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_exists
, 2159, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__188)__builtin_expect(!!(!__pyx_codeobj__188), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__65399; goto __pyx_L1_error;}
65400
65401 /* "rbd.pyx":2180
65402 * return bool(_exists != 0)
65403 *
65404 * def namespace_list(self, ioctx): # <<<<<<<<<<<<<<
65405 * """
65406 * List all namespaces within a pool
65407 */
65408 __pyx_tuple__189 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_ioctx_2, __pyx_n_s_names, __pyx_n_s_size_2, __pyx_n_s_ret, __pyx_n_s_name); if (unlikely(!__pyx_tuple__189)__builtin_expect(!!(!__pyx_tuple__189), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__65408; goto __pyx_L1_error;}
65409 __Pyx_GOTREF(__pyx_tuple__189);
65410 __Pyx_GIVEREF(__pyx_tuple__189);
65411 __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_list, 2180, __pyx_empty_bytes)PyCode_New(2 +0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_namespace_list
, 2180, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__190)__builtin_expect(!!(!__pyx_codeobj__190), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__65411; goto __pyx_L1_error;}
65412
65413 /* "rbd.pyx":2206
65414 * free(_names)
65415 *
65416 * def pool_init(self, ioctx, force): # <<<<<<<<<<<<<<
65417 * """
65418 * Initialize an RBD pool
65419 */
65420 __pyx_tuple__191 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_force, __pyx_n_s_ioctx_2, __pyx_n_s_force_2, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__191)__builtin_expect(!!(!__pyx_tuple__191), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__65420; goto __pyx_L1_error;}
65421 __Pyx_GOTREF(__pyx_tuple__191);
65422 __Pyx_GIVEREF(__pyx_tuple__191);
65423 __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_init, 2206, __pyx_empty_bytes)PyCode_New(3 +0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_init
, 2206, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__192)__builtin_expect(!!(!__pyx_codeobj__192), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__65423; goto __pyx_L1_error;}
65424
65425 /* "rbd.pyx":2222
65426 * raise make_ex(ret, 'error initializing pool')
65427 *
65428 * def pool_stats_get(self, ioctx): # <<<<<<<<<<<<<<
65429 * """
65430 * Return RBD pool stats
65431 */
65432 __pyx_tuple__193 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_ioctx, __pyx_n_s_ioctx_2, __pyx_n_s_image_count_2, __pyx_n_s_image_provisioned_bytes_2, __pyx_n_s_image_max_provisioned_bytes_2, __pyx_n_s_image_snap_count_2, __pyx_n_s_trash_count_2, __pyx_n_s_trash_provisioned_bytes_2, __pyx_n_s_trash_max_provisioned_bytes_2, __pyx_n_s_trash_snap_count_2, __pyx_n_s_stats, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__193)__builtin_expect(!!(!__pyx_tuple__193), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__65432; goto __pyx_L1_error;}
65433 __Pyx_GOTREF(__pyx_tuple__193);
65434 __Pyx_GIVEREF(__pyx_tuple__193);
65435 __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_stats_get, 2222, __pyx_empty_bytes)PyCode_New(2 +0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple
, __pyx_kp_s_home_bhubbard_working_src_ceph, __pyx_n_s_pool_stats_get
, 2222, __pyx_empty_bytes)
; if (unlikely(!__pyx_codeobj__194)__builtin_expect(!!(!__pyx_codeobj__194), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__65435; goto __pyx_L1_error;}
65436 __Pyx_RefNannyFinishContext();
65437 return 0;
65438 __pyx_L1_error:;
65439 __Pyx_RefNannyFinishContext();
65440 return -1;
65441}
65442
65443static int __Pyx_InitGlobals(void) {
65444 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65444; goto __pyx_L1_error;};
65445 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)__builtin_expect(!!(!__pyx_int_0), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65445; goto __pyx_L1_error;}
65446 __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)__builtin_expect(!!(!__pyx_int_3), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65446; goto __pyx_L1_error;}
65447 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)__builtin_expect(!!(!__pyx_int_neg_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65447; goto __pyx_L1_error;}
65448 return 0;
65449 __pyx_L1_error:;
65450 return -1;
65451}
65452
65453#if PY_MAJOR_VERSION2 < 3
65454PyMODINIT_FUNCvoid initrbd(void); /*proto*/
65455PyMODINIT_FUNCvoid initrbd(void)
65456#else
65457PyMODINIT_FUNCvoid PyInit_rbd(void); /*proto*/
65458PyMODINIT_FUNCvoid PyInit_rbd(void)
65459#endif
65460{
65461 PyObject *__pyx_t_1 = NULL((void*)0);
65462 PyObject *__pyx_t_2 = NULL((void*)0);
65463 PyObject *__pyx_t_3 = NULL((void*)0);
65464 PyObject *__pyx_t_4 = NULL((void*)0);
65465 PyObject *__pyx_t_5 = NULL((void*)0);
65466 int __pyx_t_6;
65467 PyObject *__pyx_t_7 = NULL((void*)0);
65468 PyObject *__pyx_t_8 = NULL((void*)0);
65469 PyObject *__pyx_t_9 = NULL((void*)0);
65470 int __pyx_lineno = 0;
65471 const char *__pyx_filename = NULL((void*)0);
65472 int __pyx_clineno = 0;
65473 __Pyx_RefNannyDeclarations
65474 #if CYTHON_REFNANNY0
65475 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
65476 if (!__Pyx_RefNanny) {
65477 PyErr_Clear();
65478 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
65479 if (!__Pyx_RefNanny)
65480 Py_FatalError("failed to import 'refnanny' module");
65481 }
65482 #endif
65483 __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_rbd(void)", 0);
65484 if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65484; goto __pyx_L1_error;}
65485 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)__builtin_expect(!!(!__pyx_empty_tuple), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65485; goto __pyx_L1_error;}
65486 __pyx_empty_bytes = PyBytes_FromStringAndSizePyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)__builtin_expect(!!(!__pyx_empty_bytes), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65486; goto __pyx_L1_error;}
65487 #ifdef __Pyx_CyFunction_USED1
65488 if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65488; goto __pyx_L1_error;}
65489 #endif
65490 #ifdef __Pyx_FusedFunction_USED
65491 if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65491; goto __pyx_L1_error;}
65492 #endif
65493 #ifdef __Pyx_Coroutine_USED
65494 if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65494; goto __pyx_L1_error;}
65495 #endif
65496 #ifdef __Pyx_Generator_USED
65497 if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65497; goto __pyx_L1_error;}
65498 #endif
65499 #ifdef __Pyx_StopAsyncIteration_USED
65500 if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65500; goto __pyx_L1_error;}
65501 #endif
65502 /*--- Library function declarations ---*/
65503 /*--- Threads initialization code ---*/
65504 #if defined(__PYX_FORCE_INIT_THREADS0) && __PYX_FORCE_INIT_THREADS0
65505 #ifdef WITH_THREAD1 /* Python build with threading support? */
65506 PyEval_InitThreads();
65507 #endif
65508 #endif
65509 /*--- Module creation code ---*/
65510 #if PY_MAJOR_VERSION2 < 3
65511 __pyx_m = Py_InitModule4Py_InitModule4_64("rbd", __pyx_methods, __pyx_k_This_module_is_a_thin_wrapper_a, 0, PYTHON_API_VERSION1013); Py_XINCREF(__pyx_m)do { if ((__pyx_m) == ((void*)0)) ; else ( ((PyObject*)(__pyx_m
))->ob_refcnt++); } while (0)
;
65512 #else
65513 __pyx_m = PyModule_Create(&__pyx_moduledef);
65514 #endif
65515 if (unlikely(!__pyx_m)__builtin_expect(!!(!__pyx_m), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65515; goto __pyx_L1_error;}
65516 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)__builtin_expect(!!(!__pyx_d), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65516; goto __pyx_L1_error;}
65517 Py_INCREF(__pyx_d)( ((PyObject*)(__pyx_d))->ob_refcnt++);
65518 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME"__builtin__"); if (unlikely(!__pyx_b)__builtin_expect(!!(!__pyx_b), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65518; goto __pyx_L1_error;}
65519 #if CYTHON_COMPILING_IN_PYPY0
65520 Py_INCREF(__pyx_b)( ((PyObject*)(__pyx_b))->ob_refcnt++);
65521 #endif
65522 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65522; goto __pyx_L1_error;};
65523 /*--- Initialize various global constants etc. ---*/
65524 if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65524; goto __pyx_L1_error;}
65525 #if PY_MAJOR_VERSION2 < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0)
65526 if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65526; goto __pyx_L1_error;}
65527 #endif
65528 if (__pyx_module_is_main_rbd) {
65529 if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65529; goto __pyx_L1_error;}
65530 }
65531 #if PY_MAJOR_VERSION2 >= 3
65532 {
65533 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)__builtin_expect(!!(!modules), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65533; goto __pyx_L1_error;}
65534 if (!PyDict_GetItemString(modules, "rbd")) {
65535 if (unlikely(PyDict_SetItemString(modules, "rbd", __pyx_m) < 0)__builtin_expect(!!(PyDict_SetItemString(modules, "rbd", __pyx_m
) < 0), 0)
) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65535; goto __pyx_L1_error;}
65536 }
65537 }
65538 #endif
65539 /*--- Builtin init code ---*/
65540 if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65540; goto __pyx_L1_error;}
65541 /*--- Constants init code ---*/
65542 if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65542; goto __pyx_L1_error;}
65543 /*--- Global init code ---*/
65544 __pyx_v_3rbd_errno_to_exception = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
65545 __pyx_v_3rbd_group_errno_to_exception = Py_None(&_Py_NoneStruct); Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
65546 /*--- Variable export code ---*/
65547 /*--- Function export code ---*/
65548 /*--- Type init code ---*/
65549 __pyx_vtabptr_3rbd_Completion = &__pyx_vtable_3rbd_Completion;
65550 __pyx_vtable_3rbd_Completion._complete = (void (*)(struct __pyx_obj_3rbd_Completion *))__pyx_f_3rbd_10Completion__complete;
65551 __pyx_vtable_3rbd_Completion.__pyx___persist = (PyObject *(*)(struct __pyx_obj_3rbd_Completion *))__pyx_f_3rbd_10Completion___persist;
65552 __pyx_vtable_3rbd_Completion.__pyx___unpersist = (PyObject *(*)(struct __pyx_obj_3rbd_Completion *))__pyx_f_3rbd_10Completion___unpersist;
65553 if (PyType_Ready(&__pyx_type_3rbd_Completion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__65553; goto __pyx_L1_error;}
65554 __pyx_type_3rbd_Completion.tp_print = 0;
65555 if (__Pyx_SetVtable(__pyx_type_3rbd_Completion.tp_dict, __pyx_vtabptr_3rbd_Completion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__65555; goto __pyx_L1_error;}
65556 if (PyObject_SetAttrString(__pyx_m, "Completion", (PyObject *)&__pyx_type_3rbd_Completion) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__65556; goto __pyx_L1_error;}
65557 __pyx_ptype_3rbd_Completion = &__pyx_type_3rbd_Completion;
65558 if (PyType_Ready(&__pyx_type_3rbd_MirrorPeerIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__65558; goto __pyx_L1_error;}
65559 __pyx_type_3rbd_MirrorPeerIterator.tp_print = 0;
65560 if (PyObject_SetAttrString(__pyx_m, "MirrorPeerIterator", (PyObject *)&__pyx_type_3rbd_MirrorPeerIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2294; __pyx_clineno = __LINE__65560; goto __pyx_L1_error;}
65561 __pyx_ptype_3rbd_MirrorPeerIterator = &__pyx_type_3rbd_MirrorPeerIterator;
65562 if (PyType_Ready(&__pyx_type_3rbd_MirrorImageStatusIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __pyx_clineno = __LINE__65562; goto __pyx_L1_error;}
65563 __pyx_type_3rbd_MirrorImageStatusIterator.tp_print = 0;
65564 if (PyObject_SetAttrString(__pyx_m, "MirrorImageStatusIterator", (PyObject *)&__pyx_type_3rbd_MirrorImageStatusIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __pyx_clineno = __LINE__65564; goto __pyx_L1_error;}
65565 __pyx_ptype_3rbd_MirrorImageStatusIterator = &__pyx_type_3rbd_MirrorImageStatusIterator;
65566 if (PyType_Ready(&__pyx_type_3rbd_MirrorImageInstanceIdIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2433; __pyx_clineno = __LINE__65566; goto __pyx_L1_error;}
65567 __pyx_type_3rbd_MirrorImageInstanceIdIterator.tp_print = 0;
65568 if (PyObject_SetAttrString(__pyx_m, "MirrorImageInstanceIdIterator", (PyObject *)&__pyx_type_3rbd_MirrorImageInstanceIdIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2433; __pyx_clineno = __LINE__65568; goto __pyx_L1_error;}
65569 __pyx_ptype_3rbd_MirrorImageInstanceIdIterator = &__pyx_type_3rbd_MirrorImageInstanceIdIterator;
65570 if (PyType_Ready(&__pyx_type_3rbd_PoolMetadataIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__65570; goto __pyx_L1_error;}
65571 __pyx_type_3rbd_PoolMetadataIterator.tp_print = 0;
65572 if (PyObject_SetAttrString(__pyx_m, "PoolMetadataIterator", (PyObject *)&__pyx_type_3rbd_PoolMetadataIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__65572; goto __pyx_L1_error;}
65573 __pyx_ptype_3rbd_PoolMetadataIterator = &__pyx_type_3rbd_PoolMetadataIterator;
65574 if (PyType_Ready(&__pyx_type_3rbd_ConfigPoolIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__65574; goto __pyx_L1_error;}
65575 __pyx_type_3rbd_ConfigPoolIterator.tp_print = 0;
65576 if (PyObject_SetAttrString(__pyx_m, "ConfigPoolIterator", (PyObject *)&__pyx_type_3rbd_ConfigPoolIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__65576; goto __pyx_L1_error;}
65577 __pyx_ptype_3rbd_ConfigPoolIterator = &__pyx_type_3rbd_ConfigPoolIterator;
65578 if (PyType_Ready(&__pyx_type_3rbd_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2626; __pyx_clineno = __LINE__65578; goto __pyx_L1_error;}
65579 __pyx_type_3rbd_Group.tp_print = 0;
65580 if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_3rbd_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2626; __pyx_clineno = __LINE__65580; goto __pyx_L1_error;}
65581 __pyx_ptype_3rbd_Group = &__pyx_type_3rbd_Group;
65582 if (PyType_Ready(&__pyx_type_3rbd_Image) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; __pyx_clineno = __LINE__65582; goto __pyx_L1_error;}
65583 __pyx_type_3rbd_Image.tp_print = 0;
65584 #if CYTHON_COMPILING_IN_CPYTHON1
65585 {
65586 PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_3rbd_Image, "__init__"); if (unlikely(!wrapper)__builtin_expect(!!(!wrapper), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; __pyx_clineno = __LINE__65586; goto __pyx_L1_error;}
65587 if (Py_TYPE(wrapper)(((PyObject*)(wrapper))->ob_type) == &PyWrapperDescr_Type) {
65588 __pyx_wrapperbase_3rbd_5Image___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
65589 __pyx_wrapperbase_3rbd_5Image___init__.doc = __pyx_doc_3rbd_5Image___init__;
65590 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_3rbd_5Image___init__;
65591 }
65592 }
65593 #endif
65594 if (PyObject_SetAttrString(__pyx_m, "Image", (PyObject *)&__pyx_type_3rbd_Image) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; __pyx_clineno = __LINE__65594; goto __pyx_L1_error;}
65595 __pyx_ptype_3rbd_Image = &__pyx_type_3rbd_Image;
65596 if (PyType_Ready(&__pyx_type_3rbd_ImageIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4545; __pyx_clineno = __LINE__65596; goto __pyx_L1_error;}
65597 __pyx_type_3rbd_ImageIterator.tp_print = 0;
65598 if (PyObject_SetAttrString(__pyx_m, "ImageIterator", (PyObject *)&__pyx_type_3rbd_ImageIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4545; __pyx_clineno = __LINE__65598; goto __pyx_L1_error;}
65599 __pyx_ptype_3rbd_ImageIterator = &__pyx_type_3rbd_ImageIterator;
65600 if (PyType_Ready(&__pyx_type_3rbd_LockOwnerIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4590; __pyx_clineno = __LINE__65600; goto __pyx_L1_error;}
65601 __pyx_type_3rbd_LockOwnerIterator.tp_print = 0;
65602 if (PyObject_SetAttrString(__pyx_m, "LockOwnerIterator", (PyObject *)&__pyx_type_3rbd_LockOwnerIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4590; __pyx_clineno = __LINE__65602; goto __pyx_L1_error;}
65603 __pyx_ptype_3rbd_LockOwnerIterator = &__pyx_type_3rbd_LockOwnerIterator;
65604 if (PyType_Ready(&__pyx_type_3rbd_MetadataIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4638; __pyx_clineno = __LINE__65604; goto __pyx_L1_error;}
65605 __pyx_type_3rbd_MetadataIterator.tp_print = 0;
65606 if (PyObject_SetAttrString(__pyx_m, "MetadataIterator", (PyObject *)&__pyx_type_3rbd_MetadataIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4638; __pyx_clineno = __LINE__65606; goto __pyx_L1_error;}
65607 __pyx_ptype_3rbd_MetadataIterator = &__pyx_type_3rbd_MetadataIterator;
65608 if (PyType_Ready(&__pyx_type_3rbd_SnapIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4706; __pyx_clineno = __LINE__65608; goto __pyx_L1_error;}
65609 __pyx_type_3rbd_SnapIterator.tp_print = 0;
65610 if (PyObject_SetAttrString(__pyx_m, "SnapIterator", (PyObject *)&__pyx_type_3rbd_SnapIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4706; __pyx_clineno = __LINE__65610; goto __pyx_L1_error;}
65611 __pyx_ptype_3rbd_SnapIterator = &__pyx_type_3rbd_SnapIterator;
65612 if (PyType_Ready(&__pyx_type_3rbd_TrashIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4774; __pyx_clineno = __LINE__65612; goto __pyx_L1_error;}
65613 __pyx_type_3rbd_TrashIterator.tp_print = 0;
65614 if (PyObject_SetAttrString(__pyx_m, "TrashIterator", (PyObject *)&__pyx_type_3rbd_TrashIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4774; __pyx_clineno = __LINE__65614; goto __pyx_L1_error;}
65615 __pyx_ptype_3rbd_TrashIterator = &__pyx_type_3rbd_TrashIterator;
65616 if (PyType_Ready(&__pyx_type_3rbd_ChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4832; __pyx_clineno = __LINE__65616; goto __pyx_L1_error;}
65617 __pyx_type_3rbd_ChildIterator.tp_print = 0;
65618 if (PyObject_SetAttrString(__pyx_m, "ChildIterator", (PyObject *)&__pyx_type_3rbd_ChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4832; __pyx_clineno = __LINE__65618; goto __pyx_L1_error;}
65619 __pyx_ptype_3rbd_ChildIterator = &__pyx_type_3rbd_ChildIterator;
65620 if (PyType_Ready(&__pyx_type_3rbd_WatcherIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4890; __pyx_clineno = __LINE__65620; goto __pyx_L1_error;}
65621 __pyx_type_3rbd_WatcherIterator.tp_print = 0;
65622 if (PyObject_SetAttrString(__pyx_m, "WatcherIterator", (PyObject *)&__pyx_type_3rbd_WatcherIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4890; __pyx_clineno = __LINE__65622; goto __pyx_L1_error;}
65623 __pyx_ptype_3rbd_WatcherIterator = &__pyx_type_3rbd_WatcherIterator;
65624 if (PyType_Ready(&__pyx_type_3rbd_ConfigImageIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4937; __pyx_clineno = __LINE__65624; goto __pyx_L1_error;}
65625 __pyx_type_3rbd_ConfigImageIterator.tp_print = 0;
65626 if (PyObject_SetAttrString(__pyx_m, "ConfigImageIterator", (PyObject *)&__pyx_type_3rbd_ConfigImageIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4937; __pyx_clineno = __LINE__65626; goto __pyx_L1_error;}
65627 __pyx_ptype_3rbd_ConfigImageIterator = &__pyx_type_3rbd_ConfigImageIterator;
65628 if (PyType_Ready(&__pyx_type_3rbd_GroupImageIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4985; __pyx_clineno = __LINE__65628; goto __pyx_L1_error;}
65629 __pyx_type_3rbd_GroupImageIterator.tp_print = 0;
65630 if (PyObject_SetAttrString(__pyx_m, "GroupImageIterator", (PyObject *)&__pyx_type_3rbd_GroupImageIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4985; __pyx_clineno = __LINE__65630; goto __pyx_L1_error;}
65631 __pyx_ptype_3rbd_GroupImageIterator = &__pyx_type_3rbd_GroupImageIterator;
65632 if (PyType_Ready(&__pyx_type_3rbd_GroupSnapIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5038; __pyx_clineno = __LINE__65632; goto __pyx_L1_error;}
65633 __pyx_type_3rbd_GroupSnapIterator.tp_print = 0;
65634 if (PyObject_SetAttrString(__pyx_m, "GroupSnapIterator", (PyObject *)&__pyx_type_3rbd_GroupSnapIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5038; __pyx_clineno = __LINE__65634; goto __pyx_L1_error;}
65635 __pyx_ptype_3rbd_GroupSnapIterator = &__pyx_type_3rbd_GroupSnapIterator;
65636 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2330; __pyx_clineno = __LINE__65636; goto __pyx_L1_error;}
65637 __pyx_type_3rbd___pyx_scope_struct____iter__.tp_print = 0;
65638 __pyx_ptype_3rbd___pyx_scope_struct____iter__ = &__pyx_type_3rbd___pyx_scope_struct____iter__;
65639 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__65639; goto __pyx_L1_error;}
65640 __pyx_type_3rbd___pyx_scope_struct_1___iter__.tp_print = 0;
65641 __pyx_ptype_3rbd___pyx_scope_struct_1___iter__ = &__pyx_type_3rbd___pyx_scope_struct_1___iter__;
65642 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_2___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2459; __pyx_clineno = __LINE__65642; goto __pyx_L1_error;}
65643 __pyx_type_3rbd___pyx_scope_struct_2___iter__.tp_print = 0;
65644 __pyx_ptype_3rbd___pyx_scope_struct_2___iter__ = &__pyx_type_3rbd___pyx_scope_struct_2___iter__;
65645 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_3___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; __pyx_clineno = __LINE__65645; goto __pyx_L1_error;}
65646 __pyx_type_3rbd___pyx_scope_struct_3___iter__.tp_print = 0;
65647 __pyx_ptype_3rbd___pyx_scope_struct_3___iter__ = &__pyx_type_3rbd___pyx_scope_struct_3___iter__;
65648 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_4___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__65648; goto __pyx_L1_error;}
65649 __pyx_type_3rbd___pyx_scope_struct_4___iter__.tp_print = 0;
65650 __pyx_ptype_3rbd___pyx_scope_struct_4___iter__ = &__pyx_type_3rbd___pyx_scope_struct_4___iter__;
65651 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_5_aio_read) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4226; __pyx_clineno = __LINE__65651; goto __pyx_L1_error;}
65652 __pyx_type_3rbd___pyx_scope_struct_5_aio_read.tp_print = 0;
65653 __pyx_ptype_3rbd___pyx_scope_struct_5_aio_read = &__pyx_type_3rbd___pyx_scope_struct_5_aio_read;
65654 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_6___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __pyx_clineno = __LINE__65654; goto __pyx_L1_error;}
65655 __pyx_type_3rbd___pyx_scope_struct_6___iter__.tp_print = 0;
65656 __pyx_ptype_3rbd___pyx_scope_struct_6___iter__ = &__pyx_type_3rbd___pyx_scope_struct_6___iter__;
65657 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4626; __pyx_clineno = __LINE__65657; goto __pyx_L1_error;}
65658 __pyx_type_3rbd___pyx_scope_struct_7___iter__.tp_print = 0;
65659 __pyx_ptype_3rbd___pyx_scope_struct_7___iter__ = &__pyx_type_3rbd___pyx_scope_struct_7___iter__;
65660 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_8___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4662; __pyx_clineno = __LINE__65660; goto __pyx_L1_error;}
65661 __pyx_type_3rbd___pyx_scope_struct_8___iter__.tp_print = 0;
65662 __pyx_ptype_3rbd___pyx_scope_struct_8___iter__ = &__pyx_type_3rbd___pyx_scope_struct_8___iter__;
65663 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_9___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4747; __pyx_clineno = __LINE__65663; goto __pyx_L1_error;}
65664 __pyx_type_3rbd___pyx_scope_struct_9___iter__.tp_print = 0;
65665 __pyx_ptype_3rbd___pyx_scope_struct_9___iter__ = &__pyx_type_3rbd___pyx_scope_struct_9___iter__;
65666 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_10___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4817; __pyx_clineno = __LINE__65666; goto __pyx_L1_error;}
65667 __pyx_type_3rbd___pyx_scope_struct_10___iter__.tp_print = 0;
65668 __pyx_ptype_3rbd___pyx_scope_struct_10___iter__ = &__pyx_type_3rbd___pyx_scope_struct_10___iter__;
65669 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_11___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4875; __pyx_clineno = __LINE__65669; goto __pyx_L1_error;}
65670 __pyx_type_3rbd___pyx_scope_struct_11___iter__.tp_print = 0;
65671 __pyx_ptype_3rbd___pyx_scope_struct_11___iter__ = &__pyx_type_3rbd___pyx_scope_struct_11___iter__;
65672 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_12___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4924; __pyx_clineno = __LINE__65672; goto __pyx_L1_error;}
65673 __pyx_type_3rbd___pyx_scope_struct_12___iter__.tp_print = 0;
65674 __pyx_ptype_3rbd___pyx_scope_struct_12___iter__ = &__pyx_type_3rbd___pyx_scope_struct_12___iter__;
65675 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_13___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4972; __pyx_clineno = __LINE__65675; goto __pyx_L1_error;}
65676 __pyx_type_3rbd___pyx_scope_struct_13___iter__.tp_print = 0;
65677 __pyx_ptype_3rbd___pyx_scope_struct_13___iter__ = &__pyx_type_3rbd___pyx_scope_struct_13___iter__;
65678 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_14___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5023; __pyx_clineno = __LINE__65678; goto __pyx_L1_error;}
65679 __pyx_type_3rbd___pyx_scope_struct_14___iter__.tp_print = 0;
65680 __pyx_ptype_3rbd___pyx_scope_struct_14___iter__ = &__pyx_type_3rbd___pyx_scope_struct_14___iter__;
65681 if (PyType_Ready(&__pyx_type_3rbd___pyx_scope_struct_15___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5073; __pyx_clineno = __LINE__65681; goto __pyx_L1_error;}
65682 __pyx_type_3rbd___pyx_scope_struct_15___iter__.tp_print = 0;
65683 __pyx_ptype_3rbd___pyx_scope_struct_15___iter__ = &__pyx_type_3rbd___pyx_scope_struct_15___iter__;
65684 /*--- Type import code ---*/
65685 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "type",
65686 #if CYTHON_COMPILING_IN_PYPY0
65687 sizeof(PyTypeObject),
65688 #else
65689 sizeof(PyHeapTypeObject),
65690 #endif
65691 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)__builtin_expect(!!(!__pyx_ptype_7cpython_4type_type), 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__65691; goto __pyx_L1_error;}
65692 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)__builtin_expect(!!(!__pyx_ptype_7cpython_4bool_bool), 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__65692; goto __pyx_L1_error;}
65693 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME"__builtin__", "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)__builtin_expect(!!(!__pyx_ptype_7cpython_7complex_complex), 0
)
) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__65693; goto __pyx_L1_error;}
65694 __pyx_ptype_5rados_Rados = __Pyx_ImportType("rados", "Rados", sizeof(struct __pyx_obj_5rados_Rados), 1); if (unlikely(!__pyx_ptype_5rados_Rados)__builtin_expect(!!(!__pyx_ptype_5rados_Rados), 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__65694; goto __pyx_L1_error;}
65695 __pyx_ptype_5rados_Ioctx = __Pyx_ImportType("rados", "Ioctx", sizeof(struct __pyx_obj_5rados_Ioctx), 1); if (unlikely(!__pyx_ptype_5rados_Ioctx)__builtin_expect(!!(!__pyx_ptype_5rados_Ioctx), 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__65695; goto __pyx_L1_error;}
65696 /*--- Variable import code ---*/
65697 /*--- Function import code ---*/
65698 /*--- Execution code ---*/
65699 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
65700 if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__65700; goto __pyx_L1_error;}
65701 #endif
65702
65703 /* "rbd.pyx":18
65704 *
65705 * import cython
65706 * import sys # <<<<<<<<<<<<<<
65707 *
65708 * from cpython cimport PyObject, ref, exc
65709 */
65710 __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__65710; goto __pyx_L1_error;}
65711 __Pyx_GOTREF(__pyx_t_1);
65712 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__65712; goto __pyx_L1_error;}
65713 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65714
65715 /* "rbd.pyx":26
65716 * from libc.string cimport strdup
65717 *
65718 * try: # <<<<<<<<<<<<<<
65719 * from collections.abc import Iterable
65720 * except ImportError:
65721 */
65722 {
65723 __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
65724 __Pyx_XGOTREF(__pyx_t_2);
65725 __Pyx_XGOTREF(__pyx_t_3);
65726 __Pyx_XGOTREF(__pyx_t_4);
65727 /*try:*/ {
65728
65729 /* "rbd.pyx":27
65730 *
65731 * try:
65732 * from collections.abc import Iterable # <<<<<<<<<<<<<<
65733 * except ImportError:
65734 * from collections import Iterable
65735 */
65736 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__65736; goto __pyx_L2_error;}
65737 __Pyx_GOTREF(__pyx_t_1);
65738 __Pyx_INCREF(__pyx_n_s_Iterable)( ((PyObject*)(__pyx_n_s_Iterable))->ob_refcnt++);
65739 __Pyx_GIVEREF(__pyx_n_s_Iterable);
65740 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Iterable)(((PyListObject *)(__pyx_t_1))->ob_item[0] = (__pyx_n_s_Iterable
))
;
65741 __pyx_t_5 = __Pyx_Import(__pyx_n_s_collections_abc, __pyx_t_1, -1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__65741; goto __pyx_L2_error;}
65742 __Pyx_GOTREF(__pyx_t_5);
65743 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65744 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__65744; goto __pyx_L2_error;}
65745 __Pyx_GOTREF(__pyx_t_1);
65746 if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__65746; goto __pyx_L2_error;}
65747 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65748 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
65749
65750 /* "rbd.pyx":26
65751 * from libc.string cimport strdup
65752 *
65753 * try: # <<<<<<<<<<<<<<
65754 * from collections.abc import Iterable
65755 * except ImportError:
65756 */
65757 }
65758 __Pyx_XDECREF(__pyx_t_2)do { if ((__pyx_t_2) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_2)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_2)))); } while (0); } while (0)
; __pyx_t_2 = 0;
65759 __Pyx_XDECREF(__pyx_t_3)do { if ((__pyx_t_3) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_3))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_3)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_3)))); } while (0); } while (0)
; __pyx_t_3 = 0;
65760 __Pyx_XDECREF(__pyx_t_4)do { if ((__pyx_t_4) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_4))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_4)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_4)))); } while (0); } while (0)
; __pyx_t_4 = 0;
65761 goto __pyx_L9_try_end;
65762 __pyx_L2_error:;
65763 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
; __pyx_t_1 = 0;
65764 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
; __pyx_t_5 = 0;
65765
65766 /* "rbd.pyx":28
65767 * try:
65768 * from collections.abc import Iterable
65769 * except ImportError: # <<<<<<<<<<<<<<
65770 * from collections import Iterable
65771 * from datetime import datetime
65772 */
65773 __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
65774 if (__pyx_t_6) {
65775 __Pyx_AddTraceback("rbd", __pyx_clineno, __pyx_lineno, __pyx_filename);
65776 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__65776; goto __pyx_L4_except_error;}
65777 __Pyx_GOTREF(__pyx_t_5);
65778 __Pyx_GOTREF(__pyx_t_1);
65779 __Pyx_GOTREF(__pyx_t_7);
65780
65781 /* "rbd.pyx":29
65782 * from collections.abc import Iterable
65783 * except ImportError:
65784 * from collections import Iterable # <<<<<<<<<<<<<<
65785 * from datetime import datetime
65786 * from itertools import chain
65787 */
65788 __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__65788; goto __pyx_L4_except_error;}
65789 __Pyx_GOTREF(__pyx_t_8);
65790 __Pyx_INCREF(__pyx_n_s_Iterable)( ((PyObject*)(__pyx_n_s_Iterable))->ob_refcnt++);
65791 __Pyx_GIVEREF(__pyx_n_s_Iterable);
65792 PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_Iterable)(((PyListObject *)(__pyx_t_8))->ob_item[0] = (__pyx_n_s_Iterable
))
;
65793 __pyx_t_9 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_8, -1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__65793; goto __pyx_L4_except_error;}
65794 __Pyx_GOTREF(__pyx_t_9);
65795 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
65796 __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__65796; goto __pyx_L4_except_error;}
65797 __Pyx_GOTREF(__pyx_t_8);
65798 if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__65798; goto __pyx_L4_except_error;}
65799 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
65800 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
65801 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
65802 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65803 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65804 goto __pyx_L3_exception_handled;
65805 }
65806 goto __pyx_L4_except_error;
65807 __pyx_L4_except_error:;
65808
65809 /* "rbd.pyx":26
65810 * from libc.string cimport strdup
65811 *
65812 * try: # <<<<<<<<<<<<<<
65813 * from collections.abc import Iterable
65814 * except ImportError:
65815 */
65816 __Pyx_XGIVEREF(__pyx_t_2);
65817 __Pyx_XGIVEREF(__pyx_t_3);
65818 __Pyx_XGIVEREF(__pyx_t_4);
65819 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
65820 goto __pyx_L1_error;
65821 __pyx_L3_exception_handled:;
65822 __Pyx_XGIVEREF(__pyx_t_2);
65823 __Pyx_XGIVEREF(__pyx_t_3);
65824 __Pyx_XGIVEREF(__pyx_t_4);
65825 __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
65826 __pyx_L9_try_end:;
65827 }
65828
65829 /* "rbd.pyx":30
65830 * except ImportError:
65831 * from collections import Iterable
65832 * from datetime import datetime # <<<<<<<<<<<<<<
65833 * from itertools import chain
65834 * import time
65835 */
65836 __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__65836; goto __pyx_L1_error;}
65837 __Pyx_GOTREF(__pyx_t_7);
65838 __Pyx_INCREF(__pyx_n_s_datetime)( ((PyObject*)(__pyx_n_s_datetime))->ob_refcnt++);
65839 __Pyx_GIVEREF(__pyx_n_s_datetime);
65840 PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_datetime)(((PyListObject *)(__pyx_t_7))->ob_item[0] = (__pyx_n_s_datetime
))
;
65841 __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_7, -1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__65841; goto __pyx_L1_error;}
65842 __Pyx_GOTREF(__pyx_t_1);
65843 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65844 __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__65844; goto __pyx_L1_error;}
65845 __Pyx_GOTREF(__pyx_t_7);
65846 if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__65846; goto __pyx_L1_error;}
65847 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65848 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65849
65850 /* "rbd.pyx":31
65851 * from collections import Iterable
65852 * from datetime import datetime
65853 * from itertools import chain # <<<<<<<<<<<<<<
65854 * import time
65855 *
65856 */
65857 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__65857; goto __pyx_L1_error;}
65858 __Pyx_GOTREF(__pyx_t_1);
65859 __Pyx_INCREF(__pyx_n_s_chain)( ((PyObject*)(__pyx_n_s_chain))->ob_refcnt++);
65860 __Pyx_GIVEREF(__pyx_n_s_chain);
65861 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chain)(((PyListObject *)(__pyx_t_1))->ob_item[0] = (__pyx_n_s_chain
))
;
65862 __pyx_t_7 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, -1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__65862; goto __pyx_L1_error;}
65863 __Pyx_GOTREF(__pyx_t_7);
65864 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65865 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_chain); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__65865; goto __pyx_L1_error;}
65866 __Pyx_GOTREF(__pyx_t_1);
65867 if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__65867; goto __pyx_L1_error;}
65868 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
65869 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65870
65871 /* "rbd.pyx":32
65872 * from datetime import datetime
65873 * from itertools import chain
65874 * import time # <<<<<<<<<<<<<<
65875 *
65876 * cimport rados
65877 */
65878 __pyx_t_7 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__65878; goto __pyx_L1_error;}
65879 __Pyx_GOTREF(__pyx_t_7);
65880 if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__65880; goto __pyx_L1_error;}
65881 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65882
65883 /* "rbd.pyx":620
65884 * int rbd_pool_stats_get(rados_ioctx_t io, rbd_pool_stats_t stats)
65885 *
65886 * ECANCELED = _ECANCELED # <<<<<<<<<<<<<<
65887 *
65888 * RBD_FEATURE_LAYERING = _RBD_FEATURE_LAYERING
65889 */
65890 __pyx_t_7 = __Pyx_PyInt_From_int(ECANCELED125); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__65890; goto __pyx_L1_error;}
65891 __Pyx_GOTREF(__pyx_t_7);
65892 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ECANCELED, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__65892; goto __pyx_L1_error;}
65893 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65894
65895 /* "rbd.pyx":622
65896 * ECANCELED = _ECANCELED
65897 *
65898 * RBD_FEATURE_LAYERING = _RBD_FEATURE_LAYERING # <<<<<<<<<<<<<<
65899 * RBD_FEATURE_STRIPINGV2 = _RBD_FEATURE_STRIPINGV2
65900 * RBD_FEATURE_EXCLUSIVE_LOCK = _RBD_FEATURE_EXCLUSIVE_LOCK
65901 */
65902 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_LAYERING(1ULL<<0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__65902; goto __pyx_L1_error;}
65903 __Pyx_GOTREF(__pyx_t_7);
65904 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_LAYERING, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__65904; goto __pyx_L1_error;}
65905 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65906
65907 /* "rbd.pyx":623
65908 *
65909 * RBD_FEATURE_LAYERING = _RBD_FEATURE_LAYERING
65910 * RBD_FEATURE_STRIPINGV2 = _RBD_FEATURE_STRIPINGV2 # <<<<<<<<<<<<<<
65911 * RBD_FEATURE_EXCLUSIVE_LOCK = _RBD_FEATURE_EXCLUSIVE_LOCK
65912 * RBD_FEATURE_OBJECT_MAP = _RBD_FEATURE_OBJECT_MAP
65913 */
65914 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_STRIPINGV2(1ULL<<1)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__65914; goto __pyx_L1_error;}
65915 __Pyx_GOTREF(__pyx_t_7);
65916 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_STRIPINGV2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__65916; goto __pyx_L1_error;}
65917 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65918
65919 /* "rbd.pyx":624
65920 * RBD_FEATURE_LAYERING = _RBD_FEATURE_LAYERING
65921 * RBD_FEATURE_STRIPINGV2 = _RBD_FEATURE_STRIPINGV2
65922 * RBD_FEATURE_EXCLUSIVE_LOCK = _RBD_FEATURE_EXCLUSIVE_LOCK # <<<<<<<<<<<<<<
65923 * RBD_FEATURE_OBJECT_MAP = _RBD_FEATURE_OBJECT_MAP
65924 * RBD_FEATURE_FAST_DIFF = _RBD_FEATURE_FAST_DIFF
65925 */
65926 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_EXCLUSIVE_LOCK(1ULL<<2)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__65926; goto __pyx_L1_error;}
65927 __Pyx_GOTREF(__pyx_t_7);
65928 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_EXCLUSIVE_LOCK, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__65928; goto __pyx_L1_error;}
65929 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65930
65931 /* "rbd.pyx":625
65932 * RBD_FEATURE_STRIPINGV2 = _RBD_FEATURE_STRIPINGV2
65933 * RBD_FEATURE_EXCLUSIVE_LOCK = _RBD_FEATURE_EXCLUSIVE_LOCK
65934 * RBD_FEATURE_OBJECT_MAP = _RBD_FEATURE_OBJECT_MAP # <<<<<<<<<<<<<<
65935 * RBD_FEATURE_FAST_DIFF = _RBD_FEATURE_FAST_DIFF
65936 * RBD_FEATURE_DEEP_FLATTEN = _RBD_FEATURE_DEEP_FLATTEN
65937 */
65938 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_OBJECT_MAP(1ULL<<3)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__65938; goto __pyx_L1_error;}
65939 __Pyx_GOTREF(__pyx_t_7);
65940 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_OBJECT_MAP, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__65940; goto __pyx_L1_error;}
65941 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65942
65943 /* "rbd.pyx":626
65944 * RBD_FEATURE_EXCLUSIVE_LOCK = _RBD_FEATURE_EXCLUSIVE_LOCK
65945 * RBD_FEATURE_OBJECT_MAP = _RBD_FEATURE_OBJECT_MAP
65946 * RBD_FEATURE_FAST_DIFF = _RBD_FEATURE_FAST_DIFF # <<<<<<<<<<<<<<
65947 * RBD_FEATURE_DEEP_FLATTEN = _RBD_FEATURE_DEEP_FLATTEN
65948 * RBD_FEATURE_JOURNALING = _RBD_FEATURE_JOURNALING
65949 */
65950 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_FAST_DIFF(1ULL<<4)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__65950; goto __pyx_L1_error;}
65951 __Pyx_GOTREF(__pyx_t_7);
65952 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_FAST_DIFF, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__65952; goto __pyx_L1_error;}
65953 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65954
65955 /* "rbd.pyx":627
65956 * RBD_FEATURE_OBJECT_MAP = _RBD_FEATURE_OBJECT_MAP
65957 * RBD_FEATURE_FAST_DIFF = _RBD_FEATURE_FAST_DIFF
65958 * RBD_FEATURE_DEEP_FLATTEN = _RBD_FEATURE_DEEP_FLATTEN # <<<<<<<<<<<<<<
65959 * RBD_FEATURE_JOURNALING = _RBD_FEATURE_JOURNALING
65960 * RBD_FEATURE_DATA_POOL = _RBD_FEATURE_DATA_POOL
65961 */
65962 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_DEEP_FLATTEN(1ULL<<5)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__65962; goto __pyx_L1_error;}
65963 __Pyx_GOTREF(__pyx_t_7);
65964 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_DEEP_FLATTEN, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__65964; goto __pyx_L1_error;}
65965 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65966
65967 /* "rbd.pyx":628
65968 * RBD_FEATURE_FAST_DIFF = _RBD_FEATURE_FAST_DIFF
65969 * RBD_FEATURE_DEEP_FLATTEN = _RBD_FEATURE_DEEP_FLATTEN
65970 * RBD_FEATURE_JOURNALING = _RBD_FEATURE_JOURNALING # <<<<<<<<<<<<<<
65971 * RBD_FEATURE_DATA_POOL = _RBD_FEATURE_DATA_POOL
65972 * RBD_FEATURE_OPERATIONS = _RBD_FEATURE_OPERATIONS
65973 */
65974 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_JOURNALING(1ULL<<6)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__65974; goto __pyx_L1_error;}
65975 __Pyx_GOTREF(__pyx_t_7);
65976 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_JOURNALING, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__65976; goto __pyx_L1_error;}
65977 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65978
65979 /* "rbd.pyx":629
65980 * RBD_FEATURE_DEEP_FLATTEN = _RBD_FEATURE_DEEP_FLATTEN
65981 * RBD_FEATURE_JOURNALING = _RBD_FEATURE_JOURNALING
65982 * RBD_FEATURE_DATA_POOL = _RBD_FEATURE_DATA_POOL # <<<<<<<<<<<<<<
65983 * RBD_FEATURE_OPERATIONS = _RBD_FEATURE_OPERATIONS
65984 * RBD_FEATURE_MIGRATING = _RBD_FEATURE_MIGRATING
65985 */
65986 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_DATA_POOL(1ULL<<7)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__65986; goto __pyx_L1_error;}
65987 __Pyx_GOTREF(__pyx_t_7);
65988 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_DATA_POOL, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__65988; goto __pyx_L1_error;}
65989 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
65990
65991 /* "rbd.pyx":630
65992 * RBD_FEATURE_JOURNALING = _RBD_FEATURE_JOURNALING
65993 * RBD_FEATURE_DATA_POOL = _RBD_FEATURE_DATA_POOL
65994 * RBD_FEATURE_OPERATIONS = _RBD_FEATURE_OPERATIONS # <<<<<<<<<<<<<<
65995 * RBD_FEATURE_MIGRATING = _RBD_FEATURE_MIGRATING
65996 *
65997 */
65998 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_OPERATIONS(1ULL<<8)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__65998; goto __pyx_L1_error;}
65999 __Pyx_GOTREF(__pyx_t_7);
66000 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_OPERATIONS, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__66000; goto __pyx_L1_error;}
66001 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66002
66003 /* "rbd.pyx":631
66004 * RBD_FEATURE_DATA_POOL = _RBD_FEATURE_DATA_POOL
66005 * RBD_FEATURE_OPERATIONS = _RBD_FEATURE_OPERATIONS
66006 * RBD_FEATURE_MIGRATING = _RBD_FEATURE_MIGRATING # <<<<<<<<<<<<<<
66007 *
66008 * RBD_FEATURES_INCOMPATIBLE = _RBD_FEATURES_INCOMPATIBLE
66009 */
66010 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURE_MIGRATING(1ULL<<9)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__66010; goto __pyx_L1_error;}
66011 __Pyx_GOTREF(__pyx_t_7);
66012 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURE_MIGRATING, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__66012; goto __pyx_L1_error;}
66013 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66014
66015 /* "rbd.pyx":633
66016 * RBD_FEATURE_MIGRATING = _RBD_FEATURE_MIGRATING
66017 *
66018 * RBD_FEATURES_INCOMPATIBLE = _RBD_FEATURES_INCOMPATIBLE # <<<<<<<<<<<<<<
66019 * RBD_FEATURES_RW_INCOMPATIBLE = _RBD_FEATURES_RW_INCOMPATIBLE
66020 * RBD_FEATURES_MUTABLE = _RBD_FEATURES_MUTABLE
66021 */
66022 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURES_INCOMPATIBLE((1ULL<<0) | (1ULL<<1) | (1ULL<<7))); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__66022; goto __pyx_L1_error;}
66023 __Pyx_GOTREF(__pyx_t_7);
66024 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURES_INCOMPATIBLE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__66024; goto __pyx_L1_error;}
66025 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66026
66027 /* "rbd.pyx":634
66028 *
66029 * RBD_FEATURES_INCOMPATIBLE = _RBD_FEATURES_INCOMPATIBLE
66030 * RBD_FEATURES_RW_INCOMPATIBLE = _RBD_FEATURES_RW_INCOMPATIBLE # <<<<<<<<<<<<<<
66031 * RBD_FEATURES_MUTABLE = _RBD_FEATURES_MUTABLE
66032 * RBD_FEATURES_SINGLE_CLIENT = _RBD_FEATURES_SINGLE_CLIENT
66033 */
66034 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURES_RW_INCOMPATIBLE(((1ULL<<0) | (1ULL<<1) | (1ULL<<7)) | (1ULL
<<2) | (1ULL<<3) | (1ULL<<4) | (1ULL<<
5) | (1ULL<<6) | (1ULL<<8) | (1ULL<<9))
); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__66034; goto __pyx_L1_error;}
66035 __Pyx_GOTREF(__pyx_t_7);
66036 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURES_RW_INCOMPATIBLE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__66036; goto __pyx_L1_error;}
66037 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66038
66039 /* "rbd.pyx":635
66040 * RBD_FEATURES_INCOMPATIBLE = _RBD_FEATURES_INCOMPATIBLE
66041 * RBD_FEATURES_RW_INCOMPATIBLE = _RBD_FEATURES_RW_INCOMPATIBLE
66042 * RBD_FEATURES_MUTABLE = _RBD_FEATURES_MUTABLE # <<<<<<<<<<<<<<
66043 * RBD_FEATURES_SINGLE_CLIENT = _RBD_FEATURES_SINGLE_CLIENT
66044 * RBD_FEATURES_ALL = _RBD_FEATURES_ALL
66045 */
66046 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURES_MUTABLE((1ULL<<2) | (1ULL<<3) | (1ULL<<4) | (1ULL<<
6))
); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__66046; goto __pyx_L1_error;}
66047 __Pyx_GOTREF(__pyx_t_7);
66048 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURES_MUTABLE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__66048; goto __pyx_L1_error;}
66049 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66050
66051 /* "rbd.pyx":636
66052 * RBD_FEATURES_RW_INCOMPATIBLE = _RBD_FEATURES_RW_INCOMPATIBLE
66053 * RBD_FEATURES_MUTABLE = _RBD_FEATURES_MUTABLE
66054 * RBD_FEATURES_SINGLE_CLIENT = _RBD_FEATURES_SINGLE_CLIENT # <<<<<<<<<<<<<<
66055 * RBD_FEATURES_ALL = _RBD_FEATURES_ALL
66056 *
66057 */
66058 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURES_SINGLE_CLIENT((1ULL<<2) | (1ULL<<3) | (1ULL<<4) | (1ULL<<
6))
); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__66058; goto __pyx_L1_error;}
66059 __Pyx_GOTREF(__pyx_t_7);
66060 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURES_SINGLE_CLIENT, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__66060; goto __pyx_L1_error;}
66061 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66062
66063 /* "rbd.pyx":637
66064 * RBD_FEATURES_MUTABLE = _RBD_FEATURES_MUTABLE
66065 * RBD_FEATURES_SINGLE_CLIENT = _RBD_FEATURES_SINGLE_CLIENT
66066 * RBD_FEATURES_ALL = _RBD_FEATURES_ALL # <<<<<<<<<<<<<<
66067 *
66068 * RBD_OPERATION_FEATURE_CLONE_PARENT = _RBD_OPERATION_FEATURE_CLONE_PARENT
66069 */
66070 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FEATURES_ALL((1ULL<<0) | (1ULL<<1) | (1ULL<<2) | (1ULL<<
3) | (1ULL<<4) | (1ULL<<5) | (1ULL<<6) | (1ULL
<<7) | (1ULL<<8) | (1ULL<<9))
); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__66070; goto __pyx_L1_error;}
66071 __Pyx_GOTREF(__pyx_t_7);
66072 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FEATURES_ALL, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__66072; goto __pyx_L1_error;}
66073 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66074
66075 /* "rbd.pyx":639
66076 * RBD_FEATURES_ALL = _RBD_FEATURES_ALL
66077 *
66078 * RBD_OPERATION_FEATURE_CLONE_PARENT = _RBD_OPERATION_FEATURE_CLONE_PARENT # <<<<<<<<<<<<<<
66079 * RBD_OPERATION_FEATURE_CLONE_CHILD = _RBD_OPERATION_FEATURE_CLONE_CHILD
66080 * RBD_OPERATION_FEATURE_GROUP = _RBD_OPERATION_FEATURE_GROUP
66081 */
66082 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_OPERATION_FEATURE_CLONE_PARENT(1ULL<<0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__66082; goto __pyx_L1_error;}
66083 __Pyx_GOTREF(__pyx_t_7);
66084 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_OPERATION_FEATURE_CLONE_PARE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__66084; goto __pyx_L1_error;}
66085 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66086
66087 /* "rbd.pyx":640
66088 *
66089 * RBD_OPERATION_FEATURE_CLONE_PARENT = _RBD_OPERATION_FEATURE_CLONE_PARENT
66090 * RBD_OPERATION_FEATURE_CLONE_CHILD = _RBD_OPERATION_FEATURE_CLONE_CHILD # <<<<<<<<<<<<<<
66091 * RBD_OPERATION_FEATURE_GROUP = _RBD_OPERATION_FEATURE_GROUP
66092 * RBD_OPERATION_FEATURE_SNAP_TRASH = _RBD_OPERATION_FEATURE_SNAP_TRASH
66093 */
66094 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_OPERATION_FEATURE_CLONE_CHILD(1ULL<<1)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__66094; goto __pyx_L1_error;}
66095 __Pyx_GOTREF(__pyx_t_7);
66096 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_OPERATION_FEATURE_CLONE_CHIL, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__66096; goto __pyx_L1_error;}
66097 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66098
66099 /* "rbd.pyx":641
66100 * RBD_OPERATION_FEATURE_CLONE_PARENT = _RBD_OPERATION_FEATURE_CLONE_PARENT
66101 * RBD_OPERATION_FEATURE_CLONE_CHILD = _RBD_OPERATION_FEATURE_CLONE_CHILD
66102 * RBD_OPERATION_FEATURE_GROUP = _RBD_OPERATION_FEATURE_GROUP # <<<<<<<<<<<<<<
66103 * RBD_OPERATION_FEATURE_SNAP_TRASH = _RBD_OPERATION_FEATURE_SNAP_TRASH
66104 *
66105 */
66106 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_OPERATION_FEATURE_GROUP(1ULL<<2)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__66106; goto __pyx_L1_error;}
66107 __Pyx_GOTREF(__pyx_t_7);
66108 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_OPERATION_FEATURE_GROUP, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__66108; goto __pyx_L1_error;}
66109 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66110
66111 /* "rbd.pyx":642
66112 * RBD_OPERATION_FEATURE_CLONE_CHILD = _RBD_OPERATION_FEATURE_CLONE_CHILD
66113 * RBD_OPERATION_FEATURE_GROUP = _RBD_OPERATION_FEATURE_GROUP
66114 * RBD_OPERATION_FEATURE_SNAP_TRASH = _RBD_OPERATION_FEATURE_SNAP_TRASH # <<<<<<<<<<<<<<
66115 *
66116 * RBD_FLAG_OBJECT_MAP_INVALID = _RBD_FLAG_OBJECT_MAP_INVALID
66117 */
66118 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_OPERATION_FEATURE_SNAP_TRASH(1ULL<<3)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__66118; goto __pyx_L1_error;}
66119 __Pyx_GOTREF(__pyx_t_7);
66120 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_OPERATION_FEATURE_SNAP_TRASH, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__66120; goto __pyx_L1_error;}
66121 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66122
66123 /* "rbd.pyx":644
66124 * RBD_OPERATION_FEATURE_SNAP_TRASH = _RBD_OPERATION_FEATURE_SNAP_TRASH
66125 *
66126 * RBD_FLAG_OBJECT_MAP_INVALID = _RBD_FLAG_OBJECT_MAP_INVALID # <<<<<<<<<<<<<<
66127 * RBD_FLAG_FAST_DIFF_INVALID = _RBD_FLAG_FAST_DIFF_INVALID
66128 *
66129 */
66130 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FLAG_OBJECT_MAP_INVALID(1<<0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__66130; goto __pyx_L1_error;}
66131 __Pyx_GOTREF(__pyx_t_7);
66132 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FLAG_OBJECT_MAP_INVALID, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__66132; goto __pyx_L1_error;}
66133 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66134
66135 /* "rbd.pyx":645
66136 *
66137 * RBD_FLAG_OBJECT_MAP_INVALID = _RBD_FLAG_OBJECT_MAP_INVALID
66138 * RBD_FLAG_FAST_DIFF_INVALID = _RBD_FLAG_FAST_DIFF_INVALID # <<<<<<<<<<<<<<
66139 *
66140 * RBD_MIRROR_MODE_DISABLED = _RBD_MIRROR_MODE_DISABLED
66141 */
66142 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_FLAG_FAST_DIFF_INVALID(1<<1)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__66142; goto __pyx_L1_error;}
66143 __Pyx_GOTREF(__pyx_t_7);
66144 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_FLAG_FAST_DIFF_INVALID, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__66144; goto __pyx_L1_error;}
66145 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66146
66147 /* "rbd.pyx":647
66148 * RBD_FLAG_FAST_DIFF_INVALID = _RBD_FLAG_FAST_DIFF_INVALID
66149 *
66150 * RBD_MIRROR_MODE_DISABLED = _RBD_MIRROR_MODE_DISABLED # <<<<<<<<<<<<<<
66151 * RBD_MIRROR_MODE_IMAGE = _RBD_MIRROR_MODE_IMAGE
66152 * RBD_MIRROR_MODE_POOL = _RBD_MIRROR_MODE_POOL
66153 */
66154 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_mode_t(RBD_MIRROR_MODE_DISABLED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__66154; goto __pyx_L1_error;}
66155 __Pyx_GOTREF(__pyx_t_7);
66156 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_MODE_DISABLED, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__66156; goto __pyx_L1_error;}
66157 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66158
66159 /* "rbd.pyx":648
66160 *
66161 * RBD_MIRROR_MODE_DISABLED = _RBD_MIRROR_MODE_DISABLED
66162 * RBD_MIRROR_MODE_IMAGE = _RBD_MIRROR_MODE_IMAGE # <<<<<<<<<<<<<<
66163 * RBD_MIRROR_MODE_POOL = _RBD_MIRROR_MODE_POOL
66164 *
66165 */
66166 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_mode_t(RBD_MIRROR_MODE_IMAGE); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__66166; goto __pyx_L1_error;}
66167 __Pyx_GOTREF(__pyx_t_7);
66168 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_MODE_IMAGE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__66168; goto __pyx_L1_error;}
66169 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66170
66171 /* "rbd.pyx":649
66172 * RBD_MIRROR_MODE_DISABLED = _RBD_MIRROR_MODE_DISABLED
66173 * RBD_MIRROR_MODE_IMAGE = _RBD_MIRROR_MODE_IMAGE
66174 * RBD_MIRROR_MODE_POOL = _RBD_MIRROR_MODE_POOL # <<<<<<<<<<<<<<
66175 *
66176 * RBD_MIRROR_IMAGE_DISABLING = _RBD_MIRROR_IMAGE_DISABLING
66177 */
66178 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_mode_t(RBD_MIRROR_MODE_POOL); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__66178; goto __pyx_L1_error;}
66179 __Pyx_GOTREF(__pyx_t_7);
66180 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_MODE_POOL, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__66180; goto __pyx_L1_error;}
66181 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66182
66183 /* "rbd.pyx":651
66184 * RBD_MIRROR_MODE_POOL = _RBD_MIRROR_MODE_POOL
66185 *
66186 * RBD_MIRROR_IMAGE_DISABLING = _RBD_MIRROR_IMAGE_DISABLING # <<<<<<<<<<<<<<
66187 * RBD_MIRROR_IMAGE_ENABLED = _RBD_MIRROR_IMAGE_ENABLED
66188 * RBD_MIRROR_IMAGE_DISABLED = _RBD_MIRROR_IMAGE_DISABLED
66189 */
66190 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_state_t(RBD_MIRROR_IMAGE_DISABLING); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__66190; goto __pyx_L1_error;}
66191 __Pyx_GOTREF(__pyx_t_7);
66192 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_IMAGE_DISABLING, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__66192; goto __pyx_L1_error;}
66193 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66194
66195 /* "rbd.pyx":652
66196 *
66197 * RBD_MIRROR_IMAGE_DISABLING = _RBD_MIRROR_IMAGE_DISABLING
66198 * RBD_MIRROR_IMAGE_ENABLED = _RBD_MIRROR_IMAGE_ENABLED # <<<<<<<<<<<<<<
66199 * RBD_MIRROR_IMAGE_DISABLED = _RBD_MIRROR_IMAGE_DISABLED
66200 *
66201 */
66202 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_state_t(RBD_MIRROR_IMAGE_ENABLED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__66202; goto __pyx_L1_error;}
66203 __Pyx_GOTREF(__pyx_t_7);
66204 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_IMAGE_ENABLED, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__66204; goto __pyx_L1_error;}
66205 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66206
66207 /* "rbd.pyx":653
66208 * RBD_MIRROR_IMAGE_DISABLING = _RBD_MIRROR_IMAGE_DISABLING
66209 * RBD_MIRROR_IMAGE_ENABLED = _RBD_MIRROR_IMAGE_ENABLED
66210 * RBD_MIRROR_IMAGE_DISABLED = _RBD_MIRROR_IMAGE_DISABLED # <<<<<<<<<<<<<<
66211 *
66212 * MIRROR_IMAGE_STATUS_STATE_UNKNOWN = _MIRROR_IMAGE_STATUS_STATE_UNKNOWN
66213 */
66214 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_state_t(RBD_MIRROR_IMAGE_DISABLED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__66214; goto __pyx_L1_error;}
66215 __Pyx_GOTREF(__pyx_t_7);
66216 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_IMAGE_DISABLED, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__66216; goto __pyx_L1_error;}
66217 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66218
66219 /* "rbd.pyx":655
66220 * RBD_MIRROR_IMAGE_DISABLED = _RBD_MIRROR_IMAGE_DISABLED
66221 *
66222 * MIRROR_IMAGE_STATUS_STATE_UNKNOWN = _MIRROR_IMAGE_STATUS_STATE_UNKNOWN # <<<<<<<<<<<<<<
66223 * MIRROR_IMAGE_STATUS_STATE_ERROR = _MIRROR_IMAGE_STATUS_STATE_ERROR
66224 * MIRROR_IMAGE_STATUS_STATE_SYNCING = _MIRROR_IMAGE_STATUS_STATE_SYNCING
66225 */
66226 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_UNKNOWN); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__66226; goto __pyx_L1_error;}
66227 __Pyx_GOTREF(__pyx_t_7);
66228 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_UNKNOW, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__66228; goto __pyx_L1_error;}
66229 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66230
66231 /* "rbd.pyx":656
66232 *
66233 * MIRROR_IMAGE_STATUS_STATE_UNKNOWN = _MIRROR_IMAGE_STATUS_STATE_UNKNOWN
66234 * MIRROR_IMAGE_STATUS_STATE_ERROR = _MIRROR_IMAGE_STATUS_STATE_ERROR # <<<<<<<<<<<<<<
66235 * MIRROR_IMAGE_STATUS_STATE_SYNCING = _MIRROR_IMAGE_STATUS_STATE_SYNCING
66236 * MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY
66237 */
66238 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_ERROR); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__66238; goto __pyx_L1_error;}
66239 __Pyx_GOTREF(__pyx_t_7);
66240 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_ERROR, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__66240; goto __pyx_L1_error;}
66241 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66242
66243 /* "rbd.pyx":657
66244 * MIRROR_IMAGE_STATUS_STATE_UNKNOWN = _MIRROR_IMAGE_STATUS_STATE_UNKNOWN
66245 * MIRROR_IMAGE_STATUS_STATE_ERROR = _MIRROR_IMAGE_STATUS_STATE_ERROR
66246 * MIRROR_IMAGE_STATUS_STATE_SYNCING = _MIRROR_IMAGE_STATUS_STATE_SYNCING # <<<<<<<<<<<<<<
66247 * MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY
66248 * MIRROR_IMAGE_STATUS_STATE_REPLAYING = _MIRROR_IMAGE_STATUS_STATE_REPLAYING
66249 */
66250 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_SYNCING); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__66250; goto __pyx_L1_error;}
66251 __Pyx_GOTREF(__pyx_t_7);
66252 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_SYNCIN, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__66252; goto __pyx_L1_error;}
66253 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66254
66255 /* "rbd.pyx":658
66256 * MIRROR_IMAGE_STATUS_STATE_ERROR = _MIRROR_IMAGE_STATUS_STATE_ERROR
66257 * MIRROR_IMAGE_STATUS_STATE_SYNCING = _MIRROR_IMAGE_STATUS_STATE_SYNCING
66258 * MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY # <<<<<<<<<<<<<<
66259 * MIRROR_IMAGE_STATUS_STATE_REPLAYING = _MIRROR_IMAGE_STATUS_STATE_REPLAYING
66260 * MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY
66261 */
66262 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__66262; goto __pyx_L1_error;}
66263 __Pyx_GOTREF(__pyx_t_7);
66264 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STARTI, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__66264; goto __pyx_L1_error;}
66265 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66266
66267 /* "rbd.pyx":659
66268 * MIRROR_IMAGE_STATUS_STATE_SYNCING = _MIRROR_IMAGE_STATUS_STATE_SYNCING
66269 * MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY
66270 * MIRROR_IMAGE_STATUS_STATE_REPLAYING = _MIRROR_IMAGE_STATUS_STATE_REPLAYING # <<<<<<<<<<<<<<
66271 * MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY
66272 * MIRROR_IMAGE_STATUS_STATE_STOPPED = _MIRROR_IMAGE_STATUS_STATE_STOPPED
66273 */
66274 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_REPLAYING); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__66274; goto __pyx_L1_error;}
66275 __Pyx_GOTREF(__pyx_t_7);
66276 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_REPLAY, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__66276; goto __pyx_L1_error;}
66277 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66278
66279 /* "rbd.pyx":660
66280 * MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STARTING_REPLAY
66281 * MIRROR_IMAGE_STATUS_STATE_REPLAYING = _MIRROR_IMAGE_STATUS_STATE_REPLAYING
66282 * MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY # <<<<<<<<<<<<<<
66283 * MIRROR_IMAGE_STATUS_STATE_STOPPED = _MIRROR_IMAGE_STATUS_STATE_STOPPED
66284 *
66285 */
66286 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__66286; goto __pyx_L1_error;}
66287 __Pyx_GOTREF(__pyx_t_7);
66288 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STOPPI, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__66288; goto __pyx_L1_error;}
66289 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66290
66291 /* "rbd.pyx":661
66292 * MIRROR_IMAGE_STATUS_STATE_REPLAYING = _MIRROR_IMAGE_STATUS_STATE_REPLAYING
66293 * MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY = _MIRROR_IMAGE_STATUS_STATE_STOPPING_REPLAY
66294 * MIRROR_IMAGE_STATUS_STATE_STOPPED = _MIRROR_IMAGE_STATUS_STATE_STOPPED # <<<<<<<<<<<<<<
66295 *
66296 * RBD_LOCK_MODE_EXCLUSIVE = _RBD_LOCK_MODE_EXCLUSIVE
66297 */
66298 __pyx_t_7 = __Pyx_PyInt_From_rbd_mirror_image_status_state_t(MIRROR_IMAGE_STATUS_STATE_STOPPED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__66298; goto __pyx_L1_error;}
66299 __Pyx_GOTREF(__pyx_t_7);
66300 if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIRROR_IMAGE_STATUS_STATE_STOPPE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__66300; goto __pyx_L1_error;}
66301 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66302
66303 /* "rbd.pyx":663
66304 * MIRROR_IMAGE_STATUS_STATE_STOPPED = _MIRROR_IMAGE_STATUS_STATE_STOPPED
66305 *
66306 * RBD_LOCK_MODE_EXCLUSIVE = _RBD_LOCK_MODE_EXCLUSIVE # <<<<<<<<<<<<<<
66307 * RBD_LOCK_MODE_SHARED = _RBD_LOCK_MODE_SHARED
66308 *
66309 */
66310 __pyx_t_7 = __Pyx_PyInt_From_rbd_lock_mode_t(RBD_LOCK_MODE_EXCLUSIVE); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__66310; goto __pyx_L1_error;}
66311 __Pyx_GOTREF(__pyx_t_7);
66312 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_LOCK_MODE_EXCLUSIVE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__66312; goto __pyx_L1_error;}
66313 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66314
66315 /* "rbd.pyx":664
66316 *
66317 * RBD_LOCK_MODE_EXCLUSIVE = _RBD_LOCK_MODE_EXCLUSIVE
66318 * RBD_LOCK_MODE_SHARED = _RBD_LOCK_MODE_SHARED # <<<<<<<<<<<<<<
66319 *
66320 * RBD_IMAGE_OPTION_FORMAT = _RBD_IMAGE_OPTION_FORMAT
66321 */
66322 __pyx_t_7 = __Pyx_PyInt_From_rbd_lock_mode_t(RBD_LOCK_MODE_SHARED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__66322; goto __pyx_L1_error;}
66323 __Pyx_GOTREF(__pyx_t_7);
66324 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_LOCK_MODE_SHARED, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__66324; goto __pyx_L1_error;}
66325 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66326
66327 /* "rbd.pyx":666
66328 * RBD_LOCK_MODE_SHARED = _RBD_LOCK_MODE_SHARED
66329 *
66330 * RBD_IMAGE_OPTION_FORMAT = _RBD_IMAGE_OPTION_FORMAT # <<<<<<<<<<<<<<
66331 * RBD_IMAGE_OPTION_FEATURES = _RBD_IMAGE_OPTION_FEATURES
66332 * RBD_IMAGE_OPTION_ORDER = _RBD_IMAGE_OPTION_ORDER
66333 */
66334 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_IMAGE_OPTION_FORMAT); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__66334; goto __pyx_L1_error;}
66335 __Pyx_GOTREF(__pyx_t_7);
66336 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_OPTION_FORMAT, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__66336; goto __pyx_L1_error;}
66337 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66338
66339 /* "rbd.pyx":667
66340 *
66341 * RBD_IMAGE_OPTION_FORMAT = _RBD_IMAGE_OPTION_FORMAT
66342 * RBD_IMAGE_OPTION_FEATURES = _RBD_IMAGE_OPTION_FEATURES # <<<<<<<<<<<<<<
66343 * RBD_IMAGE_OPTION_ORDER = _RBD_IMAGE_OPTION_ORDER
66344 * RBD_IMAGE_OPTION_STRIPE_UNIT = _RBD_IMAGE_OPTION_STRIPE_UNIT
66345 */
66346 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_IMAGE_OPTION_FEATURES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__66346; goto __pyx_L1_error;}
66347 __Pyx_GOTREF(__pyx_t_7);
66348 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_OPTION_FEATURES, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__66348; goto __pyx_L1_error;}
66349 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66350
66351 /* "rbd.pyx":668
66352 * RBD_IMAGE_OPTION_FORMAT = _RBD_IMAGE_OPTION_FORMAT
66353 * RBD_IMAGE_OPTION_FEATURES = _RBD_IMAGE_OPTION_FEATURES
66354 * RBD_IMAGE_OPTION_ORDER = _RBD_IMAGE_OPTION_ORDER # <<<<<<<<<<<<<<
66355 * RBD_IMAGE_OPTION_STRIPE_UNIT = _RBD_IMAGE_OPTION_STRIPE_UNIT
66356 * RBD_IMAGE_OPTION_STRIPE_COUNT = _RBD_IMAGE_OPTION_STRIPE_COUNT
66357 */
66358 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_IMAGE_OPTION_ORDER); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__66358; goto __pyx_L1_error;}
66359 __Pyx_GOTREF(__pyx_t_7);
66360 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_OPTION_ORDER, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__66360; goto __pyx_L1_error;}
66361 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66362
66363 /* "rbd.pyx":669
66364 * RBD_IMAGE_OPTION_FEATURES = _RBD_IMAGE_OPTION_FEATURES
66365 * RBD_IMAGE_OPTION_ORDER = _RBD_IMAGE_OPTION_ORDER
66366 * RBD_IMAGE_OPTION_STRIPE_UNIT = _RBD_IMAGE_OPTION_STRIPE_UNIT # <<<<<<<<<<<<<<
66367 * RBD_IMAGE_OPTION_STRIPE_COUNT = _RBD_IMAGE_OPTION_STRIPE_COUNT
66368 * RBD_IMAGE_OPTION_DATA_POOL = _RBD_IMAGE_OPTION_DATA_POOL
66369 */
66370 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_IMAGE_OPTION_STRIPE_UNIT); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__66370; goto __pyx_L1_error;}
66371 __Pyx_GOTREF(__pyx_t_7);
66372 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_OPTION_STRIPE_UNIT, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__66372; goto __pyx_L1_error;}
66373 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66374
66375 /* "rbd.pyx":670
66376 * RBD_IMAGE_OPTION_ORDER = _RBD_IMAGE_OPTION_ORDER
66377 * RBD_IMAGE_OPTION_STRIPE_UNIT = _RBD_IMAGE_OPTION_STRIPE_UNIT
66378 * RBD_IMAGE_OPTION_STRIPE_COUNT = _RBD_IMAGE_OPTION_STRIPE_COUNT # <<<<<<<<<<<<<<
66379 * RBD_IMAGE_OPTION_DATA_POOL = _RBD_IMAGE_OPTION_DATA_POOL
66380 *
66381 */
66382 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_IMAGE_OPTION_STRIPE_COUNT); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__66382; goto __pyx_L1_error;}
66383 __Pyx_GOTREF(__pyx_t_7);
66384 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_OPTION_STRIPE_COUNT, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__66384; goto __pyx_L1_error;}
66385 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66386
66387 /* "rbd.pyx":671
66388 * RBD_IMAGE_OPTION_STRIPE_UNIT = _RBD_IMAGE_OPTION_STRIPE_UNIT
66389 * RBD_IMAGE_OPTION_STRIPE_COUNT = _RBD_IMAGE_OPTION_STRIPE_COUNT
66390 * RBD_IMAGE_OPTION_DATA_POOL = _RBD_IMAGE_OPTION_DATA_POOL # <<<<<<<<<<<<<<
66391 *
66392 * RBD_SNAP_NAMESPACE_TYPE_USER = _RBD_SNAP_NAMESPACE_TYPE_USER
66393 */
66394 __pyx_t_7 = __Pyx_PyInt_From_int(RBD_IMAGE_OPTION_DATA_POOL); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__66394; goto __pyx_L1_error;}
66395 __Pyx_GOTREF(__pyx_t_7);
66396 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_OPTION_DATA_POOL, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__66396; goto __pyx_L1_error;}
66397 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66398
66399 /* "rbd.pyx":673
66400 * RBD_IMAGE_OPTION_DATA_POOL = _RBD_IMAGE_OPTION_DATA_POOL
66401 *
66402 * RBD_SNAP_NAMESPACE_TYPE_USER = _RBD_SNAP_NAMESPACE_TYPE_USER # <<<<<<<<<<<<<<
66403 * RBD_SNAP_NAMESPACE_TYPE_GROUP = _RBD_SNAP_NAMESPACE_TYPE_GROUP
66404 * RBD_SNAP_NAMESPACE_TYPE_TRASH = _RBD_SNAP_NAMESPACE_TYPE_TRASH
66405 */
66406 __pyx_t_7 = __Pyx_PyInt_From_rbd_snap_namespace_type_t(RBD_SNAP_NAMESPACE_TYPE_USER); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__66406; goto __pyx_L1_error;}
66407 __Pyx_GOTREF(__pyx_t_7);
66408 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_USER, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__66408; goto __pyx_L1_error;}
66409 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66410
66411 /* "rbd.pyx":674
66412 *
66413 * RBD_SNAP_NAMESPACE_TYPE_USER = _RBD_SNAP_NAMESPACE_TYPE_USER
66414 * RBD_SNAP_NAMESPACE_TYPE_GROUP = _RBD_SNAP_NAMESPACE_TYPE_GROUP # <<<<<<<<<<<<<<
66415 * RBD_SNAP_NAMESPACE_TYPE_TRASH = _RBD_SNAP_NAMESPACE_TYPE_TRASH
66416 *
66417 */
66418 __pyx_t_7 = __Pyx_PyInt_From_rbd_snap_namespace_type_t(RBD_SNAP_NAMESPACE_TYPE_GROUP); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__66418; goto __pyx_L1_error;}
66419 __Pyx_GOTREF(__pyx_t_7);
66420 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_GROUP, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__66420; goto __pyx_L1_error;}
66421 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66422
66423 /* "rbd.pyx":675
66424 * RBD_SNAP_NAMESPACE_TYPE_USER = _RBD_SNAP_NAMESPACE_TYPE_USER
66425 * RBD_SNAP_NAMESPACE_TYPE_GROUP = _RBD_SNAP_NAMESPACE_TYPE_GROUP
66426 * RBD_SNAP_NAMESPACE_TYPE_TRASH = _RBD_SNAP_NAMESPACE_TYPE_TRASH # <<<<<<<<<<<<<<
66427 *
66428 * RBD_GROUP_IMAGE_STATE_ATTACHED = _RBD_GROUP_IMAGE_STATE_ATTACHED
66429 */
66430 __pyx_t_7 = __Pyx_PyInt_From_rbd_snap_namespace_type_t(RBD_SNAP_NAMESPACE_TYPE_TRASH); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__66430; goto __pyx_L1_error;}
66431 __Pyx_GOTREF(__pyx_t_7);
66432 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_SNAP_NAMESPACE_TYPE_TRASH, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__66432; goto __pyx_L1_error;}
66433 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66434
66435 /* "rbd.pyx":677
66436 * RBD_SNAP_NAMESPACE_TYPE_TRASH = _RBD_SNAP_NAMESPACE_TYPE_TRASH
66437 *
66438 * RBD_GROUP_IMAGE_STATE_ATTACHED = _RBD_GROUP_IMAGE_STATE_ATTACHED # <<<<<<<<<<<<<<
66439 * RBD_GROUP_IMAGE_STATE_INCOMPLETE = _RBD_GROUP_IMAGE_STATE_INCOMPLETE
66440 *
66441 */
66442 __pyx_t_7 = __Pyx_PyInt_From_rbd_group_image_state_t(RBD_GROUP_IMAGE_STATE_ATTACHED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__66442; goto __pyx_L1_error;}
66443 __Pyx_GOTREF(__pyx_t_7);
66444 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_GROUP_IMAGE_STATE_ATTACHED, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__66444; goto __pyx_L1_error;}
66445 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66446
66447 /* "rbd.pyx":678
66448 *
66449 * RBD_GROUP_IMAGE_STATE_ATTACHED = _RBD_GROUP_IMAGE_STATE_ATTACHED
66450 * RBD_GROUP_IMAGE_STATE_INCOMPLETE = _RBD_GROUP_IMAGE_STATE_INCOMPLETE # <<<<<<<<<<<<<<
66451 *
66452 * RBD_GROUP_SNAP_STATE_INCOMPLETE = _RBD_GROUP_SNAP_STATE_INCOMPLETE
66453 */
66454 __pyx_t_7 = __Pyx_PyInt_From_rbd_group_image_state_t(RBD_GROUP_IMAGE_STATE_INCOMPLETE); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__66454; goto __pyx_L1_error;}
66455 __Pyx_GOTREF(__pyx_t_7);
66456 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_GROUP_IMAGE_STATE_INCOMPLETE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__66456; goto __pyx_L1_error;}
66457 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66458
66459 /* "rbd.pyx":680
66460 * RBD_GROUP_IMAGE_STATE_INCOMPLETE = _RBD_GROUP_IMAGE_STATE_INCOMPLETE
66461 *
66462 * RBD_GROUP_SNAP_STATE_INCOMPLETE = _RBD_GROUP_SNAP_STATE_INCOMPLETE # <<<<<<<<<<<<<<
66463 * RBD_GROUP_SNAP_STATE_COMPLETE = _RBD_GROUP_SNAP_STATE_COMPLETE
66464 *
66465 */
66466 __pyx_t_7 = __Pyx_PyInt_From_rbd_group_snap_state_t(RBD_GROUP_SNAP_STATE_INCOMPLETE); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__66466; goto __pyx_L1_error;}
66467 __Pyx_GOTREF(__pyx_t_7);
66468 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_GROUP_SNAP_STATE_INCOMPLETE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__66468; goto __pyx_L1_error;}
66469 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66470
66471 /* "rbd.pyx":681
66472 *
66473 * RBD_GROUP_SNAP_STATE_INCOMPLETE = _RBD_GROUP_SNAP_STATE_INCOMPLETE
66474 * RBD_GROUP_SNAP_STATE_COMPLETE = _RBD_GROUP_SNAP_STATE_COMPLETE # <<<<<<<<<<<<<<
66475 *
66476 * RBD_IMAGE_MIGRATION_STATE_UNKNOWN = _RBD_IMAGE_MIGRATION_STATE_UNKNOWN
66477 */
66478 __pyx_t_7 = __Pyx_PyInt_From_rbd_group_snap_state_t(RBD_GROUP_SNAP_STATE_COMPLETE); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__66478; goto __pyx_L1_error;}
66479 __Pyx_GOTREF(__pyx_t_7);
66480 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_GROUP_SNAP_STATE_COMPLETE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__66480; goto __pyx_L1_error;}
66481 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66482
66483 /* "rbd.pyx":683
66484 * RBD_GROUP_SNAP_STATE_COMPLETE = _RBD_GROUP_SNAP_STATE_COMPLETE
66485 *
66486 * RBD_IMAGE_MIGRATION_STATE_UNKNOWN = _RBD_IMAGE_MIGRATION_STATE_UNKNOWN # <<<<<<<<<<<<<<
66487 * RBD_IMAGE_MIGRATION_STATE_ERROR = _RBD_IMAGE_MIGRATION_STATE_ERROR
66488 * RBD_IMAGE_MIGRATION_STATE_PREPARING = _RBD_IMAGE_MIGRATION_STATE_PREPARING
66489 */
66490 __pyx_t_7 = __Pyx_PyInt_From_rbd_image_migration_state_t(RBD_IMAGE_MIGRATION_STATE_UNKNOWN); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__66490; goto __pyx_L1_error;}
66491 __Pyx_GOTREF(__pyx_t_7);
66492 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_MIGRATION_STATE_UNKNOW, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__66492; goto __pyx_L1_error;}
66493 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66494
66495 /* "rbd.pyx":684
66496 *
66497 * RBD_IMAGE_MIGRATION_STATE_UNKNOWN = _RBD_IMAGE_MIGRATION_STATE_UNKNOWN
66498 * RBD_IMAGE_MIGRATION_STATE_ERROR = _RBD_IMAGE_MIGRATION_STATE_ERROR # <<<<<<<<<<<<<<
66499 * RBD_IMAGE_MIGRATION_STATE_PREPARING = _RBD_IMAGE_MIGRATION_STATE_PREPARING
66500 * RBD_IMAGE_MIGRATION_STATE_PREPARED = _RBD_IMAGE_MIGRATION_STATE_PREPARED
66501 */
66502 __pyx_t_7 = __Pyx_PyInt_From_rbd_image_migration_state_t(RBD_IMAGE_MIGRATION_STATE_ERROR); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__66502; goto __pyx_L1_error;}
66503 __Pyx_GOTREF(__pyx_t_7);
66504 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_MIGRATION_STATE_ERROR, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__66504; goto __pyx_L1_error;}
66505 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66506
66507 /* "rbd.pyx":685
66508 * RBD_IMAGE_MIGRATION_STATE_UNKNOWN = _RBD_IMAGE_MIGRATION_STATE_UNKNOWN
66509 * RBD_IMAGE_MIGRATION_STATE_ERROR = _RBD_IMAGE_MIGRATION_STATE_ERROR
66510 * RBD_IMAGE_MIGRATION_STATE_PREPARING = _RBD_IMAGE_MIGRATION_STATE_PREPARING # <<<<<<<<<<<<<<
66511 * RBD_IMAGE_MIGRATION_STATE_PREPARED = _RBD_IMAGE_MIGRATION_STATE_PREPARED
66512 * RBD_IMAGE_MIGRATION_STATE_EXECUTING = _RBD_IMAGE_MIGRATION_STATE_EXECUTING
66513 */
66514 __pyx_t_7 = __Pyx_PyInt_From_rbd_image_migration_state_t(RBD_IMAGE_MIGRATION_STATE_PREPARING); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__66514; goto __pyx_L1_error;}
66515 __Pyx_GOTREF(__pyx_t_7);
66516 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_MIGRATION_STATE_PREPAR, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__66516; goto __pyx_L1_error;}
66517 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66518
66519 /* "rbd.pyx":686
66520 * RBD_IMAGE_MIGRATION_STATE_ERROR = _RBD_IMAGE_MIGRATION_STATE_ERROR
66521 * RBD_IMAGE_MIGRATION_STATE_PREPARING = _RBD_IMAGE_MIGRATION_STATE_PREPARING
66522 * RBD_IMAGE_MIGRATION_STATE_PREPARED = _RBD_IMAGE_MIGRATION_STATE_PREPARED # <<<<<<<<<<<<<<
66523 * RBD_IMAGE_MIGRATION_STATE_EXECUTING = _RBD_IMAGE_MIGRATION_STATE_EXECUTING
66524 * RBD_IMAGE_MIGRATION_STATE_EXECUTED = _RBD_IMAGE_MIGRATION_STATE_EXECUTED
66525 */
66526 __pyx_t_7 = __Pyx_PyInt_From_rbd_image_migration_state_t(RBD_IMAGE_MIGRATION_STATE_PREPARED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__66526; goto __pyx_L1_error;}
66527 __Pyx_GOTREF(__pyx_t_7);
66528 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_MIGRATION_STATE_PREPAR_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__66528; goto __pyx_L1_error;}
66529 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66530
66531 /* "rbd.pyx":687
66532 * RBD_IMAGE_MIGRATION_STATE_PREPARING = _RBD_IMAGE_MIGRATION_STATE_PREPARING
66533 * RBD_IMAGE_MIGRATION_STATE_PREPARED = _RBD_IMAGE_MIGRATION_STATE_PREPARED
66534 * RBD_IMAGE_MIGRATION_STATE_EXECUTING = _RBD_IMAGE_MIGRATION_STATE_EXECUTING # <<<<<<<<<<<<<<
66535 * RBD_IMAGE_MIGRATION_STATE_EXECUTED = _RBD_IMAGE_MIGRATION_STATE_EXECUTED
66536 *
66537 */
66538 __pyx_t_7 = __Pyx_PyInt_From_rbd_image_migration_state_t(RBD_IMAGE_MIGRATION_STATE_EXECUTING); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__66538; goto __pyx_L1_error;}
66539 __Pyx_GOTREF(__pyx_t_7);
66540 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_MIGRATION_STATE_EXECUT, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__66540; goto __pyx_L1_error;}
66541 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66542
66543 /* "rbd.pyx":688
66544 * RBD_IMAGE_MIGRATION_STATE_PREPARED = _RBD_IMAGE_MIGRATION_STATE_PREPARED
66545 * RBD_IMAGE_MIGRATION_STATE_EXECUTING = _RBD_IMAGE_MIGRATION_STATE_EXECUTING
66546 * RBD_IMAGE_MIGRATION_STATE_EXECUTED = _RBD_IMAGE_MIGRATION_STATE_EXECUTED # <<<<<<<<<<<<<<
66547 *
66548 * RBD_CONFIG_SOURCE_CONFIG = _RBD_CONFIG_SOURCE_CONFIG
66549 */
66550 __pyx_t_7 = __Pyx_PyInt_From_rbd_image_migration_state_t(RBD_IMAGE_MIGRATION_STATE_EXECUTED); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__66550; goto __pyx_L1_error;}
66551 __Pyx_GOTREF(__pyx_t_7);
66552 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_IMAGE_MIGRATION_STATE_EXECUT_2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__66552; goto __pyx_L1_error;}
66553 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66554
66555 /* "rbd.pyx":690
66556 * RBD_IMAGE_MIGRATION_STATE_EXECUTED = _RBD_IMAGE_MIGRATION_STATE_EXECUTED
66557 *
66558 * RBD_CONFIG_SOURCE_CONFIG = _RBD_CONFIG_SOURCE_CONFIG # <<<<<<<<<<<<<<
66559 * RBD_CONFIG_SOURCE_POOL = _RBD_CONFIG_SOURCE_POOL
66560 * RBD_CONFIG_SOURCE_IMAGE = _RBD_CONFIG_SOURCE_IMAGE
66561 */
66562 __pyx_t_7 = __Pyx_PyInt_From_rbd_config_source_t(RBD_CONFIG_SOURCE_CONFIG); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__66562; goto __pyx_L1_error;}
66563 __Pyx_GOTREF(__pyx_t_7);
66564 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_CONFIG_SOURCE_CONFIG, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__66564; goto __pyx_L1_error;}
66565 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66566
66567 /* "rbd.pyx":691
66568 *
66569 * RBD_CONFIG_SOURCE_CONFIG = _RBD_CONFIG_SOURCE_CONFIG
66570 * RBD_CONFIG_SOURCE_POOL = _RBD_CONFIG_SOURCE_POOL # <<<<<<<<<<<<<<
66571 * RBD_CONFIG_SOURCE_IMAGE = _RBD_CONFIG_SOURCE_IMAGE
66572 *
66573 */
66574 __pyx_t_7 = __Pyx_PyInt_From_rbd_config_source_t(RBD_CONFIG_SOURCE_POOL); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__66574; goto __pyx_L1_error;}
66575 __Pyx_GOTREF(__pyx_t_7);
66576 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_CONFIG_SOURCE_POOL, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__66576; goto __pyx_L1_error;}
66577 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66578
66579 /* "rbd.pyx":692
66580 * RBD_CONFIG_SOURCE_CONFIG = _RBD_CONFIG_SOURCE_CONFIG
66581 * RBD_CONFIG_SOURCE_POOL = _RBD_CONFIG_SOURCE_POOL
66582 * RBD_CONFIG_SOURCE_IMAGE = _RBD_CONFIG_SOURCE_IMAGE # <<<<<<<<<<<<<<
66583 *
66584 * RBD_POOL_STAT_OPTION_IMAGES = _RBD_POOL_STAT_OPTION_IMAGES
66585 */
66586 __pyx_t_7 = __Pyx_PyInt_From_rbd_config_source_t(RBD_CONFIG_SOURCE_IMAGE); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__66586; goto __pyx_L1_error;}
66587 __Pyx_GOTREF(__pyx_t_7);
66588 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_CONFIG_SOURCE_IMAGE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__66588; goto __pyx_L1_error;}
66589 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66590
66591 /* "rbd.pyx":694
66592 * RBD_CONFIG_SOURCE_IMAGE = _RBD_CONFIG_SOURCE_IMAGE
66593 *
66594 * RBD_POOL_STAT_OPTION_IMAGES = _RBD_POOL_STAT_OPTION_IMAGES # <<<<<<<<<<<<<<
66595 * RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES
66596 * RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES
66597 */
66598 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_IMAGES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__66598; goto __pyx_L1_error;}
66599 __Pyx_GOTREF(__pyx_t_7);
66600 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_IMAGES, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__66600; goto __pyx_L1_error;}
66601 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66602
66603 /* "rbd.pyx":695
66604 *
66605 * RBD_POOL_STAT_OPTION_IMAGES = _RBD_POOL_STAT_OPTION_IMAGES
66606 * RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES # <<<<<<<<<<<<<<
66607 * RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES
66608 * RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS = _RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS
66609 */
66610 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__66610; goto __pyx_L1_error;}
66611 __Pyx_GOTREF(__pyx_t_7);
66612 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_PROVI, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__66612; goto __pyx_L1_error;}
66613 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66614
66615 /* "rbd.pyx":696
66616 * RBD_POOL_STAT_OPTION_IMAGES = _RBD_POOL_STAT_OPTION_IMAGES
66617 * RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES
66618 * RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES # <<<<<<<<<<<<<<
66619 * RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS = _RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS
66620 * RBD_POOL_STAT_OPTION_TRASH_IMAGES = _RBD_POOL_STAT_OPTION_TRASH_IMAGES
66621 */
66622 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__66622; goto __pyx_L1_error;}
66623 __Pyx_GOTREF(__pyx_t_7);
66624 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_MAX_P, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__66624; goto __pyx_L1_error;}
66625 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66626
66627 /* "rbd.pyx":697
66628 * RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_PROVISIONED_BYTES
66629 * RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES
66630 * RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS = _RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS # <<<<<<<<<<<<<<
66631 * RBD_POOL_STAT_OPTION_TRASH_IMAGES = _RBD_POOL_STAT_OPTION_TRASH_IMAGES
66632 * RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES
66633 */
66634 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__66634; goto __pyx_L1_error;}
66635 __Pyx_GOTREF(__pyx_t_7);
66636 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_IMAGE_SNAPS, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__66636; goto __pyx_L1_error;}
66637 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66638
66639 /* "rbd.pyx":698
66640 * RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_IMAGE_MAX_PROVISIONED_BYTES
66641 * RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS = _RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS
66642 * RBD_POOL_STAT_OPTION_TRASH_IMAGES = _RBD_POOL_STAT_OPTION_TRASH_IMAGES # <<<<<<<<<<<<<<
66643 * RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES
66644 * RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES
66645 */
66646 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_TRASH_IMAGES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__66646; goto __pyx_L1_error;}
66647 __Pyx_GOTREF(__pyx_t_7);
66648 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_IMAGE, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__66648; goto __pyx_L1_error;}
66649 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66650
66651 /* "rbd.pyx":699
66652 * RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS = _RBD_POOL_STAT_OPTION_IMAGE_SNAPSHOTS
66653 * RBD_POOL_STAT_OPTION_TRASH_IMAGES = _RBD_POOL_STAT_OPTION_TRASH_IMAGES
66654 * RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES # <<<<<<<<<<<<<<
66655 * RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES
66656 * RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS = _RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS
66657 */
66658 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__66658; goto __pyx_L1_error;}
66659 __Pyx_GOTREF(__pyx_t_7);
66660 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_PROVI, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__66660; goto __pyx_L1_error;}
66661 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66662
66663 /* "rbd.pyx":700
66664 * RBD_POOL_STAT_OPTION_TRASH_IMAGES = _RBD_POOL_STAT_OPTION_TRASH_IMAGES
66665 * RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES
66666 * RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES # <<<<<<<<<<<<<<
66667 * RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS = _RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS
66668 *
66669 */
66670 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__66670; goto __pyx_L1_error;}
66671 __Pyx_GOTREF(__pyx_t_7);
66672 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_MAX_P, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__66672; goto __pyx_L1_error;}
66673 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66674
66675 /* "rbd.pyx":701
66676 * RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_PROVISIONED_BYTES
66677 * RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES = _RBD_POOL_STAT_OPTION_TRASH_MAX_PROVISIONED_BYTES
66678 * RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS = _RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS # <<<<<<<<<<<<<<
66679 *
66680 *
66681 */
66682 __pyx_t_7 = __Pyx_PyInt_From_rbd_pool_stat_option_t(RBD_POOL_STAT_OPTION_TRASH_SNAPSHOTS); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__66682; goto __pyx_L1_error;}
66683 __Pyx_GOTREF(__pyx_t_7);
66684 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_POOL_STAT_OPTION_TRASH_SNAPS, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__66684; goto __pyx_L1_error;}
66685 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66686
66687 /* "rbd.pyx":704
66688 *
66689 *
66690 * class Error(Exception): # <<<<<<<<<<<<<<
66691 * pass
66692 *
66693 */
66694 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__66694; goto __pyx_L1_error;}
66695 __Pyx_GOTREF(__pyx_t_7);
66696 __Pyx_INCREF(__pyx_builtin_Exception)( ((PyObject*)(__pyx_builtin_Exception))->ob_refcnt++);
66697 __Pyx_GIVEREF(__pyx_builtin_Exception);
66698 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_Exception)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_builtin_Exception
)
;
66699 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__66699; goto __pyx_L1_error;}
66700 __Pyx_GOTREF(__pyx_t_1);
66701 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__66701; goto __pyx_L1_error;}
66702 __Pyx_GOTREF(__pyx_t_5);
66703 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Error, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__66703; goto __pyx_L1_error;}
66704 __Pyx_GOTREF(__pyx_t_9);
66705 if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__66705; goto __pyx_L1_error;}
66706 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66707 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
66708 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
66709 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66710
66711 /* "rbd.pyx":708
66712 *
66713 *
66714 * class OSError(Error): # <<<<<<<<<<<<<<
66715 * """ `OSError` class, derived from `Error` """
66716 * def __init__(self, message, errno=None):
66717 */
66718 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Error); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__66718; goto __pyx_L1_error;}
66719 __Pyx_GOTREF(__pyx_t_7);
66720 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__66720; goto __pyx_L1_error;}
66721 __Pyx_GOTREF(__pyx_t_1);
66722 __Pyx_GIVEREF(__pyx_t_7);
66723 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
66724 __pyx_t_7 = 0;
66725 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__66725; goto __pyx_L1_error;}
66726 __Pyx_GOTREF(__pyx_t_7);
66727 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_OSError, __pyx_n_s_OSError, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, __pyx_kp_s_OSError_class_derived_from_Erro); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__66727; goto __pyx_L1_error;}
66728 __Pyx_GOTREF(__pyx_t_5);
66729
66730 /* "rbd.pyx":710
66731 * class OSError(Error):
66732 * """ `OSError` class, derived from `Error` """
66733 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
66734 * super(OSError, self).__init__(message)
66735 * self.errno = errno
66736 */
66737 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_7OSError_1__init__, 0, __pyx_n_s_OSError___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__28))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_7OSError_1__init__
, 0, __pyx_n_s_OSError___init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__28))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__66737; goto __pyx_L1_error;}
66738 __Pyx_GOTREF(__pyx_t_9);
66739 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__29);
66740 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__66740; goto __pyx_L1_error;}
66741 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66742
66743 /* "rbd.pyx":714
66744 * self.errno = errno
66745 *
66746 * def __str__(self): # <<<<<<<<<<<<<<
66747 * msg = super(OSError, self).__str__()
66748 * if self.errno is None:
66749 */
66750 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_7OSError_3__str__, 0, __pyx_n_s_OSError___str, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__31))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_7OSError_3__str__
, 0, __pyx_n_s_OSError___str, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__31))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__66750; goto __pyx_L1_error;}
66751 __Pyx_GOTREF(__pyx_t_9);
66752 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_str, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__66752; goto __pyx_L1_error;}
66753 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66754
66755 /* "rbd.pyx":720
66756 * return '[errno {0}] {1}'.format(self.errno, msg)
66757 *
66758 * def __reduce__(self): # <<<<<<<<<<<<<<
66759 * return (self.__class__, (self.message, self.errno))
66760 *
66761 */
66762 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_7OSError_5__reduce__, 0, __pyx_n_s_OSError___reduce, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__33))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_7OSError_5__reduce__
, 0, __pyx_n_s_OSError___reduce, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__33))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__66762; goto __pyx_L1_error;}
66763 __Pyx_GOTREF(__pyx_t_9);
66764 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_reduce, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__66764; goto __pyx_L1_error;}
66765 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66766
66767 /* "rbd.pyx":708
66768 *
66769 *
66770 * class OSError(Error): # <<<<<<<<<<<<<<
66771 * """ `OSError` class, derived from `Error` """
66772 * def __init__(self, message, errno=None):
66773 */
66774 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_OSError, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__66774; goto __pyx_L1_error;}
66775 __Pyx_GOTREF(__pyx_t_9);
66776 if (PyDict_SetItem(__pyx_d, __pyx_n_s_OSError, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__66776; goto __pyx_L1_error;}
66777 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66778 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
66779 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66780 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
66781
66782 /* "rbd.pyx":723
66783 * return (self.__class__, (self.message, self.errno))
66784 *
66785 * class PermissionError(OSError): # <<<<<<<<<<<<<<
66786 * def __init__(self, message, errno=None):
66787 * super(PermissionError, self).__init__(
66788 */
66789 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__66789; goto __pyx_L1_error;}
66790 __Pyx_GOTREF(__pyx_t_1);
66791 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__66791; goto __pyx_L1_error;}
66792 __Pyx_GOTREF(__pyx_t_7);
66793 __Pyx_GIVEREF(__pyx_t_1);
66794 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
66795 __pyx_t_1 = 0;
66796 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__66796; goto __pyx_L1_error;}
66797 __Pyx_GOTREF(__pyx_t_1);
66798 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_PermissionError, __pyx_n_s_PermissionError, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__66798; goto __pyx_L1_error;}
66799 __Pyx_GOTREF(__pyx_t_5);
66800
66801 /* "rbd.pyx":724
66802 *
66803 * class PermissionError(OSError):
66804 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
66805 * super(PermissionError, self).__init__(
66806 * "RBD permission error (%s)" % message, errno)
66807 */
66808 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_15PermissionError_1__init__, 0, __pyx_n_s_PermissionError___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__35))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_15PermissionError_1__init__
, 0, __pyx_n_s_PermissionError___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__35))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__66808; goto __pyx_L1_error;}
66809 __Pyx_GOTREF(__pyx_t_9);
66810 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__36);
66811 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__66811; goto __pyx_L1_error;}
66812 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66813
66814 /* "rbd.pyx":723
66815 * return (self.__class__, (self.message, self.errno))
66816 *
66817 * class PermissionError(OSError): # <<<<<<<<<<<<<<
66818 * def __init__(self, message, errno=None):
66819 * super(PermissionError, self).__init__(
66820 */
66821 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_PermissionError, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__66821; goto __pyx_L1_error;}
66822 __Pyx_GOTREF(__pyx_t_9);
66823 if (PyDict_SetItem(__pyx_d, __pyx_n_s_PermissionError, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__66823; goto __pyx_L1_error;}
66824 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66825 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
66826 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
66827 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66828
66829 /* "rbd.pyx":729
66830 *
66831 *
66832 * class ImageNotFound(OSError): # <<<<<<<<<<<<<<
66833 * def __init__(self, message, errno=None):
66834 * super(ImageNotFound, self).__init__(
66835 */
66836 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__66836; goto __pyx_L1_error;}
66837 __Pyx_GOTREF(__pyx_t_7);
66838 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__66838; goto __pyx_L1_error;}
66839 __Pyx_GOTREF(__pyx_t_1);
66840 __Pyx_GIVEREF(__pyx_t_7);
66841 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
66842 __pyx_t_7 = 0;
66843 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__66843; goto __pyx_L1_error;}
66844 __Pyx_GOTREF(__pyx_t_7);
66845 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_ImageNotFound, __pyx_n_s_ImageNotFound, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__66845; goto __pyx_L1_error;}
66846 __Pyx_GOTREF(__pyx_t_5);
66847
66848 /* "rbd.pyx":730
66849 *
66850 * class ImageNotFound(OSError):
66851 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
66852 * super(ImageNotFound, self).__init__(
66853 * "RBD image not found (%s)" % message, errno)
66854 */
66855 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_13ImageNotFound_1__init__, 0, __pyx_n_s_ImageNotFound___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__38))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_13ImageNotFound_1__init__
, 0, __pyx_n_s_ImageNotFound___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__38))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__66855; goto __pyx_L1_error;}
66856 __Pyx_GOTREF(__pyx_t_9);
66857 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__39);
66858 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__66858; goto __pyx_L1_error;}
66859 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66860
66861 /* "rbd.pyx":729
66862 *
66863 *
66864 * class ImageNotFound(OSError): # <<<<<<<<<<<<<<
66865 * def __init__(self, message, errno=None):
66866 * super(ImageNotFound, self).__init__(
66867 */
66868 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ImageNotFound, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__66868; goto __pyx_L1_error;}
66869 __Pyx_GOTREF(__pyx_t_9);
66870 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ImageNotFound, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__66870; goto __pyx_L1_error;}
66871 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66872 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
66873 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66874 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
66875
66876 /* "rbd.pyx":735
66877 *
66878 *
66879 * class ObjectNotFound(OSError): # <<<<<<<<<<<<<<
66880 * def __init__(self, message, errno=None):
66881 * super(ObjectNotFound, self).__init__(
66882 */
66883 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__66883; goto __pyx_L1_error;}
66884 __Pyx_GOTREF(__pyx_t_1);
66885 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__66885; goto __pyx_L1_error;}
66886 __Pyx_GOTREF(__pyx_t_7);
66887 __Pyx_GIVEREF(__pyx_t_1);
66888 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
66889 __pyx_t_1 = 0;
66890 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__66890; goto __pyx_L1_error;}
66891 __Pyx_GOTREF(__pyx_t_1);
66892 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_ObjectNotFound, __pyx_n_s_ObjectNotFound, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__66892; goto __pyx_L1_error;}
66893 __Pyx_GOTREF(__pyx_t_5);
66894
66895 /* "rbd.pyx":736
66896 *
66897 * class ObjectNotFound(OSError):
66898 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
66899 * super(ObjectNotFound, self).__init__(
66900 * "RBD object not found (%s)" % message, errno)
66901 */
66902 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_14ObjectNotFound_1__init__, 0, __pyx_n_s_ObjectNotFound___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__41))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_14ObjectNotFound_1__init__
, 0, __pyx_n_s_ObjectNotFound___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__41))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__66902; goto __pyx_L1_error;}
66903 __Pyx_GOTREF(__pyx_t_9);
66904 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__42);
66905 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__66905; goto __pyx_L1_error;}
66906 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66907
66908 /* "rbd.pyx":735
66909 *
66910 *
66911 * class ObjectNotFound(OSError): # <<<<<<<<<<<<<<
66912 * def __init__(self, message, errno=None):
66913 * super(ObjectNotFound, self).__init__(
66914 */
66915 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ObjectNotFound, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__66915; goto __pyx_L1_error;}
66916 __Pyx_GOTREF(__pyx_t_9);
66917 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectNotFound, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__66917; goto __pyx_L1_error;}
66918 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66919 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
66920 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
66921 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66922
66923 /* "rbd.pyx":741
66924 *
66925 *
66926 * class ImageExists(OSError): # <<<<<<<<<<<<<<
66927 * def __init__(self, message, errno=None):
66928 * super(ImageExists, self).__init__(
66929 */
66930 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__66930; goto __pyx_L1_error;}
66931 __Pyx_GOTREF(__pyx_t_7);
66932 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__66932; goto __pyx_L1_error;}
66933 __Pyx_GOTREF(__pyx_t_1);
66934 __Pyx_GIVEREF(__pyx_t_7);
66935 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
66936 __pyx_t_7 = 0;
66937 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__66937; goto __pyx_L1_error;}
66938 __Pyx_GOTREF(__pyx_t_7);
66939 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_ImageExists, __pyx_n_s_ImageExists, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__66939; goto __pyx_L1_error;}
66940 __Pyx_GOTREF(__pyx_t_5);
66941
66942 /* "rbd.pyx":742
66943 *
66944 * class ImageExists(OSError):
66945 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
66946 * super(ImageExists, self).__init__(
66947 * "RBD image already exists (%s)" % message, errno)
66948 */
66949 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_11ImageExists_1__init__, 0, __pyx_n_s_ImageExists___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__44))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_11ImageExists_1__init__
, 0, __pyx_n_s_ImageExists___init, ((void*)0), __pyx_n_s_rbd,
__pyx_d, ((PyObject *)__pyx_codeobj__44))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__66949; goto __pyx_L1_error;}
66950 __Pyx_GOTREF(__pyx_t_9);
66951 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__45);
66952 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__66952; goto __pyx_L1_error;}
66953 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66954
66955 /* "rbd.pyx":741
66956 *
66957 *
66958 * class ImageExists(OSError): # <<<<<<<<<<<<<<
66959 * def __init__(self, message, errno=None):
66960 * super(ImageExists, self).__init__(
66961 */
66962 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ImageExists, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__66962; goto __pyx_L1_error;}
66963 __Pyx_GOTREF(__pyx_t_9);
66964 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ImageExists, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__66964; goto __pyx_L1_error;}
66965 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
66966 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
66967 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
66968 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
66969
66970 /* "rbd.pyx":747
66971 *
66972 *
66973 * class ObjectExists(OSError): # <<<<<<<<<<<<<<
66974 * def __init__(self, message, errno=None):
66975 * super(ObjectExists, self).__init__(
66976 */
66977 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__66977; goto __pyx_L1_error;}
66978 __Pyx_GOTREF(__pyx_t_1);
66979 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__66979; goto __pyx_L1_error;}
66980 __Pyx_GOTREF(__pyx_t_7);
66981 __Pyx_GIVEREF(__pyx_t_1);
66982 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
66983 __pyx_t_1 = 0;
66984 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__66984; goto __pyx_L1_error;}
66985 __Pyx_GOTREF(__pyx_t_1);
66986 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_ObjectExists, __pyx_n_s_ObjectExists, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__66986; goto __pyx_L1_error;}
66987 __Pyx_GOTREF(__pyx_t_5);
66988
66989 /* "rbd.pyx":748
66990 *
66991 * class ObjectExists(OSError):
66992 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
66993 * super(ObjectExists, self).__init__(
66994 * "RBD object already exists (%s)" % message, errno)
66995 */
66996 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_12ObjectExists_1__init__, 0, __pyx_n_s_ObjectExists___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__47))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_12ObjectExists_1__init__
, 0, __pyx_n_s_ObjectExists___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__47))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__66996; goto __pyx_L1_error;}
66997 __Pyx_GOTREF(__pyx_t_9);
66998 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__48);
66999 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__66999; goto __pyx_L1_error;}
67000 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67001
67002 /* "rbd.pyx":747
67003 *
67004 *
67005 * class ObjectExists(OSError): # <<<<<<<<<<<<<<
67006 * def __init__(self, message, errno=None):
67007 * super(ObjectExists, self).__init__(
67008 */
67009 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ObjectExists, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__67009; goto __pyx_L1_error;}
67010 __Pyx_GOTREF(__pyx_t_9);
67011 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObjectExists, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__67011; goto __pyx_L1_error;}
67012 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67013 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67014 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67015 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67016
67017 /* "rbd.pyx":753
67018 *
67019 *
67020 * class IOError(OSError): # <<<<<<<<<<<<<<
67021 * def __init__(self, message, errno=None):
67022 * super(IOError, self).__init__(
67023 */
67024 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__67024; goto __pyx_L1_error;}
67025 __Pyx_GOTREF(__pyx_t_7);
67026 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__67026; goto __pyx_L1_error;}
67027 __Pyx_GOTREF(__pyx_t_1);
67028 __Pyx_GIVEREF(__pyx_t_7);
67029 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67030 __pyx_t_7 = 0;
67031 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__67031; goto __pyx_L1_error;}
67032 __Pyx_GOTREF(__pyx_t_7);
67033 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_IOError, __pyx_n_s_IOError, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__67033; goto __pyx_L1_error;}
67034 __Pyx_GOTREF(__pyx_t_5);
67035
67036 /* "rbd.pyx":754
67037 *
67038 * class IOError(OSError):
67039 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67040 * super(IOError, self).__init__(
67041 * "RBD I/O error (%s)" % message, errno)
67042 */
67043 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_7IOError_1__init__, 0, __pyx_n_s_IOError___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__50))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_7IOError_1__init__
, 0, __pyx_n_s_IOError___init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__50))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__67043; goto __pyx_L1_error;}
67044 __Pyx_GOTREF(__pyx_t_9);
67045 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__51);
67046 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__67046; goto __pyx_L1_error;}
67047 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67048
67049 /* "rbd.pyx":753
67050 *
67051 *
67052 * class IOError(OSError): # <<<<<<<<<<<<<<
67053 * def __init__(self, message, errno=None):
67054 * super(IOError, self).__init__(
67055 */
67056 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_IOError, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__67056; goto __pyx_L1_error;}
67057 __Pyx_GOTREF(__pyx_t_9);
67058 if (PyDict_SetItem(__pyx_d, __pyx_n_s_IOError, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__67058; goto __pyx_L1_error;}
67059 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67060 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67061 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67062 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67063
67064 /* "rbd.pyx":759
67065 *
67066 *
67067 * class NoSpace(OSError): # <<<<<<<<<<<<<<
67068 * def __init__(self, message, errno=None):
67069 * super(NoSpace, self).__init__(
67070 */
67071 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__67071; goto __pyx_L1_error;}
67072 __Pyx_GOTREF(__pyx_t_1);
67073 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__67073; goto __pyx_L1_error;}
67074 __Pyx_GOTREF(__pyx_t_7);
67075 __Pyx_GIVEREF(__pyx_t_1);
67076 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67077 __pyx_t_1 = 0;
67078 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__67078; goto __pyx_L1_error;}
67079 __Pyx_GOTREF(__pyx_t_1);
67080 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_NoSpace, __pyx_n_s_NoSpace, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__67080; goto __pyx_L1_error;}
67081 __Pyx_GOTREF(__pyx_t_5);
67082
67083 /* "rbd.pyx":760
67084 *
67085 * class NoSpace(OSError):
67086 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67087 * super(NoSpace, self).__init__(
67088 * "RBD insufficient space available (%s)" % message, errno)
67089 */
67090 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_7NoSpace_1__init__, 0, __pyx_n_s_NoSpace___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__53))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_7NoSpace_1__init__
, 0, __pyx_n_s_NoSpace___init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__53))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__67090; goto __pyx_L1_error;}
67091 __Pyx_GOTREF(__pyx_t_9);
67092 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__54);
67093 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__67093; goto __pyx_L1_error;}
67094 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67095
67096 /* "rbd.pyx":759
67097 *
67098 *
67099 * class NoSpace(OSError): # <<<<<<<<<<<<<<
67100 * def __init__(self, message, errno=None):
67101 * super(NoSpace, self).__init__(
67102 */
67103 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NoSpace, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__67103; goto __pyx_L1_error;}
67104 __Pyx_GOTREF(__pyx_t_9);
67105 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NoSpace, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__67105; goto __pyx_L1_error;}
67106 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67107 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67108 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67109 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67110
67111 /* "rbd.pyx":765
67112 *
67113 *
67114 * class IncompleteWriteError(OSError): # <<<<<<<<<<<<<<
67115 * def __init__(self, message, errno=None):
67116 * super(IncompleteWriteError, self).__init__(
67117 */
67118 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__67118; goto __pyx_L1_error;}
67119 __Pyx_GOTREF(__pyx_t_7);
67120 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__67120; goto __pyx_L1_error;}
67121 __Pyx_GOTREF(__pyx_t_1);
67122 __Pyx_GIVEREF(__pyx_t_7);
67123 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67124 __pyx_t_7 = 0;
67125 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__67125; goto __pyx_L1_error;}
67126 __Pyx_GOTREF(__pyx_t_7);
67127 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_IncompleteWriteError, __pyx_n_s_IncompleteWriteError, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__67127; goto __pyx_L1_error;}
67128 __Pyx_GOTREF(__pyx_t_5);
67129
67130 /* "rbd.pyx":766
67131 *
67132 * class IncompleteWriteError(OSError):
67133 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67134 * super(IncompleteWriteError, self).__init__(
67135 * "RBD incomplete write (%s)" % message, errno)
67136 */
67137 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_20IncompleteWriteError_1__init__, 0, __pyx_n_s_IncompleteWriteError___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__56))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_20IncompleteWriteError_1__init__
, 0, __pyx_n_s_IncompleteWriteError___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__56))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__67137; goto __pyx_L1_error;}
67138 __Pyx_GOTREF(__pyx_t_9);
67139 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__57);
67140 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__67140; goto __pyx_L1_error;}
67141 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67142
67143 /* "rbd.pyx":765
67144 *
67145 *
67146 * class IncompleteWriteError(OSError): # <<<<<<<<<<<<<<
67147 * def __init__(self, message, errno=None):
67148 * super(IncompleteWriteError, self).__init__(
67149 */
67150 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_IncompleteWriteError, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__67150; goto __pyx_L1_error;}
67151 __Pyx_GOTREF(__pyx_t_9);
67152 if (PyDict_SetItem(__pyx_d, __pyx_n_s_IncompleteWriteError, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__67152; goto __pyx_L1_error;}
67153 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67154 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67155 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67156 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67157
67158 /* "rbd.pyx":771
67159 *
67160 *
67161 * class InvalidArgument(OSError): # <<<<<<<<<<<<<<
67162 * def __init__(self, message, errno=None):
67163 * super(InvalidArgument, self).__init__(
67164 */
67165 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__67165; goto __pyx_L1_error;}
67166 __Pyx_GOTREF(__pyx_t_1);
67167 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__67167; goto __pyx_L1_error;}
67168 __Pyx_GOTREF(__pyx_t_7);
67169 __Pyx_GIVEREF(__pyx_t_1);
67170 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67171 __pyx_t_1 = 0;
67172 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__67172; goto __pyx_L1_error;}
67173 __Pyx_GOTREF(__pyx_t_1);
67174 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_InvalidArgument, __pyx_n_s_InvalidArgument, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__67174; goto __pyx_L1_error;}
67175 __Pyx_GOTREF(__pyx_t_5);
67176
67177 /* "rbd.pyx":772
67178 *
67179 * class InvalidArgument(OSError):
67180 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67181 * super(InvalidArgument, self).__init__(
67182 * "RBD invalid argument (%s)" % message, errno)
67183 */
67184 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_15InvalidArgument_1__init__, 0, __pyx_n_s_InvalidArgument___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__59))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_15InvalidArgument_1__init__
, 0, __pyx_n_s_InvalidArgument___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__59))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__67184; goto __pyx_L1_error;}
67185 __Pyx_GOTREF(__pyx_t_9);
67186 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__60);
67187 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__67187; goto __pyx_L1_error;}
67188 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67189
67190 /* "rbd.pyx":771
67191 *
67192 *
67193 * class InvalidArgument(OSError): # <<<<<<<<<<<<<<
67194 * def __init__(self, message, errno=None):
67195 * super(InvalidArgument, self).__init__(
67196 */
67197 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InvalidArgument, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__67197; goto __pyx_L1_error;}
67198 __Pyx_GOTREF(__pyx_t_9);
67199 if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidArgument, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__67199; goto __pyx_L1_error;}
67200 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67201 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67202 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67203 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67204
67205 /* "rbd.pyx":777
67206 *
67207 *
67208 * class LogicError(OSError): # <<<<<<<<<<<<<<
67209 * def __init__(self, message, errno=None):
67210 * super(LogicError, self).__init__(
67211 */
67212 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__67212; goto __pyx_L1_error;}
67213 __Pyx_GOTREF(__pyx_t_7);
67214 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__67214; goto __pyx_L1_error;}
67215 __Pyx_GOTREF(__pyx_t_1);
67216 __Pyx_GIVEREF(__pyx_t_7);
67217 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67218 __pyx_t_7 = 0;
67219 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__67219; goto __pyx_L1_error;}
67220 __Pyx_GOTREF(__pyx_t_7);
67221 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_LogicError, __pyx_n_s_LogicError, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__67221; goto __pyx_L1_error;}
67222 __Pyx_GOTREF(__pyx_t_5);
67223
67224 /* "rbd.pyx":778
67225 *
67226 * class LogicError(OSError):
67227 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67228 * super(LogicError, self).__init__(
67229 * "RBD logic error (%s)" % message, errno)
67230 */
67231 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_10LogicError_1__init__, 0, __pyx_n_s_LogicError___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__62))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_10LogicError_1__init__
, 0, __pyx_n_s_LogicError___init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__62))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__67231; goto __pyx_L1_error;}
67232 __Pyx_GOTREF(__pyx_t_9);
67233 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__63);
67234 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__67234; goto __pyx_L1_error;}
67235 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67236
67237 /* "rbd.pyx":777
67238 *
67239 *
67240 * class LogicError(OSError): # <<<<<<<<<<<<<<
67241 * def __init__(self, message, errno=None):
67242 * super(LogicError, self).__init__(
67243 */
67244 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_LogicError, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__67244; goto __pyx_L1_error;}
67245 __Pyx_GOTREF(__pyx_t_9);
67246 if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogicError, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__67246; goto __pyx_L1_error;}
67247 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67248 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67249 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67250 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67251
67252 /* "rbd.pyx":783
67253 *
67254 *
67255 * class ReadOnlyImage(OSError): # <<<<<<<<<<<<<<
67256 * def __init__(self, message, errno=None):
67257 * super(ReadOnlyImage, self).__init__(
67258 */
67259 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__67259; goto __pyx_L1_error;}
67260 __Pyx_GOTREF(__pyx_t_1);
67261 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__67261; goto __pyx_L1_error;}
67262 __Pyx_GOTREF(__pyx_t_7);
67263 __Pyx_GIVEREF(__pyx_t_1);
67264 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67265 __pyx_t_1 = 0;
67266 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__67266; goto __pyx_L1_error;}
67267 __Pyx_GOTREF(__pyx_t_1);
67268 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_ReadOnlyImage, __pyx_n_s_ReadOnlyImage, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__67268; goto __pyx_L1_error;}
67269 __Pyx_GOTREF(__pyx_t_5);
67270
67271 /* "rbd.pyx":784
67272 *
67273 * class ReadOnlyImage(OSError):
67274 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67275 * super(ReadOnlyImage, self).__init__(
67276 * "RBD read-only image (%s)" % message, errno)
67277 */
67278 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_13ReadOnlyImage_1__init__, 0, __pyx_n_s_ReadOnlyImage___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__65))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_13ReadOnlyImage_1__init__
, 0, __pyx_n_s_ReadOnlyImage___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__65))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__67278; goto __pyx_L1_error;}
67279 __Pyx_GOTREF(__pyx_t_9);
67280 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__66);
67281 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__67281; goto __pyx_L1_error;}
67282 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67283
67284 /* "rbd.pyx":783
67285 *
67286 *
67287 * class ReadOnlyImage(OSError): # <<<<<<<<<<<<<<
67288 * def __init__(self, message, errno=None):
67289 * super(ReadOnlyImage, self).__init__(
67290 */
67291 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ReadOnlyImage, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__67291; goto __pyx_L1_error;}
67292 __Pyx_GOTREF(__pyx_t_9);
67293 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReadOnlyImage, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__67293; goto __pyx_L1_error;}
67294 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67295 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67296 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67297 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67298
67299 /* "rbd.pyx":789
67300 *
67301 *
67302 * class ImageBusy(OSError): # <<<<<<<<<<<<<<
67303 * def __init__(self, message, errno=None):
67304 * super(ImageBusy, self).__init__(
67305 */
67306 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__67306; goto __pyx_L1_error;}
67307 __Pyx_GOTREF(__pyx_t_7);
67308 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__67308; goto __pyx_L1_error;}
67309 __Pyx_GOTREF(__pyx_t_1);
67310 __Pyx_GIVEREF(__pyx_t_7);
67311 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67312 __pyx_t_7 = 0;
67313 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__67313; goto __pyx_L1_error;}
67314 __Pyx_GOTREF(__pyx_t_7);
67315 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_ImageBusy, __pyx_n_s_ImageBusy, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__67315; goto __pyx_L1_error;}
67316 __Pyx_GOTREF(__pyx_t_5);
67317
67318 /* "rbd.pyx":790
67319 *
67320 * class ImageBusy(OSError):
67321 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67322 * super(ImageBusy, self).__init__(
67323 * "RBD image is busy (%s)" % message, errno)
67324 */
67325 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_9ImageBusy_1__init__, 0, __pyx_n_s_ImageBusy___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__68))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_9ImageBusy_1__init__
, 0, __pyx_n_s_ImageBusy___init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__68))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__67325; goto __pyx_L1_error;}
67326 __Pyx_GOTREF(__pyx_t_9);
67327 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__69);
67328 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__67328; goto __pyx_L1_error;}
67329 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67330
67331 /* "rbd.pyx":789
67332 *
67333 *
67334 * class ImageBusy(OSError): # <<<<<<<<<<<<<<
67335 * def __init__(self, message, errno=None):
67336 * super(ImageBusy, self).__init__(
67337 */
67338 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ImageBusy, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__67338; goto __pyx_L1_error;}
67339 __Pyx_GOTREF(__pyx_t_9);
67340 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ImageBusy, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__67340; goto __pyx_L1_error;}
67341 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67342 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67343 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67344 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67345
67346 /* "rbd.pyx":795
67347 *
67348 *
67349 * class ImageHasSnapshots(OSError): # <<<<<<<<<<<<<<
67350 * def __init__(self, message, errno=None):
67351 * super(ImageHasSnapshots, self).__init__(
67352 */
67353 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__67353; goto __pyx_L1_error;}
67354 __Pyx_GOTREF(__pyx_t_1);
67355 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__67355; goto __pyx_L1_error;}
67356 __Pyx_GOTREF(__pyx_t_7);
67357 __Pyx_GIVEREF(__pyx_t_1);
67358 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67359 __pyx_t_1 = 0;
67360 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__67360; goto __pyx_L1_error;}
67361 __Pyx_GOTREF(__pyx_t_1);
67362 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_ImageHasSnapshots, __pyx_n_s_ImageHasSnapshots, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__67362; goto __pyx_L1_error;}
67363 __Pyx_GOTREF(__pyx_t_5);
67364
67365 /* "rbd.pyx":796
67366 *
67367 * class ImageHasSnapshots(OSError):
67368 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67369 * super(ImageHasSnapshots, self).__init__(
67370 * "RBD image has snapshots (%s)" % message, errno)
67371 */
67372 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_17ImageHasSnapshots_1__init__, 0, __pyx_n_s_ImageHasSnapshots___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__71))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_17ImageHasSnapshots_1__init__
, 0, __pyx_n_s_ImageHasSnapshots___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__71))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__67372; goto __pyx_L1_error;}
67373 __Pyx_GOTREF(__pyx_t_9);
67374 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__72);
67375 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__67375; goto __pyx_L1_error;}
67376 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67377
67378 /* "rbd.pyx":795
67379 *
67380 *
67381 * class ImageHasSnapshots(OSError): # <<<<<<<<<<<<<<
67382 * def __init__(self, message, errno=None):
67383 * super(ImageHasSnapshots, self).__init__(
67384 */
67385 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ImageHasSnapshots, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__67385; goto __pyx_L1_error;}
67386 __Pyx_GOTREF(__pyx_t_9);
67387 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ImageHasSnapshots, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__67387; goto __pyx_L1_error;}
67388 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67389 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67390 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67391 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67392
67393 /* "rbd.pyx":801
67394 *
67395 *
67396 * class FunctionNotSupported(OSError): # <<<<<<<<<<<<<<
67397 * def __init__(self, message, errno=None):
67398 * super(FunctionNotSupported, self).__init__(
67399 */
67400 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__67400; goto __pyx_L1_error;}
67401 __Pyx_GOTREF(__pyx_t_7);
67402 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__67402; goto __pyx_L1_error;}
67403 __Pyx_GOTREF(__pyx_t_1);
67404 __Pyx_GIVEREF(__pyx_t_7);
67405 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67406 __pyx_t_7 = 0;
67407 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__67407; goto __pyx_L1_error;}
67408 __Pyx_GOTREF(__pyx_t_7);
67409 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_FunctionNotSupported, __pyx_n_s_FunctionNotSupported, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__67409; goto __pyx_L1_error;}
67410 __Pyx_GOTREF(__pyx_t_5);
67411
67412 /* "rbd.pyx":802
67413 *
67414 * class FunctionNotSupported(OSError):
67415 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67416 * super(FunctionNotSupported, self).__init__(
67417 * "RBD function not supported (%s)" % message, errno)
67418 */
67419 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_20FunctionNotSupported_1__init__, 0, __pyx_n_s_FunctionNotSupported___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__74))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_20FunctionNotSupported_1__init__
, 0, __pyx_n_s_FunctionNotSupported___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__74))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__67419; goto __pyx_L1_error;}
67420 __Pyx_GOTREF(__pyx_t_9);
67421 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__75);
67422 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__67422; goto __pyx_L1_error;}
67423 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67424
67425 /* "rbd.pyx":801
67426 *
67427 *
67428 * class FunctionNotSupported(OSError): # <<<<<<<<<<<<<<
67429 * def __init__(self, message, errno=None):
67430 * super(FunctionNotSupported, self).__init__(
67431 */
67432 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_FunctionNotSupported, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__67432; goto __pyx_L1_error;}
67433 __Pyx_GOTREF(__pyx_t_9);
67434 if (PyDict_SetItem(__pyx_d, __pyx_n_s_FunctionNotSupported, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__67434; goto __pyx_L1_error;}
67435 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67436 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67437 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67438 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67439
67440 /* "rbd.pyx":807
67441 *
67442 *
67443 * class ArgumentOutOfRange(OSError): # <<<<<<<<<<<<<<
67444 * def __init__(self, message, errno=None):
67445 * super(ArgumentOutOfRange, self).__init__(
67446 */
67447 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__67447; goto __pyx_L1_error;}
67448 __Pyx_GOTREF(__pyx_t_1);
67449 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__67449; goto __pyx_L1_error;}
67450 __Pyx_GOTREF(__pyx_t_7);
67451 __Pyx_GIVEREF(__pyx_t_1);
67452 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67453 __pyx_t_1 = 0;
67454 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__67454; goto __pyx_L1_error;}
67455 __Pyx_GOTREF(__pyx_t_1);
67456 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_ArgumentOutOfRange, __pyx_n_s_ArgumentOutOfRange, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__67456; goto __pyx_L1_error;}
67457 __Pyx_GOTREF(__pyx_t_5);
67458
67459 /* "rbd.pyx":808
67460 *
67461 * class ArgumentOutOfRange(OSError):
67462 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67463 * super(ArgumentOutOfRange, self).__init__(
67464 * "RBD arguments out of range (%s)" % message, errno)
67465 */
67466 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_18ArgumentOutOfRange_1__init__, 0, __pyx_n_s_ArgumentOutOfRange___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__77))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_18ArgumentOutOfRange_1__init__
, 0, __pyx_n_s_ArgumentOutOfRange___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__77))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__67466; goto __pyx_L1_error;}
67467 __Pyx_GOTREF(__pyx_t_9);
67468 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__78);
67469 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__67469; goto __pyx_L1_error;}
67470 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67471
67472 /* "rbd.pyx":807
67473 *
67474 *
67475 * class ArgumentOutOfRange(OSError): # <<<<<<<<<<<<<<
67476 * def __init__(self, message, errno=None):
67477 * super(ArgumentOutOfRange, self).__init__(
67478 */
67479 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ArgumentOutOfRange, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__67479; goto __pyx_L1_error;}
67480 __Pyx_GOTREF(__pyx_t_9);
67481 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArgumentOutOfRange, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__67481; goto __pyx_L1_error;}
67482 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67483 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67484 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67485 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67486
67487 /* "rbd.pyx":813
67488 *
67489 *
67490 * class ConnectionShutdown(OSError): # <<<<<<<<<<<<<<
67491 * def __init__(self, message, errno=None):
67492 * super(ConnectionShutdown, self).__init__(
67493 */
67494 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__67494; goto __pyx_L1_error;}
67495 __Pyx_GOTREF(__pyx_t_7);
67496 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__67496; goto __pyx_L1_error;}
67497 __Pyx_GOTREF(__pyx_t_1);
67498 __Pyx_GIVEREF(__pyx_t_7);
67499 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67500 __pyx_t_7 = 0;
67501 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__67501; goto __pyx_L1_error;}
67502 __Pyx_GOTREF(__pyx_t_7);
67503 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_ConnectionShutdown, __pyx_n_s_ConnectionShutdown, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__67503; goto __pyx_L1_error;}
67504 __Pyx_GOTREF(__pyx_t_5);
67505
67506 /* "rbd.pyx":814
67507 *
67508 * class ConnectionShutdown(OSError):
67509 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67510 * super(ConnectionShutdown, self).__init__(
67511 * "RBD connection was shutdown (%s)" % message, errno)
67512 */
67513 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_18ConnectionShutdown_1__init__, 0, __pyx_n_s_ConnectionShutdown___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__80))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_18ConnectionShutdown_1__init__
, 0, __pyx_n_s_ConnectionShutdown___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__80))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__67513; goto __pyx_L1_error;}
67514 __Pyx_GOTREF(__pyx_t_9);
67515 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__81);
67516 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__67516; goto __pyx_L1_error;}
67517 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67518
67519 /* "rbd.pyx":813
67520 *
67521 *
67522 * class ConnectionShutdown(OSError): # <<<<<<<<<<<<<<
67523 * def __init__(self, message, errno=None):
67524 * super(ConnectionShutdown, self).__init__(
67525 */
67526 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ConnectionShutdown, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__67526; goto __pyx_L1_error;}
67527 __Pyx_GOTREF(__pyx_t_9);
67528 if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConnectionShutdown, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__67528; goto __pyx_L1_error;}
67529 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67530 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67531 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67532 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67533
67534 /* "rbd.pyx":819
67535 *
67536 *
67537 * class Timeout(OSError): # <<<<<<<<<<<<<<
67538 * def __init__(self, message, errno=None):
67539 * super(Timeout, self).__init__(
67540 */
67541 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__67541; goto __pyx_L1_error;}
67542 __Pyx_GOTREF(__pyx_t_1);
67543 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__67543; goto __pyx_L1_error;}
67544 __Pyx_GOTREF(__pyx_t_7);
67545 __Pyx_GIVEREF(__pyx_t_1);
67546 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67547 __pyx_t_1 = 0;
67548 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__67548; goto __pyx_L1_error;}
67549 __Pyx_GOTREF(__pyx_t_1);
67550 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_Timeout, __pyx_n_s_Timeout, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__67550; goto __pyx_L1_error;}
67551 __Pyx_GOTREF(__pyx_t_5);
67552
67553 /* "rbd.pyx":820
67554 *
67555 * class Timeout(OSError):
67556 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67557 * super(Timeout, self).__init__(
67558 * "RBD operation timeout (%s)" % message, errno)
67559 */
67560 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_7Timeout_1__init__, 0, __pyx_n_s_Timeout___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__83))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_7Timeout_1__init__
, 0, __pyx_n_s_Timeout___init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__83))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__67560; goto __pyx_L1_error;}
67561 __Pyx_GOTREF(__pyx_t_9);
67562 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__84);
67563 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__67563; goto __pyx_L1_error;}
67564 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67565
67566 /* "rbd.pyx":819
67567 *
67568 *
67569 * class Timeout(OSError): # <<<<<<<<<<<<<<
67570 * def __init__(self, message, errno=None):
67571 * super(Timeout, self).__init__(
67572 */
67573 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Timeout, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__67573; goto __pyx_L1_error;}
67574 __Pyx_GOTREF(__pyx_t_9);
67575 if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timeout, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__67575; goto __pyx_L1_error;}
67576 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67577 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67578 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67579 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67580
67581 /* "rbd.pyx":825
67582 *
67583 *
67584 * class DiskQuotaExceeded(OSError): # <<<<<<<<<<<<<<
67585 * def __init__(self, message, errno=None):
67586 * super(DiskQuotaExceeded, self).__init__(
67587 */
67588 __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__67588; goto __pyx_L1_error;}
67589 __Pyx_GOTREF(__pyx_t_7);
67590 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__67590; goto __pyx_L1_error;}
67591 __Pyx_GOTREF(__pyx_t_1);
67592 __Pyx_GIVEREF(__pyx_t_7);
67593 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)(((PyTupleObject *)(__pyx_t_1))->ob_item[0] = __pyx_t_7);
67594 __pyx_t_7 = 0;
67595 __pyx_t_7 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__67595; goto __pyx_L1_error;}
67596 __Pyx_GOTREF(__pyx_t_7);
67597 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_1, __pyx_n_s_DiskQuotaExceeded, __pyx_n_s_DiskQuotaExceeded, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__67597; goto __pyx_L1_error;}
67598 __Pyx_GOTREF(__pyx_t_5);
67599
67600 /* "rbd.pyx":826
67601 *
67602 * class DiskQuotaExceeded(OSError):
67603 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67604 * super(DiskQuotaExceeded, self).__init__(
67605 * "RBD disk quota exceeded (%s)" % message, errno)
67606 */
67607 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_17DiskQuotaExceeded_1__init__, 0, __pyx_n_s_DiskQuotaExceeded___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__86))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_17DiskQuotaExceeded_1__init__
, 0, __pyx_n_s_DiskQuotaExceeded___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__86))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__67607; goto __pyx_L1_error;}
67608 __Pyx_GOTREF(__pyx_t_9);
67609 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__87);
67610 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__67610; goto __pyx_L1_error;}
67611 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67612
67613 /* "rbd.pyx":825
67614 *
67615 *
67616 * class DiskQuotaExceeded(OSError): # <<<<<<<<<<<<<<
67617 * def __init__(self, message, errno=None):
67618 * super(DiskQuotaExceeded, self).__init__(
67619 */
67620 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_DiskQuotaExceeded, __pyx_t_1, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__67620; goto __pyx_L1_error;}
67621 __Pyx_GOTREF(__pyx_t_9);
67622 if (PyDict_SetItem(__pyx_d, __pyx_n_s_DiskQuotaExceeded, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__67622; goto __pyx_L1_error;}
67623 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67624 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67625 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67626 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67627
67628 /* "rbd.pyx":830
67629 * "RBD disk quota exceeded (%s)" % message, errno)
67630 *
67631 * class OperationCanceled(OSError): # <<<<<<<<<<<<<<
67632 * def __init__(self, message, errno=None):
67633 * super(OperationCanceled, self).__init__(
67634 */
67635 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OSError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__67635; goto __pyx_L1_error;}
67636 __Pyx_GOTREF(__pyx_t_1);
67637 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__67637; goto __pyx_L1_error;}
67638 __Pyx_GOTREF(__pyx_t_7);
67639 __Pyx_GIVEREF(__pyx_t_1);
67640 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_t_1);
67641 __pyx_t_1 = 0;
67642 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__67642; goto __pyx_L1_error;}
67643 __Pyx_GOTREF(__pyx_t_1);
67644 __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_OperationCanceled, __pyx_n_s_OperationCanceled, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, (PyObject *) NULL((void*)0)); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__67644; goto __pyx_L1_error;}
67645 __Pyx_GOTREF(__pyx_t_5);
67646
67647 /* "rbd.pyx":831
67648 *
67649 * class OperationCanceled(OSError):
67650 * def __init__(self, message, errno=None): # <<<<<<<<<<<<<<
67651 * super(OperationCanceled, self).__init__(
67652 * "RBD operation canceled (%s)" % message, errno)
67653 */
67654 __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_17OperationCanceled_1__init__, 0, __pyx_n_s_OperationCanceled___init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__89))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_17OperationCanceled_1__init__
, 0, __pyx_n_s_OperationCanceled___init, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__89))
; if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__67654; goto __pyx_L1_error;}
67655 __Pyx_GOTREF(__pyx_t_9);
67656 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__90);
67657 if (PyObject_SetItem(__pyx_t_5, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__67657; goto __pyx_L1_error;}
67658 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67659
67660 /* "rbd.pyx":830
67661 * "RBD disk quota exceeded (%s)" % message, errno)
67662 *
67663 * class OperationCanceled(OSError): # <<<<<<<<<<<<<<
67664 * def __init__(self, message, errno=None):
67665 * super(OperationCanceled, self).__init__(
67666 */
67667 __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_OperationCanceled, __pyx_t_7, __pyx_t_5, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__67667; goto __pyx_L1_error;}
67668 __Pyx_GOTREF(__pyx_t_9);
67669 if (PyDict_SetItem(__pyx_d, __pyx_n_s_OperationCanceled, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__67669; goto __pyx_L1_error;}
67670 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
67671 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67672 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67673 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
67674
67675 /* "rbd.pyx":836
67676 *
67677 * cdef errno_to_exception = {
67678 * errno.EPERM : PermissionError, # <<<<<<<<<<<<<<
67679 * errno.ENOENT : ImageNotFound,
67680 * errno.EIO : IOError,
67681 */
67682 __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67682; goto __pyx_L1_error;}
67683 __Pyx_GOTREF(__pyx_t_7);
67684 __pyx_t_1 = __Pyx_PyInt_From_int(EPERM1); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67684; goto __pyx_L1_error;}
67685 __Pyx_GOTREF(__pyx_t_1);
67686 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_PermissionError); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67686; goto __pyx_L1_error;}
67687 __Pyx_GOTREF(__pyx_t_5);
67688 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67688; goto __pyx_L1_error;}
67689 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67690 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67691
67692 /* "rbd.pyx":837
67693 * cdef errno_to_exception = {
67694 * errno.EPERM : PermissionError,
67695 * errno.ENOENT : ImageNotFound, # <<<<<<<<<<<<<<
67696 * errno.EIO : IOError,
67697 * errno.ENOSPC : NoSpace,
67698 */
67699 __pyx_t_5 = __Pyx_PyInt_From_int(ENOENT2); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__67699; goto __pyx_L1_error;}
67700 __Pyx_GOTREF(__pyx_t_5);
67701 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageNotFound); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__67701; goto __pyx_L1_error;}
67702 __Pyx_GOTREF(__pyx_t_1);
67703 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67703; goto __pyx_L1_error;}
67704 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67705 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67706
67707 /* "rbd.pyx":838
67708 * errno.EPERM : PermissionError,
67709 * errno.ENOENT : ImageNotFound,
67710 * errno.EIO : IOError, # <<<<<<<<<<<<<<
67711 * errno.ENOSPC : NoSpace,
67712 * errno.EEXIST : ImageExists,
67713 */
67714 __pyx_t_1 = __Pyx_PyInt_From_int(EIO5); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__67714; goto __pyx_L1_error;}
67715 __Pyx_GOTREF(__pyx_t_1);
67716 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_IOError); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__67716; goto __pyx_L1_error;}
67717 __Pyx_GOTREF(__pyx_t_5);
67718 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67718; goto __pyx_L1_error;}
67719 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67720 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67721
67722 /* "rbd.pyx":839
67723 * errno.ENOENT : ImageNotFound,
67724 * errno.EIO : IOError,
67725 * errno.ENOSPC : NoSpace, # <<<<<<<<<<<<<<
67726 * errno.EEXIST : ImageExists,
67727 * errno.EINVAL : InvalidArgument,
67728 */
67729 __pyx_t_5 = __Pyx_PyInt_From_int(ENOSPC28); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__67729; goto __pyx_L1_error;}
67730 __Pyx_GOTREF(__pyx_t_5);
67731 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoSpace); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__67731; goto __pyx_L1_error;}
67732 __Pyx_GOTREF(__pyx_t_1);
67733 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67733; goto __pyx_L1_error;}
67734 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67735 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67736
67737 /* "rbd.pyx":840
67738 * errno.EIO : IOError,
67739 * errno.ENOSPC : NoSpace,
67740 * errno.EEXIST : ImageExists, # <<<<<<<<<<<<<<
67741 * errno.EINVAL : InvalidArgument,
67742 * errno.EROFS : ReadOnlyImage,
67743 */
67744 __pyx_t_1 = __Pyx_PyInt_From_int(EEXIST17); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__67744; goto __pyx_L1_error;}
67745 __Pyx_GOTREF(__pyx_t_1);
67746 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageExists); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__67746; goto __pyx_L1_error;}
67747 __Pyx_GOTREF(__pyx_t_5);
67748 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67748; goto __pyx_L1_error;}
67749 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67750 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67751
67752 /* "rbd.pyx":841
67753 * errno.ENOSPC : NoSpace,
67754 * errno.EEXIST : ImageExists,
67755 * errno.EINVAL : InvalidArgument, # <<<<<<<<<<<<<<
67756 * errno.EROFS : ReadOnlyImage,
67757 * errno.EBUSY : ImageBusy,
67758 */
67759 __pyx_t_5 = __Pyx_PyInt_From_int(EINVAL22); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__67759; goto __pyx_L1_error;}
67760 __Pyx_GOTREF(__pyx_t_5);
67761 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__67761; goto __pyx_L1_error;}
67762 __Pyx_GOTREF(__pyx_t_1);
67763 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67763; goto __pyx_L1_error;}
67764 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67765 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67766
67767 /* "rbd.pyx":842
67768 * errno.EEXIST : ImageExists,
67769 * errno.EINVAL : InvalidArgument,
67770 * errno.EROFS : ReadOnlyImage, # <<<<<<<<<<<<<<
67771 * errno.EBUSY : ImageBusy,
67772 * errno.ENOTEMPTY : ImageHasSnapshots,
67773 */
67774 __pyx_t_1 = __Pyx_PyInt_From_int(EROFS30); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__67774; goto __pyx_L1_error;}
67775 __Pyx_GOTREF(__pyx_t_1);
67776 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReadOnlyImage); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__67776; goto __pyx_L1_error;}
67777 __Pyx_GOTREF(__pyx_t_5);
67778 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67778; goto __pyx_L1_error;}
67779 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67780 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67781
67782 /* "rbd.pyx":843
67783 * errno.EINVAL : InvalidArgument,
67784 * errno.EROFS : ReadOnlyImage,
67785 * errno.EBUSY : ImageBusy, # <<<<<<<<<<<<<<
67786 * errno.ENOTEMPTY : ImageHasSnapshots,
67787 * errno.ENOSYS : FunctionNotSupported,
67788 */
67789 __pyx_t_5 = __Pyx_PyInt_From_int(EBUSY16); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__67789; goto __pyx_L1_error;}
67790 __Pyx_GOTREF(__pyx_t_5);
67791 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageBusy); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__67791; goto __pyx_L1_error;}
67792 __Pyx_GOTREF(__pyx_t_1);
67793 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67793; goto __pyx_L1_error;}
67794 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67795 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67796
67797 /* "rbd.pyx":844
67798 * errno.EROFS : ReadOnlyImage,
67799 * errno.EBUSY : ImageBusy,
67800 * errno.ENOTEMPTY : ImageHasSnapshots, # <<<<<<<<<<<<<<
67801 * errno.ENOSYS : FunctionNotSupported,
67802 * errno.EDOM : ArgumentOutOfRange,
67803 */
67804 __pyx_t_1 = __Pyx_PyInt_From_int(ENOTEMPTY39); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__67804; goto __pyx_L1_error;}
67805 __Pyx_GOTREF(__pyx_t_1);
67806 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageHasSnapshots); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__67806; goto __pyx_L1_error;}
67807 __Pyx_GOTREF(__pyx_t_5);
67808 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67808; goto __pyx_L1_error;}
67809 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67810 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67811
67812 /* "rbd.pyx":845
67813 * errno.EBUSY : ImageBusy,
67814 * errno.ENOTEMPTY : ImageHasSnapshots,
67815 * errno.ENOSYS : FunctionNotSupported, # <<<<<<<<<<<<<<
67816 * errno.EDOM : ArgumentOutOfRange,
67817 * errno.ESHUTDOWN : ConnectionShutdown,
67818 */
67819 __pyx_t_5 = __Pyx_PyInt_From_int(ENOSYS38); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__67819; goto __pyx_L1_error;}
67820 __Pyx_GOTREF(__pyx_t_5);
67821 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FunctionNotSupported); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__67821; goto __pyx_L1_error;}
67822 __Pyx_GOTREF(__pyx_t_1);
67823 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67823; goto __pyx_L1_error;}
67824 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67825 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67826
67827 /* "rbd.pyx":846
67828 * errno.ENOTEMPTY : ImageHasSnapshots,
67829 * errno.ENOSYS : FunctionNotSupported,
67830 * errno.EDOM : ArgumentOutOfRange, # <<<<<<<<<<<<<<
67831 * errno.ESHUTDOWN : ConnectionShutdown,
67832 * errno.ETIMEDOUT : Timeout,
67833 */
67834 __pyx_t_1 = __Pyx_PyInt_From_int(EDOM33); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__67834; goto __pyx_L1_error;}
67835 __Pyx_GOTREF(__pyx_t_1);
67836 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ArgumentOutOfRange); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__67836; goto __pyx_L1_error;}
67837 __Pyx_GOTREF(__pyx_t_5);
67838 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67838; goto __pyx_L1_error;}
67839 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67840 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67841
67842 /* "rbd.pyx":847
67843 * errno.ENOSYS : FunctionNotSupported,
67844 * errno.EDOM : ArgumentOutOfRange,
67845 * errno.ESHUTDOWN : ConnectionShutdown, # <<<<<<<<<<<<<<
67846 * errno.ETIMEDOUT : Timeout,
67847 * errno.EDQUOT : DiskQuotaExceeded,
67848 */
67849 __pyx_t_5 = __Pyx_PyInt_From_int(ESHUTDOWN108); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__67849; goto __pyx_L1_error;}
67850 __Pyx_GOTREF(__pyx_t_5);
67851 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ConnectionShutdown); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__67851; goto __pyx_L1_error;}
67852 __Pyx_GOTREF(__pyx_t_1);
67853 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67853; goto __pyx_L1_error;}
67854 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67855 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67856
67857 /* "rbd.pyx":848
67858 * errno.EDOM : ArgumentOutOfRange,
67859 * errno.ESHUTDOWN : ConnectionShutdown,
67860 * errno.ETIMEDOUT : Timeout, # <<<<<<<<<<<<<<
67861 * errno.EDQUOT : DiskQuotaExceeded,
67862 * ECANCELED : OperationCanceled,
67863 */
67864 __pyx_t_1 = __Pyx_PyInt_From_int(ETIMEDOUT110); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__67864; goto __pyx_L1_error;}
67865 __Pyx_GOTREF(__pyx_t_1);
67866 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timeout); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__67866; goto __pyx_L1_error;}
67867 __Pyx_GOTREF(__pyx_t_5);
67868 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67868; goto __pyx_L1_error;}
67869 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67870 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67871
67872 /* "rbd.pyx":849
67873 * errno.ESHUTDOWN : ConnectionShutdown,
67874 * errno.ETIMEDOUT : Timeout,
67875 * errno.EDQUOT : DiskQuotaExceeded, # <<<<<<<<<<<<<<
67876 * ECANCELED : OperationCanceled,
67877 * }
67878 */
67879 __pyx_t_5 = __Pyx_PyInt_From_int(EDQUOT122); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__67879; goto __pyx_L1_error;}
67880 __Pyx_GOTREF(__pyx_t_5);
67881 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiskQuotaExceeded); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__67881; goto __pyx_L1_error;}
67882 __Pyx_GOTREF(__pyx_t_1);
67883 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67883; goto __pyx_L1_error;}
67884 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67885 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67886
67887 /* "rbd.pyx":850
67888 * errno.ETIMEDOUT : Timeout,
67889 * errno.EDQUOT : DiskQuotaExceeded,
67890 * ECANCELED : OperationCanceled, # <<<<<<<<<<<<<<
67891 * }
67892 *
67893 */
67894 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ECANCELED); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__67894; goto __pyx_L1_error;}
67895 __Pyx_GOTREF(__pyx_t_1);
67896 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationCanceled); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__67896; goto __pyx_L1_error;}
67897 __Pyx_GOTREF(__pyx_t_5);
67898 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__67898; goto __pyx_L1_error;}
67899 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67900 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67901 __Pyx_XGOTREF(__pyx_v_3rbd_errno_to_exception);
67902 __Pyx_DECREF_SET(__pyx_v_3rbd_errno_to_exception, __pyx_t_7)do { PyObject *tmp = (PyObject *) __pyx_v_3rbd_errno_to_exception
; __pyx_v_3rbd_errno_to_exception = __pyx_t_7; do { if ( --((
PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *
)((PyObject *)(tmp)))); } while (0); } while (0)
;
67903 __Pyx_GIVEREF(__pyx_t_7);
67904 __pyx_t_7 = 0;
67905
67906 /* "rbd.pyx":854
67907 *
67908 * cdef group_errno_to_exception = {
67909 * errno.EPERM : PermissionError, # <<<<<<<<<<<<<<
67910 * errno.ENOENT : ObjectNotFound,
67911 * errno.EIO : IOError,
67912 */
67913 __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67913; goto __pyx_L1_error;}
67914 __Pyx_GOTREF(__pyx_t_7);
67915 __pyx_t_5 = __Pyx_PyInt_From_int(EPERM1); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67915; goto __pyx_L1_error;}
67916 __Pyx_GOTREF(__pyx_t_5);
67917 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PermissionError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67917; goto __pyx_L1_error;}
67918 __Pyx_GOTREF(__pyx_t_1);
67919 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67919; goto __pyx_L1_error;}
67920 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67921 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67922
67923 /* "rbd.pyx":855
67924 * cdef group_errno_to_exception = {
67925 * errno.EPERM : PermissionError,
67926 * errno.ENOENT : ObjectNotFound, # <<<<<<<<<<<<<<
67927 * errno.EIO : IOError,
67928 * errno.ENOSPC : NoSpace,
67929 */
67930 __pyx_t_1 = __Pyx_PyInt_From_int(ENOENT2); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__67930; goto __pyx_L1_error;}
67931 __Pyx_GOTREF(__pyx_t_1);
67932 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectNotFound); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__67932; goto __pyx_L1_error;}
67933 __Pyx_GOTREF(__pyx_t_5);
67934 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67934; goto __pyx_L1_error;}
67935 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67936 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67937
67938 /* "rbd.pyx":856
67939 * errno.EPERM : PermissionError,
67940 * errno.ENOENT : ObjectNotFound,
67941 * errno.EIO : IOError, # <<<<<<<<<<<<<<
67942 * errno.ENOSPC : NoSpace,
67943 * errno.EEXIST : ObjectExists,
67944 */
67945 __pyx_t_5 = __Pyx_PyInt_From_int(EIO5); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__67945; goto __pyx_L1_error;}
67946 __Pyx_GOTREF(__pyx_t_5);
67947 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_IOError); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__67947; goto __pyx_L1_error;}
67948 __Pyx_GOTREF(__pyx_t_1);
67949 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67949; goto __pyx_L1_error;}
67950 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67951 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67952
67953 /* "rbd.pyx":857
67954 * errno.ENOENT : ObjectNotFound,
67955 * errno.EIO : IOError,
67956 * errno.ENOSPC : NoSpace, # <<<<<<<<<<<<<<
67957 * errno.EEXIST : ObjectExists,
67958 * errno.EINVAL : InvalidArgument,
67959 */
67960 __pyx_t_1 = __Pyx_PyInt_From_int(ENOSPC28); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__67960; goto __pyx_L1_error;}
67961 __Pyx_GOTREF(__pyx_t_1);
67962 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_NoSpace); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__67962; goto __pyx_L1_error;}
67963 __Pyx_GOTREF(__pyx_t_5);
67964 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67964; goto __pyx_L1_error;}
67965 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67966 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67967
67968 /* "rbd.pyx":858
67969 * errno.EIO : IOError,
67970 * errno.ENOSPC : NoSpace,
67971 * errno.EEXIST : ObjectExists, # <<<<<<<<<<<<<<
67972 * errno.EINVAL : InvalidArgument,
67973 * errno.EROFS : ReadOnlyImage,
67974 */
67975 __pyx_t_5 = __Pyx_PyInt_From_int(EEXIST17); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__67975; goto __pyx_L1_error;}
67976 __Pyx_GOTREF(__pyx_t_5);
67977 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ObjectExists); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__67977; goto __pyx_L1_error;}
67978 __Pyx_GOTREF(__pyx_t_1);
67979 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67979; goto __pyx_L1_error;}
67980 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67981 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67982
67983 /* "rbd.pyx":859
67984 * errno.ENOSPC : NoSpace,
67985 * errno.EEXIST : ObjectExists,
67986 * errno.EINVAL : InvalidArgument, # <<<<<<<<<<<<<<
67987 * errno.EROFS : ReadOnlyImage,
67988 * errno.EBUSY : ImageBusy,
67989 */
67990 __pyx_t_1 = __Pyx_PyInt_From_int(EINVAL22); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__67990; goto __pyx_L1_error;}
67991 __Pyx_GOTREF(__pyx_t_1);
67992 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidArgument); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__67992; goto __pyx_L1_error;}
67993 __Pyx_GOTREF(__pyx_t_5);
67994 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__67994; goto __pyx_L1_error;}
67995 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
67996 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
67997
67998 /* "rbd.pyx":860
67999 * errno.EEXIST : ObjectExists,
68000 * errno.EINVAL : InvalidArgument,
68001 * errno.EROFS : ReadOnlyImage, # <<<<<<<<<<<<<<
68002 * errno.EBUSY : ImageBusy,
68003 * errno.ENOTEMPTY : ImageHasSnapshots,
68004 */
68005 __pyx_t_5 = __Pyx_PyInt_From_int(EROFS30); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__68005; goto __pyx_L1_error;}
68006 __Pyx_GOTREF(__pyx_t_5);
68007 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReadOnlyImage); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__68007; goto __pyx_L1_error;}
68008 __Pyx_GOTREF(__pyx_t_1);
68009 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68009; goto __pyx_L1_error;}
68010 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68011 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68012
68013 /* "rbd.pyx":861
68014 * errno.EINVAL : InvalidArgument,
68015 * errno.EROFS : ReadOnlyImage,
68016 * errno.EBUSY : ImageBusy, # <<<<<<<<<<<<<<
68017 * errno.ENOTEMPTY : ImageHasSnapshots,
68018 * errno.ENOSYS : FunctionNotSupported,
68019 */
68020 __pyx_t_1 = __Pyx_PyInt_From_int(EBUSY16); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__68020; goto __pyx_L1_error;}
68021 __Pyx_GOTREF(__pyx_t_1);
68022 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageBusy); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__68022; goto __pyx_L1_error;}
68023 __Pyx_GOTREF(__pyx_t_5);
68024 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68024; goto __pyx_L1_error;}
68025 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68026 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68027
68028 /* "rbd.pyx":862
68029 * errno.EROFS : ReadOnlyImage,
68030 * errno.EBUSY : ImageBusy,
68031 * errno.ENOTEMPTY : ImageHasSnapshots, # <<<<<<<<<<<<<<
68032 * errno.ENOSYS : FunctionNotSupported,
68033 * errno.EDOM : ArgumentOutOfRange,
68034 */
68035 __pyx_t_5 = __Pyx_PyInt_From_int(ENOTEMPTY39); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__68035; goto __pyx_L1_error;}
68036 __Pyx_GOTREF(__pyx_t_5);
68037 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ImageHasSnapshots); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__68037; goto __pyx_L1_error;}
68038 __Pyx_GOTREF(__pyx_t_1);
68039 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68039; goto __pyx_L1_error;}
68040 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68041 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68042
68043 /* "rbd.pyx":863
68044 * errno.EBUSY : ImageBusy,
68045 * errno.ENOTEMPTY : ImageHasSnapshots,
68046 * errno.ENOSYS : FunctionNotSupported, # <<<<<<<<<<<<<<
68047 * errno.EDOM : ArgumentOutOfRange,
68048 * errno.ESHUTDOWN : ConnectionShutdown,
68049 */
68050 __pyx_t_1 = __Pyx_PyInt_From_int(ENOSYS38); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__68050; goto __pyx_L1_error;}
68051 __Pyx_GOTREF(__pyx_t_1);
68052 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FunctionNotSupported); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__68052; goto __pyx_L1_error;}
68053 __Pyx_GOTREF(__pyx_t_5);
68054 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68054; goto __pyx_L1_error;}
68055 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68056 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68057
68058 /* "rbd.pyx":864
68059 * errno.ENOTEMPTY : ImageHasSnapshots,
68060 * errno.ENOSYS : FunctionNotSupported,
68061 * errno.EDOM : ArgumentOutOfRange, # <<<<<<<<<<<<<<
68062 * errno.ESHUTDOWN : ConnectionShutdown,
68063 * errno.ETIMEDOUT : Timeout,
68064 */
68065 __pyx_t_5 = __Pyx_PyInt_From_int(EDOM33); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__68065; goto __pyx_L1_error;}
68066 __Pyx_GOTREF(__pyx_t_5);
68067 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ArgumentOutOfRange); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__68067; goto __pyx_L1_error;}
68068 __Pyx_GOTREF(__pyx_t_1);
68069 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68069; goto __pyx_L1_error;}
68070 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68071 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68072
68073 /* "rbd.pyx":865
68074 * errno.ENOSYS : FunctionNotSupported,
68075 * errno.EDOM : ArgumentOutOfRange,
68076 * errno.ESHUTDOWN : ConnectionShutdown, # <<<<<<<<<<<<<<
68077 * errno.ETIMEDOUT : Timeout,
68078 * errno.EDQUOT : DiskQuotaExceeded,
68079 */
68080 __pyx_t_1 = __Pyx_PyInt_From_int(ESHUTDOWN108); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__68080; goto __pyx_L1_error;}
68081 __Pyx_GOTREF(__pyx_t_1);
68082 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ConnectionShutdown); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__68082; goto __pyx_L1_error;}
68083 __Pyx_GOTREF(__pyx_t_5);
68084 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68084; goto __pyx_L1_error;}
68085 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68086 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68087
68088 /* "rbd.pyx":866
68089 * errno.EDOM : ArgumentOutOfRange,
68090 * errno.ESHUTDOWN : ConnectionShutdown,
68091 * errno.ETIMEDOUT : Timeout, # <<<<<<<<<<<<<<
68092 * errno.EDQUOT : DiskQuotaExceeded,
68093 * ECANCELED : OperationCanceled,
68094 */
68095 __pyx_t_5 = __Pyx_PyInt_From_int(ETIMEDOUT110); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__68095; goto __pyx_L1_error;}
68096 __Pyx_GOTREF(__pyx_t_5);
68097 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timeout); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__68097; goto __pyx_L1_error;}
68098 __Pyx_GOTREF(__pyx_t_1);
68099 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68099; goto __pyx_L1_error;}
68100 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68101 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68102
68103 /* "rbd.pyx":867
68104 * errno.ESHUTDOWN : ConnectionShutdown,
68105 * errno.ETIMEDOUT : Timeout,
68106 * errno.EDQUOT : DiskQuotaExceeded, # <<<<<<<<<<<<<<
68107 * ECANCELED : OperationCanceled,
68108 * }
68109 */
68110 __pyx_t_1 = __Pyx_PyInt_From_int(EDQUOT122); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__68110; goto __pyx_L1_error;}
68111 __Pyx_GOTREF(__pyx_t_1);
68112 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DiskQuotaExceeded); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__68112; goto __pyx_L1_error;}
68113 __Pyx_GOTREF(__pyx_t_5);
68114 if (PyDict_SetItem(__pyx_t_7, __pyx_t_1, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68114; goto __pyx_L1_error;}
68115 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68116 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68117
68118 /* "rbd.pyx":868
68119 * errno.ETIMEDOUT : Timeout,
68120 * errno.EDQUOT : DiskQuotaExceeded,
68121 * ECANCELED : OperationCanceled, # <<<<<<<<<<<<<<
68122 * }
68123 *
68124 */
68125 __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ECANCELED); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__68125; goto __pyx_L1_error;}
68126 __Pyx_GOTREF(__pyx_t_5);
68127 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OperationCanceled); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__68127; goto __pyx_L1_error;}
68128 __Pyx_GOTREF(__pyx_t_1);
68129 if (PyDict_SetItem(__pyx_t_7, __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__68129; goto __pyx_L1_error;}
68130 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68131 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68132 __Pyx_XGOTREF(__pyx_v_3rbd_group_errno_to_exception);
68133 __Pyx_DECREF_SET(__pyx_v_3rbd_group_errno_to_exception, __pyx_t_7)do { PyObject *tmp = (PyObject *) __pyx_v_3rbd_group_errno_to_exception
; __pyx_v_3rbd_group_errno_to_exception = __pyx_t_7; do { if (
--((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp)))); } while (0); } while (0)
;
68134 __Pyx_GIVEREF(__pyx_t_7);
68135 __pyx_t_7 = 0;
68136
68137 /* "rbd.pyx":871
68138 * }
68139 *
68140 * cdef make_ex(ret, msg, exception_map=errno_to_exception): # <<<<<<<<<<<<<<
68141 * """
68142 * Translate a librbd return code into an exception.
68143 */
68144 __Pyx_INCREF(__pyx_v_3rbd_errno_to_exception)( ((PyObject*)(__pyx_v_3rbd_errno_to_exception))->ob_refcnt
++)
;
68145 __pyx_k_ = __pyx_v_3rbd_errno_to_exception;
68146 __Pyx_GIVEREF(__pyx_v_3rbd_errno_to_exception);
68147
68148 /* "rbd.pyx":897
68149 * return 0
68150 *
68151 * def cstr(val, name, encoding="utf-8", opt=False): # <<<<<<<<<<<<<<
68152 * """
68153 * Create a byte string from a Python string
68154 */
68155 __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_3rbd_1cstr, NULL((void*)0), __pyx_n_s_rbd); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__68155; goto __pyx_L1_error;}
68156 __Pyx_GOTREF(__pyx_t_7);
68157 if (PyDict_SetItem(__pyx_d, __pyx_n_s_cstr, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__68157; goto __pyx_L1_error;}
68158 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68159
68160 /* "rbd.pyx":919
68161 * raise InvalidArgument('%s must be a string' % name)
68162 *
68163 * def decode_cstr(val, encoding="utf-8"): # <<<<<<<<<<<<<<
68164 * """
68165 * Decode a byte string into a Python string.
68166 */
68167 __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_3rbd_3decode_cstr, NULL((void*)0), __pyx_n_s_rbd); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__68167; goto __pyx_L1_error;}
68168 __Pyx_GOTREF(__pyx_t_7);
68169 if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode_cstr, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__68169; goto __pyx_L1_error;}
68170 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68171
68172 /* "rbd.pyx":943
68173 * return ret
68174 *
68175 * RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST) # <<<<<<<<<<<<<<
68176 * RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY)
68177 *
68178 */
68179 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__68179; goto __pyx_L1_error;}
68180 __Pyx_GOTREF(__pyx_t_1);
68181 __pyx_t_5 = __Pyx_PyBytes_FromStringPyString_FromString(RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST"mon_host"); if (unlikely(!__pyx_t_5)__builtin_expect(!!(!__pyx_t_5), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__68181; goto __pyx_L1_error;}
68182 __Pyx_GOTREF(__pyx_t_5);
68183 __pyx_t_9 = NULL((void*)0);
68184 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
68185 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
68186 if (likely(__pyx_t_9)__builtin_expect(!!(__pyx_t_9), 1)) {
68187 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
68188 __Pyx_INCREF(__pyx_t_9)( ((PyObject*)(__pyx_t_9))->ob_refcnt++);
68189 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
68190 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
68191 }
68192 }
68193 if (!__pyx_t_9) {
68194 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__68194; goto __pyx_L1_error;}
68195 __Pyx_DECREF(__pyx_t_5)do { if ( --((PyObject*)(__pyx_t_5))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_5)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_5)))); } while (
0)
; __pyx_t_5 = 0;
68196 __Pyx_GOTREF(__pyx_t_7);
68197 } else {
68198 __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__68198; goto __pyx_L1_error;}
68199 __Pyx_GOTREF(__pyx_t_8);
68200 __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)(((PyTupleObject *)(__pyx_t_8))->ob_item[0] = __pyx_t_9); __pyx_t_9 = NULL((void*)0);
68201 __Pyx_GIVEREF(__pyx_t_5);
68202 PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5)(((PyTupleObject *)(__pyx_t_8))->ob_item[0+1] = __pyx_t_5);
68203 __pyx_t_5 = 0;
68204 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__68204; goto __pyx_L1_error;}
68205 __Pyx_GOTREF(__pyx_t_7);
68206 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68207 }
68208 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68209 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_PEER_ATTRIBUTE_NAME_M, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__68209; goto __pyx_L1_error;}
68210 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68211
68212 /* "rbd.pyx":944
68213 *
68214 * RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME_MON_HOST)
68215 * RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY) # <<<<<<<<<<<<<<
68216 *
68217 * cdef class Completion
68218 */
68219 __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_decode_cstr); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__68219; goto __pyx_L1_error;}
68220 __Pyx_GOTREF(__pyx_t_1);
68221 __pyx_t_8 = __Pyx_PyBytes_FromStringPyString_FromString(RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY"key"); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__68221; goto __pyx_L1_error;}
68222 __Pyx_GOTREF(__pyx_t_8);
68223 __pyx_t_5 = NULL((void*)0);
68224 if (CYTHON_COMPILING_IN_CPYTHON1 && unlikely(PyMethod_Check(__pyx_t_1))__builtin_expect(!!(((__pyx_t_1)->ob_type == &PyMethod_Type
)), 0)
) {
68225 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_self);
68226 if (likely(__pyx_t_5)__builtin_expect(!!(__pyx_t_5), 1)) {
68227 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1)(((PyMethodObject *)__pyx_t_1) -> im_func);
68228 __Pyx_INCREF(__pyx_t_5)( ((PyObject*)(__pyx_t_5))->ob_refcnt++);
68229 __Pyx_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
68230 __Pyx_DECREF_SET(__pyx_t_1, function)do { PyObject *tmp = (PyObject *) __pyx_t_1; __pyx_t_1 = function
; do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0); } while (0)
;
68231 }
68232 }
68233 if (!__pyx_t_5) {
68234 __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__68234; goto __pyx_L1_error;}
68235 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68236 __Pyx_GOTREF(__pyx_t_7);
68237 } else {
68238 __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__68238; goto __pyx_L1_error;}
68239 __Pyx_GOTREF(__pyx_t_9);
68240 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5)(((PyTupleObject *)(__pyx_t_9))->ob_item[0] = __pyx_t_5); __pyx_t_5 = NULL((void*)0);
68241 __Pyx_GIVEREF(__pyx_t_8);
68242 PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8)(((PyTupleObject *)(__pyx_t_9))->ob_item[0+1] = __pyx_t_8);
68243 __pyx_t_8 = 0;
68244 __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL((void*)0)); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__68244; goto __pyx_L1_error;}
68245 __Pyx_GOTREF(__pyx_t_7);
68246 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
68247 }
68248 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68249 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD_MIRROR_PEER_ATTRIBUTE_NAME_K, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__68249; goto __pyx_L1_error;}
68250 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68251
68252 /* "rbd.pyx":1053
68253 *
68254 *
68255 * class RBD(object): # <<<<<<<<<<<<<<
68256 * """
68257 * This class wraps librbd CRUD functions.
68258 */
68259 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__68259; goto __pyx_L1_error;}
68260 __Pyx_GOTREF(__pyx_t_7);
68261 __Pyx_INCREF(__pyx_builtin_object)( ((PyObject*)(__pyx_builtin_object))->ob_refcnt++);
68262 __Pyx_GIVEREF(__pyx_builtin_object);
68263 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object)(((PyTupleObject *)(__pyx_t_7))->ob_item[0] = __pyx_builtin_object
)
;
68264 __pyx_t_1 = __Pyx_CalculateMetaclass(NULL((void*)0), __pyx_t_7); if (unlikely(!__pyx_t_1)__builtin_expect(!!(!__pyx_t_1), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__68264; goto __pyx_L1_error;}
68265 __Pyx_GOTREF(__pyx_t_1);
68266 __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_7, __pyx_n_s_RBD, __pyx_n_s_RBD, (PyObject *) NULL((void*)0), __pyx_n_s_rbd, __pyx_kp_s_This_class_wraps_librbd_CRUD_fu); if (unlikely(!__pyx_t_9)__builtin_expect(!!(!__pyx_t_9), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__68266; goto __pyx_L1_error;}
68267 __Pyx_GOTREF(__pyx_t_9);
68268
68269 /* "rbd.pyx":1057
68270 * This class wraps librbd CRUD functions.
68271 * """
68272 * def version(self): # <<<<<<<<<<<<<<
68273 * """
68274 * Get the version number of the ``librbd`` C library.
68275 */
68276 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_1version, 0, __pyx_n_s_RBD_version, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__96))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_1version
, 0, __pyx_n_s_RBD_version, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__96))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__68276; goto __pyx_L1_error;}
68277 __Pyx_GOTREF(__pyx_t_8);
68278 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_version, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__68278; goto __pyx_L1_error;}
68279 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68280
68281 /* "rbd.pyx":1070
68282 * return (major, minor, extra)
68283 *
68284 * def create(self, ioctx, name, size, order=None, old_format=True, # <<<<<<<<<<<<<<
68285 * features=None, stripe_unit=None, stripe_count=None,
68286 * data_pool=None):
68287 */
68288 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_3create, 0, __pyx_n_s_RBD_create, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__98))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_3create
, 0, __pyx_n_s_RBD_create, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__98))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__68288; goto __pyx_L1_error;}
68289 __Pyx_GOTREF(__pyx_t_8);
68290 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__99);
68291 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_create, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__68291; goto __pyx_L1_error;}
68292 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68293
68294 /* "rbd.pyx":1151
68295 * raise make_ex(ret, 'error creating image')
68296 *
68297 * def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name, # <<<<<<<<<<<<<<
68298 * features=None, order=None, stripe_unit=None, stripe_count=None,
68299 * data_pool=None):
68300 */
68301 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_5clone, 0, __pyx_n_s_RBD_clone, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__101))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_5clone
, 0, __pyx_n_s_RBD_clone, ((void*)0), __pyx_n_s_rbd, __pyx_d,
((PyObject *)__pyx_codeobj__101))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__68301; goto __pyx_L1_error;}
68302 __Pyx_GOTREF(__pyx_t_8);
68303 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__102);
68304 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_clone, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__68304; goto __pyx_L1_error;}
68305 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68306
68307 /* "rbd.pyx":1220
68308 * raise make_ex(ret, 'error creating clone')
68309 *
68310 * def list(self, ioctx): # <<<<<<<<<<<<<<
68311 * """
68312 * List image names.
68313 */
68314 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_7list, 0, __pyx_n_s_RBD_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__104))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_7list
, 0, __pyx_n_s_RBD_list, ((void*)0), __pyx_n_s_rbd, __pyx_d, (
(PyObject *)__pyx_codeobj__104))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__68314; goto __pyx_L1_error;}
68315 __Pyx_GOTREF(__pyx_t_8);
68316 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __pyx_clineno = __LINE__68316; goto __pyx_L1_error;}
68317 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68318
68319 /* "rbd.pyx":1246
68320 * free(c_names)
68321 *
68322 * def list2(self, ioctx): # <<<<<<<<<<<<<<
68323 * """
68324 * Iterate over the images in the pool.
68325 */
68326 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_9list2, 0, __pyx_n_s_RBD_list2, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__106))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_9list2
, 0, __pyx_n_s_RBD_list2, ((void*)0), __pyx_n_s_rbd, __pyx_d,
((PyObject *)__pyx_codeobj__106))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__68326; goto __pyx_L1_error;}
68327 __Pyx_GOTREF(__pyx_t_8);
68328 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_list2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__68328; goto __pyx_L1_error;}
68329 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68330
68331 /* "rbd.pyx":1256
68332 * return ImageIterator(ioctx)
68333 *
68334 * def remove(self, ioctx, name, on_progress=None): # <<<<<<<<<<<<<<
68335 * """
68336 * Delete an RBD image. This may take a long time, since it does
68337 */
68338 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_11remove, 0, __pyx_n_s_RBD_remove, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__108))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_11remove
, 0, __pyx_n_s_RBD_remove, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__108))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__68338; goto __pyx_L1_error;}
68339 __Pyx_GOTREF(__pyx_t_8);
68340 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__109);
68341 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_remove, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; __pyx_clineno = __LINE__68341; goto __pyx_L1_error;}
68342 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68343
68344 /* "rbd.pyx":1289
68345 * raise make_ex(ret, 'error removing image')
68346 *
68347 * def rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
68348 * """
68349 * Rename an RBD image.
68350 */
68351 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_13rename, 0, __pyx_n_s_RBD_rename, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__111))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_13rename
, 0, __pyx_n_s_RBD_rename, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__111))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__68351; goto __pyx_L1_error;}
68352 __Pyx_GOTREF(__pyx_t_8);
68353 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_rename, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; __pyx_clineno = __LINE__68353; goto __pyx_L1_error;}
68354 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68355
68356 /* "rbd.pyx":1312
68357 * raise make_ex(ret, 'error renaming image')
68358 *
68359 * def trash_move(self, ioctx, name, delay=0): # <<<<<<<<<<<<<<
68360 * """
68361 * Move an RBD image to the trash.
68362 */
68363 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_15trash_move, 0, __pyx_n_s_RBD_trash_move, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__113))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_15trash_move
, 0, __pyx_n_s_RBD_trash_move, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__113))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__68363; goto __pyx_L1_error;}
68364 __Pyx_GOTREF(__pyx_t_8);
68365 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__114);
68366 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_trash_move, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__68366; goto __pyx_L1_error;}
68367 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68368
68369 /* "rbd.pyx":1335
68370 * raise make_ex(ret, 'error moving image to trash')
68371 *
68372 * def trash_purge(self, ioctx, expire_ts=None, threshold=-1): # <<<<<<<<<<<<<<
68373 * """
68374 * Delete RBD images from trash in bulk.
68375 */
68376 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_17trash_purge, 0, __pyx_n_s_RBD_trash_purge, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__116))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_17trash_purge
, 0, __pyx_n_s_RBD_trash_purge, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__116))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__68376; goto __pyx_L1_error;}
68377 __Pyx_GOTREF(__pyx_t_8);
68378 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__117);
68379 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_trash_purge, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__68379; goto __pyx_L1_error;}
68380 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68381
68382 /* "rbd.pyx":1367
68383 * raise make_ex(ret, 'error purging images from trash')
68384 *
68385 * def trash_remove(self, ioctx, image_id, force=False, on_progress=None): # <<<<<<<<<<<<<<
68386 * """
68387 * Delete an RBD image from trash. If image deferment time has not
68388 */
68389 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_19trash_remove, 0, __pyx_n_s_RBD_trash_remove, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__119))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_19trash_remove
, 0, __pyx_n_s_RBD_trash_remove, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__119))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__68389; goto __pyx_L1_error;}
68390 __Pyx_GOTREF(__pyx_t_8);
68391 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__120);
68392 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_trash_remove, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__68392; goto __pyx_L1_error;}
68393 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68394
68395 /* "rbd.pyx":1398
68396 * raise make_ex(ret, 'error deleting image from trash')
68397 *
68398 * def trash_get(self, ioctx, image_id): # <<<<<<<<<<<<<<
68399 * """
68400 * Retrieve RBD image info from trash.
68401 */
68402 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_21trash_get, 0, __pyx_n_s_RBD_trash_get, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__122))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_21trash_get
, 0, __pyx_n_s_RBD_trash_get, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__122))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__68402; goto __pyx_L1_error;}
68403 __Pyx_GOTREF(__pyx_t_8);
68404 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_trash_get, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__68404; goto __pyx_L1_error;}
68405 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68406
68407 /* "rbd.pyx":1442
68408 * return info
68409 *
68410 * def trash_list(self, ioctx): # <<<<<<<<<<<<<<
68411 * """
68412 * List all entries from trash.
68413 */
68414 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_23trash_list, 0, __pyx_n_s_RBD_trash_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__124))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_23trash_list
, 0, __pyx_n_s_RBD_trash_list, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__124))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__68414; goto __pyx_L1_error;}
68415 __Pyx_GOTREF(__pyx_t_8);
68416 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_trash_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__68416; goto __pyx_L1_error;}
68417 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68418
68419 /* "rbd.pyx":1452
68420 * return TrashIterator(ioctx)
68421 *
68422 * def trash_restore(self, ioctx, image_id, name): # <<<<<<<<<<<<<<
68423 * """
68424 * Restore an RBD image from trash.
68425 */
68426 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_25trash_restore, 0, __pyx_n_s_RBD_trash_restore, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__126))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_25trash_restore
, 0, __pyx_n_s_RBD_trash_restore, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__126))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__68426; goto __pyx_L1_error;}
68427 __Pyx_GOTREF(__pyx_t_8);
68428 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_trash_restore, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__68428; goto __pyx_L1_error;}
68429 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68430
68431 /* "rbd.pyx":1475
68432 * raise make_ex(ret, 'error restoring image from trash')
68433 *
68434 * def migration_prepare(self, ioctx, image_name, dest_ioctx, dest_image_name, # <<<<<<<<<<<<<<
68435 * features=None, order=None, stripe_unit=None, stripe_count=None,
68436 * data_pool=None):
68437 */
68438 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_27migration_prepare, 0, __pyx_n_s_RBD_migration_prepare, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__128))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_27migration_prepare
, 0, __pyx_n_s_RBD_migration_prepare, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__128))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__68438; goto __pyx_L1_error;}
68439 __Pyx_GOTREF(__pyx_t_8);
68440 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__129);
68441 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_migration_prepare, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__68441; goto __pyx_L1_error;}
68442 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68443
68444 /* "rbd.pyx":1539
68445 * raise make_ex(ret, 'error migrating image %s' % (image_name))
68446 *
68447 * def migration_execute(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
68448 * """
68449 * Execute a prepared RBD image migration.
68450 */
68451 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_29migration_execute, 0, __pyx_n_s_RBD_migration_execute, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__131))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_29migration_execute
, 0, __pyx_n_s_RBD_migration_execute, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__131))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__68451; goto __pyx_L1_error;}
68452 __Pyx_GOTREF(__pyx_t_8);
68453 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__132);
68454 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_migration_execute, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__68454; goto __pyx_L1_error;}
68455 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68456
68457 /* "rbd.pyx":1566
68458 * raise make_ex(ret, 'error aborting migration')
68459 *
68460 * def migration_commit(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
68461 * """
68462 * Commit an executed RBD image migration.
68463 */
68464 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_31migration_commit, 0, __pyx_n_s_RBD_migration_commit, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__134))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_31migration_commit
, 0, __pyx_n_s_RBD_migration_commit, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__134))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__68464; goto __pyx_L1_error;}
68465 __Pyx_GOTREF(__pyx_t_8);
68466 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__135);
68467 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_migration_commit, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__68467; goto __pyx_L1_error;}
68468 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68469
68470 /* "rbd.pyx":1593
68471 * raise make_ex(ret, 'error aborting migration')
68472 *
68473 * def migration_abort(self, ioctx, image_name, on_progress=None): # <<<<<<<<<<<<<<
68474 * """
68475 * Cancel a previously started but interrupted migration.
68476 */
68477 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_33migration_abort, 0, __pyx_n_s_RBD_migration_abort, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__137))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_33migration_abort
, 0, __pyx_n_s_RBD_migration_abort, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__137))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__68477; goto __pyx_L1_error;}
68478 __Pyx_GOTREF(__pyx_t_8);
68479 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__138);
68480 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_migration_abort, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__68480; goto __pyx_L1_error;}
68481 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68482
68483 /* "rbd.pyx":1620
68484 * raise make_ex(ret, 'error aborting migration')
68485 *
68486 * def migration_status(self, ioctx, image_name): # <<<<<<<<<<<<<<
68487 * """
68488 * Return RBD image migration status.
68489 */
68490 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_35migration_status, 0, __pyx_n_s_RBD_migration_status, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__140))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_35migration_status
, 0, __pyx_n_s_RBD_migration_status, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__140))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__68490; goto __pyx_L1_error;}
68491 __Pyx_GOTREF(__pyx_t_8);
68492 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_migration_status, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__68492; goto __pyx_L1_error;}
68493 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68494
68495 /* "rbd.pyx":1680
68496 * return status
68497 *
68498 * def mirror_mode_get(self, ioctx): # <<<<<<<<<<<<<<
68499 * """
68500 * Get pool mirror mode.
68501 */
68502 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_37mirror_mode_get, 0, __pyx_n_s_RBD_mirror_mode_get, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__142))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_37mirror_mode_get
, 0, __pyx_n_s_RBD_mirror_mode_get, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__142))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__68502; goto __pyx_L1_error;}
68503 __Pyx_GOTREF(__pyx_t_8);
68504 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_mode_get, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__68504; goto __pyx_L1_error;}
68505 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68506
68507 /* "rbd.pyx":1697
68508 * return mirror_mode
68509 *
68510 * def mirror_mode_set(self, ioctx, mirror_mode): # <<<<<<<<<<<<<<
68511 * """
68512 * Set pool mirror mode.
68513 */
68514 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_39mirror_mode_set, 0, __pyx_n_s_RBD_mirror_mode_set, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__144))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_39mirror_mode_set
, 0, __pyx_n_s_RBD_mirror_mode_set, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__144))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__68514; goto __pyx_L1_error;}
68515 __Pyx_GOTREF(__pyx_t_8);
68516 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_mode_set, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__68516; goto __pyx_L1_error;}
68517 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68518
68519 /* "rbd.pyx":1714
68520 * raise make_ex(ret, 'error setting mirror mode')
68521 *
68522 * def mirror_peer_add(self, ioctx, cluster_name, client_name): # <<<<<<<<<<<<<<
68523 * """
68524 * Add mirror peer.
68525 */
68526 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_41mirror_peer_add, 0, __pyx_n_s_RBD_mirror_peer_add, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__146))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_41mirror_peer_add
, 0, __pyx_n_s_RBD_mirror_peer_add, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__146))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__68526; goto __pyx_L1_error;}
68527 __Pyx_GOTREF(__pyx_t_8);
68528 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_add, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__68528; goto __pyx_L1_error;}
68529 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68530
68531 /* "rbd.pyx":1744
68532 * free(_uuid)
68533 *
68534 * def mirror_peer_remove(self, ioctx, uuid): # <<<<<<<<<<<<<<
68535 * """
68536 * Remove mirror peer.
68537 */
68538 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_43mirror_peer_remove, 0, __pyx_n_s_RBD_mirror_peer_remove, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__148))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_43mirror_peer_remove
, 0, __pyx_n_s_RBD_mirror_peer_remove, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__148))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__68538; goto __pyx_L1_error;}
68539 __Pyx_GOTREF(__pyx_t_8);
68540 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_remove, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__68540; goto __pyx_L1_error;}
68541 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68542
68543 /* "rbd.pyx":1762
68544 * raise make_ex(ret, 'error removing mirror peer')
68545 *
68546 * def mirror_peer_list(self, ioctx): # <<<<<<<<<<<<<<
68547 * """
68548 * Iterate over the peers of a pool.
68549 */
68550 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_45mirror_peer_list, 0, __pyx_n_s_RBD_mirror_peer_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__150))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_45mirror_peer_list
, 0, __pyx_n_s_RBD_mirror_peer_list, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__150))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__68550; goto __pyx_L1_error;}
68551 __Pyx_GOTREF(__pyx_t_8);
68552 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__68552; goto __pyx_L1_error;}
68553 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68554
68555 /* "rbd.pyx":1772
68556 * return MirrorPeerIterator(ioctx)
68557 *
68558 * def mirror_peer_set_client(self, ioctx, uuid, client_name): # <<<<<<<<<<<<<<
68559 * """
68560 * Set mirror peer client name
68561 */
68562 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_47mirror_peer_set_client, 0, __pyx_n_s_RBD_mirror_peer_set_client, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__152))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_47mirror_peer_set_client
, 0, __pyx_n_s_RBD_mirror_peer_set_client, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__152))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__68562; goto __pyx_L1_error;}
68563 __Pyx_GOTREF(__pyx_t_8);
68564 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_set_client, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; __pyx_clineno = __LINE__68564; goto __pyx_L1_error;}
68565 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68566
68567 /* "rbd.pyx":1794
68568 * raise make_ex(ret, 'error setting mirror peer client')
68569 *
68570 * def mirror_peer_set_cluster(self, ioctx, uuid, cluster_name): # <<<<<<<<<<<<<<
68571 * """
68572 * Set mirror peer cluster name
68573 */
68574 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_49mirror_peer_set_cluster, 0, __pyx_n_s_RBD_mirror_peer_set_cluster, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__154))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_49mirror_peer_set_cluster
, 0, __pyx_n_s_RBD_mirror_peer_set_cluster, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__154))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__68574; goto __pyx_L1_error;}
68575 __Pyx_GOTREF(__pyx_t_8);
68576 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_set_cluster, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__68576; goto __pyx_L1_error;}
68577 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68578
68579 /* "rbd.pyx":1816
68580 * raise make_ex(ret, 'error setting mirror peer cluster')
68581 *
68582 * def mirror_peer_get_attributes(self, ioctx, uuid): # <<<<<<<<<<<<<<
68583 * """
68584 * Get optional mirror peer attributes
68585 */
68586 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_51mirror_peer_get_attributes, 0, __pyx_n_s_RBD_mirror_peer_get_attributes, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__156))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_51mirror_peer_get_attributes
, 0, __pyx_n_s_RBD_mirror_peer_get_attributes, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__156))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__68586; goto __pyx_L1_error;}
68587 __Pyx_GOTREF(__pyx_t_8);
68588 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_get_attributes, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__68588; goto __pyx_L1_error;}
68589 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68590
68591 /* "rbd.pyx":1859
68592 * free(_vals)
68593 *
68594 * def mirror_peer_set_attributes(self, ioctx, uuid, attributes): # <<<<<<<<<<<<<<
68595 * """
68596 * Set optional mirror peer attributes
68597 */
68598 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_53mirror_peer_set_attributes, 0, __pyx_n_s_RBD_mirror_peer_set_attributes, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__158))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_53mirror_peer_set_attributes
, 0, __pyx_n_s_RBD_mirror_peer_set_attributes, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__158))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__68598; goto __pyx_L1_error;}
68599 __Pyx_GOTREF(__pyx_t_8);
68600 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_peer_set_attributes, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__68600; goto __pyx_L1_error;}
68601 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68602
68603 /* "rbd.pyx":1886
68604 * raise make_ex(ret, 'error setting mirror peer attributes')
68605 *
68606 * def mirror_image_status_list(self, ioctx): # <<<<<<<<<<<<<<
68607 * """
68608 * Iterate over the mirror image statuses of a pool.
68609 */
68610 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_55mirror_image_status_list, 0, __pyx_n_s_RBD_mirror_image_status_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__160))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_55mirror_image_status_list
, 0, __pyx_n_s_RBD_mirror_image_status_list, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__160))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__68610; goto __pyx_L1_error;}
68611 __Pyx_GOTREF(__pyx_t_8);
68612 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_image_status_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__68612; goto __pyx_L1_error;}
68613 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68614
68615 /* "rbd.pyx":1896
68616 * return MirrorImageStatusIterator(ioctx)
68617 *
68618 * def mirror_image_status_summary(self, ioctx): # <<<<<<<<<<<<<<
68619 * """
68620 * Get mirror image status summary of a pool.
68621 */
68622 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_57mirror_image_status_summary, 0, __pyx_n_s_RBD_mirror_image_status_summary, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__162))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_57mirror_image_status_summary
, 0, __pyx_n_s_RBD_mirror_image_status_summary, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__162))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__68622; goto __pyx_L1_error;}
68623 __Pyx_GOTREF(__pyx_t_8);
68624 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_image_status_summary, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__68624; goto __pyx_L1_error;}
68625 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68626
68627 /* "rbd.pyx":1923
68628 * free(counts)
68629 *
68630 * def mirror_image_instance_id_list(self, ioctx): # <<<<<<<<<<<<<<
68631 * """
68632 * Iterate over the mirror image instance ids of a pool.
68633 */
68634 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_59mirror_image_instance_id_list, 0, __pyx_n_s_RBD_mirror_image_instance_id_lis, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__164))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_59mirror_image_instance_id_list
, 0, __pyx_n_s_RBD_mirror_image_instance_id_lis, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__164))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__68634; goto __pyx_L1_error;}
68635 __Pyx_GOTREF(__pyx_t_8);
68636 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_mirror_image_instance_id_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__68636; goto __pyx_L1_error;}
68637 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68638
68639 /* "rbd.pyx":1933
68640 * return MirrorImageInstanceIdIterator(ioctx)
68641 *
68642 * def pool_metadata_get(self, ioctx, key): # <<<<<<<<<<<<<<
68643 * """
68644 * Get pool metadata for the given key.
68645 */
68646 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_61pool_metadata_get, 0, __pyx_n_s_RBD_pool_metadata_get, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__166))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_61pool_metadata_get
, 0, __pyx_n_s_RBD_pool_metadata_get, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__166))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__68646; goto __pyx_L1_error;}
68647 __Pyx_GOTREF(__pyx_t_8);
68648 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_pool_metadata_get, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__68648; goto __pyx_L1_error;}
68649 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68650
68651 /* "rbd.pyx":1965
68652 * free(value)
68653 *
68654 * def pool_metadata_set(self, ioctx, key, value): # <<<<<<<<<<<<<<
68655 * """
68656 * Set pool metadata for the given key.
68657 */
68658 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_63pool_metadata_set, 0, __pyx_n_s_RBD_pool_metadata_set, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__168))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_63pool_metadata_set
, 0, __pyx_n_s_RBD_pool_metadata_set, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__168))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__68658; goto __pyx_L1_error;}
68659 __Pyx_GOTREF(__pyx_t_8);
68660 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_pool_metadata_set, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__68660; goto __pyx_L1_error;}
68661 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68662
68663 /* "rbd.pyx":1988
68664 * raise make_ex(ret, 'error setting metadata %s' % (key))
68665 *
68666 * def pool_metadata_remove(self, ioctx, key): # <<<<<<<<<<<<<<
68667 * """
68668 * Remove pool metadata for the given key.
68669 */
68670 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_65pool_metadata_remove, 0, __pyx_n_s_RBD_pool_metadata_remove, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__170))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_65pool_metadata_remove
, 0, __pyx_n_s_RBD_pool_metadata_remove, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__170))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__68670; goto __pyx_L1_error;}
68671 __Pyx_GOTREF(__pyx_t_8);
68672 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_pool_metadata_remove, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__68672; goto __pyx_L1_error;}
68673 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68674
68675 /* "rbd.pyx":2010
68676 * raise make_ex(ret, 'error removing metadata %s' % (key))
68677 *
68678 * def pool_metadata_list(self, ioctx): # <<<<<<<<<<<<<<
68679 * """
68680 * List pool metadata.
68681 */
68682 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_67pool_metadata_list, 0, __pyx_n_s_RBD_pool_metadata_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__172))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_67pool_metadata_list
, 0, __pyx_n_s_RBD_pool_metadata_list, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__172))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__68682; goto __pyx_L1_error;}
68683 __Pyx_GOTREF(__pyx_t_8);
68684 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_pool_metadata_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__68684; goto __pyx_L1_error;}
68685 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68686
68687 /* "rbd.pyx":2018
68688 * return PoolMetadataIterator(ioctx)
68689 *
68690 * def config_list(self, ioctx): # <<<<<<<<<<<<<<
68691 * """
68692 * List pool-level config overrides.
68693 */
68694 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_69config_list, 0, __pyx_n_s_RBD_config_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__174))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_69config_list
, 0, __pyx_n_s_RBD_config_list, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__174))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__68694; goto __pyx_L1_error;}
68695 __Pyx_GOTREF(__pyx_t_8);
68696 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_config_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; __pyx_clineno = __LINE__68696; goto __pyx_L1_error;}
68697 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68698
68699 /* "rbd.pyx":2026
68700 * return ConfigPoolIterator(ioctx)
68701 *
68702 * def group_create(self, ioctx, name): # <<<<<<<<<<<<<<
68703 * """
68704 * Create a group.
68705 */
68706 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_71group_create, 0, __pyx_n_s_RBD_group_create, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__176))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_71group_create
, 0, __pyx_n_s_RBD_group_create, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__176))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__68706; goto __pyx_L1_error;}
68707 __Pyx_GOTREF(__pyx_t_8);
68708 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_group_create, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__68708; goto __pyx_L1_error;}
68709 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68710
68711 /* "rbd.pyx":2047
68712 * raise make_ex(ret, 'error creating group %s' % name, group_errno_to_exception)
68713 *
68714 * def group_remove(self, ioctx, name): # <<<<<<<<<<<<<<
68715 * """
68716 * Delete an RBD group. This may take a long time, since it does
68717 */
68718 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_73group_remove, 0, __pyx_n_s_RBD_group_remove, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__178))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_73group_remove
, 0, __pyx_n_s_RBD_group_remove, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__178))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__68718; goto __pyx_L1_error;}
68719 __Pyx_GOTREF(__pyx_t_8);
68720 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_group_remove, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__68720; goto __pyx_L1_error;}
68721 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68722
68723 /* "rbd.pyx":2070
68724 * raise make_ex(ret, 'error removing group', group_errno_to_exception)
68725 *
68726 * def group_list(self, ioctx): # <<<<<<<<<<<<<<
68727 * """
68728 * List groups.
68729 */
68730 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_75group_list, 0, __pyx_n_s_RBD_group_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__180))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_75group_list
, 0, __pyx_n_s_RBD_group_list, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__180))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__68730; goto __pyx_L1_error;}
68731 __Pyx_GOTREF(__pyx_t_8);
68732 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_group_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__68732; goto __pyx_L1_error;}
68733 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68734
68735 /* "rbd.pyx":2097
68736 * free(c_names)
68737 *
68738 * def group_rename(self, ioctx, src, dest): # <<<<<<<<<<<<<<
68739 * """
68740 * Rename an RBD group.
68741 */
68742 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_77group_rename, 0, __pyx_n_s_RBD_group_rename, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__182))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_77group_rename
, 0, __pyx_n_s_RBD_group_rename, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__182))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__68742; goto __pyx_L1_error;}
68743 __Pyx_GOTREF(__pyx_t_8);
68744 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_group_rename, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __pyx_clineno = __LINE__68744; goto __pyx_L1_error;}
68745 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68746
68747 /* "rbd.pyx":2123
68748 * raise make_ex(ret, 'error renaming group')
68749 *
68750 * def namespace_create(self, ioctx, name): # <<<<<<<<<<<<<<
68751 * """
68752 * Create an RBD namespace within a pool
68753 */
68754 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_79namespace_create, 0, __pyx_n_s_RBD_namespace_create, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__184))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_79namespace_create
, 0, __pyx_n_s_RBD_namespace_create, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__184))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__68754; goto __pyx_L1_error;}
68755 __Pyx_GOTREF(__pyx_t_8);
68756 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_namespace_create, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__68756; goto __pyx_L1_error;}
68757 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68758
68759 /* "rbd.pyx":2141
68760 * raise make_ex(ret, 'error creating namespace')
68761 *
68762 * def namespace_remove(self, ioctx, name): # <<<<<<<<<<<<<<
68763 * """
68764 * Remove an RBD namespace from a pool
68765 */
68766 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_81namespace_remove, 0, __pyx_n_s_RBD_namespace_remove, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__186))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_81namespace_remove
, 0, __pyx_n_s_RBD_namespace_remove, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__186))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__68766; goto __pyx_L1_error;}
68767 __Pyx_GOTREF(__pyx_t_8);
68768 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_namespace_remove, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__68768; goto __pyx_L1_error;}
68769 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68770
68771 /* "rbd.pyx":2159
68772 * raise make_ex(ret, 'error removing namespace')
68773 *
68774 * def namespace_exists(self, ioctx, name): # <<<<<<<<<<<<<<
68775 * """
68776 * Verifies if a namespace exists within a pool
68777 */
68778 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_83namespace_exists, 0, __pyx_n_s_RBD_namespace_exists, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__188))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_83namespace_exists
, 0, __pyx_n_s_RBD_namespace_exists, ((void*)0), __pyx_n_s_rbd
, __pyx_d, ((PyObject *)__pyx_codeobj__188))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__68778; goto __pyx_L1_error;}
68779 __Pyx_GOTREF(__pyx_t_8);
68780 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_namespace_exists, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; __pyx_clineno = __LINE__68780; goto __pyx_L1_error;}
68781 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68782
68783 /* "rbd.pyx":2180
68784 * return bool(_exists != 0)
68785 *
68786 * def namespace_list(self, ioctx): # <<<<<<<<<<<<<<
68787 * """
68788 * List all namespaces within a pool
68789 */
68790 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_85namespace_list, 0, __pyx_n_s_RBD_namespace_list, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__190))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_85namespace_list
, 0, __pyx_n_s_RBD_namespace_list, ((void*)0), __pyx_n_s_rbd,
__pyx_d, ((PyObject *)__pyx_codeobj__190))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__68790; goto __pyx_L1_error;}
68791 __Pyx_GOTREF(__pyx_t_8);
68792 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_namespace_list, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; __pyx_clineno = __LINE__68792; goto __pyx_L1_error;}
68793 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68794
68795 /* "rbd.pyx":2206
68796 * free(_names)
68797 *
68798 * def pool_init(self, ioctx, force): # <<<<<<<<<<<<<<
68799 * """
68800 * Initialize an RBD pool
68801 */
68802 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_87pool_init, 0, __pyx_n_s_RBD_pool_init, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__192))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_87pool_init
, 0, __pyx_n_s_RBD_pool_init, ((void*)0), __pyx_n_s_rbd, __pyx_d
, ((PyObject *)__pyx_codeobj__192))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__68802; goto __pyx_L1_error;}
68803 __Pyx_GOTREF(__pyx_t_8);
68804 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_pool_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__68804; goto __pyx_L1_error;}
68805 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68806
68807 /* "rbd.pyx":2222
68808 * raise make_ex(ret, 'error initializing pool')
68809 *
68810 * def pool_stats_get(self, ioctx): # <<<<<<<<<<<<<<
68811 * """
68812 * Return RBD pool stats
68813 */
68814 __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3rbd_3RBD_89pool_stats_get, 0, __pyx_n_s_RBD_pool_stats_get, NULL, __pyx_n_s_rbd, __pyx_d, ((PyObject *)__pyx_codeobj__194))__Pyx_CyFunction_New(__pyx_CyFunctionType, &__pyx_mdef_3rbd_3RBD_89pool_stats_get
, 0, __pyx_n_s_RBD_pool_stats_get, ((void*)0), __pyx_n_s_rbd,
__pyx_d, ((PyObject *)__pyx_codeobj__194))
; if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__68814; goto __pyx_L1_error;}
68815 __Pyx_GOTREF(__pyx_t_8);
68816 if (PyObject_SetItem(__pyx_t_9, __pyx_n_s_pool_stats_get, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2222; __pyx_clineno = __LINE__68816; goto __pyx_L1_error;}
68817 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68818
68819 /* "rbd.pyx":1053
68820 *
68821 *
68822 * class RBD(object): # <<<<<<<<<<<<<<
68823 * """
68824 * This class wraps librbd CRUD functions.
68825 */
68826 __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RBD, __pyx_t_7, __pyx_t_9, NULL((void*)0), 0, 1); if (unlikely(!__pyx_t_8)__builtin_expect(!!(!__pyx_t_8), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__68826; goto __pyx_L1_error;}
68827 __Pyx_GOTREF(__pyx_t_8);
68828 if (PyDict_SetItem(__pyx_d, __pyx_n_s_RBD, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__68828; goto __pyx_L1_error;}
68829 __Pyx_DECREF(__pyx_t_8)do { if ( --((PyObject*)(__pyx_t_8))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_8)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_8)))); } while (
0)
; __pyx_t_8 = 0;
68830 __Pyx_DECREF(__pyx_t_9)do { if ( --((PyObject*)(__pyx_t_9))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_9)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_9)))); } while (
0)
; __pyx_t_9 = 0;
68831 __Pyx_DECREF(__pyx_t_1)do { if ( --((PyObject*)(__pyx_t_1))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_1)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_1)))); } while (
0)
; __pyx_t_1 = 0;
68832 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68833
68834 /* "rbd.pyx":4815
68835 * raise make_ex(ret, 'error listing trash entries')
68836 *
68837 * __source_string = ['USER', 'MIRRORING'] # <<<<<<<<<<<<<<
68838 *
68839 * def __iter__(self):
68840 */
68841 __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4815; __pyx_clineno = __LINE__68841; goto __pyx_L1_error;}
68842 __Pyx_GOTREF(__pyx_t_7);
68843 __Pyx_INCREF(__pyx_n_s_USER)( ((PyObject*)(__pyx_n_s_USER))->ob_refcnt++);
68844 __Pyx_GIVEREF(__pyx_n_s_USER);
68845 PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_USER)(((PyListObject *)(__pyx_t_7))->ob_item[0] = (__pyx_n_s_USER
))
;
68846 __Pyx_INCREF(__pyx_n_s_MIRRORING)( ((PyObject*)(__pyx_n_s_MIRRORING))->ob_refcnt++);
68847 __Pyx_GIVEREF(__pyx_n_s_MIRRORING);
68848 PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_MIRRORING)(((PyListObject *)(__pyx_t_7))->ob_item[1] = (__pyx_n_s_MIRRORING
))
;
68849 if (PyDict_SetItem((PyObject *)__pyx_ptype_3rbd_TrashIterator->tp_dict, __pyx_n_s_source_string, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4815; __pyx_clineno = __LINE__68849; goto __pyx_L1_error;}
68850 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68851 PyType_Modified(__pyx_ptype_3rbd_TrashIterator);
68852
68853 /* "rbd.pyx":1
68854 * # cython: embedsignature=True # <<<<<<<<<<<<<<
68855 * """
68856 * This module is a thin wrapper around librbd.
68857 */
68858 __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)__builtin_expect(!!(!__pyx_t_7), 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__68858; goto __pyx_L1_error;}
68859 __Pyx_GOTREF(__pyx_t_7);
68860 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__68860; goto __pyx_L1_error;}
68861 __Pyx_DECREF(__pyx_t_7)do { if ( --((PyObject*)(__pyx_t_7))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_t_7)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(__pyx_t_7)))); } while (
0)
; __pyx_t_7 = 0;
68862
68863 /*--- Wrapped vars code ---*/
68864
68865 goto __pyx_L0;
68866 __pyx_L1_error:;
68867 __Pyx_XDECREF(__pyx_t_1)do { if ((__pyx_t_1) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_1)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_1)))); } while (0); } while (0)
;
68868 __Pyx_XDECREF(__pyx_t_5)do { if ((__pyx_t_5) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_5))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_5)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_5)))); } while (0); } while (0)
;
68869 __Pyx_XDECREF(__pyx_t_7)do { if ((__pyx_t_7) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_7))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_7)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_7)))); } while (0); } while (0)
;
68870 __Pyx_XDECREF(__pyx_t_8)do { if ((__pyx_t_8) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_8))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_8)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_8)))); } while (0); } while (0)
;
68871 __Pyx_XDECREF(__pyx_t_9)do { if ((__pyx_t_9) == ((void*)0)) ; else do { if ( --((PyObject
*)(__pyx_t_9))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(__pyx_t_9)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(__pyx_t_9)))); } while (0); } while (0)
;
68872 if (__pyx_m) {
68873 if (__pyx_d) {
68874 __Pyx_AddTraceback("init rbd", __pyx_clineno, __pyx_lineno, __pyx_filename);
68875 }
68876 Py_DECREF(__pyx_m)do { if ( --((PyObject*)(__pyx_m))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(__pyx_m)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(__pyx_m)))); } while (0)
; __pyx_m = 0;
68877 } else if (!PyErr_Occurred()) {
68878 PyErr_SetString(PyExc_ImportError, "init rbd");
68879 }
68880 __pyx_L0:;
68881 __Pyx_RefNannyFinishContext();
68882 #if PY_MAJOR_VERSION2 < 3
68883 return;
68884 #else
68885 return __pyx_m;
68886 #endif
68887}
68888
68889/* --- Runtime support code --- */
68890#if CYTHON_REFNANNY0
68891static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
68892 PyObject *m = NULL((void*)0), *p = NULL((void*)0);
68893 void *r = NULL((void*)0);
68894 m = PyImport_ImportModule((char *)modname);
68895 if (!m) goto end;
68896 p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
68897 if (!p) goto end;
68898 r = PyLong_AsVoidPtr(p);
68899end:
68900 Py_XDECREF(p)do { if ((p) == ((void*)0)) ; else do { if ( --((PyObject*)(p
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
p)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(p
)))); } while (0); } while (0)
;
68901 Py_XDECREF(m)do { if ((m) == ((void*)0)) ; else do { if ( --((PyObject*)(m
))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(
m)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(m
)))); } while (0); } while (0)
;
68902 return (__Pyx_RefNannyAPIStruct *)r;
68903}
68904#endif
68905
68906static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
68907 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
68908 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
68909 PyErr_Format(PyExc_NameError,
68910#if PY_MAJOR_VERSION2 >= 3
68911 "name '%U' is not defined", name);
68912#else
68913 "name '%.200s' is not defined", PyString_AS_STRING(name)(((PyStringObject *)(name))->ob_sval));
68914#endif
68915 }
68916 return result;
68917}
68918
68919static void __Pyx_RaiseArgtupleInvalid(
68920 const char* func_name,
68921 int exact,
68922 Py_ssize_t num_min,
68923 Py_ssize_t num_max,
68924 Py_ssize_t num_found)
68925{
68926 Py_ssize_t num_expected;
68927 const char *more_or_less;
68928 if (num_found < num_min) {
68929 num_expected = num_min;
68930 more_or_less = "at least";
68931 } else {
68932 num_expected = num_max;
68933 more_or_less = "at most";
68934 }
68935 if (exact) {
68936 more_or_less = "exactly";
68937 }
68938 PyErr_Format(PyExc_TypeError,
68939 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T"z" "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T"z" "d given)",
68940 func_name, more_or_less, num_expected,
68941 (num_expected == 1) ? "" : "s", num_found);
68942}
68943
68944static void __Pyx_RaiseDoubleKeywordsError(
68945 const char* func_name,
68946 PyObject* kw_name)
68947{
68948 PyErr_Format(PyExc_TypeError,
68949 #if PY_MAJOR_VERSION2 >= 3
68950 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
68951 #else
68952 "%s() got multiple values for keyword argument '%s'", func_name,
68953 PyString_AsString(kw_name));
68954 #endif
68955}
68956
68957static int __Pyx_ParseOptionalKeywords(
68958 PyObject *kwds,
68959 PyObject **argnames[],
68960 PyObject *kwds2,
68961 PyObject *values[],
68962 Py_ssize_t num_pos_args,
68963 const char* function_name)
68964{
68965 PyObject *key = 0, *value = 0;
68966 Py_ssize_t pos = 0;
68967 PyObject*** name;
68968 PyObject*** first_kw_arg = argnames + num_pos_args;
68969 while (PyDict_Next(kwds, &pos, &key, &value)) {
68970 name = first_kw_arg;
68971 while (*name && (**name != key)) name++;
68972 if (*name) {
68973 values[name-argnames] = value;
68974 continue;
68975 }
68976 name = first_kw_arg;
68977 #if PY_MAJOR_VERSION2 < 3
68978 if (likely(PyString_CheckExact(key))__builtin_expect(!!(((((PyObject*)(key))->ob_type) == &
PyString_Type)), 1)
|| likely(PyString_Check(key))__builtin_expect(!!(((((((PyObject*)(key))->ob_type))->
tp_flags & ((1L<<27))) != 0)), 1)
) {
68979 while (*name) {
68980 if ((CYTHON_COMPILING_IN_PYPY0 || PyString_GET_SIZE(**name)(((PyVarObject*)(**name))->ob_size) == PyString_GET_SIZE(key)(((PyVarObject*)(key))->ob_size))
68981 && _PyString_Eq(**name, key)) {
68982 values[name-argnames] = value;
68983 break;
68984 }
68985 name++;
68986 }
68987 if (*name) continue;
68988 else {
68989 PyObject*** argname = argnames;
68990 while (argname != first_kw_arg) {
68991 if ((**argname == key) || (
68992 (CYTHON_COMPILING_IN_PYPY0 || PyString_GET_SIZE(**argname)(((PyVarObject*)(**argname))->ob_size) == PyString_GET_SIZE(key)(((PyVarObject*)(key))->ob_size))
68993 && _PyString_Eq(**argname, key))) {
68994 goto arg_passed_twice;
68995 }
68996 argname++;
68997 }
68998 }
68999 } else
69000 #endif
69001 if (likely(PyUnicode_Check(key))__builtin_expect(!!(((((((PyObject*)(key))->ob_type))->
tp_flags & ((1L<<28))) != 0)), 1)
) {
69002 while (*name) {
69003 int cmp = (**name == key) ? 0 :
69004 #if !CYTHON_COMPILING_IN_PYPY0 && PY_MAJOR_VERSION2 >= 3
69005 (PyUnicode_GET_SIZE(**name)(((PyUnicodeObject *)(**name))->length) != PyUnicode_GET_SIZE(key)(((PyUnicodeObject *)(key))->length)) ? 1 :
69006 #endif
69007 PyUnicode_ComparePyUnicodeUCS4_Compare(**name, key);
69008 if (cmp < 0 && unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) goto bad;
69009 if (cmp == 0) {
69010 values[name-argnames] = value;
69011 break;
69012 }
69013 name++;
69014 }
69015 if (*name) continue;
69016 else {
69017 PyObject*** argname = argnames;
69018 while (argname != first_kw_arg) {
69019 int cmp = (**argname == key) ? 0 :
69020 #if !CYTHON_COMPILING_IN_PYPY0 && PY_MAJOR_VERSION2 >= 3
69021 (PyUnicode_GET_SIZE(**argname)(((PyUnicodeObject *)(**argname))->length) != PyUnicode_GET_SIZE(key)(((PyUnicodeObject *)(key))->length)) ? 1 :
69022 #endif
69023 PyUnicode_ComparePyUnicodeUCS4_Compare(**argname, key);
69024 if (cmp < 0 && unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0)) goto bad;
69025 if (cmp == 0) goto arg_passed_twice;
69026 argname++;
69027 }
69028 }
69029 } else
69030 goto invalid_keyword_type;
69031 if (kwds2) {
69032 if (unlikely(PyDict_SetItem(kwds2, key, value))__builtin_expect(!!(PyDict_SetItem(kwds2, key, value)), 0)) goto bad;
69033 } else {
69034 goto invalid_keyword;
69035 }
69036 }
69037 return 0;
69038arg_passed_twice:
69039 __Pyx_RaiseDoubleKeywordsError(function_name, key);
69040 goto bad;
69041invalid_keyword_type:
69042 PyErr_Format(PyExc_TypeError,
69043 "%.200s() keywords must be strings", function_name);
69044 goto bad;
69045invalid_keyword:
69046 PyErr_Format(PyExc_TypeError,
69047 #if PY_MAJOR_VERSION2 < 3
69048 "%.200s() got an unexpected keyword argument '%.200s'",
69049 function_name, PyString_AsString(key));
69050 #else
69051 "%s() got an unexpected keyword argument '%U'",
69052 function_name, key);
69053 #endif
69054bad:
69055 return -1;
69056}
69057
69058static CYTHON_INLINE__inline__ PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
69059 PyObject *result;
69060#if CYTHON_COMPILING_IN_CPYTHON1
69061 result = PyDict_GetItem(__pyx_d, name);
69062 if (likely(result)__builtin_expect(!!(result), 1)) {
69063 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
69064 } else {
69065#else
69066 result = PyObject_GetItem(__pyx_d, name);
69067 if (!result) {
69068 PyErr_Clear();
69069#endif
69070 result = __Pyx_GetBuiltinName(name);
69071 }
69072 return result;
69073}
69074
69075#if CYTHON_COMPILING_IN_CPYTHON1
69076static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
69077 PyObject *result;
69078 ternaryfunc call = func->ob_type->tp_call;
69079 if (unlikely(!call)__builtin_expect(!!(!call), 0))
69080 return PyObject_Call(func, arg, kw);
69081 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))__builtin_expect(!!(((++((_PyThreadState_Current)->recursion_depth
) > _Py_CheckRecursionLimit) && _Py_CheckRecursiveCall
((char*)" while calling a Python object"))), 0)
)
69082 return NULL((void*)0);
69083 result = (*call)(func, arg, kw);
69084 Py_LeaveRecursiveCall()(--(_PyThreadState_Current)->recursion_depth);
69085 if (unlikely(!result)__builtin_expect(!!(!result), 0) && unlikely(!PyErr_Occurred())__builtin_expect(!!(!PyErr_Occurred()), 0)) {
69086 PyErr_SetString(
69087 PyExc_SystemError,
69088 "NULL result without error in PyObject_Call");
69089 }
69090 return result;
69091}
69092#endif
69093
69094#if CYTHON_COMPILING_IN_CPYTHON1
69095static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
69096 PyObject *self, *result;
69097 PyCFunction cfunc;
69098 cfunc = PyCFunction_GET_FUNCTION(func)(((PyCFunctionObject *)func) -> m_ml -> ml_meth);
69099 self = PyCFunction_GET_SELF(func)(((PyCFunctionObject *)func) -> m_self);
69100 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))__builtin_expect(!!(((++((_PyThreadState_Current)->recursion_depth
) > _Py_CheckRecursionLimit) && _Py_CheckRecursiveCall
((char*)" while calling a Python object"))), 0)
)
69101 return NULL((void*)0);
69102 result = cfunc(self, arg);
69103 Py_LeaveRecursiveCall()(--(_PyThreadState_Current)->recursion_depth);
69104 if (unlikely(!result)__builtin_expect(!!(!result), 0) && unlikely(!PyErr_Occurred())__builtin_expect(!!(!PyErr_Occurred()), 0)) {
69105 PyErr_SetString(
69106 PyExc_SystemError,
69107 "NULL result without error in PyObject_Call");
69108 }
69109 return result;
69110}
69111#endif
69112
69113#if CYTHON_COMPILING_IN_CPYTHON1
69114static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
69115 PyObject *result;
69116 PyObject *args = PyTuple_New(1);
69117 if (unlikely(!args)__builtin_expect(!!(!args), 0)) return NULL((void*)0);
69118 Py_INCREF(arg)( ((PyObject*)(arg))->ob_refcnt++);
69119 PyTuple_SET_ITEM(args, 0, arg)(((PyTupleObject *)(args))->ob_item[0] = arg);
69120 result = __Pyx_PyObject_Call(func, args, NULL((void*)0));
69121 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
69122 return result;
69123}
69124static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
69125#ifdef __Pyx_CyFunction_USED1
69126 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type) || ((((PyObject*)(func))->ob_type) == (__pyx_CyFunctionType
) || PyType_IsSubtype((((PyObject*)(func))->ob_type), (__pyx_CyFunctionType
)))), 1)
) {
69127#else
69128 if (likely(PyCFunction_Check(func))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type)), 1)
) {
69129#endif
69130 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)__builtin_expect(!!((((PyCFunctionObject *)func) -> m_ml ->
ml_flags) & 0x0008), 1)
) {
69131 return __Pyx_PyObject_CallMethO(func, arg);
69132 }
69133 }
69134 return __Pyx__PyObject_CallOneArg(func, arg);
69135}
69136#else
69137static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
69138 PyObject *result;
69139 PyObject *args = PyTuple_Pack(1, arg);
69140 if (unlikely(!args)__builtin_expect(!!(!args), 0)) return NULL((void*)0);
69141 result = __Pyx_PyObject_Call(func, args, NULL((void*)0));
69142 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
69143 return result;
69144}
69145#endif
69146
69147#if CYTHON_COMPILING_IN_CPYTHON1
69148static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
69149#ifdef __Pyx_CyFunction_USED1
69150 if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type) || ((((PyObject*)(func))->ob_type) == (__pyx_CyFunctionType
) || PyType_IsSubtype((((PyObject*)(func))->ob_type), (__pyx_CyFunctionType
)))), 1)
) {
69151#else
69152 if (likely(PyCFunction_Check(func))__builtin_expect(!!(((((PyObject*)(func))->ob_type) == &
PyCFunction_Type)), 1)
) {
69153#endif
69154 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)__builtin_expect(!!((((PyCFunctionObject *)func) -> m_ml ->
ml_flags) & 0x0004), 1)
) {
69155 return __Pyx_PyObject_CallMethO(func, NULL((void*)0));
69156 }
69157 }
69158 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL((void*)0));
69159}
69160#endif
69161
69162static CYTHON_INLINE__inline__ void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
69163#if CYTHON_COMPILING_IN_CPYTHON1
69164 PyObject *tmp_type, *tmp_value, *tmp_tb;
69165 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69166 tmp_type = tstate->curexc_type;
69167 tmp_value = tstate->curexc_value;
69168 tmp_tb = tstate->curexc_traceback;
69169 tstate->curexc_type = type;
69170 tstate->curexc_value = value;
69171 tstate->curexc_traceback = tb;
69172 Py_XDECREF(tmp_type)do { if ((tmp_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_type)))); } while (0); } while (0)
;
69173 Py_XDECREF(tmp_value)do { if ((tmp_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(tmp_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp_value)))); } while (0); } while (0)
;
69174 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
69175#else
69176 PyErr_Restore(type, value, tb);
69177#endif
69178}
69179static CYTHON_INLINE__inline__ void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
69180#if CYTHON_COMPILING_IN_CPYTHON1
69181 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69182 *type = tstate->curexc_type;
69183 *value = tstate->curexc_value;
69184 *tb = tstate->curexc_traceback;
69185 tstate->curexc_type = 0;
69186 tstate->curexc_value = 0;
69187 tstate->curexc_traceback = 0;
69188#else
69189 PyErr_Fetch(type, value, tb);
69190#endif
69191}
69192
69193static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED__attribute__ ((__unused__)) int clineno,
69194 CYTHON_UNUSED__attribute__ ((__unused__)) int lineno, CYTHON_UNUSED__attribute__ ((__unused__)) const char *filename,
69195 int full_traceback, CYTHON_UNUSED__attribute__ ((__unused__)) int nogil) {
69196 PyObject *old_exc, *old_val, *old_tb;
69197 PyObject *ctx;
69198#ifdef WITH_THREAD1
69199 PyGILState_STATE state;
69200 if (nogil)
69201 state = PyGILState_Ensure();
69202#endif
69203 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
69204 if (full_traceback) {
69205 Py_XINCREF(old_exc)do { if ((old_exc) == ((void*)0)) ; else ( ((PyObject*)(old_exc
))->ob_refcnt++); } while (0)
;
69206 Py_XINCREF(old_val)do { if ((old_val) == ((void*)0)) ; else ( ((PyObject*)(old_val
))->ob_refcnt++); } while (0)
;
69207 Py_XINCREF(old_tb)do { if ((old_tb) == ((void*)0)) ; else ( ((PyObject*)(old_tb
))->ob_refcnt++); } while (0)
;
69208 __Pyx_ErrRestore(old_exc, old_val, old_tb);
69209 PyErr_PrintEx(1);
69210 }
69211 #if PY_MAJOR_VERSION2 < 3
69212 ctx = PyString_FromString(name);
69213 #else
69214 ctx = PyUnicode_FromStringPyUnicodeUCS4_FromString(name);
69215 #endif
69216 __Pyx_ErrRestore(old_exc, old_val, old_tb);
69217 if (!ctx) {
69218 PyErr_WriteUnraisable(Py_None(&_Py_NoneStruct));
69219 } else {
69220 PyErr_WriteUnraisable(ctx);
69221 Py_DECREF(ctx)do { if ( --((PyObject*)(ctx))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(ctx)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(ctx)))); } while (0)
;
69222 }
69223#ifdef WITH_THREAD1
69224 if (nogil)
69225 PyGILState_Release(state);
69226#endif
69227}
69228
69229#if PY_MAJOR_VERSION2 < 3
69230static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
69231 CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *cause) {
69232 Py_XINCREF(type)do { if ((type) == ((void*)0)) ; else ( ((PyObject*)(type))->
ob_refcnt++); } while (0)
;
69233 if (!value || value == Py_None(&_Py_NoneStruct))
69234 value = NULL((void*)0);
69235 else
69236 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69237 if (!tb || tb == Py_None(&_Py_NoneStruct))
69238 tb = NULL((void*)0);
69239 else {
69240 Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++);
69241 if (!PyTraceBack_Check(tb)((((PyObject*)(tb))->ob_type) == &PyTraceBack_Type)) {
69242 PyErr_SetString(PyExc_TypeError,
69243 "raise: arg 3 must be a traceback or None");
69244 goto raise_error;
69245 }
69246 }
69247 if (PyType_Check(type)((((((PyObject*)(type))->ob_type))->tp_flags & ((1L
<<31))) != 0)
) {
69248#if CYTHON_COMPILING_IN_PYPY0
69249 if (!value) {
69250 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
69251 value = Py_None(&_Py_NoneStruct);
69252 }
69253#endif
69254 PyErr_NormalizeException(&type, &value, &tb);
69255 } else {
69256 if (value) {
69257 PyErr_SetString(PyExc_TypeError,
69258 "instance exception may not have a separate value");
69259 goto raise_error;
69260 }
69261 value = type;
69262 type = (PyObject*) Py_TYPE(type)(((PyObject*)(type))->ob_type);
69263 Py_INCREF(type)( ((PyObject*)(type))->ob_refcnt++);
69264 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
69265 PyErr_SetString(PyExc_TypeError,
69266 "raise: exception class must be a subclass of BaseException");
69267 goto raise_error;
69268 }
69269 }
69270 __Pyx_ErrRestore(type, value, tb);
69271 return;
69272raise_error:
69273 Py_XDECREF(value)do { if ((value) == ((void*)0)) ; else do { if ( --((PyObject
*)(value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(value)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(value)))); } while (0); } while (0)
;
69274 Py_XDECREF(type)do { if ((type) == ((void*)0)) ; else do { if ( --((PyObject*
)(type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(type)))); } while (0); } while (0)
;
69275 Py_XDECREF(tb)do { if ((tb) == ((void*)0)) ; else do { if ( --((PyObject*)(
tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(tb)))); } while (0); } while (0)
;
69276 return;
69277}
69278#else
69279static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
69280 PyObject* owned_instance = NULL((void*)0);
69281 if (tb == Py_None(&_Py_NoneStruct)) {
69282 tb = 0;
69283 } else if (tb && !PyTraceBack_Check(tb)((((PyObject*)(tb))->ob_type) == &PyTraceBack_Type)) {
69284 PyErr_SetString(PyExc_TypeError,
69285 "raise: arg 3 must be a traceback or None");
69286 goto bad;
69287 }
69288 if (value == Py_None(&_Py_NoneStruct))
69289 value = 0;
69290 if (PyExceptionInstance_Check(type)((((type))->ob_type == &PyInstance_Type) || ((((type)->
ob_type)->tp_flags & ((1L<<30))) != 0))
) {
69291 if (value) {
69292 PyErr_SetString(PyExc_TypeError,
69293 "instance exception may not have a separate value");
69294 goto bad;
69295 }
69296 value = type;
69297 type = (PyObject*) Py_TYPE(value)(((PyObject*)(value))->ob_type);
69298 } else if (PyExceptionClass_Check(type)((((type))->ob_type == &PyClass_Type) || (((((((PyObject
*)((type)))->ob_type))->tp_flags & ((1L<<31))
) != 0) && ((((PyTypeObject*)(type))->tp_flags &
((1L<<30))) != 0)))
) {
69299 PyObject *instance_class = NULL((void*)0);
69300 if (value && PyExceptionInstance_Check(value)((((value))->ob_type == &PyInstance_Type) || ((((value
)->ob_type)->tp_flags & ((1L<<30))) != 0))
) {
69301 instance_class = (PyObject*) Py_TYPE(value)(((PyObject*)(value))->ob_type);
69302 if (instance_class != type) {
69303 int is_subclass = PyObject_IsSubclass(instance_class, type);
69304 if (!is_subclass) {
69305 instance_class = NULL((void*)0);
69306 } else if (unlikely(is_subclass == -1)__builtin_expect(!!(is_subclass == -1), 0)) {
69307 goto bad;
69308 } else {
69309 type = instance_class;
69310 }
69311 }
69312 }
69313 if (!instance_class) {
69314 PyObject *args;
69315 if (!value)
69316 args = PyTuple_New(0);
69317 else if (PyTuple_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<26))) != 0)
) {
69318 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69319 args = value;
69320 } else
69321 args = PyTuple_Pack(1, value);
69322 if (!args)
69323 goto bad;
69324 owned_instance = PyObject_Call(type, args, NULL((void*)0));
69325 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
69326 if (!owned_instance)
69327 goto bad;
69328 value = owned_instance;
69329 if (!PyExceptionInstance_Check(value)((((value))->ob_type == &PyInstance_Type) || ((((value
)->ob_type)->tp_flags & ((1L<<30))) != 0))
) {
69330 PyErr_Format(PyExc_TypeError,
69331 "calling %R should have returned an instance of "
69332 "BaseException, not %R",
69333 type, Py_TYPE(value)(((PyObject*)(value))->ob_type));
69334 goto bad;
69335 }
69336 }
69337 } else {
69338 PyErr_SetString(PyExc_TypeError,
69339 "raise: exception class must be a subclass of BaseException");
69340 goto bad;
69341 }
69342#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x03030000
69343 if (cause) {
69344#else
69345 if (cause && cause != Py_None(&_Py_NoneStruct)) {
69346#endif
69347 PyObject *fixed_cause;
69348 if (cause == Py_None(&_Py_NoneStruct)) {
69349 fixed_cause = NULL((void*)0);
69350 } else if (PyExceptionClass_Check(cause)((((cause))->ob_type == &PyClass_Type) || (((((((PyObject
*)((cause)))->ob_type))->tp_flags & ((1L<<31)
)) != 0) && ((((PyTypeObject*)(cause))->tp_flags &
((1L<<30))) != 0)))
) {
69351 fixed_cause = PyObject_CallObject(cause, NULL((void*)0));
69352 if (fixed_cause == NULL((void*)0))
69353 goto bad;
69354 } else if (PyExceptionInstance_Check(cause)((((cause))->ob_type == &PyInstance_Type) || ((((cause
)->ob_type)->tp_flags & ((1L<<30))) != 0))
) {
69355 fixed_cause = cause;
69356 Py_INCREF(fixed_cause)( ((PyObject*)(fixed_cause))->ob_refcnt++);
69357 } else {
69358 PyErr_SetString(PyExc_TypeError,
69359 "exception causes must derive from "
69360 "BaseException");
69361 goto bad;
69362 }
69363 PyException_SetCause(value, fixed_cause);
69364 }
69365 PyErr_SetObject(type, value);
69366 if (tb) {
69367#if CYTHON_COMPILING_IN_PYPY0
69368 PyObject *tmp_type, *tmp_value, *tmp_tb;
69369 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
69370 Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++);
69371 PyErr_Restore(tmp_type, tmp_value, tb);
69372 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
69373#else
69374 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69375 PyObject* tmp_tb = tstate->curexc_traceback;
69376 if (tb != tmp_tb) {
69377 Py_INCREF(tb)( ((PyObject*)(tb))->ob_refcnt++);
69378 tstate->curexc_traceback = tb;
69379 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
69380 }
69381#endif
69382 }
69383bad:
69384 Py_XDECREF(owned_instance)do { if ((owned_instance) == ((void*)0)) ; else do { if ( --(
(PyObject*)(owned_instance))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(owned_instance)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(owned_instance)))); } while
(0); } while (0)
;
69385 return;
69386}
69387#endif
69388
69389static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
69390 PyObject *r;
69391 if (!j) return NULL((void*)0);
69392 r = PyObject_GetItem(o, j);
69393 Py_DECREF(j)do { if ( --((PyObject*)(j))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(j)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(j)))); } while (0)
;
69394 return r;
69395}
69396static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
69397 CYTHON_NCP_UNUSED int wraparound,
69398 CYTHON_NCP_UNUSED int boundscheck) {
69399#if CYTHON_COMPILING_IN_CPYTHON1
69400 if (wraparound & unlikely(i < 0)__builtin_expect(!!(i < 0), 0)) i += PyList_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
69401 if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))__builtin_expect(!!((0 <= i) & (i < (((PyVarObject*
)(o))->ob_size))), 1)
) {
69402 PyObject *r = PyList_GET_ITEM(o, i)(((PyListObject *)(o))->ob_item[i]);
69403 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
69404 return r;
69405 }
69406 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
69407#else
69408 return PySequence_GetItem(o, i);
69409#endif
69410}
69411static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
69412 CYTHON_NCP_UNUSED int wraparound,
69413 CYTHON_NCP_UNUSED int boundscheck) {
69414#if CYTHON_COMPILING_IN_CPYTHON1
69415 if (wraparound & unlikely(i < 0)__builtin_expect(!!(i < 0), 0)) i += PyTuple_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
69416 if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))__builtin_expect(!!((0 <= i) & (i < (((PyVarObject*
)(o))->ob_size))), 1)
) {
69417 PyObject *r = PyTuple_GET_ITEM(o, i)(((PyTupleObject *)(o))->ob_item[i]);
69418 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
69419 return r;
69420 }
69421 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
69422#else
69423 return PySequence_GetItem(o, i);
69424#endif
69425}
69426static CYTHON_INLINE__inline__ PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
69427 CYTHON_NCP_UNUSED int wraparound,
69428 CYTHON_NCP_UNUSED int boundscheck) {
69429#if CYTHON_COMPILING_IN_CPYTHON1
69430 if (is_list || PyList_CheckExact(o)((((PyObject*)(o))->ob_type) == &PyList_Type)) {
69431 Py_ssize_t n = ((!wraparound) | likely(i >= 0)__builtin_expect(!!(i >= 0), 1)) ? i : i + PyList_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
69432 if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o)))__builtin_expect(!!((n >= 0) & (n < (((PyVarObject*
)(o))->ob_size))), 1)
)) {
69433 PyObject *r = PyList_GET_ITEM(o, n)(((PyListObject *)(o))->ob_item[n]);
69434 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
69435 return r;
69436 }
69437 }
69438 else if (PyTuple_CheckExact(o)((((PyObject*)(o))->ob_type) == &PyTuple_Type)) {
69439 Py_ssize_t n = ((!wraparound) | likely(i >= 0)__builtin_expect(!!(i >= 0), 1)) ? i : i + PyTuple_GET_SIZE(o)(((PyVarObject*)(o))->ob_size);
69440 if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))__builtin_expect(!!((n >= 0) & (n < (((PyVarObject*
)(o))->ob_size))), 1)
) {
69441 PyObject *r = PyTuple_GET_ITEM(o, n)(((PyTupleObject *)(o))->ob_item[n]);
69442 Py_INCREF(r)( ((PyObject*)(r))->ob_refcnt++);
69443 return r;
69444 }
69445 } else {
69446 PySequenceMethods *m = Py_TYPE(o)(((PyObject*)(o))->ob_type)->tp_as_sequence;
69447 if (likely(m && m->sq_item)__builtin_expect(!!(m && m->sq_item), 1)) {
69448 if (wraparound && unlikely(i < 0)__builtin_expect(!!(i < 0), 0) && likely(m->sq_length)__builtin_expect(!!(m->sq_length), 1)) {
69449 Py_ssize_t l = m->sq_length(o);
69450 if (likely(l >= 0)__builtin_expect(!!(l >= 0), 1)) {
69451 i += l;
69452 } else {
69453 if (PyErr_ExceptionMatches(PyExc_OverflowError))
69454 PyErr_Clear();
69455 else
69456 return NULL((void*)0);
69457 }
69458 }
69459 return m->sq_item(o, i);
69460 }
69461 }
69462#else
69463 if (is_list || PySequence_Check(o)) {
69464 return PySequence_GetItem(o, i);
69465 }
69466#endif
69467 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
69468}
69469
69470static CYTHON_INLINE__inline__ void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
69471#if CYTHON_COMPILING_IN_CPYTHON1
69472 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69473 *type = tstate->exc_type;
69474 *value = tstate->exc_value;
69475 *tb = tstate->exc_traceback;
69476 Py_XINCREF(*type)do { if ((*type) == ((void*)0)) ; else ( ((PyObject*)(*type))
->ob_refcnt++); } while (0)
;
69477 Py_XINCREF(*value)do { if ((*value) == ((void*)0)) ; else ( ((PyObject*)(*value
))->ob_refcnt++); } while (0)
;
69478 Py_XINCREF(*tb)do { if ((*tb) == ((void*)0)) ; else ( ((PyObject*)(*tb))->
ob_refcnt++); } while (0)
;
69479#else
69480 PyErr_GetExcInfo(type, value, tb);
69481#endif
69482}
69483static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
69484#if CYTHON_COMPILING_IN_CPYTHON1
69485 PyObject *tmp_type, *tmp_value, *tmp_tb;
69486 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69487 tmp_type = tstate->exc_type;
69488 tmp_value = tstate->exc_value;
69489 tmp_tb = tstate->exc_traceback;
69490 tstate->exc_type = type;
69491 tstate->exc_value = value;
69492 tstate->exc_traceback = tb;
69493 Py_XDECREF(tmp_type)do { if ((tmp_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_type)))); } while (0); } while (0)
;
69494 Py_XDECREF(tmp_value)do { if ((tmp_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(tmp_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp_value)))); } while (0); } while (0)
;
69495 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
69496#else
69497 PyErr_SetExcInfo(type, value, tb);
69498#endif
69499}
69500
69501static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
69502 PyObject *local_type, *local_value, *local_tb;
69503#if CYTHON_COMPILING_IN_CPYTHON1
69504 PyObject *tmp_type, *tmp_value, *tmp_tb;
69505 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69506 local_type = tstate->curexc_type;
69507 local_value = tstate->curexc_value;
69508 local_tb = tstate->curexc_traceback;
69509 tstate->curexc_type = 0;
69510 tstate->curexc_value = 0;
69511 tstate->curexc_traceback = 0;
69512#else
69513 PyErr_Fetch(&local_type, &local_value, &local_tb);
69514#endif
69515 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
69516#if CYTHON_COMPILING_IN_CPYTHON1
69517 if (unlikely(tstate->curexc_type)__builtin_expect(!!(tstate->curexc_type), 0))
69518#else
69519 if (unlikely(PyErr_Occurred())__builtin_expect(!!(PyErr_Occurred()), 0))
69520#endif
69521 goto bad;
69522 #if PY_MAJOR_VERSION2 >= 3
69523 if (local_tb) {
69524 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)__builtin_expect(!!(PyException_SetTraceback(local_value, local_tb
) < 0), 0)
)
69525 goto bad;
69526 }
69527 #endif
69528 Py_XINCREF(local_tb)do { if ((local_tb) == ((void*)0)) ; else ( ((PyObject*)(local_tb
))->ob_refcnt++); } while (0)
;
69529 Py_XINCREF(local_type)do { if ((local_type) == ((void*)0)) ; else ( ((PyObject*)(local_type
))->ob_refcnt++); } while (0)
;
69530 Py_XINCREF(local_value)do { if ((local_value) == ((void*)0)) ; else ( ((PyObject*)(local_value
))->ob_refcnt++); } while (0)
;
69531 *type = local_type;
69532 *value = local_value;
69533 *tb = local_tb;
69534#if CYTHON_COMPILING_IN_CPYTHON1
69535 tmp_type = tstate->exc_type;
69536 tmp_value = tstate->exc_value;
69537 tmp_tb = tstate->exc_traceback;
69538 tstate->exc_type = local_type;
69539 tstate->exc_value = local_value;
69540 tstate->exc_traceback = local_tb;
69541 Py_XDECREF(tmp_type)do { if ((tmp_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_type)))); } while (0); } while (0)
;
69542 Py_XDECREF(tmp_value)do { if ((tmp_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(tmp_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(tmp_value)))); } while (0); } while (0)
;
69543 Py_XDECREF(tmp_tb)do { if ((tmp_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(tmp_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp_tb)))); } while (0); } while (0)
;
69544#else
69545 PyErr_SetExcInfo(local_type, local_value, local_tb);
69546#endif
69547 return 0;
69548bad:
69549 *type = 0;
69550 *value = 0;
69551 *tb = 0;
69552 Py_XDECREF(local_type)do { if ((local_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(local_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(local_type)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(local_type)))); } while (0); } while (0)
;
69553 Py_XDECREF(local_value)do { if ((local_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(local_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(local_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(local_value)))); } while (0); } while (0)
;
69554 Py_XDECREF(local_tb)do { if ((local_tb) == ((void*)0)) ; else do { if ( --((PyObject
*)(local_tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(local_tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(local_tb)))); } while (0); } while (0)
;
69555 return -1;
69556}
69557
69558static CYTHON_INLINE__inline__ int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
69559 if (unlikely(!type)__builtin_expect(!!(!type), 0)) {
69560 PyErr_SetString(PyExc_SystemError, "Missing type object");
69561 return 0;
69562 }
69563 if (likely(PyObject_TypeCheck(obj, type))__builtin_expect(!!(((((PyObject*)(obj))->ob_type) == (type
) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (type
)))), 1)
)
69564 return 1;
69565 PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
69566 Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name, type->tp_name);
69567 return 0;
69568}
69569
69570static CYTHON_INLINE__inline__ void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
69571 PyObject *tmp_type, *tmp_value, *tmp_tb;
69572#if CYTHON_COMPILING_IN_CPYTHON1
69573 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
69574 tmp_type = tstate->exc_type;
69575 tmp_value = tstate->exc_value;
69576 tmp_tb = tstate->exc_traceback;
69577 tstate->exc_type = *type;
69578 tstate->exc_value = *value;
69579 tstate->exc_traceback = *tb;
69580#else
69581 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
69582 PyErr_SetExcInfo(*type, *value, *tb);
69583#endif
69584 *type = tmp_type;
69585 *value = tmp_value;
69586 *tb = tmp_tb;
69587}
69588
69589static CYTHON_INLINE__inline__ PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
69590 Py_ssize_t cstart, Py_ssize_t cstop,
69591 PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
69592 int has_cstart, int has_cstop, CYTHON_UNUSED__attribute__ ((__unused__)) int wraparound) {
69593#if CYTHON_COMPILING_IN_CPYTHON1
69594 PyMappingMethods* mp;
69595#if PY_MAJOR_VERSION2 < 3
69596 PySequenceMethods* ms = Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_as_sequence;
69597 if (likely(ms && ms->sq_slice)__builtin_expect(!!(ms && ms->sq_slice), 1)) {
69598 if (!has_cstart) {
69599 if (_py_start && (*_py_start != Py_None(&_Py_NoneStruct))) {
69600 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
69601 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
69602 } else
69603 cstart = 0;
69604 }
69605 if (!has_cstop) {
69606 if (_py_stop && (*_py_stop != Py_None(&_Py_NoneStruct))) {
69607 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
69608 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
69609 } else
69610 cstop = PY_SSIZE_T_MAX((Py_ssize_t)(((size_t)-1)>>1));
69611 }
69612 if (wraparound && unlikely((cstart < 0) | (cstop < 0))__builtin_expect(!!((cstart < 0) | (cstop < 0)), 0) && likely(ms->sq_length)__builtin_expect(!!(ms->sq_length), 1)) {
69613 Py_ssize_t l = ms->sq_length(obj);
69614 if (likely(l >= 0)__builtin_expect(!!(l >= 0), 1)) {
69615 if (cstop < 0) {
69616 cstop += l;
69617 if (cstop < 0) cstop = 0;
69618 }
69619 if (cstart < 0) {
69620 cstart += l;
69621 if (cstart < 0) cstart = 0;
69622 }
69623 } else {
69624 if (PyErr_ExceptionMatches(PyExc_OverflowError))
69625 PyErr_Clear();
69626 else
69627 goto bad;
69628 }
69629 }
69630 return ms->sq_slice(obj, cstart, cstop);
69631 }
69632#endif
69633 mp = Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_as_mapping;
69634 if (likely(mp && mp->mp_subscript)__builtin_expect(!!(mp && mp->mp_subscript), 1))
69635#endif
69636 {
69637 PyObject* result;
69638 PyObject *py_slice, *py_start, *py_stop;
69639 if (_py_slice) {
69640 py_slice = *_py_slice;
69641 } else {
69642 PyObject* owned_start = NULL((void*)0);
69643 PyObject* owned_stop = NULL((void*)0);
69644 if (_py_start) {
69645 py_start = *_py_start;
69646 } else {
69647 if (has_cstart) {
69648 owned_start = py_start = PyInt_FromSsize_t(cstart);
69649 if (unlikely(!py_start)__builtin_expect(!!(!py_start), 0)) goto bad;
69650 } else
69651 py_start = Py_None(&_Py_NoneStruct);
69652 }
69653 if (_py_stop) {
69654 py_stop = *_py_stop;
69655 } else {
69656 if (has_cstop) {
69657 owned_stop = py_stop = PyInt_FromSsize_t(cstop);
69658 if (unlikely(!py_stop)__builtin_expect(!!(!py_stop), 0)) {
69659 Py_XDECREF(owned_start)do { if ((owned_start) == ((void*)0)) ; else do { if ( --((PyObject
*)(owned_start))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(owned_start)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(owned_start)))); } while (0); } while (0)
;
69660 goto bad;
69661 }
69662 } else
69663 py_stop = Py_None(&_Py_NoneStruct);
69664 }
69665 py_slice = PySlice_New(py_start, py_stop, Py_None(&_Py_NoneStruct));
69666 Py_XDECREF(owned_start)do { if ((owned_start) == ((void*)0)) ; else do { if ( --((PyObject
*)(owned_start))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(owned_start)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(owned_start)))); } while (0); } while (0)
;
69667 Py_XDECREF(owned_stop)do { if ((owned_stop) == ((void*)0)) ; else do { if ( --((PyObject
*)(owned_stop))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(owned_stop)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(owned_stop)))); } while (0); } while (0)
;
69668 if (unlikely(!py_slice)__builtin_expect(!!(!py_slice), 0)) goto bad;
69669 }
69670#if CYTHON_COMPILING_IN_CPYTHON1
69671 result = mp->mp_subscript(obj, py_slice);
69672#else
69673 result = PyObject_GetItem(obj, py_slice);
69674#endif
69675 if (!_py_slice) {
69676 Py_DECREF(py_slice)do { if ( --((PyObject*)(py_slice))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_slice)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_slice)))); } while (
0)
;
69677 }
69678 return result;
69679 }
69680 PyErr_Format(PyExc_TypeError,
69681 "'%.200s' object is unsliceable", Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name);
69682bad:
69683 return NULL((void*)0);
69684}
69685
69686#if !CYTHON_COMPILING_IN_CPYTHON1
69687static CYTHON_INLINE__inline__ PyObject* __Pyx_PyBytes_Join_PyString_Join(PyObject* sep, PyObject* values) {
69688 return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL((void*)0));
69689}
69690#endif
69691
69692static CYTHON_INLINE__inline__ void __Pyx_RaiseClosureNameError(const char *varname) {
69693 PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
69694}
69695
69696static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
69697 PyObject* fake_module;
69698 PyTypeObject* cached_type = NULL((void*)0);
69699 fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI"0_23_4");
69700 if (!fake_module) return NULL((void*)0);
69701 Py_INCREF(fake_module)( ((PyObject*)(fake_module))->ob_refcnt++);
69702 cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
69703 if (cached_type) {
69704 if (!PyType_Check((PyObject*)cached_type)((((((PyObject*)((PyObject*)cached_type))->ob_type))->tp_flags
& ((1L<<31))) != 0)
) {
69705 PyErr_Format(PyExc_TypeError,
69706 "Shared Cython type %.200s is not a type object",
69707 type->tp_name);
69708 goto bad;
69709 }
69710 if (cached_type->tp_basicsize != type->tp_basicsize) {
69711 PyErr_Format(PyExc_TypeError,
69712 "Shared Cython type %.200s has the wrong size, try recompiling",
69713 type->tp_name);
69714 goto bad;
69715 }
69716 } else {
69717 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
69718 PyErr_Clear();
69719 if (PyType_Ready(type) < 0) goto bad;
69720 if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
69721 goto bad;
69722 Py_INCREF(type)( ((PyObject*)(type))->ob_refcnt++);
69723 cached_type = type;
69724 }
69725done:
69726 Py_DECREF(fake_module)do { if ( --((PyObject*)(fake_module))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(fake_module)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(fake_module)))); } while
(0)
;
69727 return cached_type;
69728bad:
69729 Py_XDECREF(cached_type)do { if ((cached_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(cached_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(cached_type)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(cached_type)))); } while (0); } while (0)
;
69730 cached_type = NULL((void*)0);
69731 goto done;
69732}
69733
69734static PyObject *
69735__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED__attribute__ ((__unused__)) void *closure)
69736{
69737 if (unlikely(op->func_doc == NULL)__builtin_expect(!!(op->func_doc == ((void*)0)), 0)) {
69738 if (op->func.m_ml->ml_doc) {
69739#if PY_MAJOR_VERSION2 >= 3
69740 op->func_doc = PyUnicode_FromStringPyUnicodeUCS4_FromString(op->func.m_ml->ml_doc);
69741#else
69742 op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
69743#endif
69744 if (unlikely(op->func_doc == NULL)__builtin_expect(!!(op->func_doc == ((void*)0)), 0))
69745 return NULL((void*)0);
69746 } else {
69747 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
69748 return Py_None(&_Py_NoneStruct);
69749 }
69750 }
69751 Py_INCREF(op->func_doc)( ((PyObject*)(op->func_doc))->ob_refcnt++);
69752 return op->func_doc;
69753}
69754static int
69755__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
69756{
69757 PyObject *tmp = op->func_doc;
69758 if (value == NULL((void*)0)) {
69759 value = Py_None(&_Py_NoneStruct);
69760 }
69761 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69762 op->func_doc = value;
69763 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69764 return 0;
69765}
69766static PyObject *
69767__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
69768{
69769 if (unlikely(op->func_name == NULL)__builtin_expect(!!(op->func_name == ((void*)0)), 0)) {
69770#if PY_MAJOR_VERSION2 >= 3
69771 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
69772#else
69773 op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
69774#endif
69775 if (unlikely(op->func_name == NULL)__builtin_expect(!!(op->func_name == ((void*)0)), 0))
69776 return NULL((void*)0);
69777 }
69778 Py_INCREF(op->func_name)( ((PyObject*)(op->func_name))->ob_refcnt++);
69779 return op->func_name;
69780}
69781static int
69782__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
69783{
69784 PyObject *tmp;
69785#if PY_MAJOR_VERSION2 >= 3
69786 if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<28))) !=
0)), 0)
) {
69787#else
69788 if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<27))) !=
0)), 0)
) {
69789#endif
69790 PyErr_SetString(PyExc_TypeError,
69791 "__name__ must be set to a string object");
69792 return -1;
69793 }
69794 tmp = op->func_name;
69795 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69796 op->func_name = value;
69797 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69798 return 0;
69799}
69800static PyObject *
69801__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
69802{
69803 Py_INCREF(op->func_qualname)( ((PyObject*)(op->func_qualname))->ob_refcnt++);
69804 return op->func_qualname;
69805}
69806static int
69807__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
69808{
69809 PyObject *tmp;
69810#if PY_MAJOR_VERSION2 >= 3
69811 if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<28))) !=
0)), 0)
) {
69812#else
69813 if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<27))) !=
0)), 0)
) {
69814#endif
69815 PyErr_SetString(PyExc_TypeError,
69816 "__qualname__ must be set to a string object");
69817 return -1;
69818 }
69819 tmp = op->func_qualname;
69820 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69821 op->func_qualname = value;
69822 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69823 return 0;
69824}
69825static PyObject *
69826__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED__attribute__ ((__unused__)) void *closure)
69827{
69828 PyObject *self;
69829 self = m->func_closure;
69830 if (self == NULL((void*)0))
69831 self = Py_None(&_Py_NoneStruct);
69832 Py_INCREF(self)( ((PyObject*)(self))->ob_refcnt++);
69833 return self;
69834}
69835static PyObject *
69836__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
69837{
69838 if (unlikely(op->func_dict == NULL)__builtin_expect(!!(op->func_dict == ((void*)0)), 0)) {
69839 op->func_dict = PyDict_New();
69840 if (unlikely(op->func_dict == NULL)__builtin_expect(!!(op->func_dict == ((void*)0)), 0))
69841 return NULL((void*)0);
69842 }
69843 Py_INCREF(op->func_dict)( ((PyObject*)(op->func_dict))->ob_refcnt++);
69844 return op->func_dict;
69845}
69846static int
69847__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
69848{
69849 PyObject *tmp;
69850 if (unlikely(value == NULL)__builtin_expect(!!(value == ((void*)0)), 0)) {
69851 PyErr_SetString(PyExc_TypeError,
69852 "function's dictionary may not be deleted");
69853 return -1;
69854 }
69855 if (unlikely(!PyDict_Check(value))__builtin_expect(!!(!((((((PyObject*)(value))->ob_type))->
tp_flags & ((1L<<29))) != 0)), 0)
) {
69856 PyErr_SetString(PyExc_TypeError,
69857 "setting function's dictionary to a non-dict");
69858 return -1;
69859 }
69860 tmp = op->func_dict;
69861 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69862 op->func_dict = value;
69863 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69864 return 0;
69865}
69866static PyObject *
69867__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
69868{
69869 Py_INCREF(op->func_globals)( ((PyObject*)(op->func_globals))->ob_refcnt++);
69870 return op->func_globals;
69871}
69872static PyObject *
69873__Pyx_CyFunction_get_closure(CYTHON_UNUSED__attribute__ ((__unused__)) __pyx_CyFunctionObject *op)
69874{
69875 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
69876 return Py_None(&_Py_NoneStruct);
69877}
69878static PyObject *
69879__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
69880{
69881 PyObject* result = (op->func_code) ? op->func_code : Py_None(&_Py_NoneStruct);
69882 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
69883 return result;
69884}
69885static int
69886__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
69887 int result = 0;
69888 PyObject *res = op->defaults_getter((PyObject *) op);
69889 if (unlikely(!res)__builtin_expect(!!(!res), 0))
69890 return -1;
69891 #if CYTHON_COMPILING_IN_CPYTHON1
69892 op->defaults_tuple = PyTuple_GET_ITEM(res, 0)(((PyTupleObject *)(res))->ob_item[0]);
69893 Py_INCREF(op->defaults_tuple)( ((PyObject*)(op->defaults_tuple))->ob_refcnt++);
69894 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1)(((PyTupleObject *)(res))->ob_item[1]);
69895 Py_INCREF(op->defaults_kwdict)( ((PyObject*)(op->defaults_kwdict))->ob_refcnt++);
69896 #else
69897 op->defaults_tuple = PySequence_ITEM(res, 0)( (((PyObject*)(res))->ob_type)->tp_as_sequence->sq_item
(res, 0) )
;
69898 if (unlikely(!op->defaults_tuple)__builtin_expect(!!(!op->defaults_tuple), 0)) result = -1;
69899 else {
69900 op->defaults_kwdict = PySequence_ITEM(res, 1)( (((PyObject*)(res))->ob_type)->tp_as_sequence->sq_item
(res, 1) )
;
69901 if (unlikely(!op->defaults_kwdict)__builtin_expect(!!(!op->defaults_kwdict), 0)) result = -1;
69902 }
69903 #endif
69904 Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(res)))); } while (0)
;
69905 return result;
69906}
69907static int
69908__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
69909 PyObject* tmp;
69910 if (!value) {
69911 value = Py_None(&_Py_NoneStruct);
69912 } else if (value != Py_None(&_Py_NoneStruct) && !PyTuple_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<26))) != 0)
) {
69913 PyErr_SetString(PyExc_TypeError,
69914 "__defaults__ must be set to a tuple object");
69915 return -1;
69916 }
69917 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69918 tmp = op->defaults_tuple;
69919 op->defaults_tuple = value;
69920 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69921 return 0;
69922}
69923static PyObject *
69924__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
69925 PyObject* result = op->defaults_tuple;
69926 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
69927 if (op->defaults_getter) {
69928 if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL((void*)0);
69929 result = op->defaults_tuple;
69930 } else {
69931 result = Py_None(&_Py_NoneStruct);
69932 }
69933 }
69934 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
69935 return result;
69936}
69937static int
69938__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
69939 PyObject* tmp;
69940 if (!value) {
69941 value = Py_None(&_Py_NoneStruct);
69942 } else if (value != Py_None(&_Py_NoneStruct) && !PyDict_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<29))) != 0)
) {
69943 PyErr_SetString(PyExc_TypeError,
69944 "__kwdefaults__ must be set to a dict object");
69945 return -1;
69946 }
69947 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
69948 tmp = op->defaults_kwdict;
69949 op->defaults_kwdict = value;
69950 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69951 return 0;
69952}
69953static PyObject *
69954__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
69955 PyObject* result = op->defaults_kwdict;
69956 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
69957 if (op->defaults_getter) {
69958 if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL((void*)0);
69959 result = op->defaults_kwdict;
69960 } else {
69961 result = Py_None(&_Py_NoneStruct);
69962 }
69963 }
69964 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
69965 return result;
69966}
69967static int
69968__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
69969 PyObject* tmp;
69970 if (!value || value == Py_None(&_Py_NoneStruct)) {
69971 value = NULL((void*)0);
69972 } else if (!PyDict_Check(value)((((((PyObject*)(value))->ob_type))->tp_flags & ((1L
<<29))) != 0)
) {
69973 PyErr_SetString(PyExc_TypeError,
69974 "__annotations__ must be set to a dict object");
69975 return -1;
69976 }
69977 Py_XINCREF(value)do { if ((value) == ((void*)0)) ; else ( ((PyObject*)(value))
->ob_refcnt++); } while (0)
;
69978 tmp = op->func_annotations;
69979 op->func_annotations = value;
69980 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
69981 return 0;
69982}
69983static PyObject *
69984__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
69985 PyObject* result = op->func_annotations;
69986 if (unlikely(!result)__builtin_expect(!!(!result), 0)) {
69987 result = PyDict_New();
69988 if (unlikely(!result)__builtin_expect(!!(!result), 0)) return NULL((void*)0);
69989 op->func_annotations = result;
69990 }
69991 Py_INCREF(result)( ((PyObject*)(result))->ob_refcnt++);
69992 return result;
69993}
69994static PyGetSetDef __pyx_CyFunction_getsets[] = {
69995 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
69996 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
69997 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
69998 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
69999 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
70000 {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
70001 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
70002 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
70003 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
70004 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
70005 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
70006 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
70007 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
70008 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
70009 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
70010 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
70011 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
70012 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
70013 {0, 0, 0, 0, 0}
70014};
70015static PyMemberDef __pyx_CyFunction_members[] = {
70016 {(char *) "__module__", T_OBJECT6, offsetof(__pyx_CyFunctionObject, func.m_module)__builtin_offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED4, 0},
70017 {0, 0, 0, 0, 0}
70018};
70019static PyObject *
70020__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED__attribute__ ((__unused__)) PyObject *args)
70021{
70022#if PY_MAJOR_VERSION2 >= 3
70023 return PyUnicode_FromStringPyUnicodeUCS4_FromString(m->func.m_ml->ml_name);
70024#else
70025 return PyString_FromString(m->func.m_ml->ml_name);
70026#endif
70027}
70028static PyMethodDef __pyx_CyFunction_methods[] = {
70029 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS0x0001, 0},
70030 {0, 0, 0, 0}
70031};
70032#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030500A0
70033#define __Pyx_CyFunction_weakreflist(cyfunc)((cyfunc)->func_weakreflist) ((cyfunc)->func_weakreflist)
70034#else
70035#define __Pyx_CyFunction_weakreflist(cyfunc)((cyfunc)->func_weakreflist) ((cyfunc)->func.m_weakreflist)
70036#endif
70037static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
70038 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
70039 __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type)( (__pyx_CyFunctionObject *) _PyObject_GC_New(type) );
70040 if (op == NULL((void*)0))
70041 return NULL((void*)0);
70042 op->flags = flags;
70043 __Pyx_CyFunction_weakreflist(op)((op)->func_weakreflist) = NULL((void*)0);
70044 op->func.m_ml = ml;
70045 op->func.m_self = (PyObject *) op;
70046 Py_XINCREF(closure)do { if ((closure) == ((void*)0)) ; else ( ((PyObject*)(closure
))->ob_refcnt++); } while (0)
;
70047 op->func_closure = closure;
70048 Py_XINCREF(module)do { if ((module) == ((void*)0)) ; else ( ((PyObject*)(module
))->ob_refcnt++); } while (0)
;
70049 op->func.m_module = module;
70050 op->func_dict = NULL((void*)0);
70051 op->func_name = NULL((void*)0);
70052 Py_INCREF(qualname)( ((PyObject*)(qualname))->ob_refcnt++);
70053 op->func_qualname = qualname;
70054 op->func_doc = NULL((void*)0);
70055 op->func_classobj = NULL((void*)0);
70056 op->func_globals = globals;
70057 Py_INCREF(op->func_globals)( ((PyObject*)(op->func_globals))->ob_refcnt++);
70058 Py_XINCREF(code)do { if ((code) == ((void*)0)) ; else ( ((PyObject*)(code))->
ob_refcnt++); } while (0)
;
70059 op->func_code = code;
70060 op->defaults_pyobjects = 0;
70061 op->defaults = NULL((void*)0);
70062 op->defaults_tuple = NULL((void*)0);
70063 op->defaults_kwdict = NULL((void*)0);
70064 op->defaults_getter = NULL((void*)0);
70065 op->func_annotations = NULL((void*)0);
70066 PyObject_GC_Track(op);
70067 return (PyObject *) op;
70068}
70069static int
70070__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
70071{
70072 Py_CLEAR(m->func_closure)do { if (m->func_closure) { PyObject *_py_tmp = (PyObject *
)(m->func_closure); (m->func_closure) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
70073 Py_CLEAR(m->func.m_module)do { if (m->func.m_module) { PyObject *_py_tmp = (PyObject
*)(m->func.m_module); (m->func.m_module) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
70074 Py_CLEAR(m->func_dict)do { if (m->func_dict) { PyObject *_py_tmp = (PyObject *)(
m->func_dict); (m->func_dict) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
70075 Py_CLEAR(m->func_name)do { if (m->func_name) { PyObject *_py_tmp = (PyObject *)(
m->func_name); (m->func_name) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
70076 Py_CLEAR(m->func_qualname)do { if (m->func_qualname) { PyObject *_py_tmp = (PyObject
*)(m->func_qualname); (m->func_qualname) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
70077 Py_CLEAR(m->func_doc)do { if (m->func_doc) { PyObject *_py_tmp = (PyObject *)(m
->func_doc); (m->func_doc) = ((void*)0); do { if ( --((
PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
70078 Py_CLEAR(m->func_globals)do { if (m->func_globals) { PyObject *_py_tmp = (PyObject *
)(m->func_globals); (m->func_globals) = ((void*)0); do {
if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
70079 Py_CLEAR(m->func_code)do { if (m->func_code) { PyObject *_py_tmp = (PyObject *)(
m->func_code); (m->func_code) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
70080 Py_CLEAR(m->func_classobj)do { if (m->func_classobj) { PyObject *_py_tmp = (PyObject
*)(m->func_classobj); (m->func_classobj) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
70081 Py_CLEAR(m->defaults_tuple)do { if (m->defaults_tuple) { PyObject *_py_tmp = (PyObject
*)(m->defaults_tuple); (m->defaults_tuple) = ((void*)0
); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
70082 Py_CLEAR(m->defaults_kwdict)do { if (m->defaults_kwdict) { PyObject *_py_tmp = (PyObject
*)(m->defaults_kwdict); (m->defaults_kwdict) = ((void*
)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0
); } } while (0)
;
70083 Py_CLEAR(m->func_annotations)do { if (m->func_annotations) { PyObject *_py_tmp = (PyObject
*)(m->func_annotations); (m->func_annotations) = ((void
*)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0
); } } while (0)
;
70084 if (m->defaults) {
70085 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m)((PyObject * *)(((__pyx_CyFunctionObject *) (m))->defaults
))
;
70086 int i;
70087 for (i = 0; i < m->defaults_pyobjects; i++)
70088 Py_XDECREF(pydefaults[i])do { if ((pydefaults[i]) == ((void*)0)) ; else do { if ( --((
PyObject*)(pydefaults[i]))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(pydefaults[i])))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(pydefaults[i])))); } while (0); }
while (0)
;
70089 PyMem_Free(m->defaults);
70090 m->defaults = NULL((void*)0);
70091 }
70092 return 0;
70093}
70094static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
70095{
70096 PyObject_GC_UnTrack(m);
70097 if (__Pyx_CyFunction_weakreflist(m)((m)->func_weakreflist) != NULL((void*)0))
70098 PyObject_ClearWeakRefs((PyObject *) m);
70099 __Pyx_CyFunction_clear(m);
70100 PyObject_GC_Del(m);
70101}
70102static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
70103{
70104 Py_VISIT(m->func_closure)do { if (m->func_closure) { int vret = visit((PyObject *)(
m->func_closure), arg); if (vret) return vret; } } while (
0)
;
70105 Py_VISIT(m->func.m_module)do { if (m->func.m_module) { int vret = visit((PyObject *)
(m->func.m_module), arg); if (vret) return vret; } } while
(0)
;
70106 Py_VISIT(m->func_dict)do { if (m->func_dict) { int vret = visit((PyObject *)(m->
func_dict), arg); if (vret) return vret; } } while (0)
;
70107 Py_VISIT(m->func_name)do { if (m->func_name) { int vret = visit((PyObject *)(m->
func_name), arg); if (vret) return vret; } } while (0)
;
70108 Py_VISIT(m->func_qualname)do { if (m->func_qualname) { int vret = visit((PyObject *)
(m->func_qualname), arg); if (vret) return vret; } } while
(0)
;
70109 Py_VISIT(m->func_doc)do { if (m->func_doc) { int vret = visit((PyObject *)(m->
func_doc), arg); if (vret) return vret; } } while (0)
;
70110 Py_VISIT(m->func_globals)do { if (m->func_globals) { int vret = visit((PyObject *)(
m->func_globals), arg); if (vret) return vret; } } while (
0)
;
70111 Py_VISIT(m->func_code)do { if (m->func_code) { int vret = visit((PyObject *)(m->
func_code), arg); if (vret) return vret; } } while (0)
;
70112 Py_VISIT(m->func_classobj)do { if (m->func_classobj) { int vret = visit((PyObject *)
(m->func_classobj), arg); if (vret) return vret; } } while
(0)
;
70113 Py_VISIT(m->defaults_tuple)do { if (m->defaults_tuple) { int vret = visit((PyObject *
)(m->defaults_tuple), arg); if (vret) return vret; } } while
(0)
;
70114 Py_VISIT(m->defaults_kwdict)do { if (m->defaults_kwdict) { int vret = visit((PyObject *
)(m->defaults_kwdict), arg); if (vret) return vret; } } while
(0)
;
70115 if (m->defaults) {
70116 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m)((PyObject * *)(((__pyx_CyFunctionObject *) (m))->defaults
))
;
70117 int i;
70118 for (i = 0; i < m->defaults_pyobjects; i++)
70119 Py_VISIT(pydefaults[i])do { if (pydefaults[i]) { int vret = visit((PyObject *)(pydefaults
[i]), arg); if (vret) return vret; } } while (0)
;
70120 }
70121 return 0;
70122}
70123static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
70124{
70125 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
70126 if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD0x01) {
70127 Py_INCREF(func)( ((PyObject*)(func))->ob_refcnt++);
70128 return func;
70129 }
70130 if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD0x02) {
70131 if (type == NULL((void*)0))
70132 type = (PyObject *)(Py_TYPE(obj)(((PyObject*)(obj))->ob_type));
70133 return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)))PyMethod_New(func, type, (PyObject *)((((PyObject*)(type))->
ob_type)))
;
70134 }
70135 if (obj == Py_None(&_Py_NoneStruct))
70136 obj = NULL((void*)0);
70137 return __Pyx_PyMethod_New(func, obj, type)PyMethod_New(func, obj, type);
70138}
70139static PyObject*
70140__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
70141{
70142#if PY_MAJOR_VERSION2 >= 3
70143 return PyUnicode_FromFormatPyUnicodeUCS4_FromFormat("<cyfunction %U at %p>",
70144 op->func_qualname, (void *)op);
70145#else
70146 return PyString_FromFormat("<cyfunction %s at %p>",
70147 PyString_AsString(op->func_qualname), (void *)op);
70148#endif
70149}
70150#if CYTHON_COMPILING_IN_PYPY0
70151static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
70152 PyCFunctionObject* f = (PyCFunctionObject*)func;
70153 PyCFunction meth = f->m_ml->ml_meth;
70154 PyObject *self = f->m_self;
70155 Py_ssize_t size;
70156 switch (f->m_ml->ml_flags & (METH_VARARGS0x0001 | METH_KEYWORDS0x0002 | METH_NOARGS0x0004 | METH_O0x0008)) {
70157 case METH_VARARGS0x0001:
70158 if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0)
, 1)
)
70159 return (*meth)(self, arg);
70160 break;
70161 case METH_VARARGS0x0001 | METH_KEYWORDS0x0002:
70162 return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
70163 case METH_NOARGS0x0004:
70164 if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0)
, 1)
) {
70165 size = PyTuple_GET_SIZE(arg)(((PyVarObject*)(arg))->ob_size);
70166 if (likely(size == 0)__builtin_expect(!!(size == 0), 1))
70167 return (*meth)(self, NULL((void*)0));
70168 PyErr_Format(PyExc_TypeError,
70169 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T"z" "d given)",
70170 f->m_ml->ml_name, size);
70171 return NULL((void*)0);
70172 }
70173 break;
70174 case METH_O0x0008:
70175 if (likely(kw == NULL || PyDict_Size(kw) == 0)__builtin_expect(!!(kw == ((void*)0) || PyDict_Size(kw) == 0)
, 1)
) {
70176 size = PyTuple_GET_SIZE(arg)(((PyVarObject*)(arg))->ob_size);
70177 if (likely(size == 1)__builtin_expect(!!(size == 1), 1)) {
70178 PyObject *result, *arg0 = PySequence_ITEM(arg, 0)( (((PyObject*)(arg))->ob_type)->tp_as_sequence->sq_item
(arg, 0) )
;
70179 if (unlikely(!arg0)__builtin_expect(!!(!arg0), 0)) return NULL((void*)0);
70180 result = (*meth)(self, arg0);
70181 Py_DECREF(arg0)do { if ( --((PyObject*)(arg0))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(arg0)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(arg0)))); } while (0)
;
70182 return result;
70183 }
70184 PyErr_Format(PyExc_TypeError,
70185 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T"z" "d given)",
70186 f->m_ml->ml_name, size);
70187 return NULL((void*)0);
70188 }
70189 break;
70190 default:
70191 PyErr_SetString(PyExc_SystemError, "Bad call flags in "
70192 "__Pyx_CyFunction_Call. METH_OLDARGS is no "
70193 "longer supported!");
70194 return NULL((void*)0);
70195 }
70196 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
70197 f->m_ml->ml_name);
70198 return NULL((void*)0);
70199}
70200#else
70201static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
70202 return PyCFunction_Call(func, arg, kw);
70203}
70204#endif
70205static PyTypeObject __pyx_CyFunctionType_type = {
70206 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
70207 "cython_function_or_method",
70208 sizeof(__pyx_CyFunctionObject),
70209 0,
70210 (destructor) __Pyx_CyFunction_dealloc,
70211 0,
70212 0,
70213 0,
70214#if PY_MAJOR_VERSION2 < 3
70215 0,
70216#else
70217 0,
70218#endif
70219 (reprfunc) __Pyx_CyFunction_repr,
70220 0,
70221 0,
70222 0,
70223 0,
70224 __Pyx_CyFunction_Call,
70225 0,
70226 0,
70227 0,
70228 0,
70229 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
| Py_TPFLAGS_HAVE_GC(1L<<14),
70230 0,
70231 (traverseproc) __Pyx_CyFunction_traverse,
70232 (inquiry) __Pyx_CyFunction_clear,
70233 0,
70234#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030500A0
70235 offsetof(__pyx_CyFunctionObject, func_weakreflist)__builtin_offsetof(__pyx_CyFunctionObject, func_weakreflist),
70236#else
70237 offsetof(PyCFunctionObject, m_weakreflist)__builtin_offsetof(PyCFunctionObject, m_weakreflist),
70238#endif
70239 0,
70240 0,
70241 __pyx_CyFunction_methods,
70242 __pyx_CyFunction_members,
70243 __pyx_CyFunction_getsets,
70244 0,
70245 0,
70246 __Pyx_CyFunction_descr_get,
70247 0,
70248 offsetof(__pyx_CyFunctionObject, func_dict)__builtin_offsetof(__pyx_CyFunctionObject, func_dict),
70249 0,
70250 0,
70251 0,
70252 0,
70253 0,
70254 0,
70255 0,
70256 0,
70257 0,
70258 0,
70259 0,
70260 0,
70261#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
70262 0,
70263#endif
70264};
70265static int __pyx_CyFunction_init(void) {
70266#if !CYTHON_COMPILING_IN_PYPY0
70267 __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
70268#endif
70269 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
70270 if (__pyx_CyFunctionType == NULL((void*)0)) {
70271 return -1;
70272 }
70273 return 0;
70274}
70275static CYTHON_INLINE__inline__ void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
70276 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
70277 m->defaults = PyMem_Malloc(size);
70278 if (!m->defaults)
70279 return PyErr_NoMemory();
70280 memset(m->defaults, 0, size);
70281 m->defaults_pyobjects = pyobjects;
70282 return m->defaults;
70283}
70284static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
70285 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
70286 m->defaults_tuple = tuple;
70287 Py_INCREF(tuple)( ((PyObject*)(tuple))->ob_refcnt++);
70288}
70289static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
70290 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
70291 m->defaults_kwdict = dict;
70292 Py_INCREF(dict)( ((PyObject*)(dict))->ob_refcnt++);
70293}
70294static CYTHON_INLINE__inline__ void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
70295 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
70296 m->func_annotations = dict;
70297 Py_INCREF(dict)( ((PyObject*)(dict))->ob_refcnt++);
70298}
70299
70300static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
70301 PyErr_Format(PyExc_TypeError,
70302 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
70303 name, type->tp_name, Py_TYPE(obj)(((PyObject*)(obj))->ob_type)->tp_name);
70304}
70305static CYTHON_INLINE__inline__ int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
70306 const char *name, int exact)
70307{
70308 if (unlikely(!type)__builtin_expect(!!(!type), 0)) {
70309 PyErr_SetString(PyExc_SystemError, "Missing type object");
70310 return 0;
70311 }
70312 if (none_allowed && obj == Py_None(&_Py_NoneStruct)) return 1;
70313 else if (exact) {
70314 if (likely(Py_TYPE(obj) == type)__builtin_expect(!!((((PyObject*)(obj))->ob_type) == type)
, 1)
) return 1;
70315 #if PY_MAJOR_VERSION2 == 2
70316 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))__builtin_expect(!!((((((PyObject*)(obj))->ob_type) == &
PyString_Type) || ((((PyObject*)(obj))->ob_type) == &PyUnicode_Type
))), 1)
) return 1;
70317 #endif
70318 }
70319 else {
70320 if (likely(PyObject_TypeCheck(obj, type))__builtin_expect(!!(((((PyObject*)(obj))->ob_type) == (type
) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (type
)))), 1)
) return 1;
70321 }
70322 __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
70323 return 0;
70324}
70325
70326static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
70327#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x02070000
70328 PyObject *ob = PyCapsule_New(vtable, 0, 0);
70329#else
70330 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
70331#endif
70332 if (!ob)
70333 goto bad;
70334 if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
70335 goto bad;
70336 Py_DECREF(ob)do { if ( --((PyObject*)(ob))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ob)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ob)))); } while (0)
;
70337 return 0;
70338bad:
70339 Py_XDECREF(ob)do { if ((ob) == ((void*)0)) ; else do { if ( --((PyObject*)(
ob))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(ob)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(ob)))); } while (0); } while (0)
;
70340 return -1;
70341}
70342
70343static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
70344 PyObject *empty_list = 0;
70345 PyObject *module = 0;
70346 PyObject *global_dict = 0;
70347 PyObject *empty_dict = 0;
70348 PyObject *list;
70349 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
70350 PyObject *py_import;
70351 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
70352 if (!py_import)
70353 goto bad;
70354 #endif
70355 if (from_list)
70356 list = from_list;
70357 else {
70358 empty_list = PyList_New(0);
70359 if (!empty_list)
70360 goto bad;
70361 list = empty_list;
70362 }
70363 global_dict = PyModule_GetDict(__pyx_m);
70364 if (!global_dict)
70365 goto bad;
70366 empty_dict = PyDict_New();
70367 if (!empty_dict)
70368 goto bad;
70369 {
70370 #if PY_MAJOR_VERSION2 >= 3
70371 if (level == -1) {
70372 if (strchr(__Pyx_MODULE_NAME, '.')(__extension__ (__builtin_constant_p ('.') && !__builtin_constant_p
("rbd") && ('.') == '\0' ? (char *) __rawmemchr ("rbd"
, '.') : __builtin_strchr ("rbd", '.')))
) {
70373 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
70374 PyObject *py_level = PyInt_FromLong(1);
70375 if (!py_level)
70376 goto bad;
70377 module = PyObject_CallFunctionObjArgs(py_import,
70378 name, global_dict, empty_dict, list, py_level, NULL((void*)0));
70379 Py_DECREF(py_level)do { if ( --((PyObject*)(py_level))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_level)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_level)))); } while (
0)
;
70380 #else
70381 module = PyImport_ImportModuleLevelObject(
70382 name, global_dict, empty_dict, list, 1);
70383 #endif
70384 if (!module) {
70385 if (!PyErr_ExceptionMatches(PyExc_ImportError))
70386 goto bad;
70387 PyErr_Clear();
70388 }
70389 }
70390 level = 0;
70391 }
70392 #endif
70393 if (!module) {
70394 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
70395 PyObject *py_level = PyInt_FromLong(level);
70396 if (!py_level)
70397 goto bad;
70398 module = PyObject_CallFunctionObjArgs(py_import,
70399 name, global_dict, empty_dict, list, py_level, NULL((void*)0));
70400 Py_DECREF(py_level)do { if ( --((PyObject*)(py_level))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_level)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_level)))); } while (
0)
;
70401 #else
70402 module = PyImport_ImportModuleLevelObject(
70403 name, global_dict, empty_dict, list, level);
70404 #endif
70405 }
70406 }
70407bad:
70408 #if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
70409 Py_XDECREF(py_import)do { if ((py_import) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_import))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(py_import)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_import)))); } while (0); } while (0)
;
70410 #endif
70411 Py_XDECREF(empty_list)do { if ((empty_list) == ((void*)0)) ; else do { if ( --((PyObject
*)(empty_list))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(empty_list)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(empty_list)))); } while (0); } while (0)
;
70412 Py_XDECREF(empty_dict)do { if ((empty_dict) == ((void*)0)) ; else do { if ( --((PyObject
*)(empty_dict))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(empty_dict)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(empty_dict)))); } while (0); } while (0)
;
70413 return module;
70414}
70415
70416static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
70417 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
70418 if (unlikely(!value)__builtin_expect(!!(!value), 0) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
70419 PyErr_Format(PyExc_ImportError,
70420 #if PY_MAJOR_VERSION2 < 3
70421 "cannot import name %.230s", PyString_AS_STRING(name)(((PyStringObject *)(name))->ob_sval));
70422 #else
70423 "cannot import name %S", name);
70424 #endif
70425 }
70426 return value;
70427}
70428
70429static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
70430 Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases)(((PyVarObject*)(bases))->ob_size);
70431 for (i=0; i < nbases; i++) {
70432 PyTypeObject *tmptype;
70433 PyObject *tmp = PyTuple_GET_ITEM(bases, i)(((PyTupleObject *)(bases))->ob_item[i]);
70434 tmptype = Py_TYPE(tmp)(((PyObject*)(tmp))->ob_type);
70435#if PY_MAJOR_VERSION2 < 3
70436 if (tmptype == &PyClass_Type)
70437 continue;
70438#endif
70439 if (!metaclass) {
70440 metaclass = tmptype;
70441 continue;
70442 }
70443 if (PyType_IsSubtype(metaclass, tmptype))
70444 continue;
70445 if (PyType_IsSubtype(tmptype, metaclass)) {
70446 metaclass = tmptype;
70447 continue;
70448 }
70449 PyErr_SetString(PyExc_TypeError,
70450 "metaclass conflict: "
70451 "the metaclass of a derived class "
70452 "must be a (non-strict) subclass "
70453 "of the metaclasses of all its bases");
70454 return NULL((void*)0);
70455 }
70456 if (!metaclass) {
70457#if PY_MAJOR_VERSION2 < 3
70458 metaclass = &PyClass_Type;
70459#else
70460 metaclass = &PyType_Type;
70461#endif
70462 }
70463 Py_INCREF((PyObject*) metaclass)( ((PyObject*)((PyObject*) metaclass))->ob_refcnt++);
70464 return (PyObject*) metaclass;
70465}
70466
70467static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
70468 PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
70469 PyObject *ns;
70470 if (metaclass) {
70471 PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
70472 if (prep) {
70473 PyObject *pargs = PyTuple_Pack(2, name, bases);
70474 if (unlikely(!pargs)__builtin_expect(!!(!pargs), 0)) {
70475 Py_DECREF(prep)do { if ( --((PyObject*)(prep))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(prep)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(prep)))); } while (0)
;
70476 return NULL((void*)0);
70477 }
70478 ns = PyObject_Call(prep, pargs, mkw);
70479 Py_DECREF(prep)do { if ( --((PyObject*)(prep))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(prep)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(prep)))); } while (0)
;
70480 Py_DECREF(pargs)do { if ( --((PyObject*)(pargs))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(pargs)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(pargs)))); } while (0)
;
70481 } else {
70482 if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))__builtin_expect(!!(!PyErr_ExceptionMatches(PyExc_AttributeError
)), 0)
)
70483 return NULL((void*)0);
70484 PyErr_Clear();
70485 ns = PyDict_New();
70486 }
70487 } else {
70488 ns = PyDict_New();
70489 }
70490 if (unlikely(!ns)__builtin_expect(!!(!ns), 0))
70491 return NULL((void*)0);
70492 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)__builtin_expect(!!(PyObject_SetItem(ns, __pyx_n_s_module, modname
) < 0), 0)
) goto bad;
70493 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)__builtin_expect(!!(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname
) < 0), 0)
) goto bad;
70494 if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)__builtin_expect(!!(doc && PyObject_SetItem(ns, __pyx_n_s_doc
, doc) < 0), 0)
) goto bad;
70495 return ns;
70496bad:
70497 Py_DECREF(ns)do { if ( --((PyObject*)(ns))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ns)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ns)))); } while (0)
;
70498 return NULL((void*)0);
70499}
70500static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
70501 PyObject *dict, PyObject *mkw,
70502 int calculate_metaclass, int allow_py2_metaclass) {
70503 PyObject *result, *margs;
70504 PyObject *owned_metaclass = NULL((void*)0);
70505 if (allow_py2_metaclass) {
70506 owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
70507 if (owned_metaclass) {
70508 metaclass = owned_metaclass;
70509 } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))__builtin_expect(!!(PyErr_ExceptionMatches(PyExc_KeyError)), 1
)
) {
70510 PyErr_Clear();
70511 } else {
70512 return NULL((void*)0);
70513 }
70514 }
70515 if (calculate_metaclass && (!metaclass || PyType_Check(metaclass)((((((PyObject*)(metaclass))->ob_type))->tp_flags &
((1L<<31))) != 0)
)) {
70516 metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
70517 Py_XDECREF(owned_metaclass)do { if ((owned_metaclass) == ((void*)0)) ; else do { if ( --
((PyObject*)(owned_metaclass))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(owned_metaclass)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(owned_metaclass)))); } while
(0); } while (0)
;
70518 if (unlikely(!metaclass)__builtin_expect(!!(!metaclass), 0))
70519 return NULL((void*)0);
70520 owned_metaclass = metaclass;
70521 }
70522 margs = PyTuple_Pack(3, name, bases, dict);
70523 if (unlikely(!margs)__builtin_expect(!!(!margs), 0)) {
70524 result = NULL((void*)0);
70525 } else {
70526 result = PyObject_Call(metaclass, margs, mkw);
70527 Py_DECREF(margs)do { if ( --((PyObject*)(margs))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(margs)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(margs)))); } while (0)
;
70528 }
70529 Py_XDECREF(owned_metaclass)do { if ((owned_metaclass) == ((void*)0)) ; else do { if ( --
((PyObject*)(owned_metaclass))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(owned_metaclass)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(owned_metaclass)))); } while
(0); } while (0)
;
70530 return result;
70531}
70532
70533static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
70534 int start = 0, mid = 0, end = count - 1;
70535 if (end >= 0 && code_line > entries[end].code_line) {
70536 return count;
70537 }
70538 while (start < end) {
70539 mid = start + (end - start) / 2;
70540 if (code_line < entries[mid].code_line) {
70541 end = mid;
70542 } else if (code_line > entries[mid].code_line) {
70543 start = mid + 1;
70544 } else {
70545 return mid;
70546 }
70547 }
70548 if (code_line <= entries[mid].code_line) {
70549 return mid;
70550 } else {
70551 return mid + 1;
70552 }
70553}
70554static PyCodeObject *__pyx_find_code_object(int code_line) {
70555 PyCodeObject* code_object;
70556 int pos;
70557 if (unlikely(!code_line)__builtin_expect(!!(!code_line), 0) || unlikely(!__pyx_code_cache.entries)__builtin_expect(!!(!__pyx_code_cache.entries), 0)) {
70558 return NULL((void*)0);
70559 }
70560 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
70561 if (unlikely(pos >= __pyx_code_cache.count)__builtin_expect(!!(pos >= __pyx_code_cache.count), 0) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)__builtin_expect(!!(__pyx_code_cache.entries[pos].code_line !=
code_line), 0)
) {
70562 return NULL((void*)0);
70563 }
70564 code_object = __pyx_code_cache.entries[pos].code_object;
70565 Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++);
70566 return code_object;
70567}
70568static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
70569 int pos, i;
70570 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
70571 if (unlikely(!code_line)__builtin_expect(!!(!code_line), 0)) {
70572 return;
70573 }
70574 if (unlikely(!entries)__builtin_expect(!!(!entries), 0)) {
70575 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
70576 if (likely(entries)__builtin_expect(!!(entries), 1)) {
70577 __pyx_code_cache.entries = entries;
70578 __pyx_code_cache.max_count = 64;
70579 __pyx_code_cache.count = 1;
70580 entries[0].code_line = code_line;
70581 entries[0].code_object = code_object;
70582 Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++);
70583 }
70584 return;
70585 }
70586 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
70587 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)__builtin_expect(!!(__pyx_code_cache.entries[pos].code_line ==
code_line), 0)
) {
70588 PyCodeObject* tmp = entries[pos].code_object;
70589 entries[pos].code_object = code_object;
70590 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
70591 return;
70592 }
70593 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
70594 int new_max = __pyx_code_cache.max_count + 64;
70595 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
70596 __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
70597 if (unlikely(!entries)__builtin_expect(!!(!entries), 0)) {
70598 return;
70599 }
70600 __pyx_code_cache.entries = entries;
70601 __pyx_code_cache.max_count = new_max;
70602 }
70603 for (i=__pyx_code_cache.count; i>pos; i--) {
70604 entries[i] = entries[i-1];
70605 }
70606 entries[pos].code_line = code_line;
70607 entries[pos].code_object = code_object;
70608 __pyx_code_cache.count++;
70609 Py_INCREF(code_object)( ((PyObject*)(code_object))->ob_refcnt++);
70610}
70611
70612#include "compile.h"
70613#include "frameobject.h"
70614#include "traceback.h"
70615static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
70616 const char *funcname, int c_line,
70617 int py_line, const char *filename) {
70618 PyCodeObject *py_code = 0;
70619 PyObject *py_srcfile = 0;
70620 PyObject *py_funcname = 0;
70621 #if PY_MAJOR_VERSION2 < 3
70622 py_srcfile = PyString_FromString(filename);
70623 #else
70624 py_srcfile = PyUnicode_FromStringPyUnicodeUCS4_FromString(filename);
70625 #endif
70626 if (!py_srcfile) goto bad;
70627 if (c_line) {
70628 #if PY_MAJOR_VERSION2 < 3
70629 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
70630 #else
70631 py_funcname = PyUnicode_FromFormatPyUnicodeUCS4_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
70632 #endif
70633 }
70634 else {
70635 #if PY_MAJOR_VERSION2 < 3
70636 py_funcname = PyString_FromString(funcname);
70637 #else
70638 py_funcname = PyUnicode_FromStringPyUnicodeUCS4_FromString(funcname);
70639 #endif
70640 }
70641 if (!py_funcname) goto bad;
70642 py_code = __Pyx_PyCode_New(PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70643 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70644 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70645 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70646 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70647 0,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70648 __pyx_empty_bytes, /*PyObject *code,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70649 __pyx_empty_tuple, /*PyObject *consts,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70650 __pyx_empty_tuple, /*PyObject *names,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70651 __pyx_empty_tuple, /*PyObject *varnames,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70652 __pyx_empty_tuple, /*PyObject *freevars,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70653 __pyx_empty_tuple, /*PyObject *cellvars,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70654 py_srcfile, /*PyObject *filename,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70655 py_funcname, /*PyObject *name,*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70656 py_line,PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70657 __pyx_empty_bytes /*PyObject *lnotab*/PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
70658 )PyCode_New(0 +0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple
, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple
, py_srcfile, py_funcname, py_line, __pyx_empty_bytes)
;
70659 Py_DECREF(py_srcfile)do { if ( --((PyObject*)(py_srcfile))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_srcfile)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_srcfile)))); } while
(0)
;
70660 Py_DECREF(py_funcname)do { if ( --((PyObject*)(py_funcname))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_funcname)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_funcname)))); } while
(0)
;
70661 return py_code;
70662bad:
70663 Py_XDECREF(py_srcfile)do { if ((py_srcfile) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_srcfile))->ob_refcnt != 0) ; else ( (*(((PyObject*)(
(PyObject *)(py_srcfile)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_srcfile)))); } while (0); } while (0)
;
70664 Py_XDECREF(py_funcname)do { if ((py_funcname) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_funcname))->ob_refcnt != 0) ; else ( (*(((PyObject*)
((PyObject *)(py_funcname)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_funcname)))); } while (0); } while (0)
;
70665 return NULL((void*)0);
70666}
70667static void __Pyx_AddTraceback(const char *funcname, int c_line,
70668 int py_line, const char *filename) {
70669 PyCodeObject *py_code = 0;
70670 PyFrameObject *py_frame = 0;
70671 py_code = __pyx_find_code_object(c_line ? c_line : py_line);
70672 if (!py_code) {
70673 py_code = __Pyx_CreateCodeObjectForTraceback(
70674 funcname, c_line, py_line, filename);
70675 if (!py_code) goto bad;
70676 __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
70677 }
70678 py_frame = PyFrame_New(
70679 PyThreadState_GET()(_PyThreadState_Current), /*PyThreadState *tstate,*/
70680 py_code, /*PyCodeObject *code,*/
70681 __pyx_d, /*PyObject *globals,*/
70682 0 /*PyObject *locals*/
70683 );
70684 if (!py_frame) goto bad;
70685 py_frame->f_lineno = py_line;
70686 PyTraceBack_Here(py_frame);
70687bad:
70688 Py_XDECREF(py_code)do { if ((py_code) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_code))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(py_code)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(py_code)))); } while (0); } while (0)
;
70689 Py_XDECREF(py_frame)do { if ((py_frame) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_frame))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(py_frame)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(py_frame)))); } while (0); } while (0)
;
70690}
70691
70692static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int(int value) {
70693 const int neg_one = (int) -1, const_zero = (int) 0;
70694 const int is_unsigned = neg_one > const_zero;
70695 if (is_unsigned) {
70696 if (sizeof(int) < sizeof(long)) {
70697 return PyInt_FromLong((long) value);
70698 } else if (sizeof(int) <= sizeof(unsigned long)) {
70699 return PyLong_FromUnsignedLong((unsigned long) value);
70700 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70701 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70702 }
70703 } else {
70704 if (sizeof(int) <= sizeof(long)) {
70705 return PyInt_FromLong((long) value);
70706 } else if (sizeof(int) <= sizeof(PY_LONG_LONGlong long)) {
70707 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70708 }
70709 }
70710 {
70711 int one = 1; int little = (int)*(unsigned char *)&one;
70712 unsigned char *bytes = (unsigned char *)&value;
70713 return _PyLong_FromByteArray(bytes, sizeof(int),
70714 little, !is_unsigned);
70715 }
70716}
70717
70718static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_mirror_mode_t(rbd_mirror_mode_t value) {
70719 const rbd_mirror_mode_t neg_one = (rbd_mirror_mode_t) -1, const_zero = (rbd_mirror_mode_t) 0;
70720 const int is_unsigned = neg_one > const_zero;
70721 if (is_unsigned) {
70722 if (sizeof(rbd_mirror_mode_t) < sizeof(long)) {
70723 return PyInt_FromLong((long) value);
70724 } else if (sizeof(rbd_mirror_mode_t) <= sizeof(unsigned long)) {
70725 return PyLong_FromUnsignedLong((unsigned long) value);
70726 } else if (sizeof(rbd_mirror_mode_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70727 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70728 }
70729 } else {
70730 if (sizeof(rbd_mirror_mode_t) <= sizeof(long)) {
70731 return PyInt_FromLong((long) value);
70732 } else if (sizeof(rbd_mirror_mode_t) <= sizeof(PY_LONG_LONGlong long)) {
70733 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70734 }
70735 }
70736 {
70737 int one = 1; int little = (int)*(unsigned char *)&one;
70738 unsigned char *bytes = (unsigned char *)&value;
70739 return _PyLong_FromByteArray(bytes, sizeof(rbd_mirror_mode_t),
70740 little, !is_unsigned);
70741 }
70742}
70743
70744static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_mirror_image_state_t(rbd_mirror_image_state_t value) {
70745 const rbd_mirror_image_state_t neg_one = (rbd_mirror_image_state_t) -1, const_zero = (rbd_mirror_image_state_t) 0;
70746 const int is_unsigned = neg_one > const_zero;
70747 if (is_unsigned) {
70748 if (sizeof(rbd_mirror_image_state_t) < sizeof(long)) {
70749 return PyInt_FromLong((long) value);
70750 } else if (sizeof(rbd_mirror_image_state_t) <= sizeof(unsigned long)) {
70751 return PyLong_FromUnsignedLong((unsigned long) value);
70752 } else if (sizeof(rbd_mirror_image_state_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70753 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70754 }
70755 } else {
70756 if (sizeof(rbd_mirror_image_state_t) <= sizeof(long)) {
70757 return PyInt_FromLong((long) value);
70758 } else if (sizeof(rbd_mirror_image_state_t) <= sizeof(PY_LONG_LONGlong long)) {
70759 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70760 }
70761 }
70762 {
70763 int one = 1; int little = (int)*(unsigned char *)&one;
70764 unsigned char *bytes = (unsigned char *)&value;
70765 return _PyLong_FromByteArray(bytes, sizeof(rbd_mirror_image_state_t),
70766 little, !is_unsigned);
70767 }
70768}
70769
70770static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_mirror_image_status_state_t(rbd_mirror_image_status_state_t value) {
70771 const rbd_mirror_image_status_state_t neg_one = (rbd_mirror_image_status_state_t) -1, const_zero = (rbd_mirror_image_status_state_t) 0;
70772 const int is_unsigned = neg_one > const_zero;
70773 if (is_unsigned) {
70774 if (sizeof(rbd_mirror_image_status_state_t) < sizeof(long)) {
70775 return PyInt_FromLong((long) value);
70776 } else if (sizeof(rbd_mirror_image_status_state_t) <= sizeof(unsigned long)) {
70777 return PyLong_FromUnsignedLong((unsigned long) value);
70778 } else if (sizeof(rbd_mirror_image_status_state_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70779 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70780 }
70781 } else {
70782 if (sizeof(rbd_mirror_image_status_state_t) <= sizeof(long)) {
70783 return PyInt_FromLong((long) value);
70784 } else if (sizeof(rbd_mirror_image_status_state_t) <= sizeof(PY_LONG_LONGlong long)) {
70785 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70786 }
70787 }
70788 {
70789 int one = 1; int little = (int)*(unsigned char *)&one;
70790 unsigned char *bytes = (unsigned char *)&value;
70791 return _PyLong_FromByteArray(bytes, sizeof(rbd_mirror_image_status_state_t),
70792 little, !is_unsigned);
70793 }
70794}
70795
70796static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_lock_mode_t(rbd_lock_mode_t value) {
70797 const rbd_lock_mode_t neg_one = (rbd_lock_mode_t) -1, const_zero = (rbd_lock_mode_t) 0;
70798 const int is_unsigned = neg_one > const_zero;
70799 if (is_unsigned) {
70800 if (sizeof(rbd_lock_mode_t) < sizeof(long)) {
70801 return PyInt_FromLong((long) value);
70802 } else if (sizeof(rbd_lock_mode_t) <= sizeof(unsigned long)) {
70803 return PyLong_FromUnsignedLong((unsigned long) value);
70804 } else if (sizeof(rbd_lock_mode_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70805 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70806 }
70807 } else {
70808 if (sizeof(rbd_lock_mode_t) <= sizeof(long)) {
70809 return PyInt_FromLong((long) value);
70810 } else if (sizeof(rbd_lock_mode_t) <= sizeof(PY_LONG_LONGlong long)) {
70811 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70812 }
70813 }
70814 {
70815 int one = 1; int little = (int)*(unsigned char *)&one;
70816 unsigned char *bytes = (unsigned char *)&value;
70817 return _PyLong_FromByteArray(bytes, sizeof(rbd_lock_mode_t),
70818 little, !is_unsigned);
70819 }
70820}
70821
70822static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_snap_namespace_type_t(rbd_snap_namespace_type_t value) {
70823 const rbd_snap_namespace_type_t neg_one = (rbd_snap_namespace_type_t) -1, const_zero = (rbd_snap_namespace_type_t) 0;
70824 const int is_unsigned = neg_one > const_zero;
70825 if (is_unsigned) {
70826 if (sizeof(rbd_snap_namespace_type_t) < sizeof(long)) {
70827 return PyInt_FromLong((long) value);
70828 } else if (sizeof(rbd_snap_namespace_type_t) <= sizeof(unsigned long)) {
70829 return PyLong_FromUnsignedLong((unsigned long) value);
70830 } else if (sizeof(rbd_snap_namespace_type_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70831 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70832 }
70833 } else {
70834 if (sizeof(rbd_snap_namespace_type_t) <= sizeof(long)) {
70835 return PyInt_FromLong((long) value);
70836 } else if (sizeof(rbd_snap_namespace_type_t) <= sizeof(PY_LONG_LONGlong long)) {
70837 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70838 }
70839 }
70840 {
70841 int one = 1; int little = (int)*(unsigned char *)&one;
70842 unsigned char *bytes = (unsigned char *)&value;
70843 return _PyLong_FromByteArray(bytes, sizeof(rbd_snap_namespace_type_t),
70844 little, !is_unsigned);
70845 }
70846}
70847
70848static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_group_image_state_t(rbd_group_image_state_t value) {
70849 const rbd_group_image_state_t neg_one = (rbd_group_image_state_t) -1, const_zero = (rbd_group_image_state_t) 0;
70850 const int is_unsigned = neg_one > const_zero;
70851 if (is_unsigned) {
70852 if (sizeof(rbd_group_image_state_t) < sizeof(long)) {
70853 return PyInt_FromLong((long) value);
70854 } else if (sizeof(rbd_group_image_state_t) <= sizeof(unsigned long)) {
70855 return PyLong_FromUnsignedLong((unsigned long) value);
70856 } else if (sizeof(rbd_group_image_state_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70857 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70858 }
70859 } else {
70860 if (sizeof(rbd_group_image_state_t) <= sizeof(long)) {
70861 return PyInt_FromLong((long) value);
70862 } else if (sizeof(rbd_group_image_state_t) <= sizeof(PY_LONG_LONGlong long)) {
70863 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70864 }
70865 }
70866 {
70867 int one = 1; int little = (int)*(unsigned char *)&one;
70868 unsigned char *bytes = (unsigned char *)&value;
70869 return _PyLong_FromByteArray(bytes, sizeof(rbd_group_image_state_t),
70870 little, !is_unsigned);
70871 }
70872}
70873
70874static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_group_snap_state_t(rbd_group_snap_state_t value) {
70875 const rbd_group_snap_state_t neg_one = (rbd_group_snap_state_t) -1, const_zero = (rbd_group_snap_state_t) 0;
70876 const int is_unsigned = neg_one > const_zero;
70877 if (is_unsigned) {
70878 if (sizeof(rbd_group_snap_state_t) < sizeof(long)) {
70879 return PyInt_FromLong((long) value);
70880 } else if (sizeof(rbd_group_snap_state_t) <= sizeof(unsigned long)) {
70881 return PyLong_FromUnsignedLong((unsigned long) value);
70882 } else if (sizeof(rbd_group_snap_state_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70883 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70884 }
70885 } else {
70886 if (sizeof(rbd_group_snap_state_t) <= sizeof(long)) {
70887 return PyInt_FromLong((long) value);
70888 } else if (sizeof(rbd_group_snap_state_t) <= sizeof(PY_LONG_LONGlong long)) {
70889 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70890 }
70891 }
70892 {
70893 int one = 1; int little = (int)*(unsigned char *)&one;
70894 unsigned char *bytes = (unsigned char *)&value;
70895 return _PyLong_FromByteArray(bytes, sizeof(rbd_group_snap_state_t),
70896 little, !is_unsigned);
70897 }
70898}
70899
70900static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_image_migration_state_t(rbd_image_migration_state_t value) {
70901 const rbd_image_migration_state_t neg_one = (rbd_image_migration_state_t) -1, const_zero = (rbd_image_migration_state_t) 0;
70902 const int is_unsigned = neg_one > const_zero;
70903 if (is_unsigned) {
70904 if (sizeof(rbd_image_migration_state_t) < sizeof(long)) {
70905 return PyInt_FromLong((long) value);
70906 } else if (sizeof(rbd_image_migration_state_t) <= sizeof(unsigned long)) {
70907 return PyLong_FromUnsignedLong((unsigned long) value);
70908 } else if (sizeof(rbd_image_migration_state_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70909 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70910 }
70911 } else {
70912 if (sizeof(rbd_image_migration_state_t) <= sizeof(long)) {
70913 return PyInt_FromLong((long) value);
70914 } else if (sizeof(rbd_image_migration_state_t) <= sizeof(PY_LONG_LONGlong long)) {
70915 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70916 }
70917 }
70918 {
70919 int one = 1; int little = (int)*(unsigned char *)&one;
70920 unsigned char *bytes = (unsigned char *)&value;
70921 return _PyLong_FromByteArray(bytes, sizeof(rbd_image_migration_state_t),
70922 little, !is_unsigned);
70923 }
70924}
70925
70926static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_config_source_t(rbd_config_source_t value) {
70927 const rbd_config_source_t neg_one = (rbd_config_source_t) -1, const_zero = (rbd_config_source_t) 0;
70928 const int is_unsigned = neg_one > const_zero;
70929 if (is_unsigned) {
70930 if (sizeof(rbd_config_source_t) < sizeof(long)) {
70931 return PyInt_FromLong((long) value);
70932 } else if (sizeof(rbd_config_source_t) <= sizeof(unsigned long)) {
70933 return PyLong_FromUnsignedLong((unsigned long) value);
70934 } else if (sizeof(rbd_config_source_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70935 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70936 }
70937 } else {
70938 if (sizeof(rbd_config_source_t) <= sizeof(long)) {
70939 return PyInt_FromLong((long) value);
70940 } else if (sizeof(rbd_config_source_t) <= sizeof(PY_LONG_LONGlong long)) {
70941 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70942 }
70943 }
70944 {
70945 int one = 1; int little = (int)*(unsigned char *)&one;
70946 unsigned char *bytes = (unsigned char *)&value;
70947 return _PyLong_FromByteArray(bytes, sizeof(rbd_config_source_t),
70948 little, !is_unsigned);
70949 }
70950}
70951
70952static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_pool_stat_option_t(rbd_pool_stat_option_t value) {
70953 const rbd_pool_stat_option_t neg_one = (rbd_pool_stat_option_t) -1, const_zero = (rbd_pool_stat_option_t) 0;
70954 const int is_unsigned = neg_one > const_zero;
70955 if (is_unsigned) {
70956 if (sizeof(rbd_pool_stat_option_t) < sizeof(long)) {
70957 return PyInt_FromLong((long) value);
70958 } else if (sizeof(rbd_pool_stat_option_t) <= sizeof(unsigned long)) {
70959 return PyLong_FromUnsignedLong((unsigned long) value);
70960 } else if (sizeof(rbd_pool_stat_option_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70961 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70962 }
70963 } else {
70964 if (sizeof(rbd_pool_stat_option_t) <= sizeof(long)) {
70965 return PyInt_FromLong((long) value);
70966 } else if (sizeof(rbd_pool_stat_option_t) <= sizeof(PY_LONG_LONGlong long)) {
70967 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70968 }
70969 }
70970 {
70971 int one = 1; int little = (int)*(unsigned char *)&one;
70972 unsigned char *bytes = (unsigned char *)&value;
70973 return _PyLong_FromByteArray(bytes, sizeof(rbd_pool_stat_option_t),
70974 little, !is_unsigned);
70975 }
70976}
70977
70978static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
70979 const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
70980 const int is_unsigned = neg_one > const_zero;
70981 if (is_unsigned) {
70982 if (sizeof(uint64_t) < sizeof(long)) {
70983 return PyInt_FromLong((long) value);
70984 } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
70985 return PyLong_FromUnsignedLong((unsigned long) value);
70986 } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
70987 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
70988 }
70989 } else {
70990 if (sizeof(uint64_t) <= sizeof(long)) {
70991 return PyInt_FromLong((long) value);
70992 } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONGlong long)) {
70993 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
70994 }
70995 }
70996 {
70997 int one = 1; int little = (int)*(unsigned char *)&one;
70998 unsigned char *bytes = (unsigned char *)&value;
70999 return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
71000 little, !is_unsigned);
71001 }
71002}
71003
71004#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (0 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
\
71005 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (0 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
71006#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (1 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
\
71007 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (1 &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
71008#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc){ func_type value = func_value; if (sizeof(target_type) < sizeof
(func_type)) { if (__builtin_expect(!!(value != (func_type) (
target_type) value), 0)) { func_type zero = 0; if (exc &&
__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)) return (target_type) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (target_type) value; }
\
71009 {\
71010 func_type value = func_value;\
71011 if (sizeof(target_type) < sizeof(func_type)) {\
71012 if (unlikely(value != (func_type) (target_type) value)__builtin_expect(!!(value != (func_type) (target_type) value)
, 0)
) {\
71013 func_type zero = 0;\
71014 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred())__builtin_expect(!!(value == (func_type)-1 && PyErr_Occurred
()), 0)
)\
71015 return (target_type) -1;\
71016 if (is_unsigned && unlikely(value < zero)__builtin_expect(!!(value < zero), 0))\
71017 goto raise_neg_overflow;\
71018 else\
71019 goto raise_overflow;\
71020 }\
71021 }\
71022 return (target_type) value;\
71023 }
71024
71025#if CYTHON_USE_PYLONG_INTERNALS1
71026 #include "longintrepr.h"
71027#endif
71028
71029static CYTHON_INLINE__inline__ int __Pyx_PyInt_As_int(PyObject *x) {
71030 const int neg_one = (int) -1, const_zero = (int) 0;
71031 const int is_unsigned = neg_one > const_zero;
71032#if PY_MAJOR_VERSION2 < 3
71033 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
71034 if (sizeof(int) < sizeof(long)) {
71035 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(int) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (int) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71036 } else {
71037 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
71038 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
71039 goto raise_neg_overflow;
71040 }
71041 return (int) val;
71042 }
71043 } else
71044#endif
71045 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
71046 if (is_unsigned) {
71047#if CYTHON_USE_PYLONG_INTERNALS1
71048 const digit* digits = ((PyLongObject*)x)->ob_digit;
71049 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71050 case 0: return (int) 0;
71051 case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]){ digit value = digits[0]; if (sizeof(int) < sizeof(digit)
) { if (__builtin_expect(!!(value != (digit) (int) value), 0)
) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (int) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int) value; }
71052 case 2:
71053 if (8 * sizeof(int) > 1 * PyLong_SHIFT30) {
71054 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71055 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71056 } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT30) {
71057 return (int) (((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]));
71058 }
71059 }
71060 break;
71061 case 3:
71062 if (8 * sizeof(int) > 2 * PyLong_SHIFT30) {
71063 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71064 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (int) value), 0
)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71065 } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT30) {
71066 return (int) (((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]));
71067 }
71068 }
71069 break;
71070 case 4:
71071 if (8 * sizeof(int) > 3 * PyLong_SHIFT30) {
71072 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71073 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (int) value), 0)) { unsigned long zero = 0
; if (0 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (int) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int) value; }
71074 } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT30) {
71075 return (int) (((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0]));
71076 }
71077 }
71078 break;
71079 }
71080#endif
71081#if CYTHON_COMPILING_IN_CPYTHON1
71082 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
71083 goto raise_neg_overflow;
71084 }
71085#else
71086 {
71087 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
71088 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
71089 return (int) -1;
71090 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
71091 goto raise_neg_overflow;
71092 }
71093#endif
71094 if (sizeof(int) <= sizeof(unsigned long)) {
71095 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
int) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (int) value), 0)) { unsigned long zero = 0
; if (1 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (int) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int) value; }
71096 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71097 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(int) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (int) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71098 }
71099 } else {
71100#if CYTHON_USE_PYLONG_INTERNALS1
71101 const digit* digits = ((PyLongObject*)x)->ob_digit;
71102 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71103 case 0: return (int) 0;
71104 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(int) < sizeof
(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (int) value
), 0)) { sdigit zero = 0; if (0 && __builtin_expect(!
!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71105 case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(int) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (int) value), 0
)) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (int) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int) value; }
71106 case -2:
71107 if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT30) {
71108 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71109 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (int) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (int
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71110 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) {
71111 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
71112 }
71113 }
71114 break;
71115 case 2:
71116 if (8 * sizeof(int) > 1 * PyLong_SHIFT30) {
71117 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71118 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71119 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) {
71120 return (int) ((((((int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
71121 }
71122 }
71123 break;
71124 case -3:
71125 if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT30) {
71126 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71127 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (int) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71128 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) {
71129 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
71130 }
71131 }
71132 break;
71133 case 3:
71134 if (8 * sizeof(int) > 2 * PyLong_SHIFT30) {
71135 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71136 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (int) value), 0
)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71137 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) {
71138 return (int) ((((((((int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
71139 }
71140 }
71141 break;
71142 case -4:
71143 if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT30) {
71144 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71145 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (int) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71146 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT30) {
71147 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
71148 }
71149 }
71150 break;
71151 case 4:
71152 if (8 * sizeof(int) > 3 * PyLong_SHIFT30) {
71153 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71154 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (int) value), 0)) { unsigned long zero = 0
; if (0 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (int) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int) value; }
71155 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT30) {
71156 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT30) | (int)digits[2]) << PyLong_SHIFT30) | (int)digits[1]) << PyLong_SHIFT30) | (int)digits[0])));
71157 }
71158 }
71159 break;
71160 }
71161#endif
71162 if (sizeof(int) <= sizeof(long)) {
71163 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(int) < sizeof(
long)) { if (__builtin_expect(!!(value != (long) (int) value)
, 0)) { long zero = 0; if (1 && __builtin_expect(!!(value
== (long)-1 && PyErr_Occurred()), 0)) return (int) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int) value; }
71164 } else if (sizeof(int) <= sizeof(PY_LONG_LONGlong long)) {
71165 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(int) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (int) value), 0)) { long long zero = 0; if (1 && __builtin_expect
(!!(value == (long long)-1 && PyErr_Occurred()), 0)) return
(int) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int) value; }
71166 }
71167 }
71168 {
71169#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
71170 PyErr_SetString(PyExc_RuntimeError,
71171 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
71172#else
71173 int val;
71174 PyObject *v = __Pyx_PyNumber_Int(x);
71175 #if PY_MAJOR_VERSION2 < 3
71176 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
71177 PyObject *tmp = v;
71178 v = PyNumber_Long(tmp);
71179 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71180 }
71181 #endif
71182 if (likely(v)__builtin_expect(!!(v), 1)) {
71183 int one = 1; int is_little = (int)*(unsigned char *)&one;
71184 unsigned char *bytes = (unsigned char *)&val;
71185 int ret = _PyLong_AsByteArray((PyLongObject *)v,
71186 bytes, sizeof(val),
71187 is_little, !is_unsigned);
71188 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
71189 if (likely(!ret)__builtin_expect(!!(!ret), 1))
71190 return val;
71191 }
71192#endif
71193 return (int) -1;
71194 }
71195 } else {
71196 int val;
71197 PyObject *tmp = __Pyx_PyNumber_Int(x);
71198 if (!tmp) return (int) -1;
71199 val = __Pyx_PyInt_As_int(tmp);
71200 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71201 return val;
71202 }
71203raise_overflow:
71204 PyErr_SetString(PyExc_OverflowError,
71205 "value too large to convert to int");
71206 return (int) -1;
71207raise_neg_overflow:
71208 PyErr_SetString(PyExc_OverflowError,
71209 "can't convert negative value to int");
71210 return (int) -1;
71211}
71212
71213static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_long(long value) {
71214 const long neg_one = (long) -1, const_zero = (long) 0;
71215 const int is_unsigned = neg_one > const_zero;
71216 if (is_unsigned) {
71217 if (sizeof(long) < sizeof(long)) {
71218 return PyInt_FromLong((long) value);
71219 } else if (sizeof(long) <= sizeof(unsigned long)) {
71220 return PyLong_FromUnsignedLong((unsigned long) value);
71221 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71222 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
71223 }
71224 } else {
71225 if (sizeof(long) <= sizeof(long)) {
71226 return PyInt_FromLong((long) value);
71227 } else if (sizeof(long) <= sizeof(PY_LONG_LONGlong long)) {
71228 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
71229 }
71230 }
71231 {
71232 int one = 1; int little = (int)*(unsigned char *)&one;
71233 unsigned char *bytes = (unsigned char *)&value;
71234 return _PyLong_FromByteArray(bytes, sizeof(long),
71235 little, !is_unsigned);
71236 }
71237}
71238
71239static CYTHON_INLINE__inline__ uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
71240 const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
71241 const int is_unsigned = neg_one > const_zero;
71242#if PY_MAJOR_VERSION2 < 3
71243 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
71244 if (sizeof(uint64_t) < sizeof(long)) {
71245 __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(uint64_t) < sizeof(long)) { if (__builtin_expect(!!(value
!= (long) (uint64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71246 } else {
71247 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
71248 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
71249 goto raise_neg_overflow;
71250 }
71251 return (uint64_t) val;
71252 }
71253 } else
71254#endif
71255 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
71256 if (is_unsigned) {
71257#if CYTHON_USE_PYLONG_INTERNALS1
71258 const digit* digits = ((PyLongObject*)x)->ob_digit;
71259 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71260 case 0: return (uint64_t) 0;
71261 case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(uint64_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (uint64_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71262 case 2:
71263 if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT30) {
71264 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71265 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint64_t) value), 0)) { unsigned long zero = 0; if (0
&& __builtin_expect(!!(value == (unsigned long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
71266 } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT30) {
71267 return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]));
71268 }
71269 }
71270 break;
71271 case 3:
71272 if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT30) {
71273 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71274 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint64_t) < sizeof(unsigned long)
) { if (__builtin_expect(!!(value != (unsigned long) (uint64_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71275 } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT30) {
71276 return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]));
71277 }
71278 }
71279 break;
71280 case 4:
71281 if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT30) {
71282 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71283 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint64_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (uint64_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71284 } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT30) {
71285 return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT30) | (uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0]));
71286 }
71287 }
71288 break;
71289 }
71290#endif
71291#if CYTHON_COMPILING_IN_CPYTHON1
71292 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
71293 goto raise_neg_overflow;
71294 }
71295#else
71296 {
71297 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
71298 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
71299 return (uint64_t) -1;
71300 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
71301 goto raise_neg_overflow;
71302 }
71303#endif
71304 if (sizeof(uint64_t) <= sizeof(unsigned long)) {
71305 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
uint64_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (uint64_t) value), 0)) { unsigned
long zero = 0; if (1 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71306 } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71307 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(uint64_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (uint64_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(uint64_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71308 }
71309 } else {
71310#if CYTHON_USE_PYLONG_INTERNALS1
71311 const digit* digits = ((PyLongObject*)x)->ob_digit;
71312 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71313 case 0: return (uint64_t) 0;
71314 case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(uint64_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
uint64_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(uint64_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71315 case 1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(uint64_t) < sizeof(
digit)) { if (__builtin_expect(!!(value != (digit) (uint64_t)
value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(uint64_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71316 case -2:
71317 if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT30) {
71318 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71319 __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint64_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71320 } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) {
71321 return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
71322 }
71323 }
71324 break;
71325 case 2:
71326 if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT30) {
71327 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71328 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint64_t) value), 0)) { unsigned long zero = 0; if (0
&& __builtin_expect(!!(value == (unsigned long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
71329 } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) {
71330 return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
71331 }
71332 }
71333 break;
71334 case -3:
71335 if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT30) {
71336 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71337 __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint64_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (uint64_t) value), 0)) { long zero = 0; if
(0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
71338 } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) {
71339 return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
71340 }
71341 }
71342 break;
71343 case 3:
71344 if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT30) {
71345 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71346 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint64_t) < sizeof(unsigned long)
) { if (__builtin_expect(!!(value != (unsigned long) (uint64_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71347 } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) {
71348 return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
71349 }
71350 }
71351 break;
71352 case -4:
71353 if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT30) {
71354 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71355 __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint64_t) < sizeof(long)) { if (__builtin_expect(!!(value
!= (long) (uint64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71356 } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT30) {
71357 return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT30) | (uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
71358 }
71359 }
71360 break;
71361 case 4:
71362 if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT30) {
71363 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71364 __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint64_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (uint64_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint64_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71365 } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT30) {
71366 return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT30) | (uint64_t)digits[2]) << PyLong_SHIFT30) | (uint64_t)digits[1]) << PyLong_SHIFT30) | (uint64_t)digits[0])));
71367 }
71368 }
71369 break;
71370 }
71371#endif
71372 if (sizeof(uint64_t) <= sizeof(long)) {
71373 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(uint64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint64_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint64_t) value; }
71374 } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONGlong long)) {
71375 __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(uint64_t
) < sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (uint64_t) value), 0)) { long long zero = 0; if (1
&& __builtin_expect(!!(value == (long long)-1 &&
PyErr_Occurred()), 0)) return (uint64_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint64_t) value; }
71376 }
71377 }
71378 {
71379#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
71380 PyErr_SetString(PyExc_RuntimeError,
71381 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
71382#else
71383 uint64_t val;
71384 PyObject *v = __Pyx_PyNumber_Int(x);
71385 #if PY_MAJOR_VERSION2 < 3
71386 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
71387 PyObject *tmp = v;
71388 v = PyNumber_Long(tmp);
71389 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71390 }
71391 #endif
71392 if (likely(v)__builtin_expect(!!(v), 1)) {
71393 int one = 1; int is_little = (int)*(unsigned char *)&one;
71394 unsigned char *bytes = (unsigned char *)&val;
71395 int ret = _PyLong_AsByteArray((PyLongObject *)v,
71396 bytes, sizeof(val),
71397 is_little, !is_unsigned);
71398 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
71399 if (likely(!ret)__builtin_expect(!!(!ret), 1))
71400 return val;
71401 }
71402#endif
71403 return (uint64_t) -1;
71404 }
71405 } else {
71406 uint64_t val;
71407 PyObject *tmp = __Pyx_PyNumber_Int(x);
71408 if (!tmp) return (uint64_t) -1;
71409 val = __Pyx_PyInt_As_uint64_t(tmp);
71410 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71411 return val;
71412 }
71413raise_overflow:
71414 PyErr_SetString(PyExc_OverflowError,
71415 "value too large to convert to uint64_t");
71416 return (uint64_t) -1;
71417raise_neg_overflow:
71418 PyErr_SetString(PyExc_OverflowError,
71419 "can't convert negative value to uint64_t");
71420 return (uint64_t) -1;
71421}
71422
71423static CYTHON_INLINE__inline__ time_t __Pyx_PyInt_As_time_t(PyObject *x) {
71424 const time_t neg_one = (time_t) -1, const_zero = (time_t) 0;
71425 const int is_unsigned = neg_one > const_zero;
71426#if PY_MAJOR_VERSION2 < 3
71427 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
71428 if (sizeof(time_t) < sizeof(long)) {
71429 __PYX_VERIFY_RETURN_INT(time_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(time_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (time_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71430 } else {
71431 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
71432 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
71433 goto raise_neg_overflow;
71434 }
71435 return (time_t) val;
71436 }
71437 } else
71438#endif
71439 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
71440 if (is_unsigned) {
71441#if CYTHON_USE_PYLONG_INTERNALS1
71442 const digit* digits = ((PyLongObject*)x)->ob_digit;
71443 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71444 case 0: return (time_t) 0;
71445 case 1: __PYX_VERIFY_RETURN_INT(time_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(time_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (time_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
time_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71446 case 2:
71447 if (8 * sizeof(time_t) > 1 * PyLong_SHIFT30) {
71448 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71449 __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(time_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (time_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71450 } else if (8 * sizeof(time_t) >= 2 * PyLong_SHIFT30) {
71451 return (time_t) (((((time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0]));
71452 }
71453 }
71454 break;
71455 case 3:
71456 if (8 * sizeof(time_t) > 2 * PyLong_SHIFT30) {
71457 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71458 __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(time_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (time_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71459 } else if (8 * sizeof(time_t) >= 3 * PyLong_SHIFT30) {
71460 return (time_t) (((((((time_t)digits[2]) << PyLong_SHIFT30) | (time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0]));
71461 }
71462 }
71463 break;
71464 case 4:
71465 if (8 * sizeof(time_t) > 3 * PyLong_SHIFT30) {
71466 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71467 __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(time_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (time_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (time_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (time_t) value; }
71468 } else if (8 * sizeof(time_t) >= 4 * PyLong_SHIFT30) {
71469 return (time_t) (((((((((time_t)digits[3]) << PyLong_SHIFT30) | (time_t)digits[2]) << PyLong_SHIFT30) | (time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0]));
71470 }
71471 }
71472 break;
71473 }
71474#endif
71475#if CYTHON_COMPILING_IN_CPYTHON1
71476 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
71477 goto raise_neg_overflow;
71478 }
71479#else
71480 {
71481 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
71482 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
71483 return (time_t) -1;
71484 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
71485 goto raise_neg_overflow;
71486 }
71487#endif
71488 if (sizeof(time_t) <= sizeof(unsigned long)) {
71489 __PYX_VERIFY_RETURN_INT_EXC(time_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
time_t) < sizeof(unsigned long)) { if (__builtin_expect(!!
(value != (unsigned long) (time_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (time_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (time_t) value; }
71490 } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71491 __PYX_VERIFY_RETURN_INT_EXC(time_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(time_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (time_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(time_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71492 }
71493 } else {
71494#if CYTHON_USE_PYLONG_INTERNALS1
71495 const digit* digits = ((PyLongObject*)x)->ob_digit;
71496 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71497 case 0: return (time_t) 0;
71498 case -1: __PYX_VERIFY_RETURN_INT(time_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(time_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
time_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(time_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71499 case 1: __PYX_VERIFY_RETURN_INT(time_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(time_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (time_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
time_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71500 case -2:
71501 if (8 * sizeof(time_t) - 1 > 1 * PyLong_SHIFT30) {
71502 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71503 __PYX_VERIFY_RETURN_INT(time_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(time_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (time_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (time_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71504 } else if (8 * sizeof(time_t) - 1 > 2 * PyLong_SHIFT30) {
71505 return (time_t) (((time_t)-1)*(((((time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0])));
71506 }
71507 }
71508 break;
71509 case 2:
71510 if (8 * sizeof(time_t) > 1 * PyLong_SHIFT30) {
71511 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71512 __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(time_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (time_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71513 } else if (8 * sizeof(time_t) - 1 > 2 * PyLong_SHIFT30) {
71514 return (time_t) ((((((time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0])));
71515 }
71516 }
71517 break;
71518 case -3:
71519 if (8 * sizeof(time_t) - 1 > 2 * PyLong_SHIFT30) {
71520 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71521 __PYX_VERIFY_RETURN_INT(time_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(time_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (time_t) value), 0)) { long zero = 0; if (
0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (time_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (time_t) value; }
71522 } else if (8 * sizeof(time_t) - 1 > 3 * PyLong_SHIFT30) {
71523 return (time_t) (((time_t)-1)*(((((((time_t)digits[2]) << PyLong_SHIFT30) | (time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0])));
71524 }
71525 }
71526 break;
71527 case 3:
71528 if (8 * sizeof(time_t) > 2 * PyLong_SHIFT30) {
71529 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71530 __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(time_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (time_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71531 } else if (8 * sizeof(time_t) - 1 > 3 * PyLong_SHIFT30) {
71532 return (time_t) ((((((((time_t)digits[2]) << PyLong_SHIFT30) | (time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0])));
71533 }
71534 }
71535 break;
71536 case -4:
71537 if (8 * sizeof(time_t) - 1 > 3 * PyLong_SHIFT30) {
71538 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71539 __PYX_VERIFY_RETURN_INT(time_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(time_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (time_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71540 } else if (8 * sizeof(time_t) - 1 > 4 * PyLong_SHIFT30) {
71541 return (time_t) (((time_t)-1)*(((((((((time_t)digits[3]) << PyLong_SHIFT30) | (time_t)digits[2]) << PyLong_SHIFT30) | (time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0])));
71542 }
71543 }
71544 break;
71545 case 4:
71546 if (8 * sizeof(time_t) > 3 * PyLong_SHIFT30) {
71547 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71548 __PYX_VERIFY_RETURN_INT(time_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(time_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (time_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (time_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (time_t) value; }
71549 } else if (8 * sizeof(time_t) - 1 > 4 * PyLong_SHIFT30) {
71550 return (time_t) ((((((((((time_t)digits[3]) << PyLong_SHIFT30) | (time_t)digits[2]) << PyLong_SHIFT30) | (time_t)digits[1]) << PyLong_SHIFT30) | (time_t)digits[0])));
71551 }
71552 }
71553 break;
71554 }
71555#endif
71556 if (sizeof(time_t) <= sizeof(long)) {
71557 __PYX_VERIFY_RETURN_INT_EXC(time_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(time_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (time_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (time_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71558 } else if (sizeof(time_t) <= sizeof(PY_LONG_LONGlong long)) {
71559 __PYX_VERIFY_RETURN_INT_EXC(time_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(time_t) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (time_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (time_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (time_t) value; }
71560 }
71561 }
71562 {
71563#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
71564 PyErr_SetString(PyExc_RuntimeError,
71565 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
71566#else
71567 time_t val;
71568 PyObject *v = __Pyx_PyNumber_Int(x);
71569 #if PY_MAJOR_VERSION2 < 3
71570 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
71571 PyObject *tmp = v;
71572 v = PyNumber_Long(tmp);
71573 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71574 }
71575 #endif
71576 if (likely(v)__builtin_expect(!!(v), 1)) {
71577 int one = 1; int is_little = (int)*(unsigned char *)&one;
71578 unsigned char *bytes = (unsigned char *)&val;
71579 int ret = _PyLong_AsByteArray((PyLongObject *)v,
71580 bytes, sizeof(val),
71581 is_little, !is_unsigned);
71582 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
71583 if (likely(!ret)__builtin_expect(!!(!ret), 1))
71584 return val;
71585 }
71586#endif
71587 return (time_t) -1;
71588 }
71589 } else {
71590 time_t val;
71591 PyObject *tmp = __Pyx_PyNumber_Int(x);
71592 if (!tmp) return (time_t) -1;
71593 val = __Pyx_PyInt_As_time_t(tmp);
71594 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71595 return val;
71596 }
71597raise_overflow:
71598 PyErr_SetString(PyExc_OverflowError,
71599 "value too large to convert to time_t");
71600 return (time_t) -1;
71601raise_neg_overflow:
71602 PyErr_SetString(PyExc_OverflowError,
71603 "can't convert negative value to time_t");
71604 return (time_t) -1;
71605}
71606
71607static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_rbd_trash_image_source_t(rbd_trash_image_source_t value) {
71608 const rbd_trash_image_source_t neg_one = (rbd_trash_image_source_t) -1, const_zero = (rbd_trash_image_source_t) 0;
71609 const int is_unsigned = neg_one > const_zero;
71610 if (is_unsigned) {
71611 if (sizeof(rbd_trash_image_source_t) < sizeof(long)) {
71612 return PyInt_FromLong((long) value);
71613 } else if (sizeof(rbd_trash_image_source_t) <= sizeof(unsigned long)) {
71614 return PyLong_FromUnsignedLong((unsigned long) value);
71615 } else if (sizeof(rbd_trash_image_source_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71616 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
71617 }
71618 } else {
71619 if (sizeof(rbd_trash_image_source_t) <= sizeof(long)) {
71620 return PyInt_FromLong((long) value);
71621 } else if (sizeof(rbd_trash_image_source_t) <= sizeof(PY_LONG_LONGlong long)) {
71622 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
71623 }
71624 }
71625 {
71626 int one = 1; int little = (int)*(unsigned char *)&one;
71627 unsigned char *bytes = (unsigned char *)&value;
71628 return _PyLong_FromByteArray(bytes, sizeof(rbd_trash_image_source_t),
71629 little, !is_unsigned);
71630 }
71631}
71632
71633static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_time_t(time_t value) {
71634 const time_t neg_one = (time_t) -1, const_zero = (time_t) 0;
71635 const int is_unsigned = neg_one > const_zero;
71636 if (is_unsigned) {
71637 if (sizeof(time_t) < sizeof(long)) {
71638 return PyInt_FromLong((long) value);
71639 } else if (sizeof(time_t) <= sizeof(unsigned long)) {
71640 return PyLong_FromUnsignedLong((unsigned long) value);
71641 } else if (sizeof(time_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71642 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
71643 }
71644 } else {
71645 if (sizeof(time_t) <= sizeof(long)) {
71646 return PyInt_FromLong((long) value);
71647 } else if (sizeof(time_t) <= sizeof(PY_LONG_LONGlong long)) {
71648 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
71649 }
71650 }
71651 {
71652 int one = 1; int little = (int)*(unsigned char *)&one;
71653 unsigned char *bytes = (unsigned char *)&value;
71654 return _PyLong_FromByteArray(bytes, sizeof(time_t),
71655 little, !is_unsigned);
71656 }
71657}
71658
71659static CYTHON_INLINE__inline__ PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
71660 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
71661 const int is_unsigned = neg_one > const_zero;
71662 if (is_unsigned) {
71663 if (sizeof(int64_t) < sizeof(long)) {
71664 return PyInt_FromLong((long) value);
71665 } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
71666 return PyLong_FromUnsignedLong((unsigned long) value);
71667 } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71668 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONGlong long) value);
71669 }
71670 } else {
71671 if (sizeof(int64_t) <= sizeof(long)) {
71672 return PyInt_FromLong((long) value);
71673 } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONGlong long)) {
71674 return PyLong_FromLongLong((PY_LONG_LONGlong long) value);
71675 }
71676 }
71677 {
71678 int one = 1; int little = (int)*(unsigned char *)&one;
71679 unsigned char *bytes = (unsigned char *)&value;
71680 return _PyLong_FromByteArray(bytes, sizeof(int64_t),
71681 little, !is_unsigned);
71682 }
71683}
71684
71685static CYTHON_INLINE__inline__ rbd_mirror_mode_t __Pyx_PyInt_As_rbd_mirror_mode_t(PyObject *x) {
71686 const rbd_mirror_mode_t neg_one = (rbd_mirror_mode_t) -1, const_zero = (rbd_mirror_mode_t) 0;
71687 const int is_unsigned = neg_one > const_zero;
71688#if PY_MAJOR_VERSION2 < 3
71689 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
71690 if (sizeof(rbd_mirror_mode_t) < sizeof(long)) {
71691 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(rbd_mirror_mode_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (rbd_mirror_mode_t) value), 0)) { long zero
= 0; if (0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (rbd_mirror_mode_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_mirror_mode_t) value
; }
71692 } else {
71693 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
71694 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
71695 goto raise_neg_overflow;
71696 }
71697 return (rbd_mirror_mode_t) val;
71698 }
71699 } else
71700#endif
71701 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
71702 if (is_unsigned) {
71703#if CYTHON_USE_PYLONG_INTERNALS1
71704 const digit* digits = ((PyLongObject*)x)->ob_digit;
71705 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71706 case 0: return (rbd_mirror_mode_t) 0;
71707 case 1: __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(rbd_mirror_mode_t) <
sizeof(digit)) { if (__builtin_expect(!!(value != (digit) (rbd_mirror_mode_t
) value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71708 case 2:
71709 if (8 * sizeof(rbd_mirror_mode_t) > 1 * PyLong_SHIFT30) {
71710 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71711 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(rbd_mirror_mode_t
) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (rbd_mirror_mode_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71712 } else if (8 * sizeof(rbd_mirror_mode_t) >= 2 * PyLong_SHIFT30) {
71713 return (rbd_mirror_mode_t) (((((rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0]));
71714 }
71715 }
71716 break;
71717 case 3:
71718 if (8 * sizeof(rbd_mirror_mode_t) > 2 * PyLong_SHIFT30) {
71719 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71720 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(rbd_mirror_mode_t) < sizeof(unsigned
long)) { if (__builtin_expect(!!(value != (unsigned long) (rbd_mirror_mode_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71721 } else if (8 * sizeof(rbd_mirror_mode_t) >= 3 * PyLong_SHIFT30) {
71722 return (rbd_mirror_mode_t) (((((((rbd_mirror_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0]));
71723 }
71724 }
71725 break;
71726 case 4:
71727 if (8 * sizeof(rbd_mirror_mode_t) > 3 * PyLong_SHIFT30) {
71728 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71729 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(rbd_mirror_mode_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (rbd_mirror_mode_t) value), 0)) {
unsigned long zero = 0; if (0 && __builtin_expect(!!
(value == (unsigned long)-1 && PyErr_Occurred()), 0))
return (rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71730 } else if (8 * sizeof(rbd_mirror_mode_t) >= 4 * PyLong_SHIFT30) {
71731 return (rbd_mirror_mode_t) (((((((((rbd_mirror_mode_t)digits[3]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0]));
71732 }
71733 }
71734 break;
71735 }
71736#endif
71737#if CYTHON_COMPILING_IN_CPYTHON1
71738 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
71739 goto raise_neg_overflow;
71740 }
71741#else
71742 {
71743 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
71744 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
71745 return (rbd_mirror_mode_t) -1;
71746 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
71747 goto raise_neg_overflow;
71748 }
71749#endif
71750 if (sizeof(rbd_mirror_mode_t) <= sizeof(unsigned long)) {
71751 __PYX_VERIFY_RETURN_INT_EXC(rbd_mirror_mode_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
rbd_mirror_mode_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (rbd_mirror_mode_t) value), 0)) {
unsigned long zero = 0; if (1 && __builtin_expect(!!
(value == (unsigned long)-1 && PyErr_Occurred()), 0))
return (rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71752 } else if (sizeof(rbd_mirror_mode_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71753 __PYX_VERIFY_RETURN_INT_EXC(rbd_mirror_mode_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(rbd_mirror_mode_t) < sizeof(unsigned long long)) {
if (__builtin_expect(!!(value != (unsigned long long) (rbd_mirror_mode_t
) value), 0)) { unsigned long long zero = 0; if (1 &&
__builtin_expect(!!(value == (unsigned long long)-1 &&
PyErr_Occurred()), 0)) return (rbd_mirror_mode_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_mirror_mode_t) value
; }
71754 }
71755 } else {
71756#if CYTHON_USE_PYLONG_INTERNALS1
71757 const digit* digits = ((PyLongObject*)x)->ob_digit;
71758 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71759 case 0: return (rbd_mirror_mode_t) 0;
71760 case -1: __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(rbd_mirror_mode_t
) < sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit
) (rbd_mirror_mode_t) value), 0)) { sdigit zero = 0; if (0 &&
__builtin_expect(!!(value == (sdigit)-1 && PyErr_Occurred
()), 0)) return (rbd_mirror_mode_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_mirror_mode_t) value
; }
71761 case 1: __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(rbd_mirror_mode_t) <
sizeof(digit)) { if (__builtin_expect(!!(value != (digit) (rbd_mirror_mode_t
) value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71762 case -2:
71763 if (8 * sizeof(rbd_mirror_mode_t) - 1 > 1 * PyLong_SHIFT30) {
71764 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71765 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(rbd_mirror_mode_t
) < sizeof(long)) { if (__builtin_expect(!!(value != (long
) (rbd_mirror_mode_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (rbd_mirror_mode_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_mirror_mode_t) value
; }
71766 } else if (8 * sizeof(rbd_mirror_mode_t) - 1 > 2 * PyLong_SHIFT30) {
71767 return (rbd_mirror_mode_t) (((rbd_mirror_mode_t)-1)*(((((rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0])));
71768 }
71769 }
71770 break;
71771 case 2:
71772 if (8 * sizeof(rbd_mirror_mode_t) > 1 * PyLong_SHIFT30) {
71773 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71774 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(rbd_mirror_mode_t
) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (rbd_mirror_mode_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71775 } else if (8 * sizeof(rbd_mirror_mode_t) - 1 > 2 * PyLong_SHIFT30) {
71776 return (rbd_mirror_mode_t) ((((((rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0])));
71777 }
71778 }
71779 break;
71780 case -3:
71781 if (8 * sizeof(rbd_mirror_mode_t) - 1 > 2 * PyLong_SHIFT30) {
71782 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71783 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(rbd_mirror_mode_t) < sizeof(long)
) { if (__builtin_expect(!!(value != (long) (rbd_mirror_mode_t
) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71784 } else if (8 * sizeof(rbd_mirror_mode_t) - 1 > 3 * PyLong_SHIFT30) {
71785 return (rbd_mirror_mode_t) (((rbd_mirror_mode_t)-1)*(((((((rbd_mirror_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0])));
71786 }
71787 }
71788 break;
71789 case 3:
71790 if (8 * sizeof(rbd_mirror_mode_t) > 2 * PyLong_SHIFT30) {
71791 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71792 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(rbd_mirror_mode_t) < sizeof(unsigned
long)) { if (__builtin_expect(!!(value != (unsigned long) (rbd_mirror_mode_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71793 } else if (8 * sizeof(rbd_mirror_mode_t) - 1 > 3 * PyLong_SHIFT30) {
71794 return (rbd_mirror_mode_t) ((((((((rbd_mirror_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0])));
71795 }
71796 }
71797 break;
71798 case -4:
71799 if (8 * sizeof(rbd_mirror_mode_t) - 1 > 3 * PyLong_SHIFT30) {
71800 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71801 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(rbd_mirror_mode_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (rbd_mirror_mode_t) value), 0)) { long zero
= 0; if (0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (rbd_mirror_mode_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_mirror_mode_t) value
; }
71802 } else if (8 * sizeof(rbd_mirror_mode_t) - 1 > 4 * PyLong_SHIFT30) {
71803 return (rbd_mirror_mode_t) (((rbd_mirror_mode_t)-1)*(((((((((rbd_mirror_mode_t)digits[3]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0])));
71804 }
71805 }
71806 break;
71807 case 4:
71808 if (8 * sizeof(rbd_mirror_mode_t) > 3 * PyLong_SHIFT30) {
71809 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71810 __PYX_VERIFY_RETURN_INT(rbd_mirror_mode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(rbd_mirror_mode_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (rbd_mirror_mode_t) value), 0)) {
unsigned long zero = 0; if (0 && __builtin_expect(!!
(value == (unsigned long)-1 && PyErr_Occurred()), 0))
return (rbd_mirror_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71811 } else if (8 * sizeof(rbd_mirror_mode_t) - 1 > 4 * PyLong_SHIFT30) {
71812 return (rbd_mirror_mode_t) ((((((((((rbd_mirror_mode_t)digits[3]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_mirror_mode_t)digits[0])));
71813 }
71814 }
71815 break;
71816 }
71817#endif
71818 if (sizeof(rbd_mirror_mode_t) <= sizeof(long)) {
71819 __PYX_VERIFY_RETURN_INT_EXC(rbd_mirror_mode_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(rbd_mirror_mode_t
) < sizeof(long)) { if (__builtin_expect(!!(value != (long
) (rbd_mirror_mode_t) value), 0)) { long zero = 0; if (1 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (rbd_mirror_mode_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_mirror_mode_t) value
; }
71820 } else if (sizeof(rbd_mirror_mode_t) <= sizeof(PY_LONG_LONGlong long)) {
71821 __PYX_VERIFY_RETURN_INT_EXC(rbd_mirror_mode_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(rbd_mirror_mode_t
) < sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (rbd_mirror_mode_t) value), 0)) { long long zero =
0; if (1 && __builtin_expect(!!(value == (long long)
-1 && PyErr_Occurred()), 0)) return (rbd_mirror_mode_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_mirror_mode_t) value; }
71822 }
71823 }
71824 {
71825#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
71826 PyErr_SetString(PyExc_RuntimeError,
71827 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
71828#else
71829 rbd_mirror_mode_t val;
71830 PyObject *v = __Pyx_PyNumber_Int(x);
71831 #if PY_MAJOR_VERSION2 < 3
71832 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
71833 PyObject *tmp = v;
71834 v = PyNumber_Long(tmp);
71835 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71836 }
71837 #endif
71838 if (likely(v)__builtin_expect(!!(v), 1)) {
71839 int one = 1; int is_little = (int)*(unsigned char *)&one;
71840 unsigned char *bytes = (unsigned char *)&val;
71841 int ret = _PyLong_AsByteArray((PyLongObject *)v,
71842 bytes, sizeof(val),
71843 is_little, !is_unsigned);
71844 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
71845 if (likely(!ret)__builtin_expect(!!(!ret), 1))
71846 return val;
71847 }
71848#endif
71849 return (rbd_mirror_mode_t) -1;
71850 }
71851 } else {
71852 rbd_mirror_mode_t val;
71853 PyObject *tmp = __Pyx_PyNumber_Int(x);
71854 if (!tmp) return (rbd_mirror_mode_t) -1;
71855 val = __Pyx_PyInt_As_rbd_mirror_mode_t(tmp);
71856 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
71857 return val;
71858 }
71859raise_overflow:
71860 PyErr_SetString(PyExc_OverflowError,
71861 "value too large to convert to rbd_mirror_mode_t");
71862 return (rbd_mirror_mode_t) -1;
71863raise_neg_overflow:
71864 PyErr_SetString(PyExc_OverflowError,
71865 "can't convert negative value to rbd_mirror_mode_t");
71866 return (rbd_mirror_mode_t) -1;
71867}
71868
71869static CYTHON_INLINE__inline__ size_t __Pyx_PyInt_As_size_t(PyObject *x) {
71870 const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
71871 const int is_unsigned = neg_one > const_zero;
71872#if PY_MAJOR_VERSION2 < 3
71873 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
71874 if (sizeof(size_t) < sizeof(long)) {
71875 __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(size_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (size_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71876 } else {
71877 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
71878 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
71879 goto raise_neg_overflow;
71880 }
71881 return (size_t) val;
71882 }
71883 } else
71884#endif
71885 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
71886 if (is_unsigned) {
71887#if CYTHON_USE_PYLONG_INTERNALS1
71888 const digit* digits = ((PyLongObject*)x)->ob_digit;
71889 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71890 case 0: return (size_t) 0;
71891 case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(size_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (size_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
size_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71892 case 2:
71893 if (8 * sizeof(size_t) > 1 * PyLong_SHIFT30) {
71894 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71895 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(size_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (size_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71896 } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT30) {
71897 return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
71898 }
71899 }
71900 break;
71901 case 3:
71902 if (8 * sizeof(size_t) > 2 * PyLong_SHIFT30) {
71903 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71904 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(size_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (size_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71905 } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT30) {
71906 return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
71907 }
71908 }
71909 break;
71910 case 4:
71911 if (8 * sizeof(size_t) > 3 * PyLong_SHIFT30) {
71912 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71913 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(size_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (size_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (size_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (size_t) value; }
71914 } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT30) {
71915 return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
71916 }
71917 }
71918 break;
71919 }
71920#endif
71921#if CYTHON_COMPILING_IN_CPYTHON1
71922 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
71923 goto raise_neg_overflow;
71924 }
71925#else
71926 {
71927 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
71928 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
71929 return (size_t) -1;
71930 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
71931 goto raise_neg_overflow;
71932 }
71933#endif
71934 if (sizeof(size_t) <= sizeof(unsigned long)) {
71935 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
size_t) < sizeof(unsigned long)) { if (__builtin_expect(!!
(value != (unsigned long) (size_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (size_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (size_t) value; }
71936 } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
71937 __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(size_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (size_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(size_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71938 }
71939 } else {
71940#if CYTHON_USE_PYLONG_INTERNALS1
71941 const digit* digits = ((PyLongObject*)x)->ob_digit;
71942 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
71943 case 0: return (size_t) 0;
71944 case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(size_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
size_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(size_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71945 case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(size_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (size_t) value)
, 0)) { digit zero = 0; if (0 && __builtin_expect(!!(
value == (digit)-1 && PyErr_Occurred()), 0)) return (
size_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71946 case -2:
71947 if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT30) {
71948 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71949 __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(size_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (size_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (size_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71950 } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) {
71951 return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
71952 }
71953 }
71954 break;
71955 case 2:
71956 if (8 * sizeof(size_t) > 1 * PyLong_SHIFT30) {
71957 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
71958 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(size_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (size_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71959 } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) {
71960 return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
71961 }
71962 }
71963 break;
71964 case -3:
71965 if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT30) {
71966 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71967 __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(size_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (size_t) value), 0)) { long zero = 0; if (
0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (size_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (size_t) value; }
71968 } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) {
71969 return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
71970 }
71971 }
71972 break;
71973 case 3:
71974 if (8 * sizeof(size_t) > 2 * PyLong_SHIFT30) {
71975 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
71976 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(size_t) < sizeof(unsigned long)) {
if (__builtin_expect(!!(value != (unsigned long) (size_t) value
), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71977 } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) {
71978 return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
71979 }
71980 }
71981 break;
71982 case -4:
71983 if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT30) {
71984 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71985 __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(size_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (size_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
71986 } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT30) {
71987 return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
71988 }
71989 }
71990 break;
71991 case 4:
71992 if (8 * sizeof(size_t) > 3 * PyLong_SHIFT30) {
71993 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
71994 __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(size_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (size_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (size_t) -1
; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (size_t) value; }
71995 } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT30) {
71996 return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0])));
71997 }
71998 }
71999 break;
72000 }
72001#endif
72002 if (sizeof(size_t) <= sizeof(long)) {
72003 __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(size_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (size_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (size_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
72004 } else if (sizeof(size_t) <= sizeof(PY_LONG_LONGlong long)) {
72005 __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(size_t) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (size_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (size_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (size_t) value; }
72006 }
72007 }
72008 {
72009#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
72010 PyErr_SetString(PyExc_RuntimeError,
72011 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
72012#else
72013 size_t val;
72014 PyObject *v = __Pyx_PyNumber_Int(x);
72015 #if PY_MAJOR_VERSION2 < 3
72016 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
72017 PyObject *tmp = v;
72018 v = PyNumber_Long(tmp);
72019 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72020 }
72021 #endif
72022 if (likely(v)__builtin_expect(!!(v), 1)) {
72023 int one = 1; int is_little = (int)*(unsigned char *)&one;
72024 unsigned char *bytes = (unsigned char *)&val;
72025 int ret = _PyLong_AsByteArray((PyLongObject *)v,
72026 bytes, sizeof(val),
72027 is_little, !is_unsigned);
72028 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
72029 if (likely(!ret)__builtin_expect(!!(!ret), 1))
72030 return val;
72031 }
72032#endif
72033 return (size_t) -1;
72034 }
72035 } else {
72036 size_t val;
72037 PyObject *tmp = __Pyx_PyNumber_Int(x);
72038 if (!tmp) return (size_t) -1;
72039 val = __Pyx_PyInt_As_size_t(tmp);
72040 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72041 return val;
72042 }
72043raise_overflow:
72044 PyErr_SetString(PyExc_OverflowError,
72045 "value too large to convert to size_t");
72046 return (size_t) -1;
72047raise_neg_overflow:
72048 PyErr_SetString(PyExc_OverflowError,
72049 "can't convert negative value to size_t");
72050 return (size_t) -1;
72051}
72052
72053static CYTHON_INLINE__inline__ uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) {
72054 const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
72055 const int is_unsigned = neg_one > const_zero;
72056#if PY_MAJOR_VERSION2 < 3
72057 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
72058 if (sizeof(uint8_t) < sizeof(long)) {
72059 __PYX_VERIFY_RETURN_INT(uint8_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(uint8_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (uint8_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72060 } else {
72061 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
72062 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
72063 goto raise_neg_overflow;
72064 }
72065 return (uint8_t) val;
72066 }
72067 } else
72068#endif
72069 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
72070 if (is_unsigned) {
72071#if CYTHON_USE_PYLONG_INTERNALS1
72072 const digit* digits = ((PyLongObject*)x)->ob_digit;
72073 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72074 case 0: return (uint8_t) 0;
72075 case 1: __PYX_VERIFY_RETURN_INT(uint8_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(uint8_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (uint8_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
uint8_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72076 case 2:
72077 if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT30) {
72078 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72079 __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint8_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint8_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72080 } else if (8 * sizeof(uint8_t) >= 2 * PyLong_SHIFT30) {
72081 return (uint8_t) (((((uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0]));
72082 }
72083 }
72084 break;
72085 case 3:
72086 if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT30) {
72087 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72088 __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint8_t) < sizeof(unsigned long))
{ if (__builtin_expect(!!(value != (unsigned long) (uint8_t)
value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72089 } else if (8 * sizeof(uint8_t) >= 3 * PyLong_SHIFT30) {
72090 return (uint8_t) (((((((uint8_t)digits[2]) << PyLong_SHIFT30) | (uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0]));
72091 }
72092 }
72093 break;
72094 case 4:
72095 if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT30) {
72096 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72097 __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint8_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (uint8_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (uint8_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (uint8_t) value; }
72098 } else if (8 * sizeof(uint8_t) >= 4 * PyLong_SHIFT30) {
72099 return (uint8_t) (((((((((uint8_t)digits[3]) << PyLong_SHIFT30) | (uint8_t)digits[2]) << PyLong_SHIFT30) | (uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0]));
72100 }
72101 }
72102 break;
72103 }
72104#endif
72105#if CYTHON_COMPILING_IN_CPYTHON1
72106 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
72107 goto raise_neg_overflow;
72108 }
72109#else
72110 {
72111 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
72112 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
72113 return (uint8_t) -1;
72114 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
72115 goto raise_neg_overflow;
72116 }
72117#endif
72118 if (sizeof(uint8_t) <= sizeof(unsigned long)) {
72119 __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
uint8_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (uint8_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (uint8_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (uint8_t) value; }
72120 } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
72121 __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(uint8_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (uint8_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(uint8_t) -1; if (is_unsigned && __builtin_expect(!!
(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72122 }
72123 } else {
72124#if CYTHON_USE_PYLONG_INTERNALS1
72125 const digit* digits = ((PyLongObject*)x)->ob_digit;
72126 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72127 case 0: return (uint8_t) 0;
72128 case -1: __PYX_VERIFY_RETURN_INT(uint8_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(uint8_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
uint8_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(uint8_t) -1; if (is_unsigned && __builtin_expect(!!
(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72129 case 1: __PYX_VERIFY_RETURN_INT(uint8_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(uint8_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (uint8_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
uint8_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72130 case -2:
72131 if (8 * sizeof(uint8_t) - 1 > 1 * PyLong_SHIFT30) {
72132 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72133 __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint8_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint8_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint8_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72134 } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT30) {
72135 return (uint8_t) (((uint8_t)-1)*(((((uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0])));
72136 }
72137 }
72138 break;
72139 case 2:
72140 if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT30) {
72141 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72142 __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint8_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint8_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72143 } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT30) {
72144 return (uint8_t) ((((((uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0])));
72145 }
72146 }
72147 break;
72148 case -3:
72149 if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT30) {
72150 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72151 __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint8_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (uint8_t) value), 0)) { long zero = 0; if
(0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (uint8_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint8_t) value; }
72152 } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT30) {
72153 return (uint8_t) (((uint8_t)-1)*(((((((uint8_t)digits[2]) << PyLong_SHIFT30) | (uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0])));
72154 }
72155 }
72156 break;
72157 case 3:
72158 if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT30) {
72159 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72160 __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint8_t) < sizeof(unsigned long))
{ if (__builtin_expect(!!(value != (unsigned long) (uint8_t)
value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72161 } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT30) {
72162 return (uint8_t) ((((((((uint8_t)digits[2]) << PyLong_SHIFT30) | (uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0])));
72163 }
72164 }
72165 break;
72166 case -4:
72167 if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT30) {
72168 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72169 __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint8_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (uint8_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72170 } else if (8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT30) {
72171 return (uint8_t) (((uint8_t)-1)*(((((((((uint8_t)digits[3]) << PyLong_SHIFT30) | (uint8_t)digits[2]) << PyLong_SHIFT30) | (uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0])));
72172 }
72173 }
72174 break;
72175 case 4:
72176 if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT30) {
72177 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72178 __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint8_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (uint8_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (uint8_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (uint8_t) value; }
72179 } else if (8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT30) {
72180 return (uint8_t) ((((((((((uint8_t)digits[3]) << PyLong_SHIFT30) | (uint8_t)digits[2]) << PyLong_SHIFT30) | (uint8_t)digits[1]) << PyLong_SHIFT30) | (uint8_t)digits[0])));
72181 }
72182 }
72183 break;
72184 }
72185#endif
72186 if (sizeof(uint8_t) <= sizeof(long)) {
72187 __PYX_VERIFY_RETURN_INT_EXC(uint8_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(uint8_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint8_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint8_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72188 } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONGlong long)) {
72189 __PYX_VERIFY_RETURN_INT_EXC(uint8_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(uint8_t)
< sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (uint8_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (uint8_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint8_t) value; }
72190 }
72191 }
72192 {
72193#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
72194 PyErr_SetString(PyExc_RuntimeError,
72195 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
72196#else
72197 uint8_t val;
72198 PyObject *v = __Pyx_PyNumber_Int(x);
72199 #if PY_MAJOR_VERSION2 < 3
72200 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
72201 PyObject *tmp = v;
72202 v = PyNumber_Long(tmp);
72203 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72204 }
72205 #endif
72206 if (likely(v)__builtin_expect(!!(v), 1)) {
72207 int one = 1; int is_little = (int)*(unsigned char *)&one;
72208 unsigned char *bytes = (unsigned char *)&val;
72209 int ret = _PyLong_AsByteArray((PyLongObject *)v,
72210 bytes, sizeof(val),
72211 is_little, !is_unsigned);
72212 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
72213 if (likely(!ret)__builtin_expect(!!(!ret), 1))
72214 return val;
72215 }
72216#endif
72217 return (uint8_t) -1;
72218 }
72219 } else {
72220 uint8_t val;
72221 PyObject *tmp = __Pyx_PyNumber_Int(x);
72222 if (!tmp) return (uint8_t) -1;
72223 val = __Pyx_PyInt_As_uint8_t(tmp);
72224 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72225 return val;
72226 }
72227raise_overflow:
72228 PyErr_SetString(PyExc_OverflowError,
72229 "value too large to convert to uint8_t");
72230 return (uint8_t) -1;
72231raise_neg_overflow:
72232 PyErr_SetString(PyExc_OverflowError,
72233 "can't convert negative value to uint8_t");
72234 return (uint8_t) -1;
72235}
72236
72237static CYTHON_INLINE__inline__ uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
72238 const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
72239 const int is_unsigned = neg_one > const_zero;
72240#if PY_MAJOR_VERSION2 < 3
72241 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
72242 if (sizeof(uint32_t) < sizeof(long)) {
72243 __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(uint32_t) < sizeof(long)) { if (__builtin_expect(!!(value
!= (long) (uint32_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72244 } else {
72245 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
72246 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
72247 goto raise_neg_overflow;
72248 }
72249 return (uint32_t) val;
72250 }
72251 } else
72252#endif
72253 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
72254 if (is_unsigned) {
72255#if CYTHON_USE_PYLONG_INTERNALS1
72256 const digit* digits = ((PyLongObject*)x)->ob_digit;
72257 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72258 case 0: return (uint32_t) 0;
72259 case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(uint32_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (uint32_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
uint32_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72260 case 2:
72261 if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT30) {
72262 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72263 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint32_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint32_t) value), 0)) { unsigned long zero = 0; if (0
&& __builtin_expect(!!(value == (unsigned long)-1 &&
PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint32_t) value; }
72264 } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT30) {
72265 return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]));
72266 }
72267 }
72268 break;
72269 case 3:
72270 if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT30) {
72271 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72272 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint32_t) < sizeof(unsigned long)
) { if (__builtin_expect(!!(value != (unsigned long) (uint32_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint32_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72273 } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT30) {
72274 return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]));
72275 }
72276 }
72277 break;
72278 case 4:
72279 if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT30) {
72280 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72281 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint32_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint32_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72282 } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT30) {
72283 return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT30) | (uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0]));
72284 }
72285 }
72286 break;
72287 }
72288#endif
72289#if CYTHON_COMPILING_IN_CPYTHON1
72290 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
72291 goto raise_neg_overflow;
72292 }
72293#else
72294 {
72295 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
72296 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
72297 return (uint32_t) -1;
72298 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
72299 goto raise_neg_overflow;
72300 }
72301#endif
72302 if (sizeof(uint32_t) <= sizeof(unsigned long)) {
72303 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
uint32_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned
long zero = 0; if (1 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint32_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72304 } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
72305 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(uint32_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (uint32_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(uint32_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72306 }
72307 } else {
72308#if CYTHON_USE_PYLONG_INTERNALS1
72309 const digit* digits = ((PyLongObject*)x)->ob_digit;
72310 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72311 case 0: return (uint32_t) 0;
72312 case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(uint32_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
uint32_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(uint32_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72313 case 1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(uint32_t) < sizeof(
digit)) { if (__builtin_expect(!!(value != (digit) (uint32_t)
value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(uint32_t) -1; if (is_unsigned && __builtin_expect(!
!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72314 case -2:
72315 if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT30) {
72316 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72317 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint32_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint32_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint32_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72318 } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT30) {
72319 return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])));
72320 }
72321 }
72322 break;
72323 case 2:
72324 if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT30) {
72325 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72326 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(uint32_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (uint32_t) value), 0)) { unsigned long zero = 0; if (0
&& __builtin_expect(!!(value == (unsigned long)-1 &&
PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint32_t) value; }
72327 } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT30) {
72328 return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])));
72329 }
72330 }
72331 break;
72332 case -3:
72333 if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT30) {
72334 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72335 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint32_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (uint32_t) value), 0)) { long zero = 0; if
(0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint32_t) value; }
72336 } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT30) {
72337 return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])));
72338 }
72339 }
72340 break;
72341 case 3:
72342 if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT30) {
72343 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72344 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(uint32_t) < sizeof(unsigned long)
) { if (__builtin_expect(!!(value != (unsigned long) (uint32_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (uint32_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72345 } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT30) {
72346 return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])));
72347 }
72348 }
72349 break;
72350 case -4:
72351 if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT30) {
72352 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72353 __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint32_t) < sizeof(long)) { if (__builtin_expect(!!(value
!= (long) (uint32_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (uint32_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72354 } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT30) {
72355 return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT30) | (uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])));
72356 }
72357 }
72358 break;
72359 case 4:
72360 if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT30) {
72361 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72362 __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(uint32_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (uint32_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
uint32_t) -1; if (is_unsigned && __builtin_expect(!!(
value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72363 } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT30) {
72364 return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT30) | (uint32_t)digits[2]) << PyLong_SHIFT30) | (uint32_t)digits[1]) << PyLong_SHIFT30) | (uint32_t)digits[0])));
72365 }
72366 }
72367 break;
72368 }
72369#endif
72370 if (sizeof(uint32_t) <= sizeof(long)) {
72371 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(uint32_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (uint32_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (uint32_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (uint32_t) value; }
72372 } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONGlong long)) {
72373 __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(uint32_t
) < sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (uint32_t) value), 0)) { long long zero = 0; if (1
&& __builtin_expect(!!(value == (long long)-1 &&
PyErr_Occurred()), 0)) return (uint32_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (uint32_t) value; }
72374 }
72375 }
72376 {
72377#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
72378 PyErr_SetString(PyExc_RuntimeError,
72379 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
72380#else
72381 uint32_t val;
72382 PyObject *v = __Pyx_PyNumber_Int(x);
72383 #if PY_MAJOR_VERSION2 < 3
72384 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
72385 PyObject *tmp = v;
72386 v = PyNumber_Long(tmp);
72387 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72388 }
72389 #endif
72390 if (likely(v)__builtin_expect(!!(v), 1)) {
72391 int one = 1; int is_little = (int)*(unsigned char *)&one;
72392 unsigned char *bytes = (unsigned char *)&val;
72393 int ret = _PyLong_AsByteArray((PyLongObject *)v,
72394 bytes, sizeof(val),
72395 is_little, !is_unsigned);
72396 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
72397 if (likely(!ret)__builtin_expect(!!(!ret), 1))
72398 return val;
72399 }
72400#endif
72401 return (uint32_t) -1;
72402 }
72403 } else {
72404 uint32_t val;
72405 PyObject *tmp = __Pyx_PyNumber_Int(x);
72406 if (!tmp) return (uint32_t) -1;
72407 val = __Pyx_PyInt_As_uint32_t(tmp);
72408 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72409 return val;
72410 }
72411raise_overflow:
72412 PyErr_SetString(PyExc_OverflowError,
72413 "value too large to convert to uint32_t");
72414 return (uint32_t) -1;
72415raise_neg_overflow:
72416 PyErr_SetString(PyExc_OverflowError,
72417 "can't convert negative value to uint32_t");
72418 return (uint32_t) -1;
72419}
72420
72421static CYTHON_INLINE__inline__ int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
72422 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
72423 const int is_unsigned = neg_one > const_zero;
72424#if PY_MAJOR_VERSION2 < 3
72425 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
72426 if (sizeof(int64_t) < sizeof(long)) {
72427 __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(int64_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (int64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72428 } else {
72429 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
72430 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
72431 goto raise_neg_overflow;
72432 }
72433 return (int64_t) val;
72434 }
72435 } else
72436#endif
72437 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
72438 if (is_unsigned) {
72439#if CYTHON_USE_PYLONG_INTERNALS1
72440 const digit* digits = ((PyLongObject*)x)->ob_digit;
72441 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72442 case 0: return (int64_t) 0;
72443 case 1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(int64_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (int64_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
int64_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72444 case 2:
72445 if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT30) {
72446 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72447 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int64_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72448 } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT30) {
72449 return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]));
72450 }
72451 }
72452 break;
72453 case 3:
72454 if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT30) {
72455 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72456 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int64_t) < sizeof(unsigned long))
{ if (__builtin_expect(!!(value != (unsigned long) (int64_t)
value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72457 } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT30) {
72458 return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]));
72459 }
72460 }
72461 break;
72462 case 4:
72463 if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT30) {
72464 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72465 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int64_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (int64_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (int64_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int64_t) value; }
72466 } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT30) {
72467 return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT30) | (int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0]));
72468 }
72469 }
72470 break;
72471 }
72472#endif
72473#if CYTHON_COMPILING_IN_CPYTHON1
72474 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
72475 goto raise_neg_overflow;
72476 }
72477#else
72478 {
72479 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
72480 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
72481 return (int64_t) -1;
72482 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
72483 goto raise_neg_overflow;
72484 }
72485#endif
72486 if (sizeof(int64_t) <= sizeof(unsigned long)) {
72487 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
int64_t) < sizeof(unsigned long)) { if (__builtin_expect(!
!(value != (unsigned long) (int64_t) value), 0)) { unsigned long
zero = 0; if (1 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (int64_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int64_t) value; }
72488 } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
72489 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(int64_t) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (int64_t) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(int64_t) -1; if (is_unsigned && __builtin_expect(!!
(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72490 }
72491 } else {
72492#if CYTHON_USE_PYLONG_INTERNALS1
72493 const digit* digits = ((PyLongObject*)x)->ob_digit;
72494 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72495 case 0: return (int64_t) 0;
72496 case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(int64_t) <
sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (
int64_t) value), 0)) { sdigit zero = 0; if (0 && __builtin_expect
(!!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(int64_t) -1; if (is_unsigned && __builtin_expect(!!
(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72497 case 1: __PYX_VERIFY_RETURN_INT(int64_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(int64_t) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (int64_t) value
), 0)) { digit zero = 0; if (0 && __builtin_expect(!!
(value == (digit)-1 && PyErr_Occurred()), 0)) return (
int64_t) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72498 case -2:
72499 if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT30) {
72500 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72501 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (int64_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (int64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72502 } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) {
72503 return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
72504 }
72505 }
72506 break;
72507 case 2:
72508 if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT30) {
72509 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72510 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(int64_t) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (int64_t) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72511 } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) {
72512 return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
72513 }
72514 }
72515 break;
72516 case -3:
72517 if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT30) {
72518 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72519 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int64_t) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (int64_t) value), 0)) { long zero = 0; if
(0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (int64_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (int64_t) value; }
72520 } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) {
72521 return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
72522 }
72523 }
72524 break;
72525 case 3:
72526 if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT30) {
72527 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72528 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(int64_t) < sizeof(unsigned long))
{ if (__builtin_expect(!!(value != (unsigned long) (int64_t)
value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72529 } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) {
72530 return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
72531 }
72532 }
72533 break;
72534 case -4:
72535 if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT30) {
72536 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72537 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int64_t) < sizeof(long)) { if (__builtin_expect(!!(value !=
(long) (int64_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72538 } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT30) {
72539 return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT30) | (int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
72540 }
72541 }
72542 break;
72543 case 4:
72544 if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT30) {
72545 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72546 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(int64_t) < sizeof(unsigned long)) { if (__builtin_expect(
!!(value != (unsigned long) (int64_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (int64_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (int64_t) value; }
72547 } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT30) {
72548 return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT30) | (int64_t)digits[2]) << PyLong_SHIFT30) | (int64_t)digits[1]) << PyLong_SHIFT30) | (int64_t)digits[0])));
72549 }
72550 }
72551 break;
72552 }
72553#endif
72554 if (sizeof(int64_t) <= sizeof(long)) {
72555 __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(int64_t) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (int64_t) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (int64_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72556 } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONGlong long)) {
72557 __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(int64_t)
< sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (int64_t) value), 0)) { long long zero = 0; if (1 &&
__builtin_expect(!!(value == (long long)-1 && PyErr_Occurred
()), 0)) return (int64_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (int64_t) value; }
72558 }
72559 }
72560 {
72561#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
72562 PyErr_SetString(PyExc_RuntimeError,
72563 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
72564#else
72565 int64_t val;
72566 PyObject *v = __Pyx_PyNumber_Int(x);
72567 #if PY_MAJOR_VERSION2 < 3
72568 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
72569 PyObject *tmp = v;
72570 v = PyNumber_Long(tmp);
72571 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72572 }
72573 #endif
72574 if (likely(v)__builtin_expect(!!(v), 1)) {
72575 int one = 1; int is_little = (int)*(unsigned char *)&one;
72576 unsigned char *bytes = (unsigned char *)&val;
72577 int ret = _PyLong_AsByteArray((PyLongObject *)v,
72578 bytes, sizeof(val),
72579 is_little, !is_unsigned);
72580 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
72581 if (likely(!ret)__builtin_expect(!!(!ret), 1))
72582 return val;
72583 }
72584#endif
72585 return (int64_t) -1;
72586 }
72587 } else {
72588 int64_t val;
72589 PyObject *tmp = __Pyx_PyNumber_Int(x);
72590 if (!tmp) return (int64_t) -1;
72591 val = __Pyx_PyInt_As_int64_t(tmp);
72592 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72593 return val;
72594 }
72595raise_overflow:
72596 PyErr_SetString(PyExc_OverflowError,
72597 "value too large to convert to int64_t");
72598 return (int64_t) -1;
72599raise_neg_overflow:
72600 PyErr_SetString(PyExc_OverflowError,
72601 "can't convert negative value to int64_t");
72602 return (int64_t) -1;
72603}
72604
72605static CYTHON_INLINE__inline__ int __Pyx_ErrOccurredWithGIL(void) {
72606 int err;
72607 #ifdef WITH_THREAD1
72608 PyGILState_STATE _save = PyGILState_Ensure();
72609 #endif
72610 err = !!PyErr_Occurred();
72611 #ifdef WITH_THREAD1
72612 PyGILState_Release(_save);
72613 #endif
72614 return err;
72615}
72616
72617static CYTHON_INLINE__inline__ rbd_lock_mode_t __Pyx_PyInt_As_rbd_lock_mode_t(PyObject *x) {
72618 const rbd_lock_mode_t neg_one = (rbd_lock_mode_t) -1, const_zero = (rbd_lock_mode_t) 0;
72619 const int is_unsigned = neg_one > const_zero;
72620#if PY_MAJOR_VERSION2 < 3
72621 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
72622 if (sizeof(rbd_lock_mode_t) < sizeof(long)) {
72623 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(rbd_lock_mode_t) < sizeof(long)) { if (__builtin_expect(!
!(value != (long) (rbd_lock_mode_t) value), 0)) { long zero =
0; if (0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (rbd_lock_mode_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_lock_mode_t) value
; }
72624 } else {
72625 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
72626 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
72627 goto raise_neg_overflow;
72628 }
72629 return (rbd_lock_mode_t) val;
72630 }
72631 } else
72632#endif
72633 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
72634 if (is_unsigned) {
72635#if CYTHON_USE_PYLONG_INTERNALS1
72636 const digit* digits = ((PyLongObject*)x)->ob_digit;
72637 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72638 case 0: return (rbd_lock_mode_t) 0;
72639 case 1: __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, digit, digits[0]){ digit value = digits[0]; if (sizeof(rbd_lock_mode_t) < sizeof
(digit)) { if (__builtin_expect(!!(value != (digit) (rbd_lock_mode_t
) value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72640 case 2:
72641 if (8 * sizeof(rbd_lock_mode_t) > 1 * PyLong_SHIFT30) {
72642 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72643 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(rbd_lock_mode_t
) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (rbd_lock_mode_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (rbd_lock_mode_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72644 } else if (8 * sizeof(rbd_lock_mode_t) >= 2 * PyLong_SHIFT30) {
72645 return (rbd_lock_mode_t) (((((rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0]));
72646 }
72647 }
72648 break;
72649 case 3:
72650 if (8 * sizeof(rbd_lock_mode_t) > 2 * PyLong_SHIFT30) {
72651 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72652 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(rbd_lock_mode_t) < sizeof(unsigned
long)) { if (__builtin_expect(!!(value != (unsigned long) (rbd_lock_mode_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72653 } else if (8 * sizeof(rbd_lock_mode_t) >= 3 * PyLong_SHIFT30) {
72654 return (rbd_lock_mode_t) (((((((rbd_lock_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0]));
72655 }
72656 }
72657 break;
72658 case 4:
72659 if (8 * sizeof(rbd_lock_mode_t) > 3 * PyLong_SHIFT30) {
72660 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72661 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(rbd_lock_mode_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (rbd_lock_mode_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72662 } else if (8 * sizeof(rbd_lock_mode_t) >= 4 * PyLong_SHIFT30) {
72663 return (rbd_lock_mode_t) (((((((((rbd_lock_mode_t)digits[3]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0]));
72664 }
72665 }
72666 break;
72667 }
72668#endif
72669#if CYTHON_COMPILING_IN_CPYTHON1
72670 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
72671 goto raise_neg_overflow;
72672 }
72673#else
72674 {
72675 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
72676 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
72677 return (rbd_lock_mode_t) -1;
72678 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
72679 goto raise_neg_overflow;
72680 }
72681#endif
72682 if (sizeof(rbd_lock_mode_t) <= sizeof(unsigned long)) {
72683 __PYX_VERIFY_RETURN_INT_EXC(rbd_lock_mode_t, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
rbd_lock_mode_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (rbd_lock_mode_t) value), 0)) { unsigned
long zero = 0; if (1 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72684 } else if (sizeof(rbd_lock_mode_t) <= sizeof(unsigned PY_LONG_LONGlong long)) {
72685 __PYX_VERIFY_RETURN_INT_EXC(rbd_lock_mode_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(rbd_lock_mode_t) < sizeof(unsigned long long)) { if
(__builtin_expect(!!(value != (unsigned long long) (rbd_lock_mode_t
) value), 0)) { unsigned long long zero = 0; if (1 &&
__builtin_expect(!!(value == (unsigned long long)-1 &&
PyErr_Occurred()), 0)) return (rbd_lock_mode_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_lock_mode_t) value
; }
72686 }
72687 } else {
72688#if CYTHON_USE_PYLONG_INTERNALS1
72689 const digit* digits = ((PyLongObject*)x)->ob_digit;
72690 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72691 case 0: return (rbd_lock_mode_t) 0;
72692 case -1: __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(rbd_lock_mode_t
) < sizeof(sdigit)) { if (__builtin_expect(!!(value != (sdigit
) (rbd_lock_mode_t) value), 0)) { sdigit zero = 0; if (0 &&
__builtin_expect(!!(value == (sdigit)-1 && PyErr_Occurred
()), 0)) return (rbd_lock_mode_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_lock_mode_t) value
; }
72693 case 1: __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(rbd_lock_mode_t) < sizeof
(digit)) { if (__builtin_expect(!!(value != (digit) (rbd_lock_mode_t
) value), 0)) { digit zero = 0; if (0 && __builtin_expect
(!!(value == (digit)-1 && PyErr_Occurred()), 0)) return
(rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72694 case -2:
72695 if (8 * sizeof(rbd_lock_mode_t) - 1 > 1 * PyLong_SHIFT30) {
72696 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72697 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(rbd_lock_mode_t
) < sizeof(long)) { if (__builtin_expect(!!(value != (long
) (rbd_lock_mode_t) value), 0)) { long zero = 0; if (0 &&
__builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (rbd_lock_mode_t) -1; if (is_unsigned &&
__builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_lock_mode_t) value
; }
72698 } else if (8 * sizeof(rbd_lock_mode_t) - 1 > 2 * PyLong_SHIFT30) {
72699 return (rbd_lock_mode_t) (((rbd_lock_mode_t)-1)*(((((rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0])));
72700 }
72701 }
72702 break;
72703 case 2:
72704 if (8 * sizeof(rbd_lock_mode_t) > 1 * PyLong_SHIFT30) {
72705 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72706 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(rbd_lock_mode_t
) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (rbd_lock_mode_t) value), 0)) { unsigned long
zero = 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (rbd_lock_mode_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72707 } else if (8 * sizeof(rbd_lock_mode_t) - 1 > 2 * PyLong_SHIFT30) {
72708 return (rbd_lock_mode_t) ((((((rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0])));
72709 }
72710 }
72711 break;
72712 case -3:
72713 if (8 * sizeof(rbd_lock_mode_t) - 1 > 2 * PyLong_SHIFT30) {
72714 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72715 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(rbd_lock_mode_t) < sizeof(long)) {
if (__builtin_expect(!!(value != (long) (rbd_lock_mode_t) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (rbd_lock_mode_t
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72716 } else if (8 * sizeof(rbd_lock_mode_t) - 1 > 3 * PyLong_SHIFT30) {
72717 return (rbd_lock_mode_t) (((rbd_lock_mode_t)-1)*(((((((rbd_lock_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0])));
72718 }
72719 }
72720 break;
72721 case 3:
72722 if (8 * sizeof(rbd_lock_mode_t) > 2 * PyLong_SHIFT30) {
72723 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72724 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(rbd_lock_mode_t) < sizeof(unsigned
long)) { if (__builtin_expect(!!(value != (unsigned long) (rbd_lock_mode_t
) value), 0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72725 } else if (8 * sizeof(rbd_lock_mode_t) - 1 > 3 * PyLong_SHIFT30) {
72726 return (rbd_lock_mode_t) ((((((((rbd_lock_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0])));
72727 }
72728 }
72729 break;
72730 case -4:
72731 if (8 * sizeof(rbd_lock_mode_t) - 1 > 3 * PyLong_SHIFT30) {
72732 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72733 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(rbd_lock_mode_t) < sizeof(long)) { if (__builtin_expect(!
!(value != (long) (rbd_lock_mode_t) value), 0)) { long zero =
0; if (0 && __builtin_expect(!!(value == (long)-1 &&
PyErr_Occurred()), 0)) return (rbd_lock_mode_t) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (rbd_lock_mode_t) value
; }
72734 } else if (8 * sizeof(rbd_lock_mode_t) - 1 > 4 * PyLong_SHIFT30) {
72735 return (rbd_lock_mode_t) (((rbd_lock_mode_t)-1)*(((((((((rbd_lock_mode_t)digits[3]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0])));
72736 }
72737 }
72738 break;
72739 case 4:
72740 if (8 * sizeof(rbd_lock_mode_t) > 3 * PyLong_SHIFT30) {
72741 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72742 __PYX_VERIFY_RETURN_INT(rbd_lock_mode_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(rbd_lock_mode_t) < sizeof(unsigned long)) { if (__builtin_expect
(!!(value != (unsigned long) (rbd_lock_mode_t) value), 0)) { unsigned
long zero = 0; if (0 && __builtin_expect(!!(value ==
(unsigned long)-1 && PyErr_Occurred()), 0)) return (
rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72743 } else if (8 * sizeof(rbd_lock_mode_t) - 1 > 4 * PyLong_SHIFT30) {
72744 return (rbd_lock_mode_t) ((((((((((rbd_lock_mode_t)digits[3]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[2]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[1]) << PyLong_SHIFT30) | (rbd_lock_mode_t)digits[0])));
72745 }
72746 }
72747 break;
72748 }
72749#endif
72750 if (sizeof(rbd_lock_mode_t) <= sizeof(long)) {
72751 __PYX_VERIFY_RETURN_INT_EXC(rbd_lock_mode_t, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(rbd_lock_mode_t) <
sizeof(long)) { if (__builtin_expect(!!(value != (long) (rbd_lock_mode_t
) value), 0)) { long zero = 0; if (1 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(rbd_lock_mode_t) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (rbd_lock_mode_t) value; }
72752 } else if (sizeof(rbd_lock_mode_t) <= sizeof(PY_LONG_LONGlong long)) {
72753 __PYX_VERIFY_RETURN_INT_EXC(rbd_lock_mode_t, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(rbd_lock_mode_t
) < sizeof(long long)) { if (__builtin_expect(!!(value != (
long long) (rbd_lock_mode_t) value), 0)) { long long zero = 0
; if (1 && __builtin_expect(!!(value == (long long)-1
&& PyErr_Occurred()), 0)) return (rbd_lock_mode_t) -
1; if (is_unsigned && __builtin_expect(!!(value < zero
), 0)) goto raise_neg_overflow; else goto raise_overflow; } }
return (rbd_lock_mode_t) value; }
72754 }
72755 }
72756 {
72757#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
72758 PyErr_SetString(PyExc_RuntimeError,
72759 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
72760#else
72761 rbd_lock_mode_t val;
72762 PyObject *v = __Pyx_PyNumber_Int(x);
72763 #if PY_MAJOR_VERSION2 < 3
72764 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
72765 PyObject *tmp = v;
72766 v = PyNumber_Long(tmp);
72767 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72768 }
72769 #endif
72770 if (likely(v)__builtin_expect(!!(v), 1)) {
72771 int one = 1; int is_little = (int)*(unsigned char *)&one;
72772 unsigned char *bytes = (unsigned char *)&val;
72773 int ret = _PyLong_AsByteArray((PyLongObject *)v,
72774 bytes, sizeof(val),
72775 is_little, !is_unsigned);
72776 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
72777 if (likely(!ret)__builtin_expect(!!(!ret), 1))
72778 return val;
72779 }
72780#endif
72781 return (rbd_lock_mode_t) -1;
72782 }
72783 } else {
72784 rbd_lock_mode_t val;
72785 PyObject *tmp = __Pyx_PyNumber_Int(x);
72786 if (!tmp) return (rbd_lock_mode_t) -1;
72787 val = __Pyx_PyInt_As_rbd_lock_mode_t(tmp);
72788 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72789 return val;
72790 }
72791raise_overflow:
72792 PyErr_SetString(PyExc_OverflowError,
72793 "value too large to convert to rbd_lock_mode_t");
72794 return (rbd_lock_mode_t) -1;
72795raise_neg_overflow:
72796 PyErr_SetString(PyExc_OverflowError,
72797 "can't convert negative value to rbd_lock_mode_t");
72798 return (rbd_lock_mode_t) -1;
72799}
72800
72801static CYTHON_INLINE__inline__ long __Pyx_PyInt_As_long(PyObject *x) {
72802 const long neg_one = (long) -1, const_zero = (long) 0;
72803 const int is_unsigned = neg_one > const_zero;
72804#if PY_MAJOR_VERSION2 < 3
72805 if (likely(PyInt_Check(x))__builtin_expect(!!(((((x)->ob_type)->tp_flags & ((
1L<<23))) != 0)), 1)
) {
72806 if (sizeof(long) < sizeof(long)) {
72807 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)){ long value = (((PyIntObject *)(x))->ob_ival); if (sizeof
(long) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (long) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72808 } else {
72809 long val = PyInt_AS_LONG(x)(((PyIntObject *)(x))->ob_ival);
72810 if (is_unsigned && unlikely(val < 0)__builtin_expect(!!(val < 0), 0)) {
72811 goto raise_neg_overflow;
72812 }
72813 return (long) val;
72814 }
72815 } else
72816#endif
72817 if (likely(PyLong_Check(x))__builtin_expect(!!(((((((PyObject*)(x))->ob_type))->tp_flags
& ((1L<<24))) != 0)), 1)
) {
72818 if (is_unsigned) {
72819#if CYTHON_USE_PYLONG_INTERNALS1
72820 const digit* digits = ((PyLongObject*)x)->ob_digit;
72821 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72822 case 0: return (long) 0;
72823 case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]){ digit value = digits[0]; if (sizeof(long) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (long) value), 0
)) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (long)
-1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72824 case 2:
72825 if (8 * sizeof(long) > 1 * PyLong_SHIFT30) {
72826 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72827 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(long) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (long) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72828 } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT30) {
72829 return (long) (((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]));
72830 }
72831 }
72832 break;
72833 case 3:
72834 if (8 * sizeof(long) > 2 * PyLong_SHIFT30) {
72835 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72836 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(long) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (long) value),
0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72837 } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT30) {
72838 return (long) (((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]));
72839 }
72840 }
72841 break;
72842 case 4:
72843 if (8 * sizeof(long) > 3 * PyLong_SHIFT30) {
72844 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72845 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(long) < sizeof(unsigned long)) { if (__builtin_expect(!!(
value != (unsigned long) (long) value), 0)) { unsigned long zero
= 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (long) -1; if
(is_unsigned && __builtin_expect(!!(value < zero)
, 0)) goto raise_neg_overflow; else goto raise_overflow; } } return
(long) value; }
72846 } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT30) {
72847 return (long) (((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0]));
72848 }
72849 }
72850 break;
72851 }
72852#endif
72853#if CYTHON_COMPILING_IN_CPYTHON1
72854 if (unlikely(Py_SIZE(x) < 0)__builtin_expect(!!((((PyVarObject*)(x))->ob_size) < 0)
, 0)
) {
72855 goto raise_neg_overflow;
72856 }
72857#else
72858 {
72859 int result = PyObject_RichCompareBool(x, Py_False((PyObject *) &_Py_ZeroStruct), Py_LT0);
72860 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0))
72861 return (long) -1;
72862 if (unlikely(result == 1)__builtin_expect(!!(result == 1), 0))
72863 goto raise_neg_overflow;
72864 }
72865#endif
72866 if (sizeof(long) <= sizeof(unsigned long)) {
72867 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)){ unsigned long value = PyLong_AsUnsignedLong(x); if (sizeof(
long) < sizeof(unsigned long)) { if (__builtin_expect(!!(value
!= (unsigned long) (long) value), 0)) { unsigned long zero =
0; if (1 && __builtin_expect(!!(value == (unsigned long
)-1 && PyErr_Occurred()), 0)) return (long) -1; if (is_unsigned
&& __builtin_expect(!!(value < zero), 0)) goto raise_neg_overflow
; else goto raise_overflow; } } return (long) value; }
72868 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONGlong long)) {
72869 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)){ unsigned long long value = PyLong_AsUnsignedLongLong(x); if
(sizeof(long) < sizeof(unsigned long long)) { if (__builtin_expect
(!!(value != (unsigned long long) (long) value), 0)) { unsigned
long long zero = 0; if (1 && __builtin_expect(!!(value
== (unsigned long long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72870 }
72871 } else {
72872#if CYTHON_USE_PYLONG_INTERNALS1
72873 const digit* digits = ((PyLongObject*)x)->ob_digit;
72874 switch (Py_SIZE(x)(((PyVarObject*)(x))->ob_size)) {
72875 case 0: return (long) 0;
72876 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]){ sdigit value = -(sdigit) digits[0]; if (sizeof(long) < sizeof
(sdigit)) { if (__builtin_expect(!!(value != (sdigit) (long) value
), 0)) { sdigit zero = 0; if (0 && __builtin_expect(!
!(value == (sdigit)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72877 case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]){ digit value = +digits[0]; if (sizeof(long) < sizeof(digit
)) { if (__builtin_expect(!!(value != (digit) (long) value), 0
)) { digit zero = 0; if (0 && __builtin_expect(!!(value
== (digit)-1 && PyErr_Occurred()), 0)) return (long)
-1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72878 case -2:
72879 if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT30) {
72880 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72881 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(long) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (long) value
), 0)) { long zero = 0; if (0 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (long
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72882 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) {
72883 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
72884 }
72885 }
72886 break;
72887 case 2:
72888 if (8 * sizeof(long) > 1 * PyLong_SHIFT30) {
72889 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT30) {
72890 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((unsigned long)digits[1]) <<
30) | (unsigned long)digits[0])); if (sizeof(long) < sizeof
(unsigned long)) { if (__builtin_expect(!!(value != (unsigned
long) (long) value), 0)) { unsigned long zero = 0; if (0 &&
__builtin_expect(!!(value == (unsigned long)-1 && PyErr_Occurred
()), 0)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72891 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) {
72892 return (long) ((((((long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
72893 }
72894 }
72895 break;
72896 case -3:
72897 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT30) {
72898 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72899 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(long) < sizeof(long)) { if (__builtin_expect
(!!(value != (long) (long) value), 0)) { long zero = 0; if (0
&& __builtin_expect(!!(value == (long)-1 && PyErr_Occurred
()), 0)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72900 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) {
72901 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
72902 }
72903 }
72904 break;
72905 case 3:
72906 if (8 * sizeof(long) > 2 * PyLong_SHIFT30) {
72907 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT30) {
72908 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((unsigned long)digits[2]) <<
30) | (unsigned long)digits[1]) << 30) | (unsigned long
)digits[0])); if (sizeof(long) < sizeof(unsigned long)) { if
(__builtin_expect(!!(value != (unsigned long) (long) value),
0)) { unsigned long zero = 0; if (0 && __builtin_expect
(!!(value == (unsigned long)-1 && PyErr_Occurred()), 0
)) return (long) -1; if (is_unsigned && __builtin_expect
(!!(value < zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72909 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) {
72910 return (long) ((((((((long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
72911 }
72912 }
72913 break;
72914 case -4:
72915 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT30) {
72916 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72917 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ long value = -(long) (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(long) < sizeof(long)) { if (__builtin_expect(!!(value != (
long) (long) value), 0)) { long zero = 0; if (0 && __builtin_expect
(!!(value == (long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72918 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) {
72919 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
72920 }
72921 }
72922 break;
72923 case 4:
72924 if (8 * sizeof(long) > 3 * PyLong_SHIFT30) {
72925 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT30) {
72926 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))){ unsigned long value = (((((((((unsigned long)digits[3]) <<
30) | (unsigned long)digits[2]) << 30) | (unsigned long
)digits[1]) << 30) | (unsigned long)digits[0])); if (sizeof
(long) < sizeof(unsigned long)) { if (__builtin_expect(!!(
value != (unsigned long) (long) value), 0)) { unsigned long zero
= 0; if (0 && __builtin_expect(!!(value == (unsigned
long)-1 && PyErr_Occurred()), 0)) return (long) -1; if
(is_unsigned && __builtin_expect(!!(value < zero)
, 0)) goto raise_neg_overflow; else goto raise_overflow; } } return
(long) value; }
72927 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT30) {
72928 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT30) | (long)digits[2]) << PyLong_SHIFT30) | (long)digits[1]) << PyLong_SHIFT30) | (long)digits[0])));
72929 }
72930 }
72931 break;
72932 }
72933#endif
72934 if (sizeof(long) <= sizeof(long)) {
72935 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)){ long value = PyLong_AsLong(x); if (sizeof(long) < sizeof
(long)) { if (__builtin_expect(!!(value != (long) (long) value
), 0)) { long zero = 0; if (1 && __builtin_expect(!!(
value == (long)-1 && PyErr_Occurred()), 0)) return (long
) -1; if (is_unsigned && __builtin_expect(!!(value <
zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72936 } else if (sizeof(long) <= sizeof(PY_LONG_LONGlong long)) {
72937 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)){ long long value = PyLong_AsLongLong(x); if (sizeof(long) <
sizeof(long long)) { if (__builtin_expect(!!(value != (long long
) (long) value), 0)) { long long zero = 0; if (1 && __builtin_expect
(!!(value == (long long)-1 && PyErr_Occurred()), 0)) return
(long) -1; if (is_unsigned && __builtin_expect(!!(value
< zero), 0)) goto raise_neg_overflow; else goto raise_overflow
; } } return (long) value; }
72938 }
72939 }
72940 {
72941#if CYTHON_COMPILING_IN_PYPY0 && !defined(_PyLong_AsByteArray)
72942 PyErr_SetString(PyExc_RuntimeError,
72943 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
72944#else
72945 long val;
72946 PyObject *v = __Pyx_PyNumber_Int(x);
72947 #if PY_MAJOR_VERSION2 < 3
72948 if (likely(v)__builtin_expect(!!(v), 1) && !PyLong_Check(v)((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
72949 PyObject *tmp = v;
72950 v = PyNumber_Long(tmp);
72951 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72952 }
72953 #endif
72954 if (likely(v)__builtin_expect(!!(v), 1)) {
72955 int one = 1; int is_little = (int)*(unsigned char *)&one;
72956 unsigned char *bytes = (unsigned char *)&val;
72957 int ret = _PyLong_AsByteArray((PyLongObject *)v,
72958 bytes, sizeof(val),
72959 is_little, !is_unsigned);
72960 Py_DECREF(v)do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(v)))); } while (0)
;
72961 if (likely(!ret)__builtin_expect(!!(!ret), 1))
72962 return val;
72963 }
72964#endif
72965 return (long) -1;
72966 }
72967 } else {
72968 long val;
72969 PyObject *tmp = __Pyx_PyNumber_Int(x);
72970 if (!tmp) return (long) -1;
72971 val = __Pyx_PyInt_As_long(tmp);
72972 Py_DECREF(tmp)do { if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(tmp)))); } while (0)
;
72973 return val;
72974 }
72975raise_overflow:
72976 PyErr_SetString(PyExc_OverflowError,
72977 "value too large to convert to long");
72978 return (long) -1;
72979raise_neg_overflow:
72980 PyErr_SetString(PyExc_OverflowError,
72981 "can't convert negative value to long");
72982 return (long) -1;
72983}
72984
72985static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
72986 PyObject *method, *result = NULL((void*)0);
72987 method = __Pyx_PyObject_GetAttrStr(obj, method_name);
72988 if (unlikely(!method)__builtin_expect(!!(!method), 0)) goto bad;
72989#if CYTHON_COMPILING_IN_CPYTHON1
72990 if (likely(PyMethod_Check(method))__builtin_expect(!!(((method)->ob_type == &PyMethod_Type
)), 1)
) {
72991 PyObject *self = PyMethod_GET_SELF(method)(((PyMethodObject *)method) -> im_self);
72992 if (likely(self)__builtin_expect(!!(self), 1)) {
72993 PyObject *args;
72994 PyObject *function = PyMethod_GET_FUNCTION(method)(((PyMethodObject *)method) -> im_func);
72995 args = PyTuple_New(2);
72996 if (unlikely(!args)__builtin_expect(!!(!args), 0)) goto bad;
72997 Py_INCREF(self)( ((PyObject*)(self))->ob_refcnt++);
72998 PyTuple_SET_ITEM(args, 0, self)(((PyTupleObject *)(args))->ob_item[0] = self);
72999 Py_INCREF(arg)( ((PyObject*)(arg))->ob_refcnt++);
73000 PyTuple_SET_ITEM(args, 1, arg)(((PyTupleObject *)(args))->ob_item[1] = arg);
73001 Py_INCREF(function)( ((PyObject*)(function))->ob_refcnt++);
73002 Py_DECREF(method)do { if ( --((PyObject*)(method))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(method)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(method)))); } while (0)
; method = NULL((void*)0);
73003 result = __Pyx_PyObject_Call(function, args, NULL((void*)0));
73004 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
73005 Py_DECREF(function)do { if ( --((PyObject*)(function))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(function)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(function)))); } while (
0)
;
73006 return result;
73007 }
73008 }
73009#endif
73010 result = __Pyx_PyObject_CallOneArg(method, arg);
73011bad:
73012 Py_XDECREF(method)do { if ((method) == ((void*)0)) ; else do { if ( --((PyObject
*)(method))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(method)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(method)))); } while (0); } while (0)
;
73013 return result;
73014}
73015
73016#include <structmember.h>
73017#include <frameobject.h>
73018static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
73019static PyObject *__Pyx_Coroutine_Close(PyObject *self);
73020static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
73021#define __Pyx_Coroutine_Undelegate(gen)do { if ((gen)->yieldfrom) { PyObject *_py_tmp = (PyObject
*)((gen)->yieldfrom); ((gen)->yieldfrom) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
Py_CLEAR((gen)->yieldfrom)do { if ((gen)->yieldfrom) { PyObject *_py_tmp = (PyObject
*)((gen)->yieldfrom); ((gen)->yieldfrom) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
73022#if 1 || PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030300B0
73023static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
73024 PyObject *et, *ev, *tb;
73025 PyObject *value = NULL((void*)0);
73026 __Pyx_ErrFetch(&et, &ev, &tb);
73027 if (!et) {
73028 Py_XDECREF(tb)do { if ((tb) == ((void*)0)) ; else do { if ( --((PyObject*)(
tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(tb)))); } while (0); } while (0)
;
73029 Py_XDECREF(ev)do { if ((ev) == ((void*)0)) ; else do { if ( --((PyObject*)(
ev))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(ev)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(ev)))); } while (0); } while (0)
;
73030 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
73031 *pvalue = Py_None(&_Py_NoneStruct);
73032 return 0;
73033 }
73034 if (likely(et == PyExc_StopIteration)__builtin_expect(!!(et == PyExc_StopIteration), 1)) {
73035#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030300A0
73036 if (ev && Py_TYPE(ev)(((PyObject*)(ev))->ob_type) == (PyTypeObject*)PyExc_StopIteration) {
73037 value = ((PyStopIterationObject *)ev)->value;
73038 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
73039 Py_DECREF(ev)do { if ( --((PyObject*)(ev))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ev)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ev)))); } while (0)
;
73040 Py_XDECREF(tb)do { if ((tb) == ((void*)0)) ; else do { if ( --((PyObject*)(
tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(tb)))); } while (0); } while (0)
;
73041 Py_DECREF(et)do { if ( --((PyObject*)(et))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(et)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(et)))); } while (0)
;
73042 *pvalue = value;
73043 return 0;
73044 }
73045#endif
73046 if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)((((PyObject*)(ev))->ob_type) == ((PyTypeObject*)PyExc_StopIteration
) || PyType_IsSubtype((((PyObject*)(ev))->ob_type), ((PyTypeObject
*)PyExc_StopIteration)))
) {
73047 if (!ev) {
73048 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
73049 ev = Py_None(&_Py_NoneStruct);
73050 } else if (PyTuple_Check(ev)((((((PyObject*)(ev))->ob_type))->tp_flags & ((1L<<
26))) != 0)
) {
73051 if (PyTuple_GET_SIZE(ev)(((PyVarObject*)(ev))->ob_size) >= 1) {
73052 PyObject *value;
73053#if CYTHON_COMPILING_IN_CPYTHON1
73054 value = PySequence_ITEM(ev, 0)( (((PyObject*)(ev))->ob_type)->tp_as_sequence->sq_item
(ev, 0) )
;
73055#else
73056 value = PyTuple_GET_ITEM(ev, 0)(((PyTupleObject *)(ev))->ob_item[0]);
73057 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
73058#endif
73059 Py_DECREF(ev)do { if ( --((PyObject*)(ev))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ev)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ev)))); } while (0)
;
73060 ev = value;
73061 } else {
73062 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
73063 Py_DECREF(ev)do { if ( --((PyObject*)(ev))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ev)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ev)))); } while (0)
;
73064 ev = Py_None(&_Py_NoneStruct);
73065 }
73066 }
73067 Py_XDECREF(tb)do { if ((tb) == ((void*)0)) ; else do { if ( --((PyObject*)(
tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(tb)))); } while (0); } while (0)
;
73068 Py_DECREF(et)do { if ( --((PyObject*)(et))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(et)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(et)))); } while (0)
;
73069 *pvalue = ev;
73070 return 0;
73071 }
73072 } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
73073 __Pyx_ErrRestore(et, ev, tb);
73074 return -1;
73075 }
73076 PyErr_NormalizeException(&et, &ev, &tb);
73077 if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))__builtin_expect(!!(!((((PyObject*)(ev))->ob_type) == ((PyTypeObject
*)PyExc_StopIteration) || PyType_IsSubtype((((PyObject*)(ev))
->ob_type), ((PyTypeObject*)PyExc_StopIteration)))), 0)
) {
73078 __Pyx_ErrRestore(et, ev, tb);
73079 return -1;
73080 }
73081 Py_XDECREF(tb)do { if ((tb) == ((void*)0)) ; else do { if ( --((PyObject*)(
tb))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *
)(tb)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *
)(tb)))); } while (0); } while (0)
;
73082 Py_DECREF(et)do { if ( --((PyObject*)(et))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(et)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(et)))); } while (0)
;
73083#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030300A0
73084 value = ((PyStopIterationObject *)ev)->value;
73085 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
73086 Py_DECREF(ev)do { if ( --((PyObject*)(ev))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ev)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ev)))); } while (0)
;
73087#else
73088 {
73089 PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
73090 Py_DECREF(ev)do { if ( --((PyObject*)(ev))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(ev)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(ev)))); } while (0)
;
73091 if (likely(args)__builtin_expect(!!(args), 1)) {
73092 value = PySequence_GetItem(args, 0);
73093 Py_DECREF(args)do { if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(args)))); } while (0)
;
73094 }
73095 if (unlikely(!value)__builtin_expect(!!(!value), 0)) {
73096 __Pyx_ErrRestore(NULL((void*)0), NULL((void*)0), NULL((void*)0));
73097 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
73098 value = Py_None(&_Py_NoneStruct);
73099 }
73100 }
73101#endif
73102 *pvalue = value;
73103 return 0;
73104}
73105#endif
73106static CYTHON_INLINE__inline__
73107void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
73108 PyObject *exc_type = self->exc_type;
73109 PyObject *exc_value = self->exc_value;
73110 PyObject *exc_traceback = self->exc_traceback;
73111 self->exc_type = NULL((void*)0);
73112 self->exc_value = NULL((void*)0);
73113 self->exc_traceback = NULL((void*)0);
73114 Py_XDECREF(exc_type)do { if ((exc_type) == ((void*)0)) ; else do { if ( --((PyObject
*)(exc_type))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(exc_type)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(exc_type)))); } while (0); } while (0)
;
73115 Py_XDECREF(exc_value)do { if ((exc_value) == ((void*)0)) ; else do { if ( --((PyObject
*)(exc_value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(exc_value)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(exc_value)))); } while (0); } while (0)
;
73116 Py_XDECREF(exc_traceback)do { if ((exc_traceback) == ((void*)0)) ; else do { if ( --((
PyObject*)(exc_traceback))->ob_refcnt != 0) ; else ( (*(((
PyObject*)((PyObject *)(exc_traceback)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(exc_traceback)))); } while (0); }
while (0)
;
73117}
73118static CYTHON_INLINE__inline__
73119int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
73120 if (unlikely(gen->is_running)__builtin_expect(!!(gen->is_running), 0)) {
73121 PyErr_SetString(PyExc_ValueError,
73122 "generator already executing");
73123 return 1;
73124 }
73125 return 0;
73126}
73127static CYTHON_INLINE__inline__
73128PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
73129 PyObject *retval;
73130 assert(!self->is_running)((void) (0));
73131 if (unlikely(self->resume_label == 0)__builtin_expect(!!(self->resume_label == 0), 0)) {
73132 if (unlikely(value && value != Py_None)__builtin_expect(!!(value && value != (&_Py_NoneStruct
)), 0)
) {
73133 PyErr_SetString(PyExc_TypeError,
73134 "can't send non-None value to a "
73135 "just-started generator");
73136 return NULL((void*)0);
73137 }
73138 }
73139 if (unlikely(self->resume_label == -1)__builtin_expect(!!(self->resume_label == -1), 0)) {
73140 PyErr_SetNone(PyExc_StopIteration);
73141 return NULL((void*)0);
73142 }
73143 if (value) {
73144#if CYTHON_COMPILING_IN_PYPY0
73145#else
73146 if (self->exc_traceback) {
73147 PyThreadState *tstate = PyThreadState_GET()(_PyThreadState_Current);
73148 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
73149 PyFrameObject *f = tb->tb_frame;
73150 Py_XINCREF(tstate->frame)do { if ((tstate->frame) == ((void*)0)) ; else ( ((PyObject
*)(tstate->frame))->ob_refcnt++); } while (0)
;
73151 assert(f->f_back == NULL)((void) (0));
73152 f->f_back = tstate->frame;
73153 }
73154#endif
73155 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
73156 &self->exc_traceback);
73157 } else {
73158 __Pyx_Coroutine_ExceptionClear(self);
73159 }
73160 self->is_running = 1;
73161 retval = self->body((PyObject *) self, value);
73162 self->is_running = 0;
73163 if (retval) {
73164 __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
73165 &self->exc_traceback);
73166#if CYTHON_COMPILING_IN_PYPY0
73167#else
73168 if (self->exc_traceback) {
73169 PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
73170 PyFrameObject *f = tb->tb_frame;
73171 Py_CLEAR(f->f_back)do { if (f->f_back) { PyObject *_py_tmp = (PyObject *)(f->
f_back); (f->f_back) = ((void*)0); do { if ( --((PyObject*
)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(_py_tmp)))); } while (0); } } while (0)
;
73172 }
73173#endif
73174 } else {
73175 __Pyx_Coroutine_ExceptionClear(self);
73176 }
73177 return retval;
73178}
73179static CYTHON_INLINE__inline__
73180PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
73181 if (unlikely(!retval && !PyErr_Occurred())__builtin_expect(!!(!retval && !PyErr_Occurred()), 0)) {
73182 PyErr_SetNone(PyExc_StopIteration);
73183 }
73184 return retval;
73185}
73186static CYTHON_INLINE__inline__
73187PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
73188 PyObject *ret;
73189 PyObject *val = NULL((void*)0);
73190 __Pyx_Coroutine_Undelegate(gen)do { if ((gen)->yieldfrom) { PyObject *_py_tmp = (PyObject
*)((gen)->yieldfrom); ((gen)->yieldfrom) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73191 __Pyx_PyGen_FetchStopIterationValue(&val);
73192 ret = __Pyx_Coroutine_SendEx(gen, val);
73193 Py_XDECREF(val)do { if ((val) == ((void*)0)) ; else do { if ( --((PyObject*)
(val))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(val)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(val)))); } while (0); } while (0)
;
73194 return ret;
73195}
73196static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
73197 PyObject *retval;
73198 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
73199 PyObject *yf = gen->yieldfrom;
73200 if (unlikely(__Pyx_Coroutine_CheckRunning(gen))__builtin_expect(!!(__Pyx_Coroutine_CheckRunning(gen)), 0))
73201 return NULL((void*)0);
73202 if (yf) {
73203 PyObject *ret;
73204 gen->is_running = 1;
73205 #ifdef __Pyx_Generator_USED
73206 if (__Pyx_Generator_CheckExact(yf)((((PyObject*)(yf))->ob_type) == __pyx_GeneratorType)) {
73207 ret = __Pyx_Coroutine_Send(yf, value);
73208 } else
73209 #endif
73210 #ifdef __Pyx_Coroutine_USED
73211 if (__Pyx_Coroutine_CheckExact(yf)) {
73212 ret = __Pyx_Coroutine_Send(yf, value);
73213 } else
73214 #endif
73215 {
73216 if (value == Py_None(&_Py_NoneStruct))
73217 ret = Py_TYPE(yf)(((PyObject*)(yf))->ob_type)->tp_iternext(yf);
73218 else
73219 ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
73220 }
73221 gen->is_running = 0;
73222 if (likely(ret)__builtin_expect(!!(ret), 1)) {
73223 return ret;
73224 }
73225 retval = __Pyx_Coroutine_FinishDelegation(gen);
73226 } else {
73227 retval = __Pyx_Coroutine_SendEx(gen, value);
73228 }
73229 return __Pyx_Coroutine_MethodReturn(retval);
73230}
73231static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
73232 PyObject *retval = NULL((void*)0);
73233 int err = 0;
73234 #ifdef __Pyx_Generator_USED
73235 if (__Pyx_Generator_CheckExact(yf)((((PyObject*)(yf))->ob_type) == __pyx_GeneratorType)) {
73236 retval = __Pyx_Coroutine_Close(yf);
73237 if (!retval)
73238 return -1;
73239 } else
73240 #endif
73241 #ifdef __Pyx_Coroutine_USED
73242 if (__Pyx_Coroutine_CheckExact(yf)) {
73243 retval = __Pyx_Coroutine_Close(yf);
73244 if (!retval)
73245 return -1;
73246 } else
73247 #endif
73248 {
73249 PyObject *meth;
73250 gen->is_running = 1;
73251 meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
73252 if (unlikely(!meth)__builtin_expect(!!(!meth), 0)) {
73253 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
73254 PyErr_WriteUnraisable(yf);
73255 }
73256 PyErr_Clear();
73257 } else {
73258 retval = PyObject_CallFunction_PyObject_CallFunction_SizeT(meth, NULL((void*)0));
73259 Py_DECREF(meth)do { if ( --((PyObject*)(meth))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(meth)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(meth)))); } while (0)
;
73260 if (!retval)
73261 err = -1;
73262 }
73263 gen->is_running = 0;
73264 }
73265 Py_XDECREF(retval)do { if ((retval) == ((void*)0)) ; else do { if ( --((PyObject
*)(retval))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(retval)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(retval)))); } while (0); } while (0)
;
73266 return err;
73267}
73268static PyObject *__Pyx_Generator_Next(PyObject *self) {
73269 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
73270 PyObject *yf = gen->yieldfrom;
73271 if (unlikely(__Pyx_Coroutine_CheckRunning(gen))__builtin_expect(!!(__Pyx_Coroutine_CheckRunning(gen)), 0))
73272 return NULL((void*)0);
73273 if (yf) {
73274 PyObject *ret;
73275 gen->is_running = 1;
73276 ret = Py_TYPE(yf)(((PyObject*)(yf))->ob_type)->tp_iternext(yf);
73277 gen->is_running = 0;
73278 if (likely(ret)__builtin_expect(!!(ret), 1)) {
73279 return ret;
73280 }
73281 return __Pyx_Coroutine_FinishDelegation(gen);
73282 }
73283 return __Pyx_Coroutine_SendEx(gen, Py_None(&_Py_NoneStruct));
73284}
73285static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
73286 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
73287 PyObject *retval, *raised_exception;
73288 PyObject *yf = gen->yieldfrom;
73289 int err = 0;
73290 if (unlikely(__Pyx_Coroutine_CheckRunning(gen))__builtin_expect(!!(__Pyx_Coroutine_CheckRunning(gen)), 0))
73291 return NULL((void*)0);
73292 if (yf) {
73293 Py_INCREF(yf)( ((PyObject*)(yf))->ob_refcnt++);
73294 err = __Pyx_Coroutine_CloseIter(gen, yf);
73295 __Pyx_Coroutine_Undelegate(gen)do { if ((gen)->yieldfrom) { PyObject *_py_tmp = (PyObject
*)((gen)->yieldfrom); ((gen)->yieldfrom) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73296 Py_DECREF(yf)do { if ( --((PyObject*)(yf))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(yf)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(yf)))); } while (0)
;
73297 }
73298 if (err == 0)
73299 PyErr_SetNone(PyExc_GeneratorExit);
73300 retval = __Pyx_Coroutine_SendEx(gen, NULL((void*)0));
73301 if (retval) {
73302 Py_DECREF(retval)do { if ( --((PyObject*)(retval))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(retval)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(retval)))); } while (0)
;
73303 PyErr_SetString(PyExc_RuntimeError,
73304 "generator ignored GeneratorExit");
73305 return NULL((void*)0);
73306 }
73307 raised_exception = PyErr_Occurred();
73308 if (!raised_exception
73309 || raised_exception == PyExc_StopIteration
73310 || raised_exception == PyExc_GeneratorExit
73311 || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
73312 || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
73313 {
73314 if (raised_exception) PyErr_Clear();
73315 Py_INCREF(Py_None)( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++);
73316 return Py_None(&_Py_NoneStruct);
73317 }
73318 return NULL((void*)0);
73319}
73320static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
73321 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
73322 PyObject *typ;
73323 PyObject *tb = NULL((void*)0);
73324 PyObject *val = NULL((void*)0);
73325 PyObject *yf = gen->yieldfrom;
73326 if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
73327 return NULL((void*)0);
73328 if (unlikely(__Pyx_Coroutine_CheckRunning(gen))__builtin_expect(!!(__Pyx_Coroutine_CheckRunning(gen)), 0))
73329 return NULL((void*)0);
73330 if (yf) {
73331 PyObject *ret;
73332 Py_INCREF(yf)( ((PyObject*)(yf))->ob_refcnt++);
73333 if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
73334 int err = __Pyx_Coroutine_CloseIter(gen, yf);
73335 Py_DECREF(yf)do { if ( --((PyObject*)(yf))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(yf)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(yf)))); } while (0)
;
73336 __Pyx_Coroutine_Undelegate(gen)do { if ((gen)->yieldfrom) { PyObject *_py_tmp = (PyObject
*)((gen)->yieldfrom); ((gen)->yieldfrom) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73337 if (err < 0)
73338 return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL((void*)0)));
73339 goto throw_here;
73340 }
73341 gen->is_running = 1;
73342 #ifdef __Pyx_Generator_USED
73343 if (__Pyx_Generator_CheckExact(yf)((((PyObject*)(yf))->ob_type) == __pyx_GeneratorType)) {
73344 ret = __Pyx_Coroutine_Throw(yf, args);
73345 } else
73346 #endif
73347 #ifdef __Pyx_Coroutine_USED
73348 if (__Pyx_Coroutine_CheckExact(yf)) {
73349 ret = __Pyx_Coroutine_Throw(yf, args);
73350 } else
73351 #endif
73352 {
73353 PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
73354 if (unlikely(!meth)__builtin_expect(!!(!meth), 0)) {
73355 Py_DECREF(yf)do { if ( --((PyObject*)(yf))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(yf)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(yf)))); } while (0)
;
73356 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
73357 gen->is_running = 0;
73358 return NULL((void*)0);
73359 }
73360 PyErr_Clear();
73361 __Pyx_Coroutine_Undelegate(gen)do { if ((gen)->yieldfrom) { PyObject *_py_tmp = (PyObject
*)((gen)->yieldfrom); ((gen)->yieldfrom) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73362 gen->is_running = 0;
73363 goto throw_here;
73364 }
73365 ret = PyObject_CallObject(meth, args);
73366 Py_DECREF(meth)do { if ( --((PyObject*)(meth))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(meth)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(meth)))); } while (0)
;
73367 }
73368 gen->is_running = 0;
73369 Py_DECREF(yf)do { if ( --((PyObject*)(yf))->ob_refcnt != 0) ; else ( (*
(((PyObject*)((PyObject *)(yf)))->ob_type)->tp_dealloc)
((PyObject *)((PyObject *)(yf)))); } while (0)
;
73370 if (!ret) {
73371 ret = __Pyx_Coroutine_FinishDelegation(gen);
73372 }
73373 return __Pyx_Coroutine_MethodReturn(ret);
73374 }
73375throw_here:
73376 __Pyx_Raise(typ, val, tb, NULL((void*)0));
73377 return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL((void*)0)));
73378}
73379static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
73380 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
73381 Py_VISIT(gen->closure)do { if (gen->closure) { int vret = visit((PyObject *)(gen
->closure), arg); if (vret) return vret; } } while (0)
;
73382 Py_VISIT(gen->classobj)do { if (gen->classobj) { int vret = visit((PyObject *)(gen
->classobj), arg); if (vret) return vret; } } while (0)
;
73383 Py_VISIT(gen->yieldfrom)do { if (gen->yieldfrom) { int vret = visit((PyObject *)(gen
->yieldfrom), arg); if (vret) return vret; } } while (0)
;
73384 Py_VISIT(gen->exc_type)do { if (gen->exc_type) { int vret = visit((PyObject *)(gen
->exc_type), arg); if (vret) return vret; } } while (0)
;
73385 Py_VISIT(gen->exc_value)do { if (gen->exc_value) { int vret = visit((PyObject *)(gen
->exc_value), arg); if (vret) return vret; } } while (0)
;
73386 Py_VISIT(gen->exc_traceback)do { if (gen->exc_traceback) { int vret = visit((PyObject *
)(gen->exc_traceback), arg); if (vret) return vret; } } while
(0)
;
73387 return 0;
73388}
73389static int __Pyx_Coroutine_clear(PyObject *self) {
73390 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
73391 Py_CLEAR(gen->closure)do { if (gen->closure) { PyObject *_py_tmp = (PyObject *)(
gen->closure); (gen->closure) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
73392 Py_CLEAR(gen->classobj)do { if (gen->classobj) { PyObject *_py_tmp = (PyObject *)
(gen->classobj); (gen->classobj) = ((void*)0); do { if (
--((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
73393 Py_CLEAR(gen->yieldfrom)do { if (gen->yieldfrom) { PyObject *_py_tmp = (PyObject *
)(gen->yieldfrom); (gen->yieldfrom) = ((void*)0); do { if
( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*((
(PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73394 Py_CLEAR(gen->exc_type)do { if (gen->exc_type) { PyObject *_py_tmp = (PyObject *)
(gen->exc_type); (gen->exc_type) = ((void*)0); do { if (
--((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
73395 Py_CLEAR(gen->exc_value)do { if (gen->exc_value) { PyObject *_py_tmp = (PyObject *
)(gen->exc_value); (gen->exc_value) = ((void*)0); do { if
( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*((
(PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73396 Py_CLEAR(gen->exc_traceback)do { if (gen->exc_traceback) { PyObject *_py_tmp = (PyObject
*)(gen->exc_traceback); (gen->exc_traceback) = ((void*
)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0
); } } while (0)
;
73397 Py_CLEAR(gen->gi_name)do { if (gen->gi_name) { PyObject *_py_tmp = (PyObject *)(
gen->gi_name); (gen->gi_name) = ((void*)0); do { if ( --
((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject
*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(_py_tmp)))); } while (0); } } while (0)
;
73398 Py_CLEAR(gen->gi_qualname)do { if (gen->gi_qualname) { PyObject *_py_tmp = (PyObject
*)(gen->gi_qualname); (gen->gi_qualname) = ((void*)0);
do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while
(0)
;
73399 return 0;
73400}
73401static void __Pyx_Coroutine_dealloc(PyObject *self) {
73402 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
73403 PyObject_GC_UnTrack(gen);
73404 if (gen->gi_weakreflist != NULL((void*)0))
73405 PyObject_ClearWeakRefs(self);
73406 if (gen->resume_label > 0) {
73407 PyObject_GC_Track(self);
73408#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
73409 if (PyObject_CallFinalizerFromDealloc(self))
73410#else
73411 Py_TYPE(gen)(((PyObject*)(gen))->ob_type)->tp_del(self);
73412 if (self->ob_refcnt > 0)
73413#endif
73414 {
73415 return;
73416 }
73417 PyObject_GC_UnTrack(self);
73418 }
73419 __Pyx_Coroutine_clear(self);
73420 PyObject_GC_Del(gen);
73421}
73422static void __Pyx_Coroutine_del(PyObject *self) {
73423 PyObject *res;
73424 PyObject *error_type, *error_value, *error_traceback;
73425 __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
73426 if (gen->resume_label <= 0)
73427 return ;
73428#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030400a1
73429 assert(self->ob_refcnt == 0)((void) (0));
73430 self->ob_refcnt = 1;
73431#endif
73432 __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
73433 res = __Pyx_Coroutine_Close(self);
73434 if (res == NULL((void*)0))
73435 PyErr_WriteUnraisable(self);
73436 else
73437 Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(res)))); } while (0)
;
73438 __Pyx_ErrRestore(error_type, error_value, error_traceback);
73439#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x030400a1
73440 assert(self->ob_refcnt > 0)((void) (0));
73441 if (--self->ob_refcnt == 0) {
73442 return;
73443 }
73444 {
73445 Py_ssize_t refcnt = self->ob_refcnt;
73446 _Py_NewReference(self)( (((PyObject*)(self))->ob_refcnt) = 1);
73447 self->ob_refcnt = refcnt;
73448 }
73449#if CYTHON_COMPILING_IN_CPYTHON1
73450 assert(PyType_IS_GC(self->ob_type) &&((void) (0))
73451 _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED)((void) (0));
73452 _Py_DEC_REFTOTAL;
73453#endif
73454#ifdef COUNT_ALLOCS
73455 --Py_TYPE(self)(((PyObject*)(self))->ob_type)->tp_frees;
73456 --Py_TYPE(self)(((PyObject*)(self))->ob_type)->tp_allocs;
73457#endif
73458#endif
73459}
73460static PyObject *
73461__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
73462{
73463 Py_INCREF(self->gi_name)( ((PyObject*)(self->gi_name))->ob_refcnt++);
73464 return self->gi_name;
73465}
73466static int
73467__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
73468{
73469 PyObject *tmp;
73470#if PY_MAJOR_VERSION2 >= 3
73471 if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<28))) !=
0)), 0)
) {
73472#else
73473 if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<27))) !=
0)), 0)
) {
73474#endif
73475 PyErr_SetString(PyExc_TypeError,
73476 "__name__ must be set to a string object");
73477 return -1;
73478 }
73479 tmp = self->gi_name;
73480 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
73481 self->gi_name = value;
73482 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
73483 return 0;
73484}
73485static PyObject *
73486__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
73487{
73488 Py_INCREF(self->gi_qualname)( ((PyObject*)(self->gi_qualname))->ob_refcnt++);
73489 return self->gi_qualname;
73490}
73491static int
73492__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
73493{
73494 PyObject *tmp;
73495#if PY_MAJOR_VERSION2 >= 3
73496 if (unlikely(value == NULL || !PyUnicode_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<28))) !=
0)), 0)
) {
73497#else
73498 if (unlikely(value == NULL || !PyString_Check(value))__builtin_expect(!!(value == ((void*)0) || !((((((PyObject*)(
value))->ob_type))->tp_flags & ((1L<<27))) !=
0)), 0)
) {
73499#endif
73500 PyErr_SetString(PyExc_TypeError,
73501 "__qualname__ must be set to a string object");
73502 return -1;
73503 }
73504 tmp = self->gi_qualname;
73505 Py_INCREF(value)( ((PyObject*)(value))->ob_refcnt++);
73506 self->gi_qualname = value;
73507 Py_XDECREF(tmp)do { if ((tmp) == ((void*)0)) ; else do { if ( --((PyObject*)
(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(tmp)))); } while (0); } while (0)
;
73508 return 0;
73509}
73510static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
73511 PyObject *closure, PyObject *name, PyObject *qualname) {
73512 __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type)( (__pyx_CoroutineObject *) _PyObject_GC_New(type) );
73513 if (gen == NULL((void*)0))
73514 return NULL((void*)0);
73515 gen->body = body;
73516 gen->closure = closure;
73517 Py_XINCREF(closure)do { if ((closure) == ((void*)0)) ; else ( ((PyObject*)(closure
))->ob_refcnt++); } while (0)
;
73518 gen->is_running = 0;
73519 gen->resume_label = 0;
73520 gen->classobj = NULL((void*)0);
73521 gen->yieldfrom = NULL((void*)0);
73522 gen->exc_type = NULL((void*)0);
73523 gen->exc_value = NULL((void*)0);
73524 gen->exc_traceback = NULL((void*)0);
73525 gen->gi_weakreflist = NULL((void*)0);
73526 Py_XINCREF(qualname)do { if ((qualname) == ((void*)0)) ; else ( ((PyObject*)(qualname
))->ob_refcnt++); } while (0)
;
73527 gen->gi_qualname = qualname;
73528 Py_XINCREF(name)do { if ((name) == ((void*)0)) ; else ( ((PyObject*)(name))->
ob_refcnt++); } while (0)
;
73529 gen->gi_name = name;
73530 PyObject_GC_Track(gen);
73531 return gen;
73532}
73533
73534static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
73535#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
73536 int result;
73537 PyObject *globals, *result_obj;
73538 globals = PyDict_New(); if (unlikely(!globals)__builtin_expect(!!(!globals), 0)) goto ignore;
73539 result = PyDict_SetItemString(globals, "_cython_coroutine_type",
73540 #ifdef __Pyx_Coroutine_USED
73541 (PyObject*)__pyx_CoroutineType);
73542 #else
73543 Py_None(&_Py_NoneStruct));
73544 #endif
73545 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) goto ignore;
73546 result = PyDict_SetItemString(globals, "_cython_generator_type",
73547 #ifdef __Pyx_Generator_USED
73548 (PyObject*)__pyx_GeneratorType);
73549 #else
73550 Py_None(&_Py_NoneStruct));
73551 #endif
73552 if (unlikely(result < 0)__builtin_expect(!!(result < 0), 0)) goto ignore;
73553 if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)__builtin_expect(!!(PyDict_SetItemString(globals, "_module", module
) < 0), 0)
) goto ignore;
73554 if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)__builtin_expect(!!(PyDict_SetItemString(globals, "__builtins__"
, __pyx_b) < 0), 0)
) goto ignore;
73555 result_obj = PyRun_String(py_code, Py_file_input, globals, globals)PyRun_StringFlags(py_code, 257, globals, globals, ((void*)0));
73556 if (unlikely(!result_obj)__builtin_expect(!!(!result_obj), 0)) goto ignore;
73557 Py_DECREF(result_obj)do { if ( --((PyObject*)(result_obj))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(result_obj)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(result_obj)))); } while
(0)
;
73558 Py_DECREF(globals)do { if ( --((PyObject*)(globals))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(globals)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(globals)))); } while (0)
;
73559 return module;
73560ignore:
73561 Py_XDECREF(globals)do { if ((globals) == ((void*)0)) ; else do { if ( --((PyObject
*)(globals))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(globals)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(globals)))); } while (0); } while (0)
;
73562 PyErr_WriteUnraisable(module);
73563 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)__builtin_expect(!!(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type"
, 1) < 0), 0)
) {
73564 Py_DECREF(module)do { if ( --((PyObject*)(module))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(module)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(module)))); } while (0)
;
73565 module = NULL((void*)0);
73566 }
73567#else
73568 py_code++;
73569#endif
73570 return module;
73571}
73572
73573#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
73574static PyObject* __Pyx_patch_abc_module(PyObject *module);
73575static PyObject* __Pyx_patch_abc_module(PyObject *module) {
73576 module = __Pyx_Coroutine_patch_module(
73577 module, ""
73578"if _cython_generator_type is not None:\n"
73579" try: Generator = _module.Generator\n"
73580" except AttributeError: pass\n"
73581" else: Generator.register(_cython_generator_type)\n"
73582"if _cython_coroutine_type is not None:\n"
73583" try: Coroutine = _module.Coroutine\n"
73584" except AttributeError: pass\n"
73585" else: Coroutine.register(_cython_coroutine_type)\n"
73586 );
73587 return module;
73588}
73589#endif
73590static int __Pyx_patch_abc(void) {
73591#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
73592 static int abc_patched = 0;
73593 if (!abc_patched) {
73594 PyObject *module;
73595 module = PyImport_ImportModule((PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x03030000) ? "collections.abc" : "collections");
73596 if (!module) {
73597 PyErr_WriteUnraisable(NULL((void*)0));
73598 if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,__builtin_expect(!!(PyErr_WarnEx(PyExc_RuntimeWarning, ((((2 <<
24) | (7 << 16) | (12 << 8) | (0xF << 4) |
(0 << 0)) >= 0x03030000) ? "Cython module failed to register with collections.abc module"
: "Cython module failed to register with collections module"
), 1) < 0), 0)
73599 ((PY_VERSION_HEX >= 0x03030000) ?__builtin_expect(!!(PyErr_WarnEx(PyExc_RuntimeWarning, ((((2 <<
24) | (7 << 16) | (12 << 8) | (0xF << 4) |
(0 << 0)) >= 0x03030000) ? "Cython module failed to register with collections.abc module"
: "Cython module failed to register with collections module"
), 1) < 0), 0)
73600 "Cython module failed to register with collections.abc module" :__builtin_expect(!!(PyErr_WarnEx(PyExc_RuntimeWarning, ((((2 <<
24) | (7 << 16) | (12 << 8) | (0xF << 4) |
(0 << 0)) >= 0x03030000) ? "Cython module failed to register with collections.abc module"
: "Cython module failed to register with collections module"
), 1) < 0), 0)
73601 "Cython module failed to register with collections module"), 1) < 0)__builtin_expect(!!(PyErr_WarnEx(PyExc_RuntimeWarning, ((((2 <<
24) | (7 << 16) | (12 << 8) | (0xF << 4) |
(0 << 0)) >= 0x03030000) ? "Cython module failed to register with collections.abc module"
: "Cython module failed to register with collections module"
), 1) < 0), 0)
) {
73602 return -1;
73603 }
73604 } else {
73605 module = __Pyx_patch_abc_module(module);
73606 abc_patched = 1;
73607 if (unlikely(!module)__builtin_expect(!!(!module), 0))
73608 return -1;
73609 Py_DECREF(module)do { if ( --((PyObject*)(module))->ob_refcnt != 0) ; else (
(*(((PyObject*)((PyObject *)(module)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(module)))); } while (0)
;
73610 }
73611 module = PyImport_ImportModule("backports_abc");
73612 if (module) {
73613 module = __Pyx_patch_abc_module(module);
73614 Py_XDECREF(module)do { if ((module) == ((void*)0)) ; else do { if ( --((PyObject
*)(module))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(module)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(module)))); } while (0); } while (0)
;
73615 }
73616 if (!module) {
73617 PyErr_Clear();
73618 }
73619 }
73620#else
73621 if (0) __Pyx_Coroutine_patch_module(NULL((void*)0), NULL((void*)0));
73622#endif
73623 return 0;
73624}
73625
73626static PyMethodDef __pyx_Generator_methods[] = {
73627 {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O0x0008,
73628 (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration."},
73629 {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS0x0001,
73630 (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")"throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration."},
73631 {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS0x0004,
73632 (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")"close() -> raise GeneratorExit inside generator."},
73633 {0, 0, 0, 0}
73634};
73635static PyMemberDef __pyx_Generator_memberlist[] = {
73636 {(char *) "gi_running", T_BOOL14, offsetof(__pyx_CoroutineObject, is_running)__builtin_offsetof(__pyx_CoroutineObject, is_running), READONLY1, NULL((void*)0)},
73637 {(char*) "gi_yieldfrom", T_OBJECT6, offsetof(__pyx_CoroutineObject, yieldfrom)__builtin_offsetof(__pyx_CoroutineObject, yieldfrom), READONLY1,
73638 (char*) PyDoc_STR("object being iterated by 'yield from', or None")"object being iterated by 'yield from', or None"},
73639 {0, 0, 0, 0, 0}
73640};
73641static PyGetSetDef __pyx_Generator_getsets[] = {
73642 {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
73643 (char*) PyDoc_STR("name of the generator")"name of the generator", 0},
73644 {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
73645 (char*) PyDoc_STR("qualified name of the generator")"qualified name of the generator", 0},
73646 {0, 0, 0, 0, 0}
73647};
73648static PyTypeObject __pyx_GeneratorType_type = {
73649 PyVarObject_HEAD_INIT(0, 0)1, 0, 0,
73650 "generator",
73651 sizeof(__pyx_CoroutineObject),
73652 0,
73653 (destructor) __Pyx_Coroutine_dealloc,
73654 0,
73655 0,
73656 0,
73657 0,
73658 0,
73659 0,
73660 0,
73661 0,
73662 0,
73663 0,
73664 0,
73665 0,
73666 0,
73667 0,
73668 Py_TPFLAGS_DEFAULT( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<
5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<
17) | 0)
| Py_TPFLAGS_HAVE_GC(1L<<14) | Py_TPFLAGS_HAVE_FINALIZE0,
73669 0,
73670 (traverseproc) __Pyx_Coroutine_traverse,
73671 0,
73672 0,
73673 offsetof(__pyx_CoroutineObject, gi_weakreflist)__builtin_offsetof(__pyx_CoroutineObject, gi_weakreflist),
73674 0,
73675 (iternextfunc) __Pyx_Generator_Next,
73676 __pyx_Generator_methods,
73677 __pyx_Generator_memberlist,
73678 __pyx_Generator_getsets,
73679 0,
73680 0,
73681 0,
73682 0,
73683 0,
73684 0,
73685 0,
73686 0,
73687 0,
73688 0,
73689 0,
73690 0,
73691 0,
73692 0,
73693 0,
73694#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
73695 0,
73696#else
73697 __Pyx_Coroutine_del,
73698#endif
73699 0,
73700#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
>= 0x030400a1
73701 __Pyx_Coroutine_del,
73702#endif
73703};
73704static int __pyx_Generator_init(void) {
73705 __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
73706 __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
73707 __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
73708 if (unlikely(!__pyx_GeneratorType)__builtin_expect(!!(!__pyx_GeneratorType), 0)) {
73709 return -1;
73710 }
73711 return 0;
73712}
73713
73714static int __Pyx_check_binary_version(void) {
73715 char ctversion[4], rtversion[4];
73716 PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION2, PY_MINOR_VERSION7);
73717 PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
73718 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
73719 char message[200];
73720 PyOS_snprintf(message, sizeof(message),
73721 "compiletime version %s of module '%.100s' "
73722 "does not match runtime version %s",
73723 ctversion, __Pyx_MODULE_NAME"rbd", rtversion);
73724 return PyErr_WarnEx(NULL((void*)0), message, 1);
73725 }
73726 return 0;
73727}
73728
73729#ifndef __PYX_HAVE_RT_ImportModule
73730#define __PYX_HAVE_RT_ImportModule
73731static PyObject *__Pyx_ImportModule(const char *name) {
73732 PyObject *py_name = 0;
73733 PyObject *py_module = 0;
73734 py_name = __Pyx_PyIdentifier_FromString(name)PyString_FromString(name);
73735 if (!py_name)
73736 goto bad;
73737 py_module = PyImport_Import(py_name);
73738 Py_DECREF(py_name)do { if ( --((PyObject*)(py_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_name)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(py_name)))); } while (0)
;
73739 return py_module;
73740bad:
73741 Py_XDECREF(py_name)do { if ((py_name) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_name))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(py_name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(py_name)))); } while (0); } while (0)
;
73742 return 0;
73743}
73744#endif
73745
73746#ifndef __PYX_HAVE_RT_ImportType
73747#define __PYX_HAVE_RT_ImportType
73748static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
73749 size_t size, int strict)
73750{
73751 PyObject *py_module = 0;
73752 PyObject *result = 0;
73753 PyObject *py_name = 0;
73754 char warning[200];
73755 Py_ssize_t basicsize;
73756#ifdef Py_LIMITED_API
73757 PyObject *py_basicsize;
73758#endif
73759 py_module = __Pyx_ImportModule(module_name);
73760 if (!py_module)
73761 goto bad;
73762 py_name = __Pyx_PyIdentifier_FromString(class_name)PyString_FromString(class_name);
73763 if (!py_name)
73764 goto bad;
73765 result = PyObject_GetAttr(py_module, py_name);
73766 Py_DECREF(py_name)do { if ( --((PyObject*)(py_name))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_name)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(py_name)))); } while (0)
;
73767 py_name = 0;
73768 Py_DECREF(py_module)do { if ( --((PyObject*)(py_module))->ob_refcnt != 0) ; else
( (*(((PyObject*)((PyObject *)(py_module)))->ob_type)->
tp_dealloc)((PyObject *)((PyObject *)(py_module)))); } while (
0)
;
73769 py_module = 0;
73770 if (!result)
73771 goto bad;
73772 if (!PyType_Check(result)((((((PyObject*)(result))->ob_type))->tp_flags & ((
1L<<31))) != 0)
) {
73773 PyErr_Format(PyExc_TypeError,
73774 "%.200s.%.200s is not a type object",
73775 module_name, class_name);
73776 goto bad;
73777 }
73778#ifndef Py_LIMITED_API
73779 basicsize = ((PyTypeObject *)result)->tp_basicsize;
73780#else
73781 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
73782 if (!py_basicsize)
73783 goto bad;
73784 basicsize = PyLong_AsSsize_t(py_basicsize);
73785 Py_DECREF(py_basicsize)do { if ( --((PyObject*)(py_basicsize))->ob_refcnt != 0) ;
else ( (*(((PyObject*)((PyObject *)(py_basicsize)))->ob_type
)->tp_dealloc)((PyObject *)((PyObject *)(py_basicsize))));
} while (0)
;
73786 py_basicsize = 0;
73787 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
73788 goto bad;
73789#endif
73790 if (!strict && (size_t)basicsize > size) {
73791 PyOS_snprintf(warning, sizeof(warning),
73792 "%s.%s size changed, may indicate binary incompatibility",
73793 module_name, class_name);
73794 if (PyErr_WarnEx(NULL((void*)0), warning, 0) < 0) goto bad;
73795 }
73796 else if ((size_t)basicsize != size) {
73797 PyErr_Format(PyExc_ValueError,
73798 "%.200s.%.200s has the wrong size, try recompiling",
73799 module_name, class_name);
73800 goto bad;
73801 }
73802 return (PyTypeObject *)result;
73803bad:
73804 Py_XDECREF(py_module)do { if ((py_module) == ((void*)0)) ; else do { if ( --((PyObject
*)(py_module))->ob_refcnt != 0) ; else ( (*(((PyObject*)((
PyObject *)(py_module)))->ob_type)->tp_dealloc)((PyObject
*)((PyObject *)(py_module)))); } while (0); } while (0)
;
73805 Py_XDECREF(result)do { if ((result) == ((void*)0)) ; else do { if ( --((PyObject
*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject
*)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject
*)(result)))); } while (0); } while (0)
;
73806 return NULL((void*)0);
73807}
73808#endif
73809
73810static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
73811 while (t->p) {
73812 #if PY_MAJOR_VERSION2 < 3
73813 if (t->is_unicode) {
73814 *t->p = PyUnicode_DecodeUTF8PyUnicodeUCS4_DecodeUTF8(t->s, t->n - 1, NULL((void*)0));
73815 } else if (t->intern) {
73816 *t->p = PyString_InternFromString(t->s);
73817 } else {
73818 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
73819 }
73820 #else
73821 if (t->is_unicode | t->is_str) {
73822 if (t->intern) {
73823 *t->p = PyUnicode_InternFromString(t->s);
73824 } else if (t->encoding) {
73825 *t->p = PyUnicode_DecodePyUnicodeUCS4_Decode(t->s, t->n - 1, t->encoding, NULL((void*)0));
73826 } else {
73827 *t->p = PyUnicode_FromStringAndSizePyUnicodeUCS4_FromStringAndSize(t->s, t->n - 1);
73828 }
73829 } else {
73830 *t->p = PyBytes_FromStringAndSizePyString_FromStringAndSize(t->s, t->n - 1);
73831 }
73832 #endif
73833 if (!*t->p)
73834 return -1;
73835 ++t;
73836 }
73837 return 0;
73838}
73839
73840static CYTHON_INLINE__inline__ PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
73841 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str))PyUnicodeUCS4_Decode(c_str, (Py_ssize_t)strlen(c_str), "", ((
void*)0))
;
73842}
73843static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsString(PyObject* o) {
73844 Py_ssize_t ignore;
73845 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
73846}
73847static CYTHON_INLINE__inline__ char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
73848#if CYTHON_COMPILING_IN_CPYTHON1 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII0 || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT0)
73849 if (
73850#if PY_MAJOR_VERSION2 < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
73851 __Pyx_sys_getdefaultencoding_not_ascii &&
73852#endif
73853 PyUnicode_Check(o)((((((PyObject*)(o))->ob_type))->tp_flags & ((1L<<
28))) != 0)
) {
73854#if PY_VERSION_HEX((2 << 24) | (7 << 16) | (12 << 8) | (0xF <<
4) | (0 << 0))
< 0x03030000
73855 char* defenc_c;
73856 PyObject* defenc = _PyUnicode_AsDefaultEncodedString_PyUnicodeUCS4_AsDefaultEncodedString(o, NULL((void*)0));
73857 if (!defenc) return NULL((void*)0);
73858 defenc_c = PyBytes_AS_STRING(defenc)(((PyStringObject *)(defenc))->ob_sval);
73859#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
73860 {
73861 char* end = defenc_c + PyBytes_GET_SIZE(defenc)(((PyVarObject*)(defenc))->ob_size);
73862 char* c;
73863 for (c = defenc_c; c < end; c++) {
73864 if ((unsigned char) (*c) >= 128) {
73865 PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(o);
73866 return NULL((void*)0);
73867 }
73868 }
73869 }
73870#endif
73871 *length = PyBytes_GET_SIZE(defenc)(((PyVarObject*)(defenc))->ob_size);
73872 return defenc_c;
73873#else
73874 if (__Pyx_PyUnicode_READY(o)(0) == -1) return NULL((void*)0);
73875#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII0
73876 if (PyUnicode_IS_ASCII(o)) {
73877 *length = PyUnicode_GET_LENGTH(o);
73878 return PyUnicode_AsUTF8(o);
73879 } else {
73880 PyUnicode_AsASCIIStringPyUnicodeUCS4_AsASCIIString(o);
73881 return NULL((void*)0);
73882 }
73883#else
73884 return PyUnicode_AsUTF8AndSize(o, length);
73885#endif
73886#endif
73887 } else
73888#endif
73889#if (!CYTHON_COMPILING_IN_PYPY0) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
73890 if (PyByteArray_Check(o)((((PyObject*)(o))->ob_type) == (&PyByteArray_Type) ||
PyType_IsSubtype((((PyObject*)(o))->ob_type), (&PyByteArray_Type
)))
) {
73891 *length = PyByteArray_GET_SIZE(o)(((void) (0)),(((PyVarObject*)(o))->ob_size));
73892 return PyByteArray_AS_STRING(o)(((void) (0)), (((PyVarObject*)(o))->ob_size) ? ((PyByteArrayObject
*)(o))->ob_bytes : _PyByteArray_empty_string)
;
73893 } else
73894#endif
73895 {
73896 char* result;
73897 int r = PyBytes_AsStringAndSizePyString_AsStringAndSize(o, &result, length);
73898 if (unlikely(r < 0)__builtin_expect(!!(r < 0), 0)) {
73899 return NULL((void*)0);
73900 } else {
73901 return result;
73902 }
73903 }
73904}
73905static CYTHON_INLINE__inline__ int __Pyx_PyObject_IsTrue(PyObject* x) {
73906 int is_true = x == Py_True((PyObject *) &_Py_TrueStruct);
73907 if (is_true | (x == Py_False((PyObject *) &_Py_ZeroStruct)) | (x == Py_None(&_Py_NoneStruct))) return is_true;
73908 else return PyObject_IsTrue(x);
73909}
73910static CYTHON_INLINE__inline__ PyObject* __Pyx_PyNumber_Int(PyObject* x) {
73911 PyNumberMethods *m;
73912 const char *name = NULL((void*)0);
73913 PyObject *res = NULL((void*)0);
73914#if PY_MAJOR_VERSION2 < 3
73915 if (PyInt_Check(x)((((x)->ob_type)->tp_flags & ((1L<<23))) != 0
)
|| PyLong_Check(x)((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<
24))) != 0)
)
73916#else
73917 if (PyLong_Check(x)((((((PyObject*)(x))->ob_type))->tp_flags & ((1L<<
24))) != 0)
)
73918#endif
73919 return __Pyx_NewRef(x)(( ((PyObject*)(x))->ob_refcnt++), x);
73920 m = Py_TYPE(x)(((PyObject*)(x))->ob_type)->tp_as_number;
73921#if PY_MAJOR_VERSION2 < 3
73922 if (m && m->nb_int) {
73923 name = "int";
73924 res = PyNumber_Int(x);
73925 }
73926 else if (m && m->nb_long) {
73927 name = "long";
73928 res = PyNumber_Long(x);
73929 }
73930#else
73931 if (m && m->nb_int) {
73932 name = "int";
73933 res = PyNumber_Long(x);
73934 }
73935#endif
73936 if (res) {
73937#if PY_MAJOR_VERSION2 < 3
73938 if (!PyInt_Check(res)((((res)->ob_type)->tp_flags & ((1L<<23))) !=
0)
&& !PyLong_Check(res)((((((PyObject*)(res))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
73939#else
73940 if (!PyLong_Check(res)((((((PyObject*)(res))->ob_type))->tp_flags & ((1L<<
24))) != 0)
) {
73941#endif
73942 PyErr_Format(PyExc_TypeError,
73943 "__%.4s__ returned non-%.4s (type %.200s)",
73944 name, name, Py_TYPE(res)(((PyObject*)(res))->ob_type)->tp_name);
73945 Py_DECREF(res)do { if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( (
*(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc
)((PyObject *)((PyObject *)(res)))); } while (0)
;
73946 return NULL((void*)0);
73947 }
73948 }
73949 else if (!PyErr_Occurred()) {
73950 PyErr_SetString(PyExc_TypeError,
73951 "an integer is required");
73952 }
73953 return res;
73954}
73955static CYTHON_INLINE__inline__ Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
73956 Py_ssize_t ival;
73957 PyObject *x;
73958#if PY_MAJOR_VERSION2 < 3
73959 if (likely(PyInt_CheckExact(b))__builtin_expect(!!(((b)->ob_type == &PyInt_Type)), 1)) {
73960 if (sizeof(Py_ssize_t) >= sizeof(long))
73961 return PyInt_AS_LONG(b)(((PyIntObject *)(b))->ob_ival);
73962 else
73963 return PyInt_AsSsize_t(x);
73964 }
73965#endif
73966 if (likely(PyLong_CheckExact(b))__builtin_expect(!!(((((PyObject*)(b))->ob_type) == &PyLong_Type
)), 1)
) {
73967 #if CYTHON_USE_PYLONG_INTERNALS1
73968 const digit* digits = ((PyLongObject*)b)->ob_digit;
73969 const Py_ssize_t size = Py_SIZE(b)(((PyVarObject*)(b))->ob_size);
73970 if (likely(__Pyx_sst_abs(size) <= 1)__builtin_expect(!!(labs(size) <= 1), 1)) {
73971 ival = likely(size)__builtin_expect(!!(size), 1) ? digits[0] : 0;
73972 if (size == -1) ival = -ival;
73973 return ival;
73974 } else {
73975 switch (size) {
73976 case 2:
73977 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT30) {
73978 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
73979 }
73980 break;
73981 case -2:
73982 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT30) {
73983 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
73984 }
73985 break;
73986 case 3:
73987 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT30) {
73988 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
73989 }
73990 break;
73991 case -3:
73992 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT30) {
73993 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
73994 }
73995 break;
73996 case 4:
73997 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT30) {
73998 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
73999 }
74000 break;
74001 case -4:
74002 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT30) {
74003 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT30) | (size_t)digits[2]) << PyLong_SHIFT30) | (size_t)digits[1]) << PyLong_SHIFT30) | (size_t)digits[0]));
74004 }
74005 break;
74006 }
74007 }
74008 #endif
74009 return PyLong_AsSsize_t(b);
74010 }
74011 x = PyNumber_Index(b);
74012 if (!x) return -1;
74013 ival = PyInt_AsSsize_t(x);
74014 Py_DECREF(x)do { if ( --((PyObject*)(x))->ob_refcnt != 0) ; else ( (*(
((PyObject*)((PyObject *)(x)))->ob_type)->tp_dealloc)((
PyObject *)((PyObject *)(x)))); } while (0)
;
74015 return ival;
74016}
74017static CYTHON_INLINE__inline__ PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
74018 return PyInt_FromSize_t(ival);
74019}
74020
74021
74022#endif /* Py_PYTHON_H */