librados_test_stub: add list_snaps implementation for ObjectReadOperation

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2015-04-14 12:33:41 -04:00
parent 6bd2284576
commit aedcce78e0

View File

@ -587,6 +587,18 @@ size_t ObjectOperation::size() {
return o->ops.size();
}
void ObjectReadOperation::list_snaps(snap_set_t *out_snaps, int *prval) {
TestObjectOperationImpl *o = reinterpret_cast<TestObjectOperationImpl*>(impl);
ObjectOperationTestImpl op = boost::bind(&TestIoCtxImpl::list_snaps, _1, _2,
out_snaps);
if (prval != NULL) {
op = boost::bind(save_operation_result,
boost::bind(op, _1, _2, _3), prval);
}
o->ops.push_back(op);
}
void ObjectReadOperation::read(size_t off, uint64_t len, bufferlist *pbl,
int *prval) {
TestObjectOperationImpl *o = reinterpret_cast<TestObjectOperationImpl*>(impl);