summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-10-29 14:39:44 -0400
committerPeter Portante <peter.portante@redhat.com>2013-04-29 16:35:55 -0400
commitea83947fd7a20571429e183eaaee1d61edca44b8 (patch)
tree21093d513168f0121334ecef0ad4597a7b16b6ff
parent29d922d35568f48398ba03a3af79145f52dfaac9 (diff)
object-storage: minor code cleanups
Apply a few minor code cleanups to help reduce future refactoring diffs. * Remove extra lines between methods so that all methods are consistently spaced by one line * Remove unused field meta_file * Add missing documentation for uid and gid parameters Change-Id: I0a38eb06680eb0709edfaa1828d09657823f778e Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4166 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r--swift/1.4.8/plugins/DiskFile.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/swift/1.4.8/plugins/DiskFile.py b/swift/1.4.8/plugins/DiskFile.py
index f4ca366..1f74ff2 100644
--- a/swift/1.4.8/plugins/DiskFile.py
+++ b/swift/1.4.8/plugins/DiskFile.py
@@ -51,6 +51,8 @@ class Gluster_DiskFile(DiskFile):
:param obj: object name for the object
:param keep_data_fp: if True, don't close the fp, otherwise close it
:param disk_chunk_Size: size of chunks on file reads
+ :param uid: user ID disk object should assume (file or directory)
+ :param gid: group ID disk object should assume (file or directory)
"""
def __init__(self, path, device, partition, account, container, obj,
@@ -81,7 +83,6 @@ class Gluster_DiskFile(DiskFile):
self.tmpdir = os.path.join(path, device, 'tmp')
self.logger = logger
self.metadata = {}
- self.meta_file = None
self.data_file = None
self.fp = None
self.iter_etag = None
@@ -150,14 +151,11 @@ class Gluster_DiskFile(DiskFile):
create_object_metadata(dir_path)
return True
-
-
def put_metadata(self, metadata):
obj_path = self.datadir + '/' + self.obj
write_metadata(obj_path, metadata)
self.metadata = metadata
-
def put(self, fd, tmppath, metadata, extension=''):
"""
Finalize writing the file on disk, and renames it from the temp file to
@@ -217,7 +215,6 @@ class Gluster_DiskFile(DiskFile):
self.data_file = self.datadir + '/' + self.obj + extension
return True
-
def unlinkold(self, timestamp):
"""
Remove any older versions of the object file. Any file that has an