update to latest swift code
More updates will most likely be needed but these updates allow for some basic of functionality. Change-Id: I40ce259a0954be490ece06e93dc0a652c4cf3362 Signed-off-by: Thiago da Silva <thiago@redhat.com>
This commit is contained in:
parent
a1e386162c
commit
f23095a9cc
|
@ -102,11 +102,12 @@ class RadosFileSystem(object):
|
|||
|
||||
def write(self, obj, offset, data):
|
||||
try:
|
||||
return self._ioctx.write(obj, data, offset)
|
||||
self._ioctx.write(obj, data, offset)
|
||||
except self._fs.RADOS.NoSpace:
|
||||
raise DiskFileNoSpace()
|
||||
except Exception:
|
||||
raise DiskFileError()
|
||||
return len(data)
|
||||
|
||||
def read(self, obj, off):
|
||||
return self._ioctx.read(obj, offset=off)
|
||||
|
@ -165,6 +166,9 @@ class DiskFileWriter(object):
|
|||
metadata['name'] = self._name
|
||||
self._fs.put_object(self._name, metadata)
|
||||
|
||||
def commit(self, timestamp):
|
||||
pass
|
||||
|
||||
|
||||
class DiskFileReader(object):
|
||||
"""
|
||||
|
|
|
@ -53,7 +53,8 @@ class ObjectController(server.ObjectController):
|
|||
container, obj, **kwargs)
|
||||
|
||||
def async_update(self, op, account, container, obj, host, partition,
|
||||
contdevice, headers_out, objdevice):
|
||||
contdevice, headers_out, objdevice, policy,
|
||||
logger_thread_locals=None):
|
||||
"""
|
||||
Sends or saves an async update.
|
||||
|
||||
|
@ -68,7 +69,7 @@ class ObjectController(server.ObjectController):
|
|||
request
|
||||
:param objdevice: device name that the object is in
|
||||
"""
|
||||
headers_out['user-agent'] = 'obj-server %s' % os.getpid()
|
||||
headers_out['user-agent'] = 'object-server %s' % os.getpid()
|
||||
full_path = '/%s/%s/%s' % (account, container, obj)
|
||||
if all([host, partition, contdevice]):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue