summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-10-29 15:19:05 -0400
committerVijay Bellur <vbellur@redhat.com>2012-11-16 04:41:25 -0800
commit7fa7029dafa5b0da42651ffcd88e84915741c1b8 (patch)
tree50ed5dd7753c97df3fad3b5b953b6bf6efe10a0b
parenta1fd8c85eabc40b401e116285240af0b367e167f (diff)
object-storage: unused parameter cleanup & handl'n
Unsed parameter cleanup and handling changes. The device and partition parameters are not used. The account parameter is used in place of the device parameter. Rather than just making the device parameter reference the value of the account parameter, we just don't use the device parameter at all and make references to account. We also remove the device_path field from the class since it is unused. Additionally, we assert that we have a logger since the rest of the relies on that fact. Change-Id: Iea556319744ab4f729b1ce23d987650a164749db Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4168 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Tested-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
-rw-r--r--swift/1.4.8/plugins/DiskDir.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/swift/1.4.8/plugins/DiskDir.py b/swift/1.4.8/plugins/DiskDir.py
index ea6beee6592..29dec5ccb97 100644
--- a/swift/1.4.8/plugins/DiskDir.py
+++ b/swift/1.4.8/plugins/DiskDir.py
@@ -136,8 +136,8 @@ class DiskDir(DiskCommon):
Manage object files on disk.
:param path: path to devices on the node
- :param device: device name
- :param partition: partition on the device the object lives in
+ :param device: device name (unused, ignored)
+ :param partition: partition on the device the object lives in (unused, ignored)
:param account: account name for the object
:param container: container name for the object
:param logger: account or container server logging object
@@ -148,7 +148,6 @@ class DiskDir(DiskCommon):
def __init__(self, path, device, partition, account, container, logger,
uid=DEFAULT_UID, gid=DEFAULT_GID):
self.root = path
- device = account
if container:
self.name = container
else:
@@ -156,11 +155,11 @@ class DiskDir(DiskCommon):
if self.name:
self.datadir = os.path.join(path, account, self.name)
else:
- self.datadir = os.path.join(path, device)
+ self.datadir = os.path.join(path, account)
self.account = account
- self.device_path = os.path.join(path, device)
- if not check_mount(path, device):
+ if not check_mount(path, account):
check_valid_account(account)
+ assert logger is not None
self.logger = logger
self.metadata = {}
self.uid = int(uid)