Reservation API v1¶
This is a reference for the OpenStack Reservation API which is provided by the Blazar project.
Leases¶
A date and time format for *_date parameters is CCYY-MM-DD hh:mm.
For example, 2017-12-26 12:00.
List leases.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
No body content, path, nor query option.
Response¶
General Parameters¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
leases  | 
body  | 
array  | 
A list of   | 
id  | 
body  | 
string  | 
The UUID of the lease.  | 
name  | 
body  | 
string  | 
The name of the lease.  | 
start_date  | 
body  | 
string  | 
The start date and time of the lease.  | 
end_date  | 
body  | 
string  | 
The end date and time of the lease.  | 
status  | 
body  | 
string  | 
The status of the lease.  | 
degraded  | 
body  | 
boolean  | 
The flag for reserved resources of the lease. This is set True while missing_resources or resources_changed of reservations is set True.  | 
user_id  | 
body  | 
string  | 
The UUID of the lease owner.  | 
project_id  | 
body  | 
string  | 
The UUID the project which owns the lease.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the lease owner.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
reservation.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the reservation belongs.  | 
reservation.status  | 
body  | 
string  | 
The status of the reservation.  | 
reservation.missing_resources  | 
body  | 
boolean  | 
The flag for the capacity of reserved resources. It is set True while the amount of reserved resources is less than the request.  | 
reservation.resources_changed  | 
body  | 
boolean  | 
The flag for changes of reserved resources. If it is set True if reserved resources were changed after the lease started.  | 
reservation.resource_id  | 
body  | 
string  | 
The ID of the resource object of the reservation.  | 
reservation.resource_type  | 
body  | 
string  | 
The type of the resource to reserve. Note 
  | 
reservation.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
reservation.updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
events  | 
body  | 
array  | 
A list of   | 
event.id  | 
body  | 
string  | 
The UUID of the event.  | 
event.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the event belongs.  | 
event.status  | 
body  | 
string  | 
The status of the event.  | 
event.event_type  | 
body  | 
string  | 
The type of the event.  | 
event.time  | 
body  | 
string  | 
The date and time of the event.  | 
event.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
event_updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Parameters for Host Reservation¶
The following parameters are returned for host reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.min  | 
body  | 
integer  | 
The minimum number of hosts to reserve. The value should be greater than 0.  | 
reservation.max  | 
body  | 
integer  | 
The maximum number of hosts to reserve. The value should be greater than or equal to   | 
reservation.hypervisor_properties  | 
body  | 
string  | 
Properties of the hypervisor to reserve.  | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.before_end  | 
body  | 
string  | 
The before-end-action of the reservation. Note 
  | 
Parameters for Instance Reservation¶
The following parameters are returned for instance reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.amount  | 
body  | 
integer  | 
The amount of instances to reserve. The value should be greater than 0.  | 
reservation.vcpus  | 
body  | 
integer  | 
The number of VCPUs per the instance.  | 
reservation.memory_mb  | 
body  | 
integer  | 
Megabytes of memory per the instance.  | 
reservation.disk_gb  | 
body  | 
string  | 
Gigabytes of the local disk per the instance.  | 
reservation.affinity  | 
body  | 
trilean  | 
The affinity of instances to reserve. The value should be   | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.flavor_id  | 
body  | 
string  | 
The flavor ID used for launching instances on reserved resources.  | 
reservation.server_group_id  | 
body  | 
string  | 
The server group ID specified when launch instances on reserved resources.  | 
reservation.aggregate_id  | 
body  | 
integer  | 
The aggregate ID of the reservation.  | 
Example of List Leases Response
{
    "leases": [
        {
            "id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
            "name": "lease_foo",
            "start_date": "2017-12-26T12:00:00.000000",
            "end_date": "2017-12-27T12:00:00.000000",
            "status":"PENDING",
            "degraded": false,
            "user_id": "5434f637520d4c17bbf254af034b0320",
            "project_id": "aa45f56901ef45ee95e3d211097c0ea3",
            "trust_id": "b442a580b9504ababf305bf2b4c49512",
            "created_at": "2017-12-27 10:00:00",
            "updated_at": null,
            "reservations": [
                {
                    "id": "087bc740-6d2d-410b-9d47-c7b2b55a9d36",
                    "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                    "status": "pending",
                    "missing_resources": false,
                    "resources_changed": false,
                    "resource_id": "5e6c0e6e-f1e6-490b-baaf-50deacbbe371",
                    "resource_type": "physical:host",
                    "min": 4,
                    "max": 6,
                    "hypervisor_properties": "[\">=\", \"$vcpus\", \"4\"]",
                    "resource_properties": "",
                    "before_end": "default",
                    "created_at": "2017-12-27 10:00:00",
                    "updated_at": null
                },
                {
                    "id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                    "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                    "status": "pending",
                    "missing_resources": false,
                    "resources_changed": false,
                    "resource_id": "0b901727-cca2-43ed-bcc8-c21b0982dcb1",
                    "resource_type": "virtual:instance",
                    "amount": 4,
                    "vcpus": 2,
                    "memory_mb": 4096,
                    "disk_gb": 100,
                    "affinity": false,
                    "resource_properties": "",
                    "flavor_id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                    "server_group_id": "33cdfc42-5a04-4fcc-b190-1abebaa056bb",
                    "aggregate_id": 11,
                    "created_at": "2017-12-27 10:00:00",
                    "updated_at": null
                }
            ],
            "events": [
                {
                    "id": "188a8584-f832-4df9-9a4a-51e6364420ff",
                    "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                    "status": "UNDONE",
                    "event_type": "start_lease",
                    "time": "2017-12-26T12:00:00.000000",
                    "created_at": "2017-12-27 10:00:00",
                    "updated_at": null
                },
                {
                    "id": "277d6436-dfcb-4eae-ae5e-ac7fa9c2fd56",
                    "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                    "status": "UNDONE",
                    "event_type": "end_lease",
                    "time": "2017-12-27T12:00:00.000000",
                    "created_at": "2017-12-27 10:00:00",
                    "updated_at": null
                },
                {
                    "id": "f583af71-ca21-4b66-87de-52211d118029",
                    "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                    "status": "UNDONE",
                    "time": "2017-12-27T11:00:00.000000",
                    "event_type": "before_end_lease",
                    "created_at": "2017-12-27 10:00:00",
                    "updated_at": null
                }
            ]
        }
    ]
}
Create a lease.
Response codes
Normal response code: 201
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Conflict(409), Internal Server Error(500)
Request¶
General Parameters¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
name  | 
body  | 
string  | 
The name of the lease.  | 
start_date  | 
body  | 
string  | 
The start date and time of the lease. Note If   | 
end_date  | 
body  | 
string  | 
The end date and time of the lease.  | 
before_end_date (Optional)  | 
body  | 
string  | 
The date and time for the before-end-action of the lease.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.resource_type  | 
body  | 
string  | 
The type of the resource to reserve. Note 
  | 
