Skip to content

Slurm Allocations

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/slurm-allocations/ List Slurm Allocations
GET /api/slurm-allocations/{uuid}/ Retrieve
POST /api/slurm-allocations/ Create
POST /api/slurm-allocations/{uuid}/pull/ Synchronize resource state
POST /api/slurm-allocations/{uuid}/unlink/ Unlink resource
PUT /api/slurm-allocations/{uuid}/ Update
PATCH /api/slurm-allocations/{uuid}/ Partial Update
DELETE /api/slurm-allocations/{uuid}/ Delete
Other Actions
POST /api/slurm-allocations/{uuid}/set_limits/ Set limits

Core CRUD

List Slurm Allocations

1
2
3
4
http \
  GET \
  https://api.example.com/api/slurm-allocations/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.slurm_allocations import slurm_allocations_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = slurm_allocations_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: slurm_allocations_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { slurmAllocationsList } from 'waldur-js-client';

try {
  const response = await slurmAllocationsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
backend_id string
can_manage boolean Can manage
customer string (uuid)
customer_abbreviation string
customer_name string
customer_native_name string
customer_uuid string (uuid)
description string
external_ip string
field array
is_active boolean
name string
name_exact string
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project string (uuid)
project_name string
project_uuid string (uuid)
service_settings_name string
service_settings_uuid string (uuid)
state array
uuid string (uuid)

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
cpu_limit integer
cpu_usage integer
gpu_limit integer
gpu_usage integer
ram_limit integer
ram_usage integer
username string
gateway string
is_active boolean
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.slurm_allocations import slurm_allocations_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = slurm_allocations_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: slurm_allocations_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { slurmAllocationsRetrieve } from 'waldur-js-client';

try {
  const response = await slurmAllocationsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
cpu_limit integer
cpu_usage integer
gpu_limit integer
gpu_usage integer
ram_limit integer
ram_usage integer
username string
gateway string
is_active boolean
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Create

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/slurm-allocations/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-slurm-allocation" \
  service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.slurm_allocation_request import SlurmAllocationRequest # (1)
from waldur_api_client.api.slurm_allocations import slurm_allocations_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SlurmAllocationRequest(
    name="my-awesome-slurm-allocation",
    service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = slurm_allocations_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SlurmAllocationRequest
  2. API Source: slurm_allocations_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import { slurmAllocationsCreate } from 'waldur-js-client';

try {
  const response = await slurmAllocationsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-slurm-allocation",
    "service_settings": "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "project": "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
description string
service_settings string (uri)
project string (uri)

201 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
cpu_limit integer
cpu_usage integer
gpu_limit integer
gpu_usage integer
ram_limit integer
ram_usage integer
username string
gateway string
is_active boolean
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Synchronize resource state

Schedule an asynchronous pull operation to synchronize resource state from the backend. Returns 202 if the pull was scheduled successfully, or 409 if the pull operation is not implemented for this resource type.

1
2
3
4
http \
  POST \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pull/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.slurm_allocations import slurm_allocations_pull # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = slurm_allocations_pull.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: slurm_allocations_pull
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { slurmAllocationsPull } from 'waldur-js-client';

try {
  const response = await slurmAllocationsPull({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

202 - No response body


409 - No response body


Delete resource from the database without scheduling operations on backend and without checking current state of the resource. It is intended to be used for removing resource stuck in transitioning state.

1
2
3
4
http \
  POST \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unlink/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.slurm_allocations import slurm_allocations_unlink # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = slurm_allocations_unlink.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: slurm_allocations_unlink
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { slurmAllocationsUnlink } from 'waldur-js-client';

try {
  const response = await slurmAllocationsUnlink({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Update

1
2
3
4
5
6
7
http \
  PUT \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-slurm-allocation" \
  service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.slurm_allocation_request import SlurmAllocationRequest # (1)
from waldur_api_client.api.slurm_allocations import slurm_allocations_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SlurmAllocationRequest(
    name="my-awesome-slurm-allocation",
    service_settings="https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    project="https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = slurm_allocations_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SlurmAllocationRequest
  2. API Source: slurm_allocations_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import { slurmAllocationsUpdate } from 'waldur-js-client';

try {
  const response = await slurmAllocationsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-slurm-allocation",
    "service_settings": "https://api.example.com/api/service-settings/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "project": "https://api.example.com/api/project/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string
service_settings string (uri)
project string (uri)

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
cpu_limit integer
cpu_usage integer
gpu_limit integer
gpu_usage integer
ram_limit integer
ram_usage integer
username string
gateway string
is_active boolean
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_slurm_allocation_request import PatchedSlurmAllocationRequest # (1)
from waldur_api_client.api.slurm_allocations import slurm_allocations_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedSlurmAllocationRequest()
response = slurm_allocations_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedSlurmAllocationRequest
  2. API Source: slurm_allocations_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { slurmAllocationsPartialUpdate } from 'waldur-js-client';

try {
  const response = await slurmAllocationsPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
service_name string
service_settings string (uri)
service_settings_uuid string (uuid)
service_settings_state string
service_settings_error_message string
project string (uri)
project_name string
project_uuid string (uuid)
customer string (uri)
customer_uuid string (uuid)
customer_name string
customer_native_name string
customer_abbreviation string
error_message string
error_traceback string
resource_type string
state any
created string (date-time)
modified string (date-time)
backend_id string
access_url string
cpu_limit integer
cpu_usage integer
gpu_limit integer
gpu_usage integer
ram_limit integer
ram_usage integer
username string
gateway string
is_active boolean
marketplace_offering_uuid string
marketplace_offering_name string
marketplace_offering_plugin_options object (free-form)
marketplace_category_uuid string
marketplace_category_name string
marketplace_resource_uuid string
marketplace_plan_uuid string
marketplace_resource_state string
is_usage_based boolean
is_limit_based boolean

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.slurm_allocations import slurm_allocations_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = slurm_allocations_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: slurm_allocations_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { slurmAllocationsDestroy } from 'waldur-js-client';

try {
  const response = await slurmAllocationsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Set limits

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/slurm-allocations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/set_limits/ \
  Authorization:"Token YOUR_API_TOKEN" \
  cpu_limit=123 \
  gpu_limit=123 \
  ram_limit=2048
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.slurm_allocation_set_limits_request import SlurmAllocationSetLimitsRequest # (1)
from waldur_api_client.api.slurm_allocations import slurm_allocations_set_limits # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = SlurmAllocationSetLimitsRequest(
    cpu_limit=123,
    gpu_limit=123,
    ram_limit=2048
)
response = slurm_allocations_set_limits.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: SlurmAllocationSetLimitsRequest
  2. API Source: slurm_allocations_set_limits
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import { slurmAllocationsSetLimits } from 'waldur-js-client';

try {
  const response = await slurmAllocationsSetLimits({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "cpu_limit": 123,
    "gpu_limit": 123,
    "ram_limit": 2048
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
cpu_limit integer
gpu_limit integer
ram_limit integer

200 -

Field Type
cpu_limit integer
gpu_limit integer
ram_limit integer