def _send_inventory(response, resource_provider, inventory, status=200):
 response.status = status
 response.body = encodeutils.to_utf8(jsonutils.dumps(_serialize_inventory(inventory, generation=resource_provider.generation)))
 response.content_type = 'application/json'
 return response

def _send_inventory ( response , resource_provider , inventory , status = 200 ) : response . status = status response . body = encodeutils . to_utf8 ( jsonutils . dumps ( _serialize_inventory ( inventory , generation = resource_provider . generation ) ) ) response . content_type = 'application/json' return response
send a json representation of one single inventory .