events (Optional)  | 
body  | 
array  | 
A list of   | 
Parameters for Host Reservation¶
The following parameters are required for host reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.min  | 
body  | 
integer  | 
The minimum number of hosts to reserve. The value should be greater than 0.  | 
reservation.max  | 
body  | 
integer  | 
The maximum number of hosts to reserve. The value should be greater than or equal to   | 
reservation.hypervisor_properties  | 
body  | 
string  | 
Properties of the hypervisor to reserve.  | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.before_end (Optional)  | 
body  | 
string  | 
The before-end-action of the reservation. Note 
  | 
Parameters for Instance Reservation¶
The following parameters are required for instance reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.amount  | 
body  | 
integer  | 
The amount of instances to reserve. The value should be greater than 0.  | 
reservation.vcpus  | 
body  | 
integer  | 
The number of VCPUs per the instance.  | 
reservation.memory_mb  | 
body  | 
integer  | 
Megabytes of memory per the instance.  | 
reservation.disk_gb  | 
body  | 
string  | 
Gigabytes of the local disk per the instance.  | 
reservation.affinity  | 
body  | 
trilean  | 
The affinity of instances to reserve. The value should be   | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
Example of Create Lease Request
{
    "name": "lease_foo",
    "start_date": "2017-12-26 12:00",
    "end_date": "2017-12-27 12:00",
    "before_end_date": "2017-12-27 11:00",
    "reservations": [
        {
            "resource_type": "physical:host",
            "min": 4,
            "max": 6,
            "hypervisor_properties": "[\">=\", \"$vcpus\", \"4\"]",
            "resource_properties": "",
            "before_end": "default"
        },
        {
            "resource_type": "virtual:instance",
            "amount": 4,
            "vcpus": 2,
            "memory_mb": 4096,
            "disk_gb": 100,
            "affinity": false,
            "resource_properties": ""
        }
    ],
    "events": []
}
Response¶
General Parameters¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The UUID of the lease.  | 
name  | 
body  | 
string  | 
The name of the lease.  | 
start_date  | 
body  | 
string  | 
The start date and time of the lease.  | 
end_date  | 
body  | 
string  | 
The end date and time of the lease.  | 
status  | 
body  | 
string  | 
The status of the lease.  | 
degraded  | 
body  | 
boolean  | 
The flag for reserved resources of the lease. This is set True while missing_resources or resources_changed of reservations is set True.  | 
user_id  | 
body  | 
string  | 
The UUID of the lease owner.  | 
project_id  | 
body  | 
string  | 
The UUID the project which owns the lease.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the lease owner.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
reservation.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the reservation belongs.  | 
reservation.status  | 
body  | 
string  | 
The status of the reservation.  | 
reservation.missing_resources  | 
body  | 
boolean  | 
The flag for the capacity of reserved resources. It is set True while the amount of reserved resources is less than the request.  | 
reservation.resources_changed  | 
body  | 
boolean  | 
The flag for changes of reserved resources. If it is set True if reserved resources were changed after the lease started.  | 
reservation.resource_id  | 
body  | 
string  | 
The ID of the resource object of the reservation.  | 
reservation.resource_type  | 
body  | 
string  | 
The type of the resource to reserve. Note 
  | 
reservation.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
reservation.updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
events  | 
body  | 
array  | 
A list of   | 
event.id  | 
body  | 
string  | 
The UUID of the event.  | 
event.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the event belongs.  | 
event.status  | 
body  | 
string  | 
The status of the event.  | 
event.event_type  | 
body  | 
string  | 
The type of the event.  | 
event.time  | 
body  | 
string  | 
The date and time of the event.  | 
event.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
event_updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Parameters for Host Reservation¶
The following parameters are returned for host reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.min  | 
body  | 
integer  | 
The minimum number of hosts to reserve. The value should be greater than 0.  | 
reservation.max  | 
body  | 
integer  | 
The maximum number of hosts to reserve. The value should be greater than or equal to   | 
reservation.hypervisor_properties  | 
body  | 
string  | 
Properties of the hypervisor to reserve.  | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.before_end  | 
body  | 
string  | 
The before-end-action of the reservation. Note 
  | 
