Open taojing2002 opened 4 years ago
The curl command:
curl -k -v -H "Authorization: Bearer ${token}" "https://api.test.dataone.org:30443/bookkeeper/v1/quotas?subscriber=CN=opc,DC=dataone,DC=org"aType=portal"
It returns a quota with usage 2.0
2.0
{"quotas":[{"id":4,"object":"quota","quotaType":"portal","softLimit":5.0,"hardLimit":5.0,"usage":2.0,"unit":"portal","subscriptionId":1,"subject":"CN=opc,DC=dataone,DC=org"}]}
However, when I list the usages associated with subscriber. It got two usages. However, one is inactive and it should NOT be counted. So the quota should have one usage rather than two.
inactive
curl -k -v -H "Authorization: Bearer ${token}" "https://api.test.dataone.org:30443/bookkeeper/v1/usages?subscriber=CN=opc,DC=dataone,DC=org"aType=portal"
It return with two usages. But one is inactive:
{"usages":[{"id":60,"object":"usage","quotaId":4,"instanceId":"urn:uuidc11e3c52-dad2-4ddb-8aeb-099e1ffe6533","quantity":1.0,"status":"active","nodeId":"urn:node:METACAT_TEST"}, {"id":61,"object":"usage","quotaId":4,"instanceId":"urn:uuidd991d85a-99ca-46b3-8f04-c8c560083505","quantity":1.0,"status":"inactive","nodeId":"urn:node:METACAT_TEST"}]}
This is fixed, and will be tested before I close the ticket.
The curl command:
It returns a quota with usage
2.0
However, when I list the usages associated with subscriber. It got two usages. However, one is
inactive
and it should NOT be counted. So the quota should have one usage rather than two.It return with two usages. But one is inactive: