Skip to content

Rancher Nodes

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/rancher-nodes/ List Rancher Nodes
GET /api/rancher-nodes/{uuid}/ Retrieve
POST /api/rancher-nodes/ Create
POST /api/rancher-nodes/{uuid}/pull/ Synchronize resource state
POST /api/rancher-nodes/{uuid}/unlink/ Unlink resource
POST /api/rancher-nodes/{uuid}/unlink_openstack/ Unlinks node from OpenStack instance
DELETE /api/rancher-nodes/{uuid}/ Delete
Other Actions
GET /api/rancher-nodes/{uuid}/console_log/ Returns console log for the node
GET /api/rancher-nodes/{uuid}/console/ Returns console URL for the node
POST /api/rancher-nodes/{uuid}/link_openstack/ Links node to OpenStack instance

Core CRUD

List Rancher Nodes

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-nodes/ \
  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.rancher_nodes import rancher_nodes_list # (1)

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

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

try {
  const response = await rancherNodesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
cluster_uuid string (uuid)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

200 -

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

Field Type Description
uuid string (uuid)
url string (uri)
created string (date-time)
modified string (date-time)
name string
backend_id string
project_uuid string (uuid)
service_settings_name string
service_settings_uuid string (uuid)
resource_type string
state any
cluster string (uri)
cluster_name string
cluster_uuid string (uuid)
instance string
instance_name string
instance_uuid string (uuid)
instance_marketplace_uuid string (uuid)
role string
Enum: agent, server
k8s_version string
docker_version string
cpu_allocated number (double)
cpu_total integer
ram_allocated integer Allocated RAM in Mi.
ram_total integer Total RAM in Mi.
pods_allocated integer
pods_total integer
labels any
annotations any
runtime_state string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-nodes/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.rancher_nodes import rancher_nodes_retrieve # (1)

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

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

try {
  const response = await rancherNodesRetrieve({
  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)

200 -

Field Type Description
uuid string (uuid)
url string (uri)
created string (date-time)
modified string (date-time)
name string
backend_id string
project_uuid string (uuid)
service_settings_name string
service_settings_uuid string (uuid)
resource_type string
state any
cluster string (uri)
cluster_name string
cluster_uuid string (uuid)
instance string
instance_name string
instance_uuid string (uuid)
instance_marketplace_uuid string (uuid)
role string
Enum: agent, server
k8s_version string
docker_version string
cpu_allocated number (double)
cpu_total integer
ram_allocated integer Allocated RAM in Mi.
ram_total integer Total RAM in Mi.
pods_allocated integer
pods_total integer
labels any
annotations any
runtime_state string

Create

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/rancher-nodes/ \
  Authorization:"Token YOUR_API_TOKEN" \
  cluster="https://api.example.com/api/cluster/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  role="agent" \
  subnet="https://api.example.com/api/subnet/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.rancher_create_node_request import RancherCreateNodeRequest # (1)
from waldur_api_client.api.rancher_nodes import rancher_nodes_create # (2)

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

body_data = RancherCreateNodeRequest(
    cluster="https://api.example.com/api/cluster/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    role="agent",
    subnet="https://api.example.com/api/subnet/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = rancher_nodes_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await rancherNodesCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "cluster": "https://api.example.com/api/cluster/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "role": "agent",
    "subnet": "https://api.example.com/api/subnet/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
cluster string (uri)
role string
system_volume_size integer
system_volume_type string (uri)
memory integer
cpu integer
subnet string (uri)
flavor string (uri)
data_volumes array of objects
data_volumes.size integer
data_volumes.volume_type string (uri)
data_volumes.filesystem string
data_volumes.mount_point string
ssh_public_key string (uri)
tenant string (uri)

201 -

Field Type
cluster string (uri)
role string
uuid string (uuid)

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/rancher-nodes/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.rancher_nodes import rancher_nodes_pull # (1)

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

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

try {
  const response = await rancherNodesPull({
  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/rancher-nodes/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.rancher_nodes import rancher_nodes_unlink # (1)

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

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

try {
  const response = await rancherNodesUnlink({
  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


Unlinks node from OpenStack instance.

1
2
3
4
http \
  POST \
  https://api.example.com/api/rancher-nodes/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unlink_openstack/ \
  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.rancher_nodes import rancher_nodes_unlink_openstack # (1)

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

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

try {
  const response = await rancherNodesUnlinkOpenstack({
  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)

200 - No response body


Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/rancher-nodes/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.rancher_nodes import rancher_nodes_destroy # (1)

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

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

try {
  const response = await rancherNodesDestroy({
  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

Returns console log for the node

Returns console log for the node.

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-nodes/a1b2c3d4-e5f6-7890-abcd-ef1234567890/console_log/ \
  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.rancher_nodes import rancher_nodes_console_log_retrieve # (1)

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

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

try {
  const response = await rancherNodesConsoleLogRetrieve({
  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
length integer

200 -


404 - No response body


Returns console URL for the node

Returns console URL for the node.

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-nodes/a1b2c3d4-e5f6-7890-abcd-ef1234567890/console/ \
  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.rancher_nodes import rancher_nodes_console_retrieve # (1)

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

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

try {
  const response = await rancherNodesConsoleRetrieve({
  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)

200 -

Field Type
url string (uri)

Links node to OpenStack instance.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/rancher-nodes/a1b2c3d4-e5f6-7890-abcd-ef1234567890/link_openstack/ \
  Authorization:"Token YOUR_API_TOKEN" \
  instance="https://api.example.com/api/instance/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.link_openstack_request import LinkOpenstackRequest # (1)
from waldur_api_client.api.rancher_nodes import rancher_nodes_link_openstack # (2)

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

body_data = LinkOpenstackRequest(
    instance="https://api.example.com/api/instance/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = rancher_nodes_link_openstack.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await rancherNodesLinkOpenstack({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "instance": "https://api.example.com/api/instance/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
instance string (uri)

200 - No response body