Node
The node model represents an individual node in a DSE cluster.
Managing Nodes | URL |
---|---|
Get a node object by ID |
|
Get a list of nodes |
|
Create a node |
|
Update a node |
|
Delete a node |
Managing Nodes
Node
{
"id": <value>,
"name": <value>,
"datacenter-id": <value>,
"ssh-management-address": <value>,
"ssh-management-port": <value>,
"listen-address": <value>,
"native-transport-address": <value>,
"broadcast-address": <value>,
"native-transport-broadcast-address": <value>,
"config-profile-id": <value>,
"machine-credential-id": <value>,
"initial-token": <value>,
"facts": {"<key>": <value>},
"seed": <value>,
"auto-bootstrap": <value>,
"rack": <value>,
"job-status": <value>,
"last-job-id": <value>,
"comment": <value>
}
Property | Description of Values |
---|---|
name |
A name for the node. |
datacenter-id |
The ID of the |
ssh-management-address |
The IP address of the node for access over SSH. Must be reachable from the OpsCenter server. This field is required, and in very simple network setups may be the only address field required. |
ssh-management-port |
SSH port on the managed node. Defaults to the value inherited from the |
listen-address |
Goes directly into the |
native-transport-address |
Goes directly into the |
broadcast-address |
Goes directly into the |
native-transport-broadcast-address |
Goes directly into the |
config-profile-id |
The ID of the |
machine-credential-id |
The ID of the |
initial-token |
In non-vnode clusters, this specifies the |
facts |
When a job runs on a node, the first thing it does is post back relevant facts about the target node, which may include
the contents of pre-existing config files (like |
seed |
When set to |
auto-bootstrap |
Similar to seed, can be set explicitly to populate the |
rack |
The rack name for this node. |
job-status |
The most recent job status for this node. Read-only. |
last-job-id |
Read-only field indicating the last job run on this node. See Jobs. |
comment |
A generic field for user comments. |
GET /api/v2/lcm/nodes/{id}
Gets a specific node record by ID.
Path arguments: id: A node ID.
Returns a node object.
Example:
curl http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4
Output:
{
"auto-bootstrap": null,
"broadcast-address": null,
"native-transport-broadcast-address": null,
"comment": null,
"config-profile-id": null,
"created-by": "system",
"created-on": "2016-06-21T19:07:26.477Z",
"datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
"facts": {},
"href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
"id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
"initial-token": null,
"job-status": null,
"last-job-id": null,
"listen-address": null,
"machine-credential-id": null,
"modified-by": "system",
"modified-on": "2016-06-21T19:07:26.477Z",
"name": "test-node",
"rack": "rack1",
"related-resources": {
"datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
},
"native-transport-address": null,
"seed": null,
"ssh-management-address": "10.10.10.100",
"ssh-management-port": null,
"type": "node"
}
GET /api/v2/lcm/nodes/
Gets a paginated list of all node records. See Paginated Results for an overview of the query string parameters that can be used.
Example:
curl http://localhost:8888/api/v2/lcm/nodes/
Output:
{
"count": 4,
"current": 1,
"last": 1,
"next": null,
"per-page": 50,
"previous": null,
"results": [
{
"broadcast-address": null,
"native-transport-broadcast-address": null,
"config-profile-id": null,
"created-on": "2016-06-21T19:07:26.477Z",
"datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
"href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
"id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
"job-status": null,
"last-job-id": null,
"listen-address": null,
"modified-on": "2016-06-21T19:07:26.477Z",
"name": "test-node",
"rack": "rack1",
"related-resources": {
"datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
},
"native-transport-address": null,
"seed": null,
"ssh-management-address": "10.10.10.100",
"ssh-management-port": null,
"type": "node"
}
],
}
POST /api/v2/lcm/nodes/
Creates a new node record.
Body: A node object (with no ID property).
Returns the newly created node object.
Example:
curl -X POST \
-d '{"name": "test-node",
"datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
"ssh-management-address": "10.10.10.100"}' \
http://localhost:8888/api/v2/lcm/nodes/
Output:
{
"auto-bootstrap": null,
"broadcast-address": null,
"native-transport-broadcast-address": null,
"comment": null,
"config-profile-id": null,
"created-by": "system",
"created-on": "2016-06-21T19:07:26.477Z",
"datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
"facts": {},
"href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
"id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
"initial-token": null,
"job-status": null,
"last-job-id": null,
"listen-address": null,
"machine-credential-id": null,
"modified-by": "system",
"modified-on": "2016-06-21T19:07:26.477Z",
"name": "test-node",
"rack": "rack1",
"related-resources": {
"datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
},
"native-transport-address": null,
"seed": null,
"ssh-management-address": "10.10.10.100",
"ssh-management-port": null,
"type": "node"
}
PUT /api/v2/lcm/nodes/{id}
Updates an existing node record by ID.
Path arguments: id: A node ID.
Returns the updated node object.
Example:
curl -X PUT -d '{"comment": "A new comment."}' http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4
Output:
{
"auto-bootstrap": null,
"broadcast-address": null,
"native-transport-broadcast-address": null,
"comment": "A new comment.",
"config-profile-id": null,
"created-by": "system",
"created-on": "2016-06-21T19:07:26.477Z",
"datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
"facts": {},
"href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
"id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
"initial-token": null,
"job-status": null,
"last-job-id": null,
"listen-address": null,
"machine-credential-id": null,
"modified-by": "system",
"modified-on": "2016-06-21T19:28:11.092Z",
"name": "test-node",
"rack": "rack1",
"related-resources": {
"datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
},
"native-transport-address": null,
"seed": null,
"ssh-management-address": "10.10.10.100",
"ssh-management-port": null,
"type": "node"
}
DELETE /api/v2/lcm/nodes/{id}
Deletes an existing node record by ID. This is subject to foreign key constraint violations.
Path arguments: id: A node ID.
Returns the IDs of the deleted objects.
Example:
curl -X DELETE http://localhost:8888/api/v2/lcm/nodes/400758df-c723-4709-8327-99283b451969
Output:
{"deleted": {"node": ["1166a7cd-f57b-4453-9592-4582764fd1e4"]}}