From 513988915aa1af13a989d062b021fe1562cbf18d Mon Sep 17 00:00:00 2001 From: venkata edara Date: Wed, 10 May 2017 13:27:38 +0530 Subject: Rebase to Swift 2.10.1 (newton) Change-Id: I53a962c9a301089c8aed0b43c50f944c30225944 Signed-off-by: venkata edara Reviewed-on: https://review.gluster.org/16653 Reviewed-by: Prashanth Pai Tested-by: Prashanth Pai --- gluster/swift/common/constraints.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gluster/swift/common/constraints.py') diff --git a/gluster/swift/common/constraints.py b/gluster/swift/common/constraints.py index 98e2a27..2007b71 100644 --- a/gluster/swift/common/constraints.py +++ b/gluster/swift/common/constraints.py @@ -102,3 +102,14 @@ _ring.Ring = ring.Ring import swift.account.utils from gluster.swift.account.utils import account_listing_response as gf_als swift.account.utils.account_listing_response = gf_als + +# Monkey patch StoragePolicy.load_ring as POLICIES are initialized already +from swift.common.storage_policy import StoragePolicy + + +def load_ring(self, swift_dir): + if self.object_ring: + return + self.object_ring = ring.Ring(swift_dir, ring_name='object') + +StoragePolicy.load_ring = load_ring -- cgit