When trying to update an invalid resource class, I correctly get rejected.
When a valid resource class name (see list) is given, I get internal error
(tools) stuartc@stuartc-malt1 code % http GET https://credits.apps.gbnwp-cl2.ipu.graphcore.ai/resource_class/ Authorization:'Bearer bxxxxxx5'
HTTP/1.1 200 OK
Allow: GET, POST, HEAD, OPTIONS
Connection: keep-alive
Content-Length: 417
Content-Type: application/json
Cross-Origin-Opener-Policy: same-origin
Date: Thu, 10 Apr 2025 15:47:28 GMT
Referrer-Policy: same-origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
[
{
"created": "2025-04-10T10:19:01.777316Z",
"id": 3,
"name": "MEMORY_MB",
"url": "http://credits.apps.gbnwp-cl2.ipu.graphcore.ai/resource_class/3/"
},
{
"created": "2025-04-10T10:19:01.762617Z",
"id": 2,
"name": "DISK_GB",
"url": "http://credits.apps.gbnwp-cl2.ipu.graphcore.ai/resource_class/2/"
},
{
"created": "2025-04-10T10:19:01.727335Z",
"id": 1,
"name": "VCPU",
"url": "http://credits.apps.gbnwp-cl2.ipu.graphcore.ai/resource_class/1/"
}
]
With invalid name
(tools) stuartc@stuartc-malt1 code % http -j POST https://credits.apps.gbnwp-cl2.ipu.graphcore.ai/allocation/2/resources/ Authorization:'Bearer bxxxx5' VPU=10
HTTP/1.1 403 Forbidden
Allow: GET, POST, HEAD, OPTIONS
Connection: keep-alive
Content-Length: 69
Content-Type: application/json
Cross-Origin-Opener-Policy: same-origin
Date: Thu, 10 Apr 2025 16:09:13 GMT
Referrer-Policy: same-origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
{
"error": "NoResourceClass(\"Resource class 'VPU' does not exist.\")"
}
and valid name
(tools) stuartc@stuartc-malt1 code % http -j POST https://credits.apps.gbnwp-cl2.ipu.graphcore.ai/allocation/2/resources/ Authorization:'Bearer bd3da04f9cda6a2eddcc3a1bd6eb45b021fabae5' VCPU=10
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Length: 145
Content-Type: text/html; charset=utf-8
Cross-Origin-Opener-Policy: same-origin
Date: Thu, 10 Apr 2025 16:09:17 GMT
Referrer-Policy: same-origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
<!doctype html>
<html lang="en">
<head>
<title>Server Error (500)</title>
</head>
<body>
<h1>Server Error (500)</h1><p></p>
</body>
</html>
The allocation itself and valid and there are not existing resources for it.
Also note that the API documentation (from the code) says that the data should include a "resources" field with the data in it, but that doesn't work either
Example Request: { "resources": {"VCPU": 50, "MEMORY_MB": 2000, "DISK_GB": 1000}, }
When trying to update an invalid resource class, I correctly get rejected.
When a valid resource class name (see list) is given, I get internal error
With invalid name
and valid name
The allocation itself and valid and there are not existing resources for it.
Also note that the API documentation (from the code) says that the data should include a "resources" field with the data in it, but that doesn't work either
Example Request: { "resources": {"VCPU": 50, "MEMORY_MB": 2000, "DISK_GB": 1000}, }