From 80146100bd4f27c3cce0fcb92c636201f0c57c6f Mon Sep 17 00:00:00 2001 From: Peter Portante Date: Mon, 29 Oct 2012 15:19:05 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/4168 Reviewed-by: Pete Zaitcev Tested-by: Pete Zaitcev Reviewed-by: Mohammed Junaid --- swift/1.4.8/plugins/DiskDir.py | 11 +++++------ 1 file 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) -- cgit