Rename /usages to /measurements

The plural format of usage is not proper in the context of billing.
measures could be a better name, especially given that the data in
Distil has been transformed, reflecting a time-based measurement.

Change-Id: Iece7bdb44fc6b80623477c55064998c6b0d75140
This commit is contained in:
Fei Long Wang 2017-03-21 15:59:20 +13:00
parent 0ddad09389
commit a311817795
2 changed files with 5 additions and 5 deletions

View File

@ -61,9 +61,9 @@ def costs_get():
return api.render(usage=costs.get_costs(project_id, start, end))
@rest.get('/usages')
@acl.enforce("rating:usages:get")
def usage_get():
@rest.get('/measurements')
@acl.enforce("rating:measurements:get")
def measurements_get():
project_id, start, end = _get_usage_args()
return api.render(usage=costs.get_usage(project_id, start, end))
return api.render(measurements=costs.get_usage(project_id, start, end))

View File

@ -4,5 +4,5 @@
"default": "rule:admin_or_owner",
"rating:costs:get": "rule:context_is_admin",
"rating:usages:get": "rule:context_is_admin"
"rating:measurements:get": "rule:context_is_admin",
}