summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-10-29 15:19:05 -0400
committerPeter Portante <peter.portante@redhat.com>2013-04-29 16:35:55 -0400
commit80146100bd4f27c3cce0fcb92c636201f0c57c6f (patch)
tree7c0d7e31b55701ebe4d7292c07758d4acf427a84
parent60a371f4463e6d2042b2417486c81f0563729af0 (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 ea6beee..29dec5c 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)