Config option to specify default COS
Currently, in certain HPSS configurations, it is not possible to make a PUT without adding the Header "X-HPSS-Class-Of-Service-Id". With this commit, a default COS can be specified in the config, in order to let the user allow to omit the Header on each PUT request. Change-Id: I4ad2fadc95cf557a1d226e336013324c339d51b6
This commit is contained in:
parent
dc62c40a01
commit
cdb589c32d
@ -88,6 +88,7 @@ class ObjectController(server.ObjectController):
|
||||
config_true_value(conf.get('read_pickled_metadata', 'no'))
|
||||
self.allow_purgelock = \
|
||||
config_true_value(conf.get('allow_purgelock', True))
|
||||
self.default_cos_id = conf.get('default_cos_id')
|
||||
|
||||
def get_container_ring(self):
|
||||
"""Get the container ring. Load it, if it hasn't been yet."""
|
||||
@ -161,7 +162,8 @@ class ObjectController(server.ObjectController):
|
||||
elapsed_time = 0
|
||||
|
||||
# (HPSS) Check for HPSS-specific metadata headers
|
||||
cos = request.headers.get('X-Hpss-Class-Of-Service-Id', None)
|
||||
cos = request.headers.get('X-Hpss-Class-Of-Service-Id',
|
||||
self.default_cos_id)
|
||||
|
||||
if self.allow_purgelock:
|
||||
purgelock = config_true_value(
|
||||
|
Loading…
x
Reference in New Issue
Block a user