Changed post_as_copy to object_post_as_copy

This commit is contained in:
gholt 2011-06-08 04:29:24 +00:00
parent 7c9e542c02
commit 41fcf63241
4 changed files with 15 additions and 15 deletions

View File

@ -547,11 +547,11 @@ error_suppression_limit 10 Error count to consider a
node error limited
allow_account_management false Whether account PUTs and DELETEs
are even callable
post_as_copy true Set post_as_copy = false to turn
on fast posts where only the
metadata changes are stored anew
and the original data file is
kept in place. This makes for
object_post_as_copy true Set object_post_as_copy = false
to turn on fast posts where only
the metadata changes are stored
anew and the original data file
is kept in place. This makes for
quicker posts; but since the
container metadata isn't updated
in this mode, features like

View File

@ -40,11 +40,11 @@ use = egg:swift#proxy
# If set to 'true' any authorized user may create and delete accounts; if
# 'false' no one, even authorized, can.
# allow_account_management = false
# Set post_as_copy = false to turn on fast posts where only the metadata
# Set object_post_as_copy = false to turn on fast posts where only the metadata
# changes are stored anew and the original data file is kept in place. This
# makes for quicker posts; but since the container metadata isn't updated in
# this mode, features like container sync won't be able to sync posts.
# post_as_copy = true
# object_post_as_copy = true
[filter:swauth]
use = egg:swift#swauth

View File

@ -872,7 +872,7 @@ class ObjectController(Controller):
@delay_denial
def POST(self, req):
"""HTTP POST request handler."""
if self.app.post_as_copy:
if self.app.object_post_as_copy:
req.method = 'PUT'
req.path_info = '/%s/%s/%s' % (self.account_name,
self.container_name, self.object_name)
@ -1443,8 +1443,8 @@ class BaseApplication(object):
int(conf.get('recheck_account_existence', 60))
self.allow_account_management = \
conf.get('allow_account_management', 'false').lower() == 'true'
self.post_as_copy = \
conf.get('post_as_copy', 'true').lower() in TRUE_VALUES
self.object_post_as_copy = \
conf.get('object_post_as_copy', 'true').lower() in TRUE_VALUES
self.resellers_conf = ConfigParser()
self.resellers_conf.read(os.path.join(swift_dir, 'resellers.conf'))
self.object_ring = object_ring or \

View File

@ -925,7 +925,7 @@ class TestObjectController(unittest.TestCase):
def test_POST(self):
with save_globals():
self.app.post_as_copy = False
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@ -1084,7 +1084,7 @@ class TestObjectController(unittest.TestCase):
def test_POST_meta_val_len(self):
with save_globals():
self.app.post_as_copy = False
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
proxy_server.http_connect = \
@ -1127,7 +1127,7 @@ class TestObjectController(unittest.TestCase):
def test_POST_meta_key_len(self):
with save_globals():
self.app.post_as_copy = False
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
proxy_server.http_connect = \
@ -1536,7 +1536,7 @@ class TestObjectController(unittest.TestCase):
def test_PUT_POST_requires_container_exist(self):
with save_globals():
self.app.post_as_copy = False
self.app.object_post_as_copy = False
self.app.memcache = FakeMemcacheReturnsNone()
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@ -2753,7 +2753,7 @@ class TestObjectController(unittest.TestCase):
called[0] = True
return HTTPUnauthorized(request=req)
with save_globals():
self.app.post_as_copy = False
self.app.object_post_as_copy = False
proxy_server.http_connect = \
fake_http_connect(200, 200, 201, 201, 201)
controller = proxy_server.ObjectController(self.app, 'account',