import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
gpu_image_list = client.cloud.gpu_baremetal_clusters.images.list(
project_id=1,
region_id=7,
)
print(gpu_image_list.count){
"count": 1,
"results": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"min_disk": 123,
"min_ram": 123,
"name": "<string>",
"status": "<string>",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "<string>",
"architecture": "x86_64",
"gpu_driver": "nvidia",
"gpu_driver_type": "open",
"gpu_driver_version": "570.148.08",
"os_distro": "ubuntu",
"os_type": "linux",
"os_version": "19.04",
"size": 0,
"ssh_key": "allow",
"task_id": null
}
]
}import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
gpu_image_list = client.cloud.gpu_baremetal_clusters.images.list(
project_id=1,
region_id=7,
)
print(gpu_image_list.count){
"count": 1,
"results": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"min_disk": 123,
"min_ram": 123,
"name": "<string>",
"status": "<string>",
"tags": [
{
"key": "<string>",
"read_only": true,
"value": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "<string>",
"architecture": "x86_64",
"gpu_driver": "nvidia",
"gpu_driver_type": "open",
"gpu_driver_version": "570.148.08",
"os_distro": "ubuntu",
"os_type": "linux",
"os_version": "19.04",
"size": 0,
"ssh_key": "allow",
"task_id": null
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Project ID
1
Region ID
7
Was this page helpful?