Merge "Don't return content_location anymore"
This commit is contained in:
commit
15a08bda20
@ -158,7 +158,6 @@ class ItemResource(object):
|
||||
meta['href'] = req.path
|
||||
del meta['id']
|
||||
|
||||
resp.content_location = req.relative_uri
|
||||
resp.body = utils.to_json(meta)
|
||||
# status defaults to 200
|
||||
|
||||
|
@ -65,7 +65,6 @@ class Listing(object):
|
||||
response.status = falcon.HTTP_204
|
||||
return
|
||||
|
||||
response.content_location = request.relative_uri
|
||||
response.body = transport_utils.to_json(results)
|
||||
response.status = falcon.HTTP_200
|
||||
|
||||
@ -112,7 +111,6 @@ class Resource(object):
|
||||
# remove the name entry - it isn't needed on GET
|
||||
del data['name']
|
||||
response.body = transport_utils.to_json(data)
|
||||
response.content_location = request.relative_uri
|
||||
|
||||
def on_put(self, request, response, project_id, flavor):
|
||||
"""Registers a new flavor. Expects the following input:
|
||||
|
@ -32,7 +32,6 @@ class Resource(object):
|
||||
try:
|
||||
resp_dict = self.driver.health()
|
||||
|
||||
resp.content_location = req.path
|
||||
resp.body = utils.to_json(resp_dict)
|
||||
except Exception as ex:
|
||||
LOG.exception(ex)
|
||||
|
@ -212,8 +212,6 @@ class CollectionResource(object):
|
||||
u'project: %(project)s',
|
||||
{'queue': queue_name, 'project': project_id})
|
||||
|
||||
resp.content_location = req.relative_uri
|
||||
|
||||
ids = req.get_param_as_list('ids')
|
||||
|
||||
if ids is None:
|
||||
@ -325,7 +323,6 @@ class ItemResource(object):
|
||||
# Prepare response
|
||||
message['href'] = req.path
|
||||
|
||||
resp.content_location = req.relative_uri
|
||||
resp.body = utils.to_json(message)
|
||||
# status defaults to 200
|
||||
|
||||
|
@ -82,7 +82,6 @@ class Listing(object):
|
||||
response.status = falcon.HTTP_204
|
||||
return
|
||||
|
||||
response.content_location = request.relative_uri
|
||||
response.body = transport_utils.to_json(results)
|
||||
response.status = falcon.HTTP_200
|
||||
|
||||
@ -125,7 +124,6 @@ class Resource(object):
|
||||
# remove the name entry - it isn't needed on GET
|
||||
del data['name']
|
||||
response.body = transport_utils.to_json(data)
|
||||
response.content_location = request.relative_uri
|
||||
|
||||
def on_put(self, request, response, project_id, pool):
|
||||
"""Registers a new pool. Expects the following input:
|
||||
|
@ -50,7 +50,6 @@ class Resource(object):
|
||||
oldest['href'] = base_path + oldest['id']
|
||||
del oldest['id']
|
||||
|
||||
resp.content_location = req.path
|
||||
resp.body = utils.to_json(resp_dict)
|
||||
# status defaults to 200
|
||||
|
||||
@ -62,7 +61,6 @@ class Resource(object):
|
||||
'total': 0
|
||||
}
|
||||
}
|
||||
resp.content_location = req.path
|
||||
resp.body = utils.to_json(resp_dict)
|
||||
|
||||
except storage_errors.DoesNotExist as ex:
|
||||
|
@ -181,8 +181,6 @@ class ClaimsBaseTest(base.V1_1Base):
|
||||
claim = jsonutils.loads(body[0])
|
||||
|
||||
self.assertEqual(self.srmock.status, falcon.HTTP_200)
|
||||
self.assertEqual(self.srmock.headers_dict['Content-Location'],
|
||||
claim_href)
|
||||
self.assertEqual(claim['ttl'], 100)
|
||||
# NOTE(cpp-cabrera): verify that claim age is non-negative
|
||||
self.assertThat(claim['age'], matchers.GreaterThan(-1))
|
||||
|
@ -111,8 +111,6 @@ class MessagesBaseTest(base.V1_1Base):
|
||||
# Correct project ID
|
||||
result = self.simulate_get(message_uri, headers=self.headers)
|
||||
self.assertEqual(self.srmock.status, falcon.HTTP_200)
|
||||
self.assertEqual(self.srmock.headers_dict['Content-Location'],
|
||||
message_uri)
|
||||
|
||||
# Check message properties
|
||||
message = jsonutils.loads(result[0])
|
||||
@ -352,8 +350,6 @@ class MessagesBaseTest(base.V1_1Base):
|
||||
headers=self.headers)
|
||||
|
||||
self.assertEqual(self.srmock.status, falcon.HTTP_200)
|
||||
self.assertEqual(self.srmock.headers_dict['Content-Location'],
|
||||
path + '?' + query_string)
|
||||
|
||||
cnt = 0
|
||||
while jsonutils.loads(body[0])['messages'] != []:
|
||||
@ -379,8 +375,6 @@ class MessagesBaseTest(base.V1_1Base):
|
||||
self.assertEqual(self.srmock.status, falcon.HTTP_200)
|
||||
|
||||
message_stats = jsonutils.loads(body[0])['messages']
|
||||
self.assertEqual(self.srmock.headers_dict['Content-Location'],
|
||||
self.queue_path + '/stats')
|
||||
|
||||
# NOTE(kgriffs): The other parts of the stats are tested
|
||||
# in tests.storage.base and so are not repeated here.
|
||||
|
Loading…
Reference in New Issue
Block a user