Virtual serial number (VSN) APIs
The virtual serial number (VSN) APIs that are used in the VSN feature are listed in this topic.
Virtual serial number APIs
The table lists API options for VSN.
Method | API | Description |
---|---|---|
GET | /v2.1/{tenant_id}/virtual-serial-number /v2.1/{tenant_id}/virtual-serial-number?host=<HOST_MTMS> |
Provides details about the reserved VSNs and the associated host and
description. The supported |
PUT | /v2.1/{tenant_id}/virtual-serial-number?action=move | Moves the list of VSNs from a specific source host to the specified target host. Listed are the parameters in the request body.
|
POST | /v2.1/{tenant_id}/virtual-serial-number?action=reserve | This API enables users to reserve a VSN in the current project. This capability is only supported on NovaLink managed hosts. |
POST | /v2.1/{tenant_id}/virtual-serial-number?action=unreserve | This API enables users to unreserve a VSN, and the VSN is released back to the host. This capability is supported only on NovaLink managed hosts. |
POST | /v2.1/{tenant_id}/virtual-serial-number?action=update_reservation | This API is used to update the description of a reserved VSN. This capability is only supported on NovaLink managed hosts. |
VSN move API
- Response codes
-
- Normal response code: Accepted (202)
- Error response codes: Bad Request (400), Forbidden (403), Unauthorized (401), Not Found (404), Server Error (500)
- Example of request body
-
{ “move_vsns”: { “source_host”: “<MTMS>”, “target_host”: “<MTMS>”, "vsns”: [“CDF0003”, “CDF0002”] }
VSN reserve API
- Response codes
-
- Normal response code: OK (200)
- Example of request body
-
{ “virtual_serial_number”: “ABCD567”, “description” : “Sample description” }
VSN unreserve API
- Response codes
-
- Normal response code: OK (200)
- Example of request body
-
{ “virtual_serial_number”: “ABCD001” }
VSN update reservation API
- Response codes
-
- Normal response code: OK (200)
- Example of request body
-
{ “virtual_serial_number”: “ABCD567”, “description” : “updated description” }
VSN Server APIs
The table lists API options for VSN server APIs
Method | API | Description |
---|---|---|
POST | /v2.1/{tenant_id}/servers | Creates a VM. Specify powervm:virtual_serial_number in
flavor.extra_specs for creating the VM with the VSN identified by its value in the
request body.Parameter in the request body includes |
GET | /v2.1/{tenant_id}/servers | Lists IDs, names, and links for all servers. The response also includes the VSN for each VM. If the VM does not have a VSN or existing VMs (without VSN), the response returns 'none' for VSN. |
POST | /v2.1/{tenant_id}/servers/{server_id}/action | Assigns a VSN to the specified server. Specify assign_vsn action in the
request body with virtual_serial_number parameter set to 'auto' or a valid VSN.Listed are the parameters in the request body.
|
POST | /v2.1/{tenant_id}/servers/{server_id}/action | Unassigns a VSN from the specified server. |
- Example of request body for
assign_vsn
-
{ "assign_vsn": { "virtual_serial_number": "auto" or "ABCDEFG" } }
- Example of request body for
unassign_vsn
-
{ “unassign_vsn”: null }
References
- For more information about the VSN hypervisors API, see Supported OpenStack Compute (Nova) APIs.
- For more information about the VSN Flavors extra-specs API, see Flavors extra-specs.