Project

General

Profile

Actions

Bug #2909

closed

the rados_trunc function did not get implemented in rados.py Python

Added by Evan Felix almost 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
librados
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This code seems to work in the Ioctx class:

def trunc(self,key,size):
self.require_ioctx_open()
if not isinstance(key, str):
raise TypeError('key must be a string')
ret = self.librados.rados_trunc(self.io,c_char_p(key),c_size_t(size))
if ret < 0:
raise make_ex(ret, "Ioctx.trunc(%s): failed to truncate %s" % (self.name, key))
return ret
Actions

Also available in: Atom PDF