Parameters for Instance Reservation¶
The following parameters are returned for instance reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.amount  | 
body  | 
integer  | 
The amount of instances to reserve. The value should be greater than 0.  | 
reservation.vcpus  | 
body  | 
integer  | 
The number of VCPUs per the instance.  | 
reservation.memory_mb  | 
body  | 
integer  | 
Megabytes of memory per the instance.  | 
reservation.disk_gb  | 
body  | 
string  | 
Gigabytes of the local disk per the instance.  | 
reservation.affinity  | 
body  | 
trilean  | 
The affinity of instances to reserve. The value should be   | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.flavor_id  | 
body  | 
string  | 
The flavor ID used for launching instances on reserved resources.  | 
reservation.server_group_id  | 
body  | 
string  | 
The server group ID specified when launch instances on reserved resources.  | 
reservation.aggregate_id  | 
body  | 
integer  | 
The aggregate ID of the reservation.  | 
Example of Create Lease Response
{
    "lease": {
        "id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
        "name": "lease_foo",
        "start_date": "2017-12-26T12:00:00.000000",
        "end_date": "2017-12-27T12:00:00.000000",
        "status":"PENDING",
        "degraded": false,
        "user_id": "5434f637520d4c17bbf254af034b0320",
        "project_id": "aa45f56901ef45ee95e3d211097c0ea3",
        "trust_id": "b442a580b9504ababf305bf2b4c49512",
        "created_at": "2017-12-27 10:00:00",
        "updated_at": null,
        "reservations": [
            {
                "id": "087bc740-6d2d-410b-9d47-c7b2b55a9d36",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "pending",
                "missing_resources": false,
                "resources_changed": false,
                "resource_id": "5e6c0e6e-f1e6-490b-baaf-50deacbbe371",
                "resource_type": "physical:host",
                "min": 4,
                "max": 6,
                "hypervisor_properties": "[\">=\", \"$vcpus\", \"4\"]",
                "resource_properties": "",
                "before_end": "default",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "pending",
                "missing_resources": false,
                "resources_changed": false,
                "resource_id": "0b901727-cca2-43ed-bcc8-c21b0982dcb1",
                "resource_type": "virtual:instance",
                "amount": 4,
                "vcpus": 2,
                "memory_mb": 4096,
                "disk_gb": 100,
                "affinity": false,
                "resource_properties": "",
                "flavor_id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                "server_group_id": "33cdfc42-5a04-4fcc-b190-1abebaa056bb",
                "aggregate_id": 11,
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            }
        ],
        "events": [
            {
                "id": "188a8584-f832-4df9-9a4a-51e6364420ff",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "event_type": "start_lease",
                "time": "2017-12-26T12:00:00.000000",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "277d6436-dfcb-4eae-ae5e-ac7fa9c2fd56",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "event_type": "end_lease",
                "time": "2017-12-27T12:00:00.000000",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "f583af71-ca21-4b66-87de-52211d118029",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "time": "2017-12-27T11:00:00.000000",
                "event_type": "before_end_lease",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            }
        ]
    }
}
Show details of a lease.
Preconditions
The lease must exist.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease_id  | 
path  | 
string  | 
The UUID of the lease.  | 
Response¶
General Parameters¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The UUID of the lease.  | 
name  | 
body  | 
string  | 
The name of the lease.  | 
start_date  | 
body  | 
string  | 
The start date and time of the lease.  | 
end_date  | 
body  | 
string  | 
The end date and time of the lease.  | 
status  | 
body  | 
string  | 
The status of the lease.  | 
degraded  | 
body  | 
boolean  | 
The flag for reserved resources of the lease. This is set True while missing_resources or resources_changed of reservations is set True.  | 
user_id  | 
body  | 
string  | 
The UUID of the lease owner.  | 
project_id  | 
body  | 
string  | 
The UUID the project which owns the lease.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the lease owner.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
reservation.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the reservation belongs.  | 
reservation.status  | 
body  | 
string  | 
The status of the reservation.  | 
reservation.missing_resources  | 
body  | 
boolean  | 
The flag for the capacity of reserved resources. It is set True while the amount of reserved resources is less than the request.  | 
reservation.resources_changed  | 
body  | 
boolean  | 
The flag for changes of reserved resources. If it is set True if reserved resources were changed after the lease started.  | 
reservation.resource_id  | 
body  | 
string  | 
The ID of the resource object of the reservation.  | 
reservation.resource_type  | 
body  | 
string  | 
The type of the resource to reserve. Note 
  | 
reservation.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
reservation.updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
events  | 
body  | 
array  | 
A list of   | 
event.id  | 
body  | 
string  | 
The UUID of the event.  | 
event.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the event belongs.  | 
event.status  | 
body  | 
string  | 
The status of the event.  | 
event.event_type  | 
body  | 
string  | 
The type of the event.  | 
event.time  | 
body  | 
string  | 
The date and time of the event.  | 
event.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
event_updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Parameters for Host Reservation¶
The following parameters are returned for host reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.min  | 
body  | 
integer  | 
The minimum number of hosts to reserve. The value should be greater than 0.  | 
reservation.max  | 
body  | 
integer  | 
The maximum number of hosts to reserve. The value should be greater than or equal to   | 
reservation.hypervisor_properties  | 
body  | 
string  | 
Properties of the hypervisor to reserve.  | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.before_end  | 
body  | 
string  | 
The before-end-action of the reservation. Note 
  | 
