summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-10-29 14:39:44 -0400
committerVijay Bellur <vbellur@redhat.com>2012-11-16 04:39:05 -0800
commita6b51d60b07dea9ce5ef4cfb2ea9c2c2f7ecfe41 (patch)
tree23634bf59eb689c783bc94296b9931f6240a6ac6
parentb6386c8fe34c7940357a916d3c715b278a144122 (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 f4ca366b236..1f74ff2a59f 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