diff options
author | Peter Portante <peter.portante@redhat.com> | 2012-10-29 20:19:07 -0400 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-16 04:45:51 -0800 |
commit | 7066b4925dd51bdcf0f1eb2db6f455499e69c48b (patch) | |
tree | 40c2bc9f33e14895ab73e5f88faf73e6a925742c /swift/1.4.8/swift.diff | |
parent | 92fed1249752ff1feb6cd0b004e9550ba666a7b0 (diff) |
object-storage: DiskAccount subclassing of DiskDir
Changes to make DiskAccount subclass DiskDir complete. This change helps
reduce the diffs ahead of further refactoring. Note that DiskDir initializes
all the same fields as DiskAccount, plus a few more, and ends up reading the
metadata properly, while only adding a couple of fields not used for account
purposes.
This change also passes the account controller's logger for use by the
DiskAccount class.
Along the way we:
* Remove the redundant update_account() method in the DiskCommon base
class, since the update_container() method in DiskDir performs the exact
same functionality
* Remove the initialization of variables ahead of assignments in two
cases, and also move the initialization of the list variables closer to
where they are used
* Collapse the imports from swift.plugins.utils into one statement
* Use a temporary directory for the db_file.db when we find ourselves in a
unit test environment
Change-Id: I4dc59b416a66393adfe0ed32c7a62c79731d70c0
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4172
Reviewed-by: Pete Zaitcev <zaitcev@redhat.com>
Tested-by: Pete Zaitcev <zaitcev@redhat.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
Diffstat (limited to 'swift/1.4.8/swift.diff')
-rw-r--r-- | swift/1.4.8/swift.diff | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swift/1.4.8/swift.diff b/swift/1.4.8/swift.diff index 522e651cb0d..889a3b1cd21 100644 --- a/swift/1.4.8/swift.diff +++ b/swift/1.4.8/swift.diff @@ -18,7 +18,7 @@ index d195d34..ef625ff 100644 }, ) diff --git a/swift/account/server.py b/swift/account/server.py -index 800b3c0..ba13786 100644 +index 800b3c0..78fbf07 100644 --- a/swift/account/server.py +++ b/swift/account/server.py @@ -1,4 +1,5 @@ @@ -59,7 +59,7 @@ index 800b3c0..ba13786 100644 def _get_account_broker(self, drive, part, account): + if Gluster_enabled(): -+ return DiskAccount(self.root, account) ++ return DiskAccount(self.root, account, self.logger) hsh = hash_path(account) db_dir = storage_directory(DATADIR, part, hsh) db_path = os.path.join(self.root, drive, db_dir, hsh + '.db') |