Create Virtual Storage¶
Overview¶
Creates a virtual storage
Pre/Post Conditions¶
- network and subnet must exist
- a network can have a virtual storage
Classification¶
- Create
Synchronous / Asynchronous¶
- Asynchronous
Request¶
HTTP Request Method¶
- POST
HTTP Request Path¶
{api_endpoint}/v1.0/{tenant_id}/virtual_storages
HTTP Request Body¶
Request Parameter¶
Parameter | Request Type | Type | Description | Required or Optional | Note | |
---|---|---|---|---|---|---|
name | plain | String | Name of volume | Required | Name must be unique within tenant | |
description | plain | String | Description of volume | Optional | ||
network_id | plain | String | ID(UUID) for network to be connected to the Virtual Storage | Required | ||
subnet_id | plain | String | ID(UUID) for subnet to be connected to the Virtual Storage | Required | ||
volume_type_id | plain | String | volume_type ID (UUID) | Required | ||
ip_addr_pool | plain | AddressPool | IP address pool which specifies IP address range can be used by the Virtual Storage | Required | This range should be assigned within CIDR of the subnet | |
host_routes | plain | List of HostRoute | List of static routes to be set to this Virtual Storage | Optional |
Response¶
HTTP Response Header¶
HTTP Response Body¶
Response Parameter¶
Parameter | Type | Description | Note |
---|---|---|---|
api_error_message | String | Error message in API error case. | |
id | String | Virtual storage's ID (UUID) | |
network_id | String | Network ID (UUID) | |
subnet_id | String | Subnet ID (UUID) | |
ip_addr_pool | AddressPool | Specifies start/end of IP address pool | |
host_routes | List of HostRoute | Specifies static route settings for virtual storage | |
volume_type_id | String | Volume type ID (UUID) for virtual storage | |
name | String | Name of the volume | Must be unique by tenant |
description | String | Description of the volume | |
status | String | Status of virtual storage | |
created_at | DateTime | Creation timestamp of virtual storage | |
updated_at | DateTime | Update timestamp of virtual storage | |
error_message | String | Error message of virtual storage | |
smb_properties | SMB Properties | SMB properties for the virtual storage and its volumes | Available for standard_smb_na volume_type. |
Sample API Request and Response¶
Sample API Request¶
$ cat vs.json
{
"virtual_storage": {
"name": "vs01",
"description": "vs01",
"volume_type_id": "6328d234-7939-4d61-9216-736de66d15f9",
"network_id": "c64e9be1-ba3b-4c2e-bfe9-265c5cf18c2f",
"subnet_id": "dd925847-4212-44a4-9deb-bc1436efb3b8",
"ip_addr_pool": {
"start": "192.168.0.3",
"end": "192.168.0.7"
},
"host_routes": [
{
"destination": "0.0.0.0/0",
"nexthop": "192.168.0.1"
}
]
}
}
$ curl -s -i -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Auth-Token: 549b9d20836e4dc98fc7bede571fb09f' -X POST -d @./vs.json https://storage-jp1.ecl.api.ntt.com/v1.0/3f576e1e48034ef3ac8c1bafc07a9c43/virtual_storages
Sample API Response¶
HTTP/1.1 202 Accepted
Date: Thu, 3 Oct 2016 05:26:05 GMT
Content-Type: application/json
Content-Length: 239
Connection: keep-alive
Set-Cookie: TS0183560f=01cce65ce1f4efb39c7a6a5f67ccf6529ebb7618621090a8719e76769ba05d355c04ef7674; Path=/
{
"api_error_message": "",
"virtual_storage": {
"id": "985d5c89-cdde-404f-b8e8-92ce5a63e55e",
"name": "vs01",
"description": "vs01",
"network_id": "c64e9be1-ba3b-4c2e-bfe9-265c5cf18c2f",
"subnet_id": "dd925847-4212-44a4-9deb-bc1436efb3b8",
"ip_addr_pool": {
"end": "192.168.0.7",
"start": "192.168.0.3"
},
"volume_type_id": "6328d234-7939-4d61-9216-736de66d15f9"
"status": "available",
"error_message": "",
"created_at": "2016-10-03T05:26:04+0000",
"updated_at": null,
"host_routes": [
{
"destination": "0.0.0.0/0",
"nexthop": "192.168.0.1"
}
]
}
}