Parameters for Instance Reservation¶
The following parameters are returned for instance reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.amount  | 
body  | 
integer  | 
The amount of instances to reserve. The value should be greater than 0.  | 
reservation.vcpus  | 
body  | 
integer  | 
The number of VCPUs per the instance.  | 
reservation.memory_mb  | 
body  | 
integer  | 
Megabytes of memory per the instance.  | 
reservation.disk_gb  | 
body  | 
string  | 
Gigabytes of the local disk per the instance.  | 
reservation.affinity  | 
body  | 
trilean  | 
The affinity of instances to reserve. The value should be   | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.flavor_id  | 
body  | 
string  | 
The flavor ID used for launching instances on reserved resources.  | 
reservation.server_group_id  | 
body  | 
string  | 
The server group ID specified when launch instances on reserved resources.  | 
reservation.aggregate_id  | 
body  | 
integer  | 
The aggregate ID of the reservation.  | 
Example of Show Lease Details Response
{
    "lease": {
        "id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
        "name": "lease_foo",
        "start_date": "2017-12-26T12:00:00.000000",
        "end_date": "2017-12-27T12:00:00.000000",
        "status":"PENDING",
        "degraded": false,
        "user_id": "5434f637520d4c17bbf254af034b0320",
        "project_id": "aa45f56901ef45ee95e3d211097c0ea3",
        "trust_id": "b442a580b9504ababf305bf2b4c49512",
        "created_at": "2017-12-27 10:00:00",
        "updated_at": null,
        "reservations": [
            {
                "id": "087bc740-6d2d-410b-9d47-c7b2b55a9d36",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "pending",
                "missing_resources": false,
                "resources_changed": false,
                "resource_id": "5e6c0e6e-f1e6-490b-baaf-50deacbbe371",
                "resource_type": "physical:host",
                "min": 4,
                "max": 6,
                "hypervisor_properties": "[\">=\", \"$vcpus\", \"4\"]",
                "resource_properties": "",
                "before_end": "default",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "pending",
                "missing_resources": false,
                "resources_changed": false,
                "resource_id": "0b901727-cca2-43ed-bcc8-c21b0982dcb1",
                "resource_type": "virtual:instance",
                "amount": 4,
                "vcpus": 2,
                "memory_mb": 4096,
                "disk_gb": 100,
                "affinity": false,
                "resource_properties": "",
                "flavor_id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                "server_group_id": "33cdfc42-5a04-4fcc-b190-1abebaa056bb",
                "aggregate_id": 11,
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            }
        ],
        "events": [
            {
                "id": "188a8584-f832-4df9-9a4a-51e6364420ff",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "event_type": "start_lease",
                "time": "2017-12-26T12:00:00.000000",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "277d6436-dfcb-4eae-ae5e-ac7fa9c2fd56",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "event_type": "end_lease",
                "time": "2017-12-27T12:00:00.000000",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "f583af71-ca21-4b66-87de-52211d118029",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "time": "2017-12-27T11:00:00.000000",
                "event_type": "before_end_lease",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            }
        ]
    }
}
Update a lease.
Preconditions
The lease must exist.
Response codes
Normal response codes: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Conflict(409), Internal Server Error(500)
Request¶
General Parameters¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease_id  | 
path  | 
string  | 
The UUID of the lease.  | 
name (Optional)  | 
body  | 
string  | 
The name of the lease.  | 
start_date (Optional)  | 
body  | 
string  | 
The start date and time of the lease. Note If   | 
end_date (Optional)  | 
body  | 
string  | 
The end date and time of the lease.  | 
before_end_date (Optional)  | 
body  | 
string  | 
The date and time for the before-end-action of the lease.  | 
reservations (Optional)  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
Parameters for Host Reservation¶
The following parameters are required for host reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.min (Optional)  | 
body  | 
integer  | 
The minimum number of hosts to reserve. The value should be greater than 0.  | 
reservation.max (Optional)  | 
body  | 
integer  | 
The maximum number of hosts to reserve. The value should be greater than or equal to   | 
reservation.hypervisor_properties  | 
body  | 
string  | 
Properties of the hypervisor to reserve.  | 
reservation.resource_properties (Optional)  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.before_end (Optional)  | 
body  | 
string  | 
The before-end-action of the reservation. Note 
  | 
Parameters for Instance Reservation¶
The following parameters are required for instance reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.amount (Optional)  | 
body  | 
integer  | 
The amount of instances to reserve. The value should be greater than 0.  | 
reservation.vcpus (Optional)  | 
body  | 
integer  | 
The number of VCPUs per the instance.  | 
reservation.memory_mb (Optional)  | 
body  | 
integer  | 
Megabytes of memory per the instance.  | 
reservation.disk_gb (Optional)  | 
body  | 
string  | 
Gigabytes of the local disk per the instance.  | 
reservation.affinity (Optional)  | 
body  | 
trilean  | 
The affinity of instances to reserve. The value should be   | 
reservation.resource_properties (Optional)  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
Example of Update Lease Request
{
    "end_date": "2017-12-28 12:00",
    "reservations": [
        {
            "id": "087bc740-6d2d-410b-9d47-c7b2b55a9d36",
            "min": 6,
            "max": 8
        },
        {
            "id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
            "amount": 6
        }
    ],
    "events": []
}
Response¶
General Parameters¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The UUID of the lease.  | 
name  | 
body  | 
string  | 
The name of the lease.  | 
start_date  | 
body  | 
string  | 
The start date and time of the lease.  | 
end_date  | 
body  | 
string  | 
The end date and time of the lease.  | 
status  | 
body  | 
string  | 
The status of the lease.  | 
degraded  | 
body  | 
boolean  | 
The flag for reserved resources of the lease. This is set True while missing_resources or resources_changed of reservations is set True.  | 
user_id  | 
body  | 
string  | 
The UUID of the lease owner.  | 
project_id  | 
body  | 
string  | 
The UUID the project which owns the lease.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the lease owner.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
reservation.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the reservation belongs.  | 
reservation.status  | 
body  | 
string  | 
The status of the reservation.  | 
reservation.missing_resources  | 
body  | 
boolean  | 
The flag for the capacity of reserved resources. It is set True while the amount of reserved resources is less than the request.  | 
reservation.resources_changed  | 
body  | 
boolean  | 
The flag for changes of reserved resources. If it is set True if reserved resources were changed after the lease started.  | 
reservation.resource_id  | 
body  | 
string  | 
The ID of the resource object of the reservation.  | 
reservation.resource_type  | 
body  | 
string  | 
The type of the resource to reserve. Note 
  | 
reservation.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
reservation.updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
events  | 
body  | 
array  | 
A list of   | 
event.id  | 
body  | 
string  | 
The UUID of the event.  | 
event.lease_id  | 
body  | 
string  | 
The UUID of the lease to which the event belongs.  | 
event.status  | 
body  | 
string  | 
The status of the event.  | 
event.event_type  | 
body  | 
string  | 
The type of the event.  | 
event.time  | 
body  | 
string  | 
The date and time of the event.  | 
event.created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
event_updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Parameters for Host Reservation¶
The following parameters are returned for host reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.min  | 
body  | 
integer  | 
The minimum number of hosts to reserve. The value should be greater than 0.  | 
reservation.max  | 
body  | 
integer  | 
The maximum number of hosts to reserve. The value should be greater than or equal to   | 
reservation.hypervisor_properties  | 
body  | 
string  | 
Properties of the hypervisor to reserve.  | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.before_end  | 
body  | 
string  | 
The before-end-action of the reservation. Note 
  | 
