REST API¶
Note
You need token to access REST API. Receiving a token is described in tab with additional information.
CloudManager API¶
It allows to manage nodes, provides additional information used in the CloudManager module.
Module information¶
Detailed information about module.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/info | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
license (Optional) | body | object | Module license information. |
version | body | string | Module version. |
Example of getting information about module in JSON format:
{
"info": {
"license": {
"created_at": 1538141220,
"expire_at": 1545955200,
"module_package": "cloud_manager",
"name": "TestLicense",
"product": "CloudManager",
"surrogate_name": "CloudManager",
"unique_id": "04-002-4b21d15097656c2c0834",
"verified": true
},
"version": "2.0"
}
}
Instances and compute nodes¶
Actions on instances and compute nodes.
Evacuating all instnaces from compute node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
host_name | path | string | Host name. Required parameter. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/hosts/$host_name/actions/evacuate
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Disabling compute node with attempt to migrate running instances.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
host_name | path | string | Host name. Required parameter. |
allow_off_vm (Optional) | body | bool | Additional parameter, it allows hard migration instance in case of live migration failure. |
allow_evacuate (Optional) | body | bool | Additional parameter, it allows evacuation of instance in case of live migration failure. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"allow_off_vm": true, "allow_evacuate": true}' http://controller:9362/v1/hosts/$host_name/actions/shutdown
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Decommissioning of compute node with attempt to migrate running instances.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
host_name | path | string | Host name. Required parameter. |
allow_live_migrate (Optional) | body | bool | Additional parameter, it allows live migration of instance. |
allow_migrate (Optional) | body | bool | Additional parameter, it allows hard migration instance in case of live migration failure. |
allow_evacuate (Optional) | body | bool | Additional parameter, it allows evacuation of instance in case of live migration failure. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"allow_live_migrate": true, "allow_migrate": true, "allow_evacuate": true}' http://controller:9362/v1/hosts/$host_name/actions/decommission
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Performing restart compute nodes with pre-migration instances.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
hosts | body | list | Compute nodes names. |
in_sequence (Optional) | body | bool | Additional parameter, it allows to restart sequentially. |
allow_off_vm (Optional) | body | bool | Additional parameter, it allows hard migration instance in case of live migration failure. |
allow_evacuate (Optional) | body | bool | Additional parameter, it allows evacuation of instance in case of live migration failure. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"hosts": ["mnode1.develop.stand.loc", "mnode2.develop.stand.loc"], "allow_off_vm": true, "allow_evacuate": true, "in_sequence": true}' http://controller:9362/v1/hosts/actions/restart
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Balancing instance to another node.
Request¶
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/servers/$server_id/actions/balance
This operation has no response content.
Making attempt of recovering instance with preliminary reset state.
Request¶
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/servers/$server_id/actions/recover
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Making attempt of instance recovering.
Request¶
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/servers/$server_id/actions/repair
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Making attempt to resete instance state with reboot.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
reboot (Optional) | body | bool | Additional parameter, it allows to reboot after resetting the state. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"reboot": true}' http://controller:9362/v1/servers/$server_id/actions/reset-reboot
This operation has no response content.
Making attempt to wake up instance.
Request¶
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/servers/$server_id/actions/wakeup
This operation has no response content.
Performing a full clone of instance with copying of attached volumes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
count (Optional) | body | integer | Number of clones. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"count": 2}' http://controller:9362/v1/servers/$server_id/actions/clone
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Getting metadata of instance.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" $controller:9362/v1/system_metadata/45bb8680-c070-4080-be45-ec4d2312eda8 | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
metadata (Optional) | body | string | Metadata. Example:
|
Sample result in JSON format:
{
"metadata": {
"image_base_image_ref": "f0576590-ad14-4963-a47d-4fd17b6ddb80",
"image_container_format": "bare",
"image_disk_format": "qcow2",
"image_min_disk": "10",
"image_min_ram": "0"
}
}
Update metadata of instance.
Request¶
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"image_min_ram": "1", "image_min_disk": "10", "image_disk_format": "qcow2", "image_container_format": "bare", "image_base_image_ref": "f0576590-ad14-4963-a47d-4fd17b6ddb80"}' $controller:9362/v1/system_metadata/45bb8680-c070-4080-be45-ec4d2312eda8
This operation has no response content.
Removing metadata of instance.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
instance_uuid | path | string | Instance ID. |
removed | path | string | Removed field of metadata for Instance. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" $controller:9362/v1/system_metadata/45bb8680-c070-4080-be45-ec4d2312eda8/removed/image_min_disk | python -m json.tool
This operation has no response content.
Host classes¶
Actions with host classes.
Getting a list of host classes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | Host class ID. |
name (Optional) | path | string | Host class name. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
Parameters supporting modifiers are id
, name
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-classes/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class ID. |
name | body | string | Host class name. |
node_types | body | list | List of host types. |
is_default | body | bool | Parameter indicating whether the class is the default host class. |
Sample result in JSON format:
{
"node_classes": [
{
"id": 1,
"is_default": true,
"name": "hypervisor",
"node_types": [
{
"id": 1,
"name": ""
},
{
"id": 2,
"name": "QEMU"
},
{
"id": 3,
"name": "KVM"
},
{
"id": 4,
"name": "Docker"
},
{
"id": 5,
"name": "Xen"
},
{
"id": 6,
"name": "VMware"
},
{
"id": 7,
"name": "HyperV"
}
]
},
{
"id": 2,
"is_default": false,
"name": "Storage host",
"node_types": [
{
"id": 8,
"name": ""
},
{
"id": 9,
"name": "Ceph"
},
{
"id": 10,
"name": "mdraid"
},
{
"id": 11,
"name": "bcashed"
},
{
"id": 12,
"name": "GlusterFS"
},
{
"id": 13,
"name": "Sheepdog"
}
]
},
{
"id": 3,
"is_default": false,
"name": "Network host",
"node_types": [
{
"id": 14,
"name": ""
},
{
"id": 15,
"name": "Network node"
},
{
"id": 16,
"name": "Commutator"
},
{
"id": 17,
"name": "Router"
}
]
},
{
"id": 4,
"is_default": false,
"name": "Server",
"node_types": [
{
"id": 18,
"name": ""
},
{
"id": 19,
"name": "Controller node"
},
{
"id": 20,
"name": "PXE"
},
{
"id": 21,
"name": "DHCP"
},
{
"id": 22,
"name": "DNS"
},
{
"id": 23,
"name": "NTP"
}
]
}
]
}
Getting the number of host classes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | Host class ID. |
name (Optional) | path | string | Host class name. |
Parameters supporting modifiers are id
, name
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-classes/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count | body | integer | Number of objects. |
Sample result in JSON format:
{
"count": 4
}
Creating new host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
name | body | string | Host class name. |
node_types (Optional) | body | list | List of host types. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node_class": {"name": "test_class", "node_types": ["type1", "type2"]}}' http://controller:9362/v1/node-classes/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class ID. |
name | body | string | Host class name. |
node_types | body | list | List of host types. |
is_default | body | bool | Parameter indicating whether the class is the default host class. |
Sample result in JSON format:
{
"node_class": {
"id": 8,
"is_default": false,
"name": "test_class",
"node_types": [
{
"id": 27,
"name": "type1"
},
{
"id": 28,
"name": "type2"
}
]
}
}
Getting information about host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-classes/$class_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class ID. |
name | body | string | Host class name. |
node_types | body | list | List of host types. |
is_default | body | bool | Parameter indicating whether the class is the default host class. |
Sample result in JSON format:
{
"node_class": {
"id": 8,
"is_default": false,
"name": "test_class",
"node_types": [
{
"id": 27,
"name": "type1"
},
{
"id": 28,
"name": "type2"
}
]
}
}
Editing existing host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
name (Optional) | body | string | Host class name. |
node_types (Optional) | body | list | List of host types. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node_class": {"name": "test_class_renamed"}}' http://controller:9362/v1/node-classes/$class_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class ID. |
name | body | string | Host class name. |
node_types | body | list | List of host types. |
is_default | body | bool | Parameter indicating whether the class is the default host class. |
Sample result in JSON format:
{
"node_class": {
"id": 8,
"is_default": false,
"name": "test_class_renamed",
"node_types": [
{
"id": 27,
"name": "type1"
},
{
"id": 28,
"name": "type2"
}
]
}
}
Deleting existing host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/node-classes/$class_id
This operation has no response content.
Getting list of host class types.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-classes/$class_id/types/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class type ID. |
name | body | string | Host class type name. |
Sample result in JSON format:
{
"node_types": [
{
"id": 27,
"name": "type1"
},
{
"id": 28,
"name": "type2"
}
]
}
Creating new type for existing host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
name (Optional) | body | string | Host class type name. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node_type": {"name": "new_type"}}' http://controller:9362/v1/node-classes/$class_id/types/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class type ID. |
name | body | string | Host class type name. |
Sample result in JSON format:
{
"node_type": {
"id": 29,
"name": "new_type"
}
}
Changing type of existing host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
type_id (Optional) | body | integer | Host class type ID. |
name (Optional) | body | string | Host class type name. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node_type": {"name": "type_renamed"}}' http://controller:9362/v1/node-classes/$class_id/types/$type_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host class type ID. |
name | body | string | Host class type name. |
Sample result in JSON format:
{
"node_type": {
"id": 29,
"name": "type_renamed"
}
}
Deleting type of existing host class.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
class_id | path | integer | Host class ID. |
type_id | path | integer | Host class type ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/node-classes/$class_id/types/$type_id
This operation has no response content.
PXE host images¶
This allows to manage PXE host images.
Getting list of PXE images.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | PXE image ID. |
created_at (Optional) | path | string | Date and time of object creation. |
image_name (Optional) | path | string | PXE image name. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
Parameters supporting modifiers are id
, image_name
, created_at
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-images/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | PXE image ID. |
created_at | body | string | Date and time of object creation. |
image_name | body | string | PXE image name. |
file_data | body | string | Content of PXE image. |
Example of getting list of PXE images in JSON format:
{
"node_images": [
{
"created_at": "2018-10-15T12:59:50",
"file_data": "default vesamenu.c32\naprompt 1\ntimeout 30\nlabel ubuntu 14.04\nmenu label CENTER COMPUTE NODE DEFAULT\nkernel vmlinuz\nappend initrd=dracut root=192.168.100.1:/mnt/rootfs biosdevname=0 ip=eth0:on ip=eth1:on bond=bond0:eth0,eth1:mode=6 ip=bond0:dhcp ro",
"id": 1,
"image_name": "default"
}
]
}
Getting the number of PXE images.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | path | integer | PXE image ID. |
created_at (Optional) | path | string | Date and time of object creation. |
image_name (Optional) | path | string | PXE image name. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
Parameters supporting modifiers are id
, image_name
, created_at
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-images/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count | body | integer | Number of objects. |
Example of getting the number of PXE images in JSON format:
{
"count": 1
}
Getting information about PXE image.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/node-images/$image_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
created_at | body | string | Date and time of object creation. |
file_data | body | string | Content of PXE image. |
id | body | integer | PXE image ID. |
image_name | body | string | PXE image name. |
Example of getting information about the specified PXE image in JSON format:
{
"node_image": {
"created_at": "2018-10-15T12:59:50",
"file_data": "default vesamenu.c32\naprompt 1\ntimeout 30\nlabel ubuntu 14.04\nmenu label CENTER COMPUTE NODE DEFAULT\nkernel vmlinuz\nappend initrd=dracut root=192.168.100.1:/mnt/rootfs biosdevname=0 ip=eth0:on ip=eth1:on bond=bond0:eth0,eth1:mode=6 ip=bond0:dhcp ro",
"id": 1,
"image_name": "default"
}
}
PXE image creating.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
image_name | body | string | PXE image name. |
file_data | body | string | Content of PXE image. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node_image":{"image_name": "test_image", "file_data": "root=test"}}' http://controller:9362/v1/node-images/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
created_at | body | string | Date and time of object creation. |
file_data | body | string | Content of PXE image. |
id | body | integer | PXE image ID. |
image_name | body | string | PXE image name. |
Sample result in JSON format:
{
"node_image": {
"created_at": "2018-10-24T09:36:40",
"file_data": "root=test",
"id": 2,
"image_name": "test_image"
}
}
Power controls¶
This allows to manage power management tools, provides additional information used in the CloudManager module.
Getting list of power controls.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | Power control ID. |
created_at (Optional) | path | string | Date and time of object creation. |
title (Optional) | path | string | Power control name. |
control_type (Optional) | path | string | Power control type. |
protocol_type (Optional) | path | string | Power control protocol type. |
host (Optional) | path | string | Hostname or IP address of power control. |
port_number (Optional) | path | string | Port number. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
Parameters supporting modifiers are id
, created_at
, title
, control_type
, protocol_type
, host
, port_number
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Power control ID. |
time_created | body | string | Date and time of object creation. |
time_updated | body | string | Date and time of object editing. |
title | body | string | Power control name. |
control_type | body | string | Power control type. |
protocol_type | body | string | Power control protocol type. |
host | body | string | Hostname or IP address of power control. |
login | body | string | Login to connect to power control. |
port_number | body | string | Port number. |
coils_count | body | integer | Total number of output ports. |
used_coils_count | body | integer | Number of used output ports. |
coil_map | body | object | Output port maps. |
Sample result in JSON format:
{
"power_controls": [
{
"coil_map": {
"1": {
"is_default": true,
"is_initialized": true,
"node_id": 1,
"node_name": "mnode1.dev-cnt7q-ovs-02.stand.loc",
"power_control_port": "1",
"power_state": "power_on"
}
},
"coils_count": 1,
"control_type": "SupermicroRackDevice",
"host": "10.35.17.30",
"id": 1,
"login": "ADMIN",
"port_number": 623,
"protocol_type": "ipmi",
"time_created": "2018-10-17T12:18:35",
"time_updated": null,
"title": "test",
"used_coils_count": 1
},
{
"coil_map": {
"1": {
"is_default": true,
"is_initialized": true,
"node_id": 2,
"node_name": "mnode2.dev-cnt7q-ovs-02.stand.loc",
"power_control_port": "1",
"power_state": "power_on"
}
},
"coils_count": 1,
"control_type": "SupermicroRackDevice",
"host": "10.35.17.31",
"id": 2,
"login": "ADMIN",
"port_number": 623,
"protocol_type": "ipmi",
"time_created": "2018-10-18T07:37:48",
"time_updated": null,
"title": "test 2",
"used_coils_count": 1
}
]
}
Getting the number of power controls.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | Power control ID. |
created_at (Optional) | path | string | Date and time of object creation. |
title (Optional) | path | string | Power control name. |
control_type (Optional) | path | string | Power control type. |
protocol_type (Optional) | path | string | Power control protocol type. |
host (Optional) | path | string | Hostname or IP address of power control. |
port_number (Optional) | path | string | Port number. |
Parameters supporting modifiers are id
, created_at
, title
, control_type
, protocol_type
, host
, port_number
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count | body | integer | Number of objects. |
Sample result in JSON format:
{
"count": 2
}
Creating power control.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
control_type | body | string | Power control type. |
protocol_type | body | string | Power control protocol type. |
host | body | string | Hostname or IP address of power control. |
port_number | body | string | Port number. |
title (Optional) | body | string | Power control name. |
login (Optional) | body | string | Login to connect to power control. |
password (Optional) | body | string | Password to connect to power control. |
ssh_key (Optional) | body | string | RSA encrypted private key to connect to power management tool. It is supported only by means of the SshDevice type. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"power_control": {"control_type": "SupermicroRackDevice", "protocol_type": "ipmi", "host": "10.35.17.33", "port_number": 623, "login": "ADMIN", "password": "PASSWORD"}}' http://controller:9362/v1/power-controls/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Power control ID. |
time_created | body | string | Date and time of object creation. |
time_updated | body | string | Date and time of object editing. |
title | body | string | Power control name. |
control_type | body | string | Power control type. |
protocol_type | body | string | Power control protocol type. |
host | body | string | Hostname or IP address of power control. |
login | body | string | Login to connect to power control. |
port_number | body | string | Port number. |
coils_count | body | integer | Total number of output ports. |
used_coils_count | body | integer | Number of used output ports. |
coil_map | body | object | Output port maps. |
Sample result in JSON format:
{
"power_control": {
"coil_map": {
"1": null
},
"coils_count": 1,
"control_type": "SupermicroRackDevice",
"host": "10.35.17.33",
"id": 3,
"login": "ADMIN",
"port_number": 623,
"protocol_type": "ipmi",
"time_created": "2018-10-24T12:12:02",
"time_updated": null,
"title": "ipmi://SupermicroRackDevice@10.35.17.33:623",
"used_coils_count": 0
}
}
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
power_control_id | path | integer | Power control ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/$power_control_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Power control ID. |
time_created | body | string | Date and time of object creation. |
time_updated | body | string | Date and time of object editing. |
title | body | string | Power control name. |
control_type | body | string | Power control type. |
protocol_type | body | string | Power control protocol type. |
host | body | string | Hostname or IP address of power control. |
login | body | string | Login to connect to power control. |
port_number | body | string | Port number. |
coils_count | body | integer | Total number of output ports. |
used_coils_count | body | integer | Number of used output ports. |
coil_map | body | object | Output port maps. |
Sample result in JSON format:
{
"power_control": {
"coil_map": {
"1": null
},
"coils_count": 1,
"control_type": "SupermicroRackDevice",
"host": "10.35.17.33",
"id": 3,
"login": "ADMIN",
"port_number": 623,
"protocol_type": "ipmi",
"time_created": "2018-10-24T12:12:02",
"time_updated": null,
"title": "ipmi://SupermicroRackDevice@10.35.17.33:623",
"used_coils_count": 0
}
}
Deleting power control.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
power_control_id | path | integer | Power control ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/$power_control_id
This operation has no response content.
Updating power control settings.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
power_control_id | path | integer | Power control ID. |
control_type (Optional) | body | string | Power control type. |
protocol_type (Optional) | body | string | Power control protocol type. |
host (Optional) | body | string | Hostname or IP address of power control. |
port_number (Optional) | body | string | Port number. |
title (Optional) | body | string | Power control name. |
login (Optional) | body | string | Login to connect to power control. |
password (Optional) | body | string | Password to connect to power control. |
ssh_key (Optional) | body | string | RSA encrypted private key to connect to power management tool. It is supported only by means of the SshDevice type. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"power_control": {"title": "test_power_control"}}' http://controller:9362/v1/power-controls/$power_control_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Power control ID. |
time_created | body | string | Date and time of object creation. |
time_updated | body | string | Date and time of object editing. |
title | body | string | Power control name. |
control_type | body | string | Power control type. |
protocol_type | body | string | Power control protocol type. |
host | body | string | Hostname or IP address of power control. |
login | body | string | Login to connect to power control. |
port_number | body | string | Port number. |
coils_count | body | integer | Total number of output ports. |
used_coils_count | body | integer | Number of used output ports. |
coil_map | body | object | Output port maps. |
Sample result in JSON format:
{
"power_control": {
"coil_map": {
"1": null
},
"coils_count": 1,
"control_type": "SupermicroRackDevice",
"host": "10.35.17.33",
"id": 3,
"login": "ADMIN",
"port_number": 623,
"protocol_type": "ipmi",
"time_created": "2018-10-24T12:12:02",
"time_updated": "Wed, 24 Oct 2018 12:42:34 GMT",
"title": "test_power_control",
"used_coils_count": 0
}
}
Getting list of available power control types.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/types | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
types | body | list | List of supported power controls. |
Sample result in JSON format:
{
"types": [
[
"ET7067",
"modbus"
],
[
"DaenetIP2",
"snmp"
],
[
"DaenetIP2_ACPI",
"snmp"
],
[
"SshDevice",
"ssh"
],
[
"IntelAMT",
"intel_amt"
],
[
"SupermicroRackDevice",
"ipmi"
]
]
}
Getting list of supported power control protocols.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/protocols | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
protocols | body | list | List of supported power control protocols. |
Sample result in JSON format:
{
"protocols": [
"modbus",
"ipmi",
"snmp",
"ssh",
"intel_amt"
]
}
Disabling power control output port.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
power_control_id | path | integer | Power control ID. |
coil | body | integer | Power control output port. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"coil": 1}' http://controller:9362/v1/power-controls/$power_control_id/actions/power-off
This operation has no response content.
Enabling power control output port.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
power_control_id | path | integer | Power control ID. |
coil | body | integer | Power control output port. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"coil": 1}' http://controller:9362/v1/power-controls/$power_control_id/actions/power-on
This operation has no response content.
Getting list of hosts associated with a power control.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
power_control_id | path | integer | Power control ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/power-controls/$power_control_id/nodes | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
nodes | body | list | Host list. |
Sample result in JSON format:
{
"nodes": [
{
"active": true,
"condition": 0,
"controller_id": null,
"controller_login": null,
"controller_password": null,
"controller_type": null,
"cpu_amount": null,
"description": null,
"dtc_number": 1,
"hdd_gb": null,
"hypervisor_id": "2239c611-523c-44d2-9feb-2c6905fbb5c8",
"id": 1,
"image": {
"id": 1,
"name": "default"
},
"inventory_code": null,
"ip_addresses": ["10.35.222.11"],
"is_controller": false,
"is_reserved": false,
"mac_address": null,
"name": "mnode1.dev-cnt7q-ovs-02.stand.loc",
"node_class": {
"id": 1,
"is_default": true,
"name": "hypervisor",
"node_types": [
{
"id": 1,
"name": ""
},
{
"id": 2,
"name": "QEMU"
},
{
"id": 3,
"name": "KVM"
},
{
"id": 4,
"name": "Docker"
},
{
"id": 5,
"name": "Xen"
},
{
"id": 6,
"name": "VMware"
},
{
"id": 7,
"name": "HyperV"
}
]
},
"cloud_managers": [
{
"is_default": true,
"is_initialized": true,
"power_control_id": 1,
"control_type": "SupermicroRackDevice",
"power_control_title": "test",
"power_control_port": "1",
"protocol_type": "ipmi"
}
],
"node_type": {
"id": 2,
"name": "QEMU"
},
"owner": null,
"power_state": "power_on",
"rack_number": null,
"ram_mb": null,
"row_number": null,
"title": "\u0442\u0435\u0441\u04422",
"unit_number": null
}
]
}
Nodes¶
This allows to manage nodes at the physical level, provides additional information used in the CloudManager module.
Getting list of nodes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | Host ID. |
image_id (Optional) | path | integer | Host image ID. |
node_class_id (Optional) | path | integer | Host class ID. |
node_type_id (Optional) | path | integer | Host class type ID. |
hypervisor_id (Optional) | path | string | Host ID in OpenStack. |
name (Optional) | path | string | Hostname. |
controller_id (Optional) | path | string | ID of the virtual controller to which the host is bound. |
controller_type (Optional) | path | string | Virtual controller type. |
description (Optional) | path | string | Host description. |
dtc_number (Optional) | path | integer | Data center number. It can take values from 1 to 99. |
unit_number (Optional) | path | integer | Rack place number. It can take values from 1 to 99. |
rack_number (Optional) | path | integer | Rack number. It can take values from 1 to 99. |
row_number (Optional) | path | integer | Racks row number. It can take values from 1 to 99. |
cpu_amount (Optional) | path | integer | Number of processors. It can take values from 1 to 99. |
ram_mb (Optional) | path | integer | RAM (MB). |
hdd_gb (Optional) | path | integer | Hard disk space (GB). |
mac_address (Optional) | path | string | MAC addresses of host. |
title (Optional) | path | string | Host title. |
is_reserved (Optional) | path | bool | Flag that indicates whether the node is reserved. Default value is False . |
is_controller (Optional) | path | bool | Flag that indicates whether the node is controller.
Default value is False . |
inventory_code (Optional) | path | integer | Inventory number. |
power_state (Optional) | path | string | Power status. Possible values:
|
owner (Optional) | path | string | Name of the user who created the host. |
active (Optional) | path | bool | Flag that indicates whether the host is active. Default value is True . |
condition (Optional) | path | integer | State of the node. Possible values:
Default value is 0. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
with_os_object (Optional) | path | bool | Parameter that allows extending the nodes of the class hypervisor with the object os_hypervisor containing the attributes of the compute node OpenStack. |
with_hwinfo (Optional) | path | bool | Parameter that allows to extend the nodes of the class hypervisor with the object hwinfo , containing information about the hardware and topology of the compute node OpenStack. |
Parameters supporting modifiers are id
, image_id
, node_class_id
, node_type_id
, hypervisor_id
, name
, controller_id
, controller_type
, description
, dtc_number
, unit_number
, rack_number
, row_number
, cpu_amount
, ram_mb
, hdd_gb
, mac_address
, title
, is_reserved
, is_controller
, inventory_code
, power_state
, owner
, active
, condition
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
active | body | bool | Flag that indicates whether the host is active. Default value is True . |
condition | body | integer | State of the node. Possible values:
Default value is 0. |
controller_id | body | string | ID of the virtual controller to which the host is bound. |
controller_type | body | string | Virtual controller type. |
cpu_amount | body | integer | Number of processors. It can take values from 1 to 99. |
cpu_allocation_ratio | body | float | CPU allocation ratio. |
description | body | string | Host description. |
dtc_number | body | integer | Data center number. It can take values from 1 to 99. |
hdd_gb | body | integer | Hard disk space (GB). |
hypervisor_id | body | string | Host ID in OpenStack. |
id | body | integer | Host ID. |
image | body | object | PXE image of host. |
inventory_code | body | integer | Inventory number. |
ip_addresses (Optional) | body | list | List of host IP addresses. Example: {"ip_addresses": ["127.0.0.1", "192.168.0.15"]} . |
is_controller | body | bool | Flag that indicates whether the node is controller.
Default value is False . |
is_reserved | body | bool | Flag that indicates whether the node is reserved. Default value is False . |
mac_address | body | string | MAC addresses of host. |
name | body | string | Hostname. |
node_class (Optional) | body | object | Host class. |
node_type (Optional) | body | object | Host class type. |
node_controls | body | list | List of host power controls. |
owner | body | string | Name of the user who created the host. |
power_state | body | string | Power status. Possible values:
|
rack_number | body | integer | Rack number. It can take values from 1 to 99. |
ram_mb | body | integer | RAM (MB). |
ram_allocation_ratio | body | float | RAM allocation ratio. |
row_number | body | integer | Racks row number. It can take values from 1 to 99. |
title | body | string | Host title. |
unit_number | body | integer | Rack place number. It can take values from 1 to 99. |
os_hypervisor (Optional) | body | object | OpenStack compute node. |
hwinfo (Optional) | body | object | OpenStack compute node hardware and topology information. |
availability_storages (Optional) | body | array | Availability storages list. |
Sample result in JSON format:
{
"nodes": [
{
"active": true,
"condition": 0,
"controller_id": null,
"controller_type": null,
"cpu_amount": null,
"cpu_allocation_ratio": 16.0,
"description": null,
"dtc_number": 1,
"hdd_gb": null,
"hypervisor_id": "2239c611-523c-44d2-9feb-2c6905fbb5c8",
"id": 1,
"image": {
"id": 1,
"name": "default"
},
"inventory_code": null,
"ip_addresses": ["10.35.222.11"],
"is_controller": false,
"is_reserved": false,
"mac_address": null,
"name": "mnode1.dev-cnt7q-ovs-02.stand.loc",
"node_class": {
"id": 1,
"is_default": true,
"name": "hypervisor"
},
"node_controls": [
{
"is_default": true,
"is_initialized": true,
"power_control_id": 1,
"control_type": "SupermicroRackDevice",
"power_control_title": "test",
"power_control_port": "1",
"protocol_type": "ipmi"
}
],
"node_type": {
"id": 2,
"name": "QEMU"
},
"owner": null,
"power_state": "power_on",
"rack_number": null,
"ram_mb": null,
"ram_allocation_ratio": 1.5,
"row_number": null,
"title": "\u0442\u0435\u0441\u04422",
"unit_number": null
},
{
"active": true,
"condition": 0,
"controller_id": null,
"controller_type": null,
"cpu_amount": null,
"description": null,
"dtc_number": null,
"hdd_gb": null,
"hypervisor_id": "1b9d6e64-53b2-4097-a302-96d7b4a4e055",
"id": 2,
"image": {
"id": 1,
"name": "default"
},
"inventory_code": null,
"ip_addresses": ["10.35.222.12"],
"is_controller": false,
"is_reserved": false,
"mac_address": null,
"name": "mnode2.dev-cnt7q-ovs-02.stand.loc",
"node_class": {
"id": 1,
"is_default": true,
"name": "hypervisor"
},
"node_controls": [
{
"is_default": true,
"is_initialized": true,
"power_control_id": 2,
"control_type": "SupermicroRackDevice",
"power_control_title": "test 2",
"power_control_port": "1",
"protocol_type": "ipmi"
}
],
"node_type": {
"id": 2,
"name": "QEMU"
},
"owner": null,
"power_state": "power_on",
"rack_number": null,
"ram_mb": null,
"row_number": null,
"title": null,
"unit_number": null
}
]
}
Getting the number of nodes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | integer | Host ID. |
image_id (Optional) | path | integer | Host image ID. |
node_class_id (Optional) | path | integer | Host class ID. |
node_type_id (Optional) | path | integer | Host class type ID. |
hypervisor_id (Optional) | path | string | Host ID in OpenStack. |
name (Optional) | path | string | Hostname. |
controller_id (Optional) | path | string | ID of the virtual controller to which the host is bound. |
controller_type (Optional) | path | string | Virtual controller type. |
description (Optional) | path | string | Host description. |
dtc_number (Optional) | path | integer | Data center number. It can take values from 1 to 99. |
unit_number (Optional) | path | integer | Rack place number. It can take values from 1 to 99. |
rack_number (Optional) | path | integer | Rack number. It can take values from 1 to 99. |
row_number (Optional) | path | integer | Racks row number. It can take values from 1 to 99. |
cpu_amount (Optional) | path | integer | Number of processors. It can take values from 1 to 99. |
ram_mb (Optional) | path | integer | RAM (MB). |
hdd_gb (Optional) | path | integer | Hard disk space (GB). |
mac_address (Optional) | path | string | MAC addresses of host. |
title (Optional) | path | string | Host title. |
is_reserved (Optional) | path | bool | Flag that indicates whether the node is reserved. Default value is False . |
is_controller (Optional) | path | bool | Flag that indicates whether the node is controller.
Default value is False . |
inventory_code (Optional) | path | integer | Inventory number. |
power_state (Optional) | path | string | Power status. Possible values:
|
owner (Optional) | path | string | Name of the user who created the host. |
active (Optional) | path | bool | Flag that indicates whether the host is active. Default value is True . |
condition (Optional) | path | integer | State of the node. Possible values:
Default value is 0. |
Parameters supporting modifiers are id
, image_id
, node_class_id
, node_type_id
, hypervisor_id
, name
, controller_id
, controller_type
, description
, dtc_number
, unit_number
, rack_number
, row_number
, cpu_amount
, ram_mb
, hdd_gb
, mac_address
, title
, is_reserved
, is_controller
, inventory_code
, power_state
, owner
, active
, condition
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count | body | integer | Number of objects. |
Sample result in JSON format:
{
"count": 2
}
Getting information about node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
with_os_object (Optional) | path | bool | Parameter that allows extending the nodes of the class hypervisor with the object os_hypervisor containing the attributes of the compute node OpenStack. |
with_hwinfo (Optional) | path | bool | Parameter that allows to extend the nodes of the class hypervisor with the object hwinfo , containing information about the hardware and topology of the compute node OpenStack. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" "http://controller:9362/v1/nodes/$node_id?with_os_object=true" | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
active | body | bool | Flag that indicates whether the host is active. Default value is True . |
condition | body | integer | State of the node. Possible values:
Default value is 0. |
controller_id | body | string | ID of the virtual controller to which the host is bound. |
controller_type | body | string | Virtual controller type. |
cpu_amount | body | integer | Number of processors. It can take values from 1 to 99. |
description | body | string | Host description. |
dtc_number | body | integer | Data center number. It can take values from 1 to 99. |
hdd_gb | body | integer | Hard disk space (GB). |
hypervisor_id | body | string | Host ID in OpenStack. |
id | body | integer | Host ID. |
image | body | object | PXE image of host. |
inventory_code | body | integer | Inventory number. |
ip_addresses (Optional) | body | list | List of host IP addresses. Example: {"ip_addresses": ["127.0.0.1", "192.168.0.15"]} . |
is_controller | body | bool | Flag that indicates whether the node is controller.
Default value is False . |
is_reserved | body | bool | Flag that indicates whether the node is reserved. Default value is False . |
mac_address | body | string | MAC addresses of host. |
name | body | string | Hostname. |
node_class (Optional) | body | object | Host class. |
node_controls | body | list | List of host power controls. |
node_type (Optional) | body | object | Host class type. |
owner | body | string | Name of the user who created the host. |
power_state | body | string | Power status. Possible values:
|
rack_number | body | integer | Rack number. It can take values from 1 to 99. |
ram_mb | body | integer | RAM (MB). |
row_number | body | integer | Racks row number. It can take values from 1 to 99. |
title | body | string | Host title. |
unit_number | body | integer | Rack place number. It can take values from 1 to 99. |
os_hypervisor (Optional) | body | object | OpenStack compute node. |
hwinfo (Optional) | body | object | OpenStack compute node hardware and topology information. |
availability_storages (Optional) | body | array | Availability storages list. |
nas (Optional) | body | string | Attached storage hosts. |
Sample result in JSON format:
{
"node": {
"active": true,
"condition": 0,
"controller_id": null,
"controller_type": null,
"cpu_amount": null,
"description": "",
"dtc_number": null,
"hdd_gb": null,
"hypervisor_id": "f5501bd3-d69a-41fc-bcc1-91f512f2313a",
"id": 1,
"image": {
"id": 1,
"name": "default"
},
"inventory_code": "UU",
"ip_addresses": [
"10.35.222.12"
],
"is_controller": false,
"is_reserved": true,
"mac_address": null,
"name": "mnode2.dev-cnt7q-ovs-02.stand.loc",
"nas": {
"mnode1.dev-cnt7q-ovs-02.stand.loc": ["iqn.2010-10.org.openstack:volume-9ce44bf8-f981-45b8-8ef4-8120f4761420"]
},
"node_class": {
"id": 1,
"is_default": true,
"name": "hypervisor"
},
"node_controls": [
{
"control_type": "SupermicroRackDevice",
"is_default": false,
"is_initialized": true,
"power_control_id": 1,
"power_control_port": "1",
"power_control_title": "namety",
"protocol_type": "ipmi"
},
{
"control_type": "SupermicroRackDevice",
"is_default": true,
"is_initialized": true,
"power_control_id": 3,
"power_control_port": "1",
"power_control_title": "name2",
"protocol_type": "ipmi"
}
],
"node_type": {
"id": 2,
"name": "QEMU"
},
"os_hypervisor": {
"cpu_info": {
"arch": "x86_64",
"features": [
"pge",
"avx",
"xsaveopt",
"clflush",
"sep",
"rtm",
"tsc_adjust",
"tsc-deadline",
"invpcid",
"tsc",
"fsgsbase",
"xsave",
"smap",
"vmx",
"erms",
"hle",
"cmov",
"smep",
"fpu",
"pat",
"arat",
"lm",
"msr",
"adx",
"3dnowprefetch",
"nx",
"fxsr",
"syscall",
"sse4.1",
"pae",
"sse4.2",
"pclmuldq",
"pcid",
"fma",
"vme",
"mmx",
"osxsave",
"cx8",
"mce",
"de",
"aes",
"mca",
"pse",
"lahf_lm",
"abm",
"rdseed",
"popcnt",
"pdpe1gb",
"apic",
"sse",
"f16c",
"pni",
"rdtscp",
"avx2",
"sse2",
"ss",
"hypervisor",
"bmi1",
"bmi2",
"ssse3",
"cx16",
"pse36",
"mtrr",
"movbe",
"rdrand",
"x2apic"
],
"model": "Broadwell",
"topology": {
"cells": 1,
"cores": 1,
"sockets": 2,
"threads": 1
},
"vendor": "Intel"
},
"current_workload": 0,
"disk_available_least": 80,
"free_disk_gb": 99,
"free_ram_mb": 3583,
"host_ip": "10.35.222.12",
"hypervisor_hostname": "mnode2.dev-cnt7q-ovs-02.stand.loc",
"hypervisor_type": "QEMU",
"hypervisor_version": 2012000,
"id": "f5501bd3-d69a-41fc-bcc1-91f512f2313a",
"local_gb": 99,
"local_gb_used": 0,
"memory_mb": 4095,
"memory_mb_used": 512,
"running_vms": 0,
"service": {
"disabled_reason": null,
"host": "mnode2.dev-cnt7q-ovs-02.stand.loc",
"id": "bd8c4cd2-909e-4be8-b324-6bf8a7c528bb"
},
"state": "up",
"status": "enabled",
"vcpus": 2,
"vcpus_used": 0
},
"owner": null,
"power_state": "power_off",
"rack_number": null,
"ram_mb": null,
"row_number": null,
"title": null,
"unit_number": null
}
}
Creating node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
created_at (Optional) | body | string | Date and time of object creation. |
image_id (Optional) | body | integer | Host image ID. |
node_class_id (Optional) | body | integer | Host class ID. |
node_type_id (Optional) | body | integer | Host class type ID. |
ip_addresses (Optional) | body | list | List of host IP addresses. Example: {"ip_addresses": ["127.0.0.1", "192.168.0.15"]} . |
hypervisor_id (Optional) | body | string | Host ID in OpenStack. |
name (Optional) | body | string | Hostname. |
controller_id (Optional) | body | string | ID of the virtual controller to which the host is bound. |
controller_type (Optional) | body | string | Virtual controller type. |
description (Optional) | body | string | Host description. |
dtc_number (Optional) | body | integer | Data center number. It can take values from 1 to 99. |
unit_number (Optional) | body | integer | Rack place number. It can take values from 1 to 99. |
rack_number (Optional) | body | integer | Rack number. It can take values from 1 to 99. |
row_number (Optional) | body | integer | Racks row number. It can take values from 1 to 99. |
cpu_amount (Optional) | body | integer | Number of processors. It can take values from 1 to 99. |
ram_mb (Optional) | body | integer | RAM (MB). |
hdd_gb (Optional) | body | integer | Hard disk space (GB). |
mac_address (Optional) | body | string | MAC addresses of host. |
title (Optional) | body | string | Host title. |
is_reserved (Optional) | body | bool | Flag that indicates whether the node is reserved. Default value is False . |
is_controller (Optional) | body | bool | Flag that indicates whether the node is controller.
Default value is False . |
inventory_code (Optional) | body | integer | Inventory number. |
power_state (Optional) | body | string | Power status. Possible values:
|
owner (Optional) | body | string | Name of the user who created the host. |
active (Optional) | body | bool | Flag that indicates whether the host is active. Default value is True . |
condition (Optional) | body | integer | State of the node. Possible values:
Default value is 0. |
metadata (Optional) | body | string | Metadata. Example:
|
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node": {"name": "test-node", "ip_addresses": ["10.35.22.11"]}}' http://controller:9362/v1/nodes/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host ID. |
created_at | body | string | Date and time of object creation. |
image_id | body | integer | Host image ID. |
node_class (Optional) | body | object | Host class. |
node_type (Optional) | body | object | Host class type. |
hypervisor_id | body | string | Host ID in OpenStack. |
name | body | string | Hostname. |
controller_id | body | string | ID of the virtual controller to which the host is bound. |
controller_type | body | string | Virtual controller type. |
description | body | string | Host description. |
dtc_number | body | integer | Data center number. It can take values from 1 to 99. |
unit_number | body | integer | Rack place number. It can take values from 1 to 99. |
rack_number | body | integer | Rack number. It can take values from 1 to 99. |
row_number | body | integer | Racks row number. It can take values from 1 to 99. |
cpu_amount | body | integer | Number of processors. It can take values from 1 to 99. |
ram_mb | body | integer | RAM (MB). |
hdd_gb | body | integer | Hard disk space (GB). |
mac_address | body | string | MAC addresses of host. |
title | body | string | Host title. |
is_reserved | body | bool | Flag that indicates whether the node is reserved. Default value is False . |
is_controller | body | bool | Flag that indicates whether the node is controller.
Default value is False . |
inventory_code | body | integer | Inventory number. |
power_state | body | string | Power status. Possible values:
|
owner | body | string | Name of the user who created the host. |
active | body | bool | Flag that indicates whether the host is active. Default value is True . |
condition | body | integer | State of the node. Possible values:
Default value is 0. |
metadata (Optional) | body | string | Metadata. Example:
|
Sample result in JSON format:
{
"node": {
"active": true,
"condition": 0,
"controller_id": null,
"controller_type": null,
"cpu_amount": null,
"description": null,
"dtc_number": null,
"hdd_gb": null,
"hypervisor_id": null,
"id": 4,
"image": {
"id": 1,
"name": "default"
},
"inventory_code": null,
"ip_addresses": ["10.35.22.11"],
"is_controller": false,
"is_reserved": false,
"mac_address": null,
"name": "test-node",
"node_class": {
"id": 1,
"is_default": true,
"name": "hypervisor"
},
"node_type": {
"id": 1,
"name": ""
},
"owner": null,
"power_state": null,
"rack_number": null,
"ram_mb": null,
"row_number": null,
"title": null,
"unit_number": null
}
}
Updating hypervisor settings.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
created_at (Optional) | body | string | Date and time of object creation. |
image_id (Optional) | body | integer | Host image ID. |
node_class_id (Optional) | body | integer | Host class ID. |
node_type_id (Optional) | body | integer | Host class type ID. |
hypervisor_id (Optional) | body | string | Host ID in OpenStack. |
name (Optional) | body | string | Hostname. |
controller_id (Optional) | body | string | ID of the virtual controller to which the host is bound. |
controller_type (Optional) | body | string | Virtual controller type. |
description (Optional) | body | string | Host description. |
dtc_number (Optional) | body | integer | Data center number. It can take values from 1 to 99. |
unit_number (Optional) | body | integer | Rack place number. It can take values from 1 to 99. |
rack_number (Optional) | body | integer | Rack number. It can take values from 1 to 99. |
row_number (Optional) | body | integer | Racks row number. It can take values from 1 to 99. |
cpu_amount (Optional) | body | integer | Number of processors. It can take values from 1 to 99. |
ram_mb (Optional) | body | integer | RAM (MB). |
hdd_gb (Optional) | body | integer | Hard disk space (GB). |
mac_address (Optional) | body | string | MAC addresses of host. |
title (Optional) | body | string | Host title. |
is_reserved (Optional) | body | bool | Flag that indicates whether the node is reserved. Default value is False . |
is_controller (Optional) | body | bool | Flag that indicates whether the node is controller.
Default value is False . |
inventory_code (Optional) | body | integer | Inventory number. |
power_state (Optional) | body | string | Power status. Possible values:
|
owner (Optional) | body | string | Name of the user who created the host. |
active (Optional) | body | bool | Flag that indicates whether the host is active. Default value is True . |
condition (Optional) | body | integer | State of the node. Possible values:
Default value is 0. |
metadata (Optional) | body | string | Metadata. Example:
|
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node": {"title": "node title"}}' http://controller:9362/v1/nodes/$node_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Host ID. |
created_at | body | string | Date and time of object creation. |
image_id | body | integer | Host image ID. |
node_class (Optional) | body | object | Host class. |
node_type (Optional) | body | object | Host class type. |
hypervisor_id | body | string | Host ID in OpenStack. |
name | body | string | Hostname. |
controller_id | body | string | ID of the virtual controller to which the host is bound. |
controller_type | body | string | Virtual controller type. |
description | body | string | Host description. |
dtc_number | body | integer | Data center number. It can take values from 1 to 99. |
unit_number | body | integer | Rack place number. It can take values from 1 to 99. |
rack_number | body | integer | Rack number. It can take values from 1 to 99. |
row_number | body | integer | Racks row number. It can take values from 1 to 99. |
cpu_amount | body | integer | Number of processors. It can take values from 1 to 99. |
ram_mb | body | integer | RAM (MB). |
hdd_gb | body | integer | Hard disk space (GB). |
mac_address | body | string | MAC addresses of host. |
title | body | string | Host title. |
is_reserved | body | bool | Flag that indicates whether the node is reserved. Default value is False . |
is_controller | body | bool | Flag that indicates whether the node is controller.
Default value is False . |
inventory_code | body | integer | Inventory number. |
power_state | body | string | Power status. Possible values:
|
owner | body | string | Name of the user who created the host. |
active | body | bool | Flag that indicates whether the host is active. Default value is True . |
condition | body | integer | State of the node. Possible values:
Default value is 0. |
metadata (Optional) | body | string | Metadata. Example:
|
availability_storages (Optional) | body | array | Availability storages list. |
Sample result in JSON format:
{
"node": {
"active": true,
"condition": 0,
"controller_id": null,
"controller_type": null,
"cpu_amount": null,
"description": null,
"dtc_number": null,
"hdd_gb": null,
"hypervisor_id": null,
"id": 4,
"image": {
"id": 1,
"name": "default"
},
"inventory_code": null,
"ip_addresses": ["10.35.22.11"],
"is_controller": false,
"is_reserved": false,
"mac_address": null,
"name": "test-node",
"node_class": {
"id": 1,
"is_default": true,
"name": "hypervisor"
},
"node_type": {
"id": 1,
"name": ""
},
"owner": null,
"power_state": null,
"rack_number": null,
"ram_mb": null,
"row_number": null,
"title": "node title",
"unit_number": null
}
}
Deleting node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id
This operation has no response content.
Assigning PXE Image to host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
image_id | body | integer | PXE image ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"image_id": 2}' http://controller:9362/v1/nodes/$node_id/actions/assign-image
This operation has no response content.
Power off host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/actions/power-off
This operation has no response content.
Power on host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/actions/power-on
This operation has no response content.
Restarting host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/actions/reset
This operation has no response content.
Moving host to reserve.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
is_reserved | body | bool | Flag responsible for transferring the host to reserve. true is to transfer host to reserve, false is for withdrawal from reserve. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"is_reserved": true}' http://controller:9362/v1/nodes/$node_id/actions/reserve
This operation has no response content.
Enabling SNMP for host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/enable-snmp
This operation has no response content.
Disabling SNMP for host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/disable-snmp
This operation has no response content.
Enabling SSH for host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/enable-ssh
This operation has no response content.
Disabling SSH for host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/disable-ssh
This operation has no response content.
Enabling NodeSafe mode for node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/enable-nodesafe
This operation has no response content.
Disabling NodeSafe mode for node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/disable-nodesafe
This operation has no response content.
Note
When creating a node, the mode is enabled by default.
Enabling dynamic component configuration for node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/enable-dcc
This operation has no response content.
Note
When creating node, the mode is enabled by default.
Disabling dynamic component configuration for node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/disable-dcc
This operation has no response content.
Configuring the processor type of compute node instance.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
cpu_emulation_mode | body | string | Processor emulation mode. It accepts values:
|
cpu_model (Optional) | body | string | Emulated processor model. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"cpu_emulation_mode": "host-passthrough"}' http://controller:9362/v1/nodes/$node_id/actions/set-cpu-mode
This operation has no response content.
Configuring redirection of compute node logs.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
log_redirection_hostname | body | string | Domain name or IP address of the host where logging is redirected. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"log_redirection_hostname": "10.10.10.10"}' http://controller:9362/v1/nodes/$node_id/actions/setup-log-redirection
This operation has no response content.
Disabling redirection of compute node logs.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/actions/disable-log-redirection
This operation has no response content.
Running system update on a compute node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/actions/update-system
This operation has no response content.
Getting list of actions on a node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/power-actions/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Action ID. |
action | body | string | Action type. |
node_id | body | integer | Host ID. |
start_time | body | string | Action start time. |
user_name | body | string | Name of the user who performed action. |
Sample result in JSON format:
{
"power_actions": [
{
"action": "reset",
"id": 1,
"node_id": 1,
"start_time": "2018-10-25T06:31:36",
"user_name": "admin"
}
]
}
Getting information about action on node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
power_action_id | path | integer | Action ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/power-actions/$power_action_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Action ID. |
action | body | string | Action type. |
node_id | body | integer | Host ID. |
start_time | body | string | Action start time. |
user_name | body | string | Name of the user who performed action. |
Sample result in JSON format:
{
"power_action": {
"action": "reset",
"id": 1,
"node_id": 1,
"start_time": "2018-10-25T06:31:36",
"user_name": "admin"
}
}
Getting list of power controls assigned to node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/power-controls/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
is_default | body | bool | Flag that indicates whether the power control is the default. |
is_initialized | body | bool | Flag that indicates if the power control is initialized. |
power_control_id | body | integer | Power control ID. |
control_type | body | string | Power control type. |
power_control_title | body | string | Power control name. |
protocol_type | body | string | Power control protocol type. |
Sample result in JSON format:
{
"power_controls": [
{
"is_default": true,
"is_initialized": true,
"power_control_id": 1,
"control_type": "SupermicroRackDevice",
"power_control_title": "test",
"power_control_port": "1",
"protocol_type": "ipmi"
}
]
}
Assigning a power control to host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
is_default (Optional) | body | bool | Flag that indicates whether the power control is the default. |
power_control_id | body | integer | Power control ID. |
power_control_port | body | string | Port number of the power control. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"power_control_id": 1, "power_control_port": 1}' http://controller:9362/v1/nodes/$node_id/power-controls/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
is_default | body | bool | Flag that indicates whether the power control is the default. |
is_initialized | body | bool | Flag that indicates if the power control is initialized. |
power_control_id | body | integer | Power control ID. |
control_type | body | string | Power control type. |
power_control_title | body | string | Power control name. |
protocol_type | body | string | Power control protocol type. |
power_control_port | body | string | Port number of the power control. |
Sample result in JSON format:
{
"power_control": {
"is_default": false,
"is_initialized": true,
"power_control_id": 1,
"control_type": "SupermicroRackDevice",
"power_control_title": "test",
"power_control_port": "1",
"protocol_type": "ipmi"
}
}
Getting information about host-assigned power control.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
power_control_id | path | integer | Power control ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/power-controls/$power_control_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
is_default | body | bool | Flag that indicates whether the power control is the default. |
is_initialized | body | bool | Flag that indicates if the power control is initialized. |
power_control_id | body | integer | Power control ID. |
control_type | body | string | Power control type. |
power_control_title | body | string | Power control name. |
protocol_type | body | string | Power control protocol type. |
power_control_port | body | string | Port number of the power control. |
Sample result in JSON format:
{
"power_control": {
"is_default": false,
"is_initialized": true,
"power_control_id": 1,
"control_type": "SupermicroRackDevice",
"power_control_title": "test",
"power_control_port": "1",
"protocol_type": "ipmi"
}
}
Updating host-assigned power control settings.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
power_control_id | path | integer | Power control ID. |
is_default (Optional) | body | bool | Flag that indicates whether the power control is the default. |
power_control_port (Optional) | body | string | Port number of the power control. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"is_default": true}' http://controller:9362/v1/nodes/$node_id/power-controls/$power_control_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
is_default | body | bool | Flag that indicates whether the power control is the default. |
is_initialized | body | bool | Flag that indicates if the power control is initialized. |
power_control_id | body | integer | Power control ID. |
control_type | body | string | Power control type. |
power_control_title | body | string | Power control name. |
protocol_type | body | string | Power control protocol type. |
power_control_port | body | string | Port number of the power control. |
Sample result in JSON format:
{
"power_control": {
"is_default": true,
"is_initialized": true,
"power_control_id": 1,
"control_type": "SupermicroRackDevice",
"power_control_title": "test",
"power_control_port": "1",
"protocol_type": "ipmi"
}
}
Unassigning a power control to host.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
power_control_id | path | integer | Power control ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/power-controls/$power_control_id
This operation has no response content.
Binding nodes to virtual controller.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
controller_uuid | body | string | ID of the virtual controller to which the host is bound. |
hostnames | body | list | List of hostnames. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"controller_uuid": "2eec580b-12f8-4518-bf79-3dc5529617da", "hostnames": ["mnode2.dev.stand.loc"]}' http://controller:9362/v1/nodes/actions/attach | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Unbinding nodes from virtual controller.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
controller_uuid | body | string | ID of the virtual controller to which the host is bound. |
hostnames | body | list | List of hostnames. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"controller_uuid": "2eec580b-12f8-4518-bf79-3dc5529617da", "hostnames": ["mnode2.dev.stand.loc"]}' http://controller:9362/v1/nodes/actions/detach | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Sample result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
Restarting nodes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_ids | body | list | Node IDs. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"node_ids": [1, 2]}' http://controller:9362/v1/nodes/actions/reset | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
success | body | list | List of hosts that have been successfully restarted. |
failed | body | list | List of hosts that could not be restarted. |
Sample result in JSON format:
{
"failed": [],
"success": [
1,
2
]
}
Assigning host to availability storages. Previously created assignments are not deleted.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
availability_storages | body | array | List of availability storages IDs. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"availability_storages": [1]}' http://controller:9362/v1/nodes/$node_id/availability-storages/
This operation has no response content.
Reassigning host to availability storages. Previously created assignments are not deleted.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
availability_storages | body | array | List of availability storages IDs. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"availability_storages": [1]}' http://controller:9362/v1/nodes/$node_id/availability-storages/
This operation has no response content.
Deleting the assignment of availability storages to hosts.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
availability_storage_id | path | integer | Availability storage ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/nodes/$node_id/availability-storages/$availability_storage_id | python -m json.tool
This operation has no response content.
Polling storage systems for available targets.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
storage_id | body | integer | Storage ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"storage_id": 50}' http://controller:9362/v1/nodes/$node_id/actions/discovery-nas | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
targets | body | dict | List of storage targets names to attach to host. |
Sample result in JSON format:
{
"targets": {
"10.40.38.2": [
"volume-887880f7-9e54-4f81-8d32-3e0b7a9b1c5c",
"volume-99361e45-6e50-45fc-9236-08108b2c7add",
"volume-f28e9c36-beed-4ce6-b30a-d2f2a8952734"
]
}
}
Attaching target to node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
targets | body | dict | List of storage targets names to attach to host. |
vendor (Optional) | body | string | Storage vendor. |
product (Optional) | body | string | Storage model. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"targets": {"10.40.38.2": ["volume-887880f7-9e54-4f81-8d32-3e0b7a9b1c5c"]}}' http://controller:9362/v1/nodes/$node_id/actions/attach-targets | python -m json.tool
This operation has no response content.
Run volume locks repairing on the node.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
node_id | path | integer | Host ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/nodes/$node_id/actions/repair-locks | python -m json.tool
This operation has no response content.
DRS¶
This allows to audit balancing capability of instances on hosts within host aggregators.
Running a balancing capability audit.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
aggregate_id | path | string | Host aggregator ID. |
auto_apply (Optional) | body | bool | Additional parameter that enables automatic application of the audit result. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9362/v1/aggregates/{aggregate_id}/actions/execute-audit
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | Audit id. |
status | body | string | Audit status. |
Sample result in JSON format:
{
"audit": {
"id": 99,
"status": "DONE"
}
}
Application of the audit result.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
aggregate_id | path | string | Host aggregator ID. |
audit_id | body | string | Audit id. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"audit_id": 99}' http://controller:9362/v1/aggregates/{aggregate_id}/actions/apply-audit
This operation has no response content.
Getting audit status.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
aggregate_id | path | string | Host aggregator ID. |
audit_id | body | string | Audit id. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"audit_id": 99}' http://controller:9362/v1/aggregates/{aggregate_id}/actions/get-audit-status
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | Audit id. |
status | body | string | Audit status. |
Sample result in JSON format:
{
"audit": {
"id": 99,
"status": "DONE"
}
}
Cinder block storage¶
This allows to manage LVM-based block storage.
Note
Configured service agent
with type control
on nodes with cinder-volume
and nova-compute
services is required for correct operation.
Getting list of storages.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_backend_name (Optional) | path | string | Block storage backend name. |
host (Optional) | path | string | Block storage hostname. |
vg_name (Optional) | path | string | Logical volume group name. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
Parameters supporting modifiers are volume_backend_name
, host
, vg_name
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/volume-backends/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_backend_name | body | string | Block storage backend name. |
host | body | string | Block storage hostname. |
vg_name | body | string | Logical volume group name. |
protocol | body | string | Storage communication protocol. |
free_size | body | string | Free storage space (GB). |
total_size | body | string | Total storage size (GB). |
logical_volumes | body | array | List of logical volumes. |
physical_volumes | body | array | List of physical volumes. |
Response example in JSON format:
[
{
"volume_backend_name": "sanlock",
"host": "volume2.sanlock.stand.loc",
"vg_name": "vol",
"protocol": "iscsi",
"free_size": "136.75",
"total_size": "138",
"logical_volumes": [
{
"lv_name": "volume-cfae37a3-6e8f-4bc8-862e-85db07ff429f",
"vg_name": "vol",
"lv_attr": "-wi-------",
"lv_size": "1,00g",
"lv_uuid": "XSOJgt-6xDf-mTWA-NG7q-MyR7-MheT-e39yp3",
"mirror_count": "1",
"devices": [
{
"pv": "/dev/mapper/mpathb",
"seg_size": "1,00g"
}
]
}
],
"physical_volumes": [
{
"pv_name": "/dev/mapper/mpathb",
"vg_name": "vol",
"pv_attr": "a--",
"pv_size": "46,00g",
"pv_free": "44,75g"
},
{
"pv_name": "/dev/mapper/mpathc",
"vg_name": "vol",
"pv_attr": "a--",
"pv_size": "46,00g",
"pv_free": "46,00g"
},
{
"pv_name": "/dev/mapper/mpathd",
"vg_name": "vol",
"pv_attr": "a--",
"pv_size": "46,00g",
"pv_free": "46,00g"
}
],
}
]
Getting information about logical volume.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_id | body | string | Cinder volume ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/volumes/cfae37a3-6e8f-4bc8-862e-85db07ff429f | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_id | body | string | Cinder volume ID. |
volume_backend_name | body | string | Block storage backend name. |
host | body | string | Block storage hostname. |
logical_volume | body | object | Logical volume. |
thin_enabled | body | bool | Flag that indicates whether the volume is thin. |
lock_hosts | body | array | List of hosts with volume lock. |
lock_exclusive | body | bool | Flag that indicates whether the lock is exclusive. |
Response example in JSON format:
{
"volume": {
"volume_id": "cfae37a3-6e8f-4bc8-862e-85db07ff429f",
"volume_backend_name": "sanlock",
"host": "volume2.sanlock.stand.loc",
"thin_enabled": true,
"logical_volume": {
{
"lv_name": "volume-cfae37a3-6e8f-4bc8-862e-85db07ff429f",
"vg_name": "vol",
"lv_attr": "-wi-------",
"lv_uuid": "XSOJgt-6xDf-mTWA-NG7q-MyR7-MheT-e39yp3",
"mirror_count": "1",
"lv_size": "1,00g",
"lv_status": null,
"devices": [
{
"pv": "/dev/mapper/mpathb",
"seg_size": "1,00g"
}
]
}
},
"lock_hosts": ["volume2.sanlock.stand.loc"],
lock_exclusive: true
}
}
Getting information about logical volumes.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/volumes/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_id | body | string | Cinder volume ID. |
volume_backend_name | body | string | Block storage backend name. |
host | body | string | Block storage hostname. |
logical_volume | body | object | Logical volume. |
thin_enabled | body | bool | Flag that indicates whether the volume is thin. |
Response example in JSON format:
{
"volumes": [
{
"volume_id": "cfae37a3-6e8f-4bc8-862e-85db07ff429f",
"volume_backend_name": "sanlock",
"host": "volume2.sanlock.stand.loc",
"thin_enabled": true,
"logical_volume": {
{
"lv_name": "volume-cfae37a3-6e8f-4bc8-862e-85db07ff429f",
"vg_name": "vol",
"lv_attr": "-wi-------",
"lv_uuid": "XSOJgt-6xDf-mTWA-NG7q-MyR7-MheT-e39yp3",
"mirror_count": "1",
"lv_size": "1,00g",
"lv_status": null,
"devices": [
{
"pv": "/dev/mapper/mpathb",
"seg_size": "1,00g"
}
]
}
}
}
]
}
Converting a volume to a mirrored volume.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_id | path | string | Cinder volume ID. |
mirror_count | body | integer | Number of copies of volume. 0 is to disable mirroring. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"mirror_count": 1}' http://controller:9362/v1/volumes/cfae37a3-6e8f-4bc8-862e-85db07ff429f/actions/mirror
This operation has no response content.
Disk migration between physical volumes.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
volume_id | path | string | Cinder volume ID. |
source_pv | body | string | Source physical volume. |
dest_pv (Optional) | body | string | Target physical volume. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"source_pv": "/dev/mapper/mpathb", "dest_pv": "/dev/mapper/mpathc"}' http://controller:9362/v1/volumes/cfae37a3-6e8f-4bc8-862e-85db07ff429f/actions/pv-migrate
This operation has no response content.
Availability storages¶
Actions with availability storages.
Getting list of availability storages.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id (Optional) | path | integer | Availability storage ID. |
name (Optional) | path | string | Availability storage name. |
offset (Optional) | path | integer | Position number for getting data. |
limit (Optional) | path | integer | Limiting the amount of data received. |
Parameters supporting modifiers are id
, name
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/availability-storages/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Availability storage ID. |
name | body | string | Availability storage name. |
compute_path | body | string | Availability storage path on compute host. |
controller_path | body | string | Availability storage path on controller. |
nodes (Optional) | body | string | List of hosts to which the availability storage is assigned. |
Sample result in JSON format:
{
"availability_storages": [
{
"id": 1,
"name": "storage1",
"compute_path": "/tmp/",
"controller_path": "/tmp/",
"nodes": []
}
]
}
Getting the number of availability storages.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id (Optional) | path | integer | Availability storage ID. |
name (Optional) | path | string | Availability storage name. |
Parameters supporting modifiers are id
, name
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/availability-storages/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count | body | integer | Number of objects. |
Sample result in JSON format:
{
"count": 4
}
Creating new availability storage.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
name | body | string | Availability storage name. |
compute_path | body | string | Availability storage path on compute host. |
controller_path | body | string | Availability storage path on controller. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"availability_storage": {"name": "storage1", "compute_path": "/tmp/", "controller_path": "/tmp/"}}' http://controller:9362/v1/availability-storages/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | Availability storage ID. |
name | body | string | Availability storage name. |
compute_path | body | string | Availability storage path on compute host. |
controller_path | body | string | Availability storage path on controller. |
nodes (Optional) | body | string | List of hosts to which the availability storage is assigned. |
Sample result in JSON format:
{
"availability_storage": {
"id": 1,
"name": "storage1",
"compute_path": "/tmp/",
"controller_path": "/tmp/",
"nodes": []
}
}
Getting information about availability storage.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/availability-storages/$availability_storage_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
name | body | string | Availability storage name. |
compute_path | body | string | Availability storage path on compute host. |
controller_path | body | string | Availability storage path on controller. |
nodes (Optional) | body | string | List of hosts to which the availability storage is assigned. |
Sample result in JSON format:
{
"availability_storage": {
"id": 1,
"name": "storage1",
"compute_path": "/tmp/",
"controller_path": "/tmp/",
"nodes": []
}
}
Editing existing availability storage.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
name | body | string | Availability storage name. |
compute_path | body | string | Availability storage path on compute host. |
controller_path | body | string | Availability storage path on controller. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"availability_storage": {"name": "storage2"}}' http://controller:9362/v1/availability-storages/$availability_storage_id | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | path | integer | Availability storage ID. |
name | body | string | Availability storage name. |
compute_path | body | string | Availability storage path on compute host. |
controller_path | body | string | Availability storage path on controller. |
nodes (Optional) | body | string | List of hosts to which the availability storage is assigned. |
Sample result in JSON format:
{
"availability_storage": {
"id": 1,
"name": "storage2",
"compute_path": "/tmp/",
"controller_path": "/tmp/",
"nodes": []
}
}
Deleting existing availability storage.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/availability-storages/$availability_storage_id
This operation has no response content.
Assigning the availability storage to hosts. Previously created assignments are not deleted.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
nodes | body | array | Node IDs list. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"nodes": [1]}' http://controller:9362/v1/availability-storages/$availability_storage_id/nodes/
This operation has no response content.
Reassigning the availability storage to hosts. Previously created assignments are not deleted.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
nodes | body | array | Node IDs list. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"nodes": [2]}' http://controller:9362/v1/availability-storages/$availability_storage_id/nodes/
This operation has no response content.
Deleting the assignment of availability storage to hosts.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
availability_storage_id | path | integer | Availability storage ID. |
node_id | path | integer | Host ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" http://controller:9362/v1/availability-storages/$availability_storage_id/nodes/$node_id
This operation has no response content.
Celery tasks¶
Celery tasks information.
Getting list of IDs of recent celery tasks.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/tasks
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id | body | string | Celery task ID. |
Sample result in JSON format:
{
"tasks":[
"3519adaf-7669-499e-88eb-8f05f64514e2",
"013b9778-1d39-4b18-a06c-2780b67e1091",
"31c71e8a-26cd-4b8e-a4c5-9181d578616f",
"3e720334-7533-43b7-a079-24ea84b7a8a0",
"8869de12-3f44-4b96-a20e-80a03dd575a3",
"641de831-95b2-43ba-8fd5-7822ee5d6445",
"f0204f11-8e59-410a-8108-a73212c5439a",
"3b8eff74-55b1-4eb8-80e2-adf8472fc968",
"93e30a3c-117b-4e05-990d-4ff46ac5ac84",
"7c8fbc6c-468d-4afb-a292-e70a3d475edc"
]
}
Getting information about celery task by ID.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id | body | string | Celery task ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/tasks/$task_id
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
status | body | string | Task status. |
name (Optional) | body | string | Celery task name. |
traceback (Optional) | body | string | Error traceback while executing a task. |
result (Optional) | body | string | Task result. |
Sample result in JSON format:
{
"status":"SUCCESS"
}
Domains¶
Actions with domains.
Getting domain storage method.
Request¶
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/domains/actions/get-store
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
store | body | string | Domain storage method. |
Example of getting information about domain storage method in JSON format:
{
"store": "file"
}
Loading domain configuration to database.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
domain_id | body | string | Domain ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9362/v1/domains/$domain_id/actions/configure
This operation has no response content.
Getting information about possibility of sending one-time passwords from configuration.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9362/v1/domains/totp-allowed | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
totp_allowed | body | bool | Ability to send one-time passwords. |
Sample result in JSON format:
{
"totp_allowed": "true"
}