Parameters for Instance Reservation¶
The following parameters are returned for instance reservation. All parameters
are in the reservation object.
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
reservation.amount  | 
body  | 
integer  | 
The amount of instances to reserve. The value should be greater than 0.  | 
reservation.vcpus  | 
body  | 
integer  | 
The number of VCPUs per the instance.  | 
reservation.memory_mb  | 
body  | 
integer  | 
Megabytes of memory per the instance.  | 
reservation.disk_gb  | 
body  | 
string  | 
Gigabytes of the local disk per the instance.  | 
reservation.affinity  | 
body  | 
trilean  | 
The affinity of instances to reserve. The value should be   | 
reservation.resource_properties  | 
body  | 
string  | 
Properties of the resource to reserve.  | 
reservation.flavor_id  | 
body  | 
string  | 
The flavor ID used for launching instances on reserved resources.  | 
reservation.server_group_id  | 
body  | 
string  | 
The server group ID specified when launch instances on reserved resources.  | 
reservation.aggregate_id  | 
body  | 
integer  | 
The aggregate ID of the reservation.  | 
Example of Update Lease Response
{
    "lease": {
        "id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
        "name": "lease_foo",
        "start_date": "2017-12-26T12:00:00.000000",
        "end_date": "2017-12-28T12:00:00.000000",
        "status":"PENDING",
        "degraded": false,
        "user_id": "5434f637520d4c17bbf254af034b0320",
        "project_id": "aa45f56901ef45ee95e3d211097c0ea3",
        "trust_id": "b442a580b9504ababf305bf2b4c49512",
        "created_at": "2017-12-27 10:00:00",
        "updated_at": null,
        "reservations": [
            {
                "id": "087bc740-6d2d-410b-9d47-c7b2b55a9d36",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "pending",
                "missing_resources": false,
                "resources_changed": false,
                "resource_id": "5e6c0e6e-f1e6-490b-baaf-50deacbbe371",
                "resource_type": "physical:host",
                "min": 6,
                "max": 8,
                "hypervisor_properties": "[\">=\", \"$vcpus\", \"4\"]",
                "resource_properties": "",
                "before_end": "default",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "pending",
                "missing_resources": false,
                "resources_changed": false,
                "resource_id": "0b901727-cca2-43ed-bcc8-c21b0982dcb1",
                "resource_type": "virtual:instance",
                "amount": 6,
                "vcpus": 2,
                "memory_mb": 4096,
                "disk_gb": 100,
                "affinity": false,
                "resource_properties": "",
                "flavor_id": "ddc45423-f863-4e4e-8e7a-51d27cfec962",
                "server_group_id": "33cdfc42-5a04-4fcc-b190-1abebaa056bb",
                "aggregate_id": 11,
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            }
        ],
        "events": [
            {
                "id": "188a8584-f832-4df9-9a4a-51e6364420ff",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "event_type": "start_lease",
                "time": "2017-12-26T12:00:00.000000",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "277d6436-dfcb-4eae-ae5e-ac7fa9c2fd56",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "event_type": "end_lease",
                "time": "2017-12-27T12:00:00.000000",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            },
            {
                "id": "f583af71-ca21-4b66-87de-52211d118029",
                "lease_id": "6ee55c78-ac52-41a6-99af-2d2d73bcc466",
                "status": "UNDONE",
                "time": "2017-12-27T11:00:00.000000",
                "event_type": "before_end_lease",
                "created_at": "2017-12-27 10:00:00",
                "updated_at": null
            }
        ]
    }
}
Delete a lease.
Preconditions
The lease must exist.
Response codes
Normal response codes: 204
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Conflict(409), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease_id  | 
path  | 
string  | 
The UUID of the lease.  | 
Response¶
No body content is returned on a successful DELETE.
Hosts¶
List hosts.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
No body content, path, nor query option.
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
hosts  | 
body  | 
array  | 
A list of   | 
id  | 
body  | 
string  | 
The ID of the host.  | 
hypervisor_hostname  | 
body  | 
string  | 
The hypervisor name of the host.  | 
hypervisor_type  | 
body  | 
string  | 
The hypervisor type the host.  | 
hypervisor_version  | 
body  | 
integer  | 
The hypervisor version of the host.  | 
vcpus  | 
body  | 
integer  | 
The number of the VCPUs of the host.  | 
cpu_info  | 
body  | 
string  | 
Information of the CPU of the host.  | 
memory_mb  | 
body  | 
integer  | 
Megabytes of the memory of the host.  | 
local_gb  | 
body  | 
integer  | 
Gigabytes of the disk of the host.  | 
service_name  | 
body  | 
string  | 
The compute service name of the host.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the host is reservable or not.  | 
status  | 
body  | 
string  | 
The status of the host. Note This is null currently.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the host operator.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
extra_capability (Optional)  | 
body  | 
any  | 
The extra capability of the host. Note Any key-value pair can be stored as one of extra capabilities of the host.  | 
Example of List Hosts Response
{
    "hosts": [
        {
            "id": "1",
            "hypervisor_hostname": "compute-1",
            "hypervisor_type": "QEMU",
            "hypervisor_version": 2010001,
            "vcpus": 4,
            "cpu_info": "{'arch': 'x86_64', 'model': 'cpu64-rhel6',
                          'vendor': 'Intel', 'features': [
                              'pge', 'clflush', 'sep', 'syscall', 'msr',
                              'vmx', 'cmov', 'nx', 'pat', 'lm', 'tsc',
                              'fpu', 'fxsr', 'pae', 'mmx', 'cx8', 'mce',
                              'de', 'mca', 'pse', 'pni', 'apic', 'sse',
                              'lahf_lm', 'sse2', 'hypervisor', 'cx16',
                              'pse36', 'mttr', 'x2apic'],
                          'topology': {
                              'cores': 1, 'cells': 1, 'threads': 1, 'sockets': 4
                          }}",
            "memory_mb": 8192,
            "local_gb": 100,
            "service_name": "compute-1",
            "reservable": true,
            "status": null,
            "trust_id": "5f67f11215cf4c52906453a181bfcfea",
            "created_at": "2017-12-27 10:00:00",
            "updated_at": null,
            "extra_capability_sample": "foo"
        }
    ]
}
Create a host.
Response codes
Normal response code: 201
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Conflict(409), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
name  | 
body  | 
string  | 
The name of the host.  | 
extra_capability (Optional)  | 
body  | 
any  | 
The extra capability of the host. Note Any key-value pair can be stored as one of extra capabilities of the host.  | 
Example of Create Host Request
{
    "name": "compute-1",
    "extra_capability_sample": "foo"
}
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The ID of the host.  | 
hypervisor_hostname  | 
body  | 
string  | 
The hypervisor name of the host.  | 
hypervisor_type  | 
body  | 
string  | 
The hypervisor type the host.  | 
hypervisor_version  | 
body  | 
integer  | 
The hypervisor version of the host.  | 
vcpus  | 
body  | 
integer  | 
The number of the VCPUs of the host.  | 
cpu_info  | 
body  | 
string  | 
Information of the CPU of the host.  | 
memory_mb  | 
body  | 
integer  | 
Megabytes of the memory of the host.  | 
local_gb  | 
body  | 
integer  | 
Gigabytes of the disk of the host.  | 
service_name  | 
body  | 
string  | 
The compute service name of the host.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the host is reservable or not.  | 
status  | 
body  | 
string  | 
The status of the host. Note This is null currently.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the host operator.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
extra_capability (Optional)  | 
body  | 
any  | 
The extra capability of the host. Note Any key-value pair can be stored as one of extra capabilities of the host.  | 
Example of Create Host Response
{
    "host": {
        "id": "1",
        "hypervisor_hostname": "compute-1",
        "hypervisor_type": "QEMU",
        "hypervisor_version": 2010001,
        "vcpus": 4,
        "cpu_info": "{'arch': 'x86_64', 'model': 'cpu64-rhel6',
                      'vendor': 'Intel', 'features': [
                          'pge', 'clflush', 'sep', 'syscall', 'msr',
                          'vmx', 'cmov', 'nx', 'pat', 'lm', 'tsc',
                          'fpu', 'fxsr', 'pae', 'mmx', 'cx8', 'mce',
                          'de', 'mca', 'pse', 'pni', 'apic', 'sse',
                          'lahf_lm', 'sse2', 'hypervisor', 'cx16',
                          'pse36', 'mttr', 'x2apic'],
                      'topology': {
                          'cores': 1, 'cells': 1, 'threads': 1, 'sockets': 4
                      }}",
        "memory_mb": 8192,
        "local_gb": 100,
        "service_name": "compute-1",
        "reservable": true,
        "status": null,
        "trust_id": "5f67f11215cf4c52906453a181bfcfea",
        "created_at": "2017-12-27 10:00:00",
        "updated_at": null,
        "extra_capability_sample": "foo"
    }
}
Show details of a host.
Preconditions
The host must exist.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host_id  | 
path  | 
string  | 
The ID of the host.  | 
private  | 
body  | 
boolean  | 
Whether the property is private.  | 
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The ID of the host.  | 
hypervisor_hostname  | 
body  | 
string  | 
The hypervisor name of the host.  | 
hypervisor_type  | 
body  | 
string  | 
The hypervisor type the host.  | 
hypervisor_version  | 
body  | 
integer  | 
The hypervisor version of the host.  | 
vcpus  | 
body  | 
integer  | 
The number of the VCPUs of the host.  | 
cpu_info  | 
body  | 
string  | 
Information of the CPU of the host.  | 
memory_mb  | 
body  | 
integer  | 
Megabytes of the memory of the host.  | 
local_gb  | 
body  | 
integer  | 
Gigabytes of the disk of the host.  | 
service_name  | 
body  | 
string  | 
The compute service name of the host.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the host is reservable or not.  | 
status  | 
body  | 
string  | 
The status of the host. Note This is null currently.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the host operator.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
extra_capability (Optional)  | 
body  | 
any  | 
The extra capability of the host. Note Any key-value pair can be stored as one of extra capabilities of the host.  | 
Example of Show Host Details Response
{
    "host": {
        "id": "1",
        "hypervisor_hostname": "compute-1",
        "hypervisor_type": "QEMU",
        "hypervisor_version": 2010001,
        "vcpus": 4,
        "cpu_info": "{'arch': 'x86_64', 'model': 'cpu64-rhel6',
                      'vendor': 'Intel', 'features': [
                          'pge', 'clflush', 'sep', 'syscall', 'msr',
                          'vmx', 'cmov', 'nx', 'pat', 'lm', 'tsc',
                          'fpu', 'fxsr', 'pae', 'mmx', 'cx8', 'mce',
                          'de', 'mca', 'pse', 'pni', 'apic', 'sse',
                          'lahf_lm', 'sse2', 'hypervisor', 'cx16',
                          'pse36', 'mttr', 'x2apic'],
                      'topology': {
                          'cores': 1, 'cells': 1, 'threads': 1, 'sockets': 4
                      }}",
        "memory_mb": 8192,
        "local_gb": 100,
        "service_name": "compute-1",
        "reservable": true,
        "status": null,
        "trust_id": "5f67f11215cf4c52906453a181bfcfea",
        "created_at": "2017-12-27 10:00:00",
        "updated_at": null,
        "extra_capability_sample": "foo"
    }
}
Update a host.
Preconditions
The host must exist.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Conflict(409), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host_id  | 
path  | 
string  | 
The ID of the host.  | 
extra_capability (Optional)  | 
body  | 
any  | 
The extra capability of the host. Note Any key-value pair can be stored as one of extra capabilities of the host.  | 
Example of Update Host Request
{
    "extra_capability_sample": "bar"
}
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The ID of the host.  | 
hypervisor_hostname  | 
body  | 
string  | 
The hypervisor name of the host.  | 
hypervisor_type  | 
body  | 
string  | 
The hypervisor type the host.  | 
hypervisor_version  | 
body  | 
integer  | 
The hypervisor version of the host.  | 
vcpus  | 
body  | 
integer  | 
The number of the VCPUs of the host.  | 
cpu_info  | 
body  | 
string  | 
Information of the CPU of the host.  | 
memory_mb  | 
body  | 
integer  | 
Megabytes of the memory of the host.  | 
local_gb  | 
body  | 
integer  | 
Gigabytes of the disk of the host.  | 
service_name  | 
body  | 
string  | 
The compute service name of the host.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the host is reservable or not.  | 
status  | 
body  | 
string  | 
The status of the host. Note This is null currently.  | 
trust_id  | 
body  | 
string  | 
The UUID of the trust of the host operator.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
extra_capability (Optional)  | 
body  | 
any  | 
The extra capability of the host. Note Any key-value pair can be stored as one of extra capabilities of the host.  | 
Example of Host Update Response
{
    "host": {
        "id": "1",
        "hypervisor_hostname": "compute-1",
        "hypervisor_type": "QEMU",
        "hypervisor_version": 2010001,
        "vcpus": 4,
        "cpu_info": "{'arch': 'x86_64', 'model': 'cpu64-rhel6',
                      'vendor': 'Intel', 'features': [
                          'pge', 'clflush', 'sep', 'syscall', 'msr',
                          'vmx', 'cmov', 'nx', 'pat', 'lm', 'tsc',
                          'fpu', 'fxsr', 'pae', 'mmx', 'cx8', 'mce',
                          'de', 'mca', 'pse', 'pni', 'apic', 'sse',
                          'lahf_lm', 'sse2', 'hypervisor', 'cx16',
                          'pse36', 'mttr', 'x2apic'],
                      'topology': {
                          'cores': 1, 'cells': 1, 'threads': 1, 'sockets': 4
                      }}",
        "memory_mb": 8192,
        "local_gb": 100,
        "service_name": "compute-1",
        "reservable": true,
        "status": null,
        "trust_id": "5f67f11215cf4c52906453a181bfcfea",
        "created_at": "2017-12-27 10:00:00",
        "updated_at": null,
        "extra_capability_sample": "bar"
    }
}
Delete a host.
Preconditions
The host must exist.
Response codes
Normal response code: 204
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Conflict(409), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host_id  | 
path  | 
string  | 
The ID of the host.  | 
Response¶
No body content is returned on a successful DELETE.
Resource Allocations¶
List allocations of all hosts.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
lease_id (Optional)  | 
query  | 
string  | 
Filter allocations results by lease id  | 
reservation_id (Optional)  | 
query  | 
string  | 
Filter allocations results by reservation id  | 
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
allocations  | 
body  | 
array  | 
A list of   | 
resource_id  | 
body  | 
string  | 
The ID of the host.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
reservation.lease_id  | 
body  | 
string  | 
The UUID of the lease.  | 
reservation.start_date  | 
body  | 
string  | 
The start date of the lease.  | 
reservation.end_date  | 
body  | 
string  | 
The end date of the lease.  | 
Example of List Allocations Response
{
    "allocations": [
        {
            "resource_id": "1",
            "reservations": [
                {
                    "id": "3504fbac-fdb2-458e-a43f-34d27fbd0b86",
                    "lease_id": "0ec2bed6-75f9-4959-8198-9d9717dde4cb",
                    "start_date": "2021-12-16T17:11:00.000000",
                    "end_date": "2021-12-16T17:13:00.000000"
                },
                {
                    "id": "4f4743a2-d8c7-44c2-ba39-300eb7659bb9",
                    "lease_id": "6050288d-5535-4e3c-93d5-083184b86c61",
                    "start_date": "2021-12-16T17:11:00.000000",
                    "end_date": "2021-12-16T17:13:00.000000"
                }
            ]
        },
        {
            "resource_id": "2",
            "reservations": [
                {
                    "id": "b2475424-6872-43ec-857d-f4b50b403e97",
                    "lease_id": "e92b9d47-9078-47ec-a35c-27e67f7b8429",
                    "start_date": "2021-12-16T17:11:00.000000",
                    "end_date": "2021-12-16T17:13:00.000000"
                }
            ]
        }
    ]
}
Get allocation of a host.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
host_id  | 
path  | 
string  | 
The ID of the host.  | 
lease_id (Optional)  | 
query  | 
string  | 
Filter allocations results by lease id  | 
reservation_id (Optional)  | 
query  | 
string  | 
Filter allocations results by reservation id  | 
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
allocation  | 
body  | 
array  | 
An   | 
resource_id  | 
body  | 
string  | 
The ID of the host.  | 
reservations  | 
body  | 
array  | 
A list of   | 
reservation.id  | 
body  | 
string  | 
The UUID of the reservation.  | 
reservation.lease_id  | 
body  | 
string  | 
The UUID of the lease.  | 
reservation.start_date  | 
body  | 
string  | 
The start date of the lease.  | 
reservation.end_date  | 
body  | 
string  | 
The end date of the lease.  | 
Example of Get Allocation Response
{
    "allocation": {
        "resource_id": "1",
        "reservations": [
            {
                "id": "3504fbac-fdb2-458e-a43f-34d27fbd0b86",
                "lease_id": "0ec2bed6-75f9-4959-8198-9d9717dde4cb",
                "start_date": "2021-12-16T17:11:00.000000",
                "end_date": "2021-12-16T17:13:00.000000"
            },
            {
                "id": "4f4743a2-d8c7-44c2-ba39-300eb7659bb9",
                "lease_id": "6050288d-5535-4e3c-93d5-083184b86c61",
                "start_date": "2021-12-16T17:11:00.000000",
                "end_date": "2021-12-16T17:13:00.000000"
            }
        ]
    }
}
Get all resource properties from host
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
detail (Optional)  | 
query  | 
string  | 
Whether to include values along for each property and if the property is private.  | 
all (Optional)  | 
query  | 
string  | 
Whether to include all resource properties, public and private.  | 
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
resource_properties  | 
body  | 
array  | 
A list of   | 
property  | 
body  | 
any  | 
The name of the property.  | 
private (Optional)  | 
body  | 
boolean  | 
Whether the property is private.  | 
values (Optional)  | 
body  | 
array  | 
A list of values for the property.  | 
Example of List Resource Properties Response
{
    "resource_properties": [
        {
            "property": "gpu"
        }
    ]
}
Example of List Resource Properties With Detail Response
{
    "resource_properties": [
        {
            "property": "gpu",
            "private": false,
            "values": [
                "True",
                "False"
            ]
        }
    ]
}
Update a host resource properties
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
property_name  | 
path  | 
string  | 
The name of the property.  | 
private  | 
body  | 
boolean  | 
Whether the property is private.  | 
Example of Update Resource Properties
{
    "private": true
}
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
id  | 
body  | 
string  | 
The updated   | 
resource_type  | 
body  | 
string  | 
The updated   | 
property_name  | 
body  | 
any  | 
The name of the property.  | 
private  | 
body  | 
boolean  | 
Whether the updated   | 
Example of List Resource Properties Response
{
    "resource_property": {
        "created_at": "2021-12-15T19:38:16.000000",
        "updated_at": "2021-12-21T21:37:19.000000",
        "id": "19e48cd0-042d-4044-a69a-d44d672849b5",
        "resource_type": "physical:host",
        "property_name": "gpu",
        "private": true
    }
}
Floating IPs¶
List floating IPs.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Internal Server Error(500)
Request¶
No body content, path, nor query option.
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
floatingips  | 
body  | 
array  | 
A list of   | 
id  | 
body  | 
string  | 
The ID of the floating ip resources.  | 
floating_network_id  | 
body  | 
string  | 
An external network ID the floating IP belongs to.  | 
subnet_id  | 
body  | 
boolean  | 
An external subnet ID the floating IP belongs to.  | 
floating_ip_address  | 
body  | 
string  | 
The floating IP address.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the floating IP is reservable or not.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Example of List Hosts Response
{
    "floatingips": [
        {
           "id": "84c4d37e-1f8b-45ce-897b-16ad7f49b0e9",
           "floating_network_id": "1e17587e-a7ed-4b82-a17b-4beb32523e28",
           "subnet_id": "a2fa9b7e-8451-4868-85f4-92ee7c77eed6",
           "floating_ip_address": "172.24.4.101",
           "reservable": true,
           "created_at": "2019-01-28 08:01:46",
           "updated_at": null
         },
        {
            "id": "f180cf4c-f886-4dd1-8c36-854d17fbefb5",
            "floating_network_id": "1e17587e-a7ed-4b82-a17b-4beb32523e28",
            "subnet_id": "a2fa9b7e-8451-4868-85f4-92ee7c77eed6",
            "floating_ip_address": "172.24.4.102",
            "reservable": true,
            "created_at": "2019-01-28 08:08:22",
            "updated_at": null
        }
    ]
}
Create a floating IP.
Response codes
Normal response code: 201
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Conflict(409), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
floating_network_id  | 
body  | 
string  | 
An external network ID the floating IP belongs to.  | 
floating_ip_address  | 
body  | 
string  | 
The floating IP address. The IP must be the out side of allocation_pools and within its subnet’s CIDR network.  | 
Example of Create Host Request
{
  "floating_network_id": "1e17587e-a7ed-4b82-a17b-4beb32523e28",
  "floating_ip_address": "172.24.4.101"
}
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
floatingip  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The ID of the floating ip resources.  | 
floating_ip_address  | 
body  | 
string  | 
The floating IP address.  | 
network_id  | 
body  | 
string  | 
An external network ID the floating IP belongs to.  | 
subnet_id  | 
body  | 
boolean  | 
An external subnet ID the floating IP belongs to.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the floating IP is reservable or not.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Example of Create Host Response
{
    "floatingip": {
        "id": "84c4d37e-1f8b-45ce-897b-16ad7f49b0e9",
        "floating_network_id": "1e17587e-a7ed-4b82-a17b-4beb32523e28",
        "floating_ip_address": "172.24.4.101",
        "subnet_id": "a2fa9b7e-8451-4868-85f4-92ee7c77eed6",
        "reservable": true,
        "created_at": "2019-01-28T08:01:46.000000",
        "updated_at": null
    }
}
Show details of a floating IP.
Preconditions
The floating IP must exist.
Response codes
Normal response code: 200
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
floatingip_id  | 
path  | 
string  | 
The ID of the floating IP.  | 
Response¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
floatingip  | 
body  | 
object  | 
A   | 
id  | 
body  | 
string  | 
The ID of the floating ip resources.  | 
floating_network_id  | 
body  | 
string  | 
An external network ID the floating IP belongs to.  | 
floating_ip_address  | 
body  | 
string  | 
The floating IP address.  | 
reservable  | 
body  | 
boolean  | 
The flag which represents whether the floating IP is reservable or not.  | 
created_at  | 
body  | 
string  | 
The date and time when the object was created.  | 
updated_at  | 
body  | 
string  | 
The date and time when the object was updated.  | 
Example of Show Floating IP Details Response
{
    "floatingip": {
        "id": "84c4d37e-1f8b-45ce-897b-16ad7f49b0e9",
        "floating_network_id": "1e17587e-a7ed-4b82-a17b-4beb32523e28",
        "floating_ip_address": "172.24.4.101",
        "subnet_id": "a2fa9b7e-8451-4868-85f4-92ee7c77eed6",
        "reservable": true,
        "created_at": "2019-01-28T08:01:46.000000",
        "updated_at": null
    }
}
Delete a floating IP.
Preconditions
The floating IP must exist.
Response codes
Normal response code: 204
Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403), Not Found(404), Conflict(409), Internal Server Error(500)
Request¶
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
floatingip_id  | 
path  | 
string  | 
The ID of the floating IP.  | 
Repsponse¶
No body content is returned on a successful DELETE.
Request ID¶
For each REST API request, a local request ID is returned as a header in the response.
Response
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
X-Openstack-Request-Id  | 
header  | 
string  | 
The local request ID, which is a unique ID generated automatically for tracking each request to blazar. It is associated with the request and appears in the log lines for that request.  | 
Response Header
For each REST API request, the response contains a X-Openstack-Request-Id header.
The value of the X-Openstack-Request-Id header is the local request ID assigned to the request.
Response header example:
X-Openstack-Request-Id: req-d7bc29d0-7b99-4aeb-a356-89975043ab5e
Global Request ID¶
Users can specify a global request ID as a request header.
Request
Name  | 
In  | 
Type  | 
Description  | 
|---|---|---|---|
X-Openstack-Request-Id (Optional)  | 
header  | 
string  | 
The global request ID, which is a unique common ID
for tracking each request in OpenStack services.
The format of the global request ID must be   | 
Request Header
In each REST API request, you can specify a global request ID
in the X-Openstack-Request-Id header.
The format must be req- + UUID (UUID4).
If not in accordance with the format, the global request ID is
ignored by Blazar.
Request header example:
X-Openstack-Request-Id: req-e19f8f4f-40e7-441e-b776-7b43ed15c7dd