Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 1799 lines (1797 sloc) 50.8 KB
# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
swagger: '2.0'
info:
version: "v1beta"
title: OpenSDS Controller API
description: OpenSDS Controller API to manage mutliple backend storages.
termsOfService: 'https://www.linuxfoundation.org/terms'
contact:
name: OpenSDS Support
url: 'https://opensds.slack.com'
email: support@opensds.io
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: opensds
schemes:
- https
- http
produces:
- application/json
consumes:
- application/json
paths:
/:
get:
tags:
- API versions
description: Lists information for all SDSController API versions.
responses:
'200':
description: OK
schema:
type: object
properties:
versions:
type: array
items:
$ref: '#/definitions/Version'
examples:
application/json:
- name: v1beta
status: CURRENT
updated: '2017-07-10T14:36:58.014Z'
'500':
$ref: '#/responses/HTTPStatus500'
'/{apiVersion}':
parameters:
- $ref: '#/parameters/apiVersion'
get:
tags:
- API versions
description: Gets version details by specified API version.
responses:
'200':
description: OK
schema:
type: object
properties:
version:
$ref: '#/definitions/Version'
examples:
application/json:
name: v1beta
status: SUPPORTED
updated: '2017-04-10T14:36:58.014Z'
'404':
description: The resource does not exist
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/docks':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Dock
description: Lists information for all storage docks.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Dock'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/docks/{dockId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/dockId'
get:
tags:
- Dock
description: Gets storage dock detail by dock ID.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Dock'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/pools':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Pool
description: Lists information for all block storage pool.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Pool'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/availabilityZones':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Availability Zone
description: Lists availability zones.
responses:
'200':
description: OK
schema:
type: array
items:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/pools/{poolId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/poolId'
get:
tags:
- Pool
description: Gets storage pool detail by pool ID.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Pool'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/profiles':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Profiles
description: Lists information for all profiles.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Profile'
examples:
application/json:
- id: 5d8c3732-a248-50ed-bebc-539a6ffd25c1
name: Gold
description: provide gold storage service
customProperties:
key1: value1
key2:
subKey1: subValue1
subKey2: subValue2
key3: value3
- id: 5d8c3732-a248-50ed-bebc-539a6ffd25c2
name: Silver
description: provide silver storage service
customProperties:
key1: value1
key2: value2
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
post:
tags:
- Profiles
description: Creates a profile.
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Profile'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Profile'
examples:
application/json:
id: 5d8c3732-a248-50ed-bebc-539a6ffd25c1
name: Gold
description: provide gold storage service
customProperties:
key1: value1
key2:
subKey1: subValue1
subKey2: subValue2
key3: value3
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/profiles/{profileId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/profileId'
get:
tags:
- Profiles
description: Gets profile detail by profile ID.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Profile'
examples:
application/json:
id: 5d8c3732-a248-50ed-bebc-539a6ffd25c1
name: Gold
description: provide gold storage service
customProperties:
key1: value1
key2:
subKey1: subValue1
subKey2: subValue2
key3: value3
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
put:
tags:
- Profiles
description: Updates a profile.
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Profile'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Profile'
examples:
application/json:
id: 5d8c3732-a248-50ed-bebc-539a6ffd25c1
name: Gold
description: provide gold storage service
customProperties:
key1: value1
key2:
subKey1: subValue1
subKey2: subValue2
key3: value3
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
delete:
tags:
- Profiles
description: Deletes a profile.
responses:
'200':
description: OK
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/profiles/{profileId}/customeProperties':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/profileId'
post:
tags:
- Profiles
description: Adds customized property to the profile.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/CustomProperties'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/CustomProperties'
examples:
application/json:
key1: value1
key2:
subKey1: subValue1
subKey2: subValue2
key3: value3
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
get:
tags:
- Profiles
description: Lists all customized properties for the profile.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/CustomProperties'
examples:
application/json:
key1: value1
key2:
subKey1: subValue1
subKey2: subValue2
key3: value3
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/profiles/{profileId}/customProperties/{customKey}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/profileId'
- $ref: '#/parameters/customKey'
delete:
tags:
- Profiles
description: Remove a customized property from profile.
responses:
'200':
description: OK
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/volumes':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Block volumes
description: Lists information for all volumes.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Volume'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
post:
tags:
- Block volumes
description: Creates a volume.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Volume'
responses:
'202':
description: OK
schema:
$ref: '#/definitions/Volume'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/volumes/{volumeId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/volumeId'
get:
tags:
- Block volumes
description: Gets volume detail by volume id.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Volume'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
put:
tags:
- Block volumes
description: Updates a volume.
parameters:
- name: volume
in: body
schema:
type: object
required:
- name
properties:
name:
type: string
description:
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Volume'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
delete:
tags:
- Block volumes
description: Deletes a volume.
responses:
'202':
description: Accepted
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/volumes/{volumeId}/resize':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/volumeId'
post:
tags:
- Block volumes
description: Extends a volume.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/ExtendVolumeSpec'
responses:
'202':
description: Accepted
schema:
$ref: '#/definitions/Volume'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/attachments':
parameters:
- $ref: '#/parameters/projectId'
get:
parameters:
- uniqueItems: true
type: string
name: volumeId
description: The UUID of the volume assosicated with the attachment.
in: query
tags:
- Block volume attachments
description: Lists information for all volume attachments.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Attachment'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
post:
tags:
- Block volume attachments
description: Creates a volume attachment.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Attachment'
responses:
'202':
description: OK
schema:
type: object
properties:
attachment:
$ref: '#/definitions/Attachment'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/attachments/{attachmentId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/attachmentId'
get:
tags:
- Block volume attachments
description: Gets volume attachment detail by attachment id.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Attachment'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
put:
tags:
- Block volume attachments
description: Updates a volume attachments
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Attachment'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Attachment'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
delete:
tags:
- Block volume attachments
description: Deletes a volume attachment.
responses:
'202':
description: OK
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/snapshots':
parameters:
- $ref: '#/parameters/projectId'
get:
parameters:
- uniqueItems: true
type: string
name: volumeId
description: The UUID of the volume assosicated with the attachment.
in: query
tags:
- Block volume snapshots
description: Lists information for all volume snapshots.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Snapshot'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
post:
tags:
- Block volume snapshots
description: Creates a volume snapshot.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Snapshot'
responses:
'202':
description: OK
schema:
$ref: '#/definitions/Snapshot'
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/snapshots/{snapshotId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/snapshotId'
get:
tags:
- Block volume snapshots
description: Gets snapshot detail by volume snapshot id.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Snapshot'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
put:
tags:
- Block volume snapshots
description: Updates a volume snapshot.
parameters:
- name: body
in: body
schema:
type: object
properties:
name:
type: string
description:
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Snapshot'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
delete:
tags:
- Block volume snapshots
description: Deletes a volume snapshot.
responses:
'200':
description: OK
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/volumeGroup':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Block volume group
description: Lists information for all volume groups.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/VolumeGroup'
examples:
application/json:
- id: 015184f3-8e73-47fd-8f57-26ea912e2a6b
name: volumeGroup-demo
status: available
description: volumeGroup test
profiles:
- 993c87dc-1928-498b-9767-9da8f901d6ce
- 90d667f0-e9a9-427c-8a7f-cc714217c7bd
availabilityZone: default
poolId: 6e14588f-9da9-5ef3-a89d-86375c1352f6
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
post:
tags:
- Block volume group
description: Creates a volume group.
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/VolumeGroup'
responses:
'202':
description: OK
schema:
$ref: '#/definitions/VolumeGroup'
examples:
application/json:
- id: 015184f3-8e73-47fd-8f57-26ea912e2a6b
name: volumeGroup-demo
status: creating
description: volumeGroup test
profiles:
- 993c87dc-1928-498b-9767-9da8f901d6ce
- 90d667f0-e9a9-427c-8a7f-cc714217c7bd
availabilityZone: default
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/volumeGroup/{volumeGroupId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/volumeGroupId'
get:
tags:
- Block volume group
description: Gets volume group detail by volume group id.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/VolumeGroup'
examples:
application/json:
- id: 015184f3-8e73-47fd-8f57-26ea912e2a6b
createdAt: "2018-06-03T07:02:35.389Z"
name: volumeGroup-demo
status: available
description: volumeGroup test
profiles:
- 993c87dc-1928-498b-9767-9da8f901d6ce
- 90d667f0-e9a9-427c-8a7f-cc714217c7bd
availabilityZone: default
poolId: 6e14588f-9da9-5ef3-a89d-86375c1352f6
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
put:
tags:
- Block volume group
description: Updates a volume group.
parameters:
- name: body
in: body
required: true
schema:
type: object
properties:
name:
type: string
example: volumeGroup-demo
description:
type: string
example: volumeGroup test
addVolumes:
type: array
items:
type: string
example:
- 993c87dc-1928-498b-9767-9da8f901d6ce
- 90d667f0-e9a9-427c-8a7f-cc714217c7bd
removeVolumes:
type: array
items:
type: string
example: 1b7277b8-493a-4c8d-bccd-89db580e5f60
responses:
'200':
description: OK
schema:
$ref: '#/definitions/VolumeGroup'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
delete:
tags:
- Block volume group
description: Deletes a volume group.
responses:
'200':
description: OK
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/replications':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Block Replications
description: Lists information for all replications.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Replication'
examples:
application/json:
- id: e416db95-b6f4-4669-a075-5a873d050a93
name: replication-demo
ReplicationStatus: enabled
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
post:
tags:
- Block Replications
description: Create a replication.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Replication'
responses:
'202':
description: OK
schema:
$ref: '#/definitions/Replication'
examples:
application/json:
id: e416db95-b6f4-4669-a075-5a873d050a93
createdAt: "2018-05-07T07:02:35.389Z"
updatedAt:
name: replication-demo
description: volume replication demo
availabilityZone: default
primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
primaryReplicationDriverData:
AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
lvPath: /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
secondaryReplicationDriverData:
AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
lvPath: /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
ReplicationStatus: enabled
replicationMode: sync
replicationPeriod: 0
profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/replications/{replicationId}':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/replicationId'
get:
tags:
- Block Replications
description: Gets replication detail by replication id.
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Replication'
examples:
application/json:
id: e416db95-b6f4-4669-a075-5a873d050a93
createdAt: "2018-05-07T07:02:35.389Z"
updatedAt:
name: replication-demo
description: volume replication demo
availabilityZone: default
primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
primaryReplicationDriverData:
AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
lvPath: /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
secondaryReplicationDriverData:
AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
lvPath: /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
ReplicationStatus: enabled
replicationMode: sync
replicationPeriod: 0
profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
put:
tags:
- Block Replications
description: Updates a replication.
parameters:
- name: body
in: body
schema:
type: object
properties:
name:
type: string
description:
type: string
required:
- name
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Replication'
examples:
application/json:
id: e416db95-b6f4-4669-a075-5a873d050a93
createdAt: "2018-05-07T07:02:35.389Z"
updatedAt:
name: replication-demo
description: volume replication demo
availabilityZone: default
primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
primaryReplicationDriverData:
AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
lvPath: /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
secondaryReplicationDriverData:
AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
lvPath: /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
ReplicationStatus: enabled
replicationMode: sync
replicationPeriod: 0
profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
delete:
tags:
- Block Replications
description: Deletes a replication.
responses:
'200':
description: OK
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/replications/detail':
parameters:
- $ref: '#/parameters/projectId'
get:
tags:
- Block Replications
description: Lists detail information for all replications.
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Replication'
examples:
application/json:
- id: e416db95-b6f4-4669-a075-5a873d050a93
createdAt: "2018-05-07T07:02:35.389Z"
updatedAt:
name: replication-demo
description: volume replication demo
availabilityZone: default
primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
primaryReplicationDriverData:
AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
lvPath: /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
secondaryReplicationDriverData:
AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
HostIp: 192.168.56.100
HostName: opensds-master
Mountpoint: /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
lvPath: /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
ReplicationStatus: enabled
replicationMode: sync
replicationPeriod: 0
profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/replications/{replicationId}/enable':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/replicationId'
post:
tags:
- Block Replications
description: Enable Replication.
responses:
'202':
description: Accepted
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/replications/{replicationId}/disable':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/replicationId'
post:
tags:
- Block Replications
description: Disable Replication.
responses:
'202':
description: Accepted
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
'/v1beta/{projectId}/block/replications/{replicationId}/failover':
parameters:
- $ref: '#/parameters/projectId'
- $ref: '#/parameters/replicationId'
post:
tags:
- Block Replications
description: Failover Replication.
parameters:
- name: body
in: body
schema:
type: object
properties:
allowAttachedVolume:
type: boolean
secondaryBackendId:
type: string
responses:
'202':
description: Accepted
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: The resource does not exist.
'500':
$ref: '#/responses/HTTPStatus500'
definitions:
BaseModel:
type: object
properties:
id:
type: string
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
DataStorageLoS:
description: >-
DataStorageLoS can be used to describe a service option covering storage
provisioning and availability.
type: object
properties:
recoveryTimeObjective:
type: integer
provisioningPolicy:
type: string
isSpaceEfficient:
type: boolean
IOConnectivityLoS:
description: >-
IOConnectivityLoS can be used to specify the characteristics of storage
connectivity.
type: object
properties:
accessProtocol:
type: string
maxIOPS:
type: integer
maxBWS:
type: integer
DataProtectionLoS:
description: >-
DataProtectionLoS describes a replica that protects data from loss. The
requirements must be met collectively by the communication path and the
replica.
type: object
properties:
isIsolated:
type: boolean
minLifetime:
type: string
RecoveryGeographicObjective:
type: string
RecoveryPointObjectiveTime:
type: string
RecoveryTimeObjective:
type: string
ReplicaType:
type: string
Dock:
description: >-
A backend is initialized by specific driver configuration. Each backend
can be regarded as a docking service between SDS controller and storage
service.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
properties:
name:
type: string
storageType:
type: string
description:
type: string
status:
type: string
driverName:
type: string
endpoint:
type: string
Pool:
description: >-
A pool is discoveried and updated by a dock service. Each pool can be
regarded as a physical storage pool or a virtual storage pool. It is a
logical and atomic pool and can be abstracted from any storage platform.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
properties:
name:
type: string
storageType:
type: string
description:
type: string
status:
type: string
availabilityZone:
type: string
totalCapacity:
type: integer
freeCapacity:
type: integer
dockId:
type: string
extras:
type: object
additionalProperties:
type: object
Profile:
description: >-
An OpenSDS profile is identified by a unique name and ID. With adding
extra properties, each profile can contains a set of tags of storage
capabilities which are desirable features for a class of applications.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
required:
- name
- storageType
properties:
id:
type: string
readOnly: true
name:
type: string
storageType:
type: string
description:
type: string
provisioningProperties:
$ref: '#/definitions/ProvisioningProperties'
replicationProperties:
$ref: '#/definitions/ReplicationProperties'
snapshotProperties:
$ref: '#/definitions/SnapshotProperties'
dataProtectionProperties:
$ref: '#/definitions/DataProtectionProperties'
customProperties:
$ref: '#/definitions/CustomProperties'
ProvisioningProperties:
description: >-
ProvisioningProperties represents some suggested properties for performing
provisioning policies.
type: object
properties:
dataStorage:
$ref: '#/definitions/DataStorageLoS'
ioConnectivity:
$ref: '#/definitions/IOConnectivityLoS'
ReplicationProperties:
description: >-
ReplicationProperties represents some suggested properties for performing
replicaiton policies.
type: object
properties:
dataProtection:
$ref: '#/definitions/DataProtectionLoS'
replicaInfos:
type: object
properties:
replicaUpdateMode:
type: string
consistencyEnalbed:
type: boolean
replicationPeriod:
type: string
replcationBandwidth:
type: integer
SnapshotProperties:
description: >-
SnapshotProperties represents some suggested properties for performing
snapshot policies.
type: object
properties:
schedule:
type: object
properties:
datetime:
type: string
format: date-time
occurrence:
type: string
replicaInfos:
type: object
properties:
number:
type: integer
duration:
type: integer
DataProtectionProperties:
description: >-
DataProtectionProperties represents some suggested properties for
performing data protection policies.
type: object
properties:
dataProtection:
$ref: '#/definitions/DataProtectionLoS'
consistencyEnalbed:
type: boolean
CustomProperties:
description: >-
CustomProperties is a map of keys and JSON object that represents the
customized properties of profile, such as requested capabilities
including diskType, latency, deduplicaiton, compression and so forth.
type: object
additionalProperties:
type: object
Volume:
description: >-
Volume is an block device created by storage service, it can be attached
to physical machine or virtual machine instance.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
required:
- name
- availabilityZone
- size
- profileId
properties:
projectId:
type: string
readOnly: true
userId:
type: string
readOnly: true
name:
type: string
description:
type: string
size:
type: integer
example: 2
availabilityZone:
type: string
status:
type: string
readOnly: true
profileId:
type: string
poolId:
type: string
readOnly: true
SnapshotId:
type: string
readOnly: true
groupId:
type: string
readOnly: true
Attachment:
description: >-
Attachment is a description of volume attached resource.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
required:
- hostInfo
- connectionInfo
- mountpoint
- volumeId
properties:
projectId:
type: string
readOnly: true
userId:
type: string
readOnly: true
hostInfo:
$ref: '#/definitions/HostInfo'
connectionInfo:
$ref: '#/definitions/ConnectionInfo'
mountpoint:
type: string
status:
type: string
readOnly: true
volumeId:
type: string
HostInfo:
description: >-
HostInfo is a structure for all properties of host when create a volume
attachment.
type: object
required:
- platform
- osType
- ip
- host
properties:
platform:
type: string
osType:
type: string
ip:
type: string
host:
type: string
initiator:
type: string
ConnectionInfo:
description: >-
ConnectionInfo is a structure for all properties of connection when
creating a volume attachment.
type: object
properties:
driverVolumeType:
type: string
data:
type: object
additionalProperties:
type: object
Snapshot:
description: >-
Snapshot is a description of volume snapshot resource.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
required:
- name
- volumeId
properties:
projectId:
type: string
readOnly: true
userId:
type: string
readOnly: true
name:
type: string
description:
type: string
size:
type: integer
readOnly: true
status:
type: string
readOnly: true
volumeId:
type: string
VolumeGroup:
description: >-
Volume group contains a list of volumes that are used in the same
application.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
required:
- profiles
- name
- description
- availabilityZone
properties:
projectId:
type: string
readOnly: true
userId:
type: string
readOnly: true
name:
type: string
example: volumeGroup-demo
description:
type: string
example: volume group test
availabilityZone:
type: string
example: default
readOnly: true
status:
type: string
readOnly: true
poolId:
type: string
readOnly: true
profiles:
type: array
items:
type: string
example:
- 993c87dc-1928-498b-9767-9da8f901d6ce
- 90d667f0-e9a9-427c-8a7f-cc714217c7bd
Replication:
description: >-
Replication represents a replication relationship between the volumes
on the primary and secondary sites.
allOf:
- $ref: '#/definitions/BaseModel'
- type: object
required:
- name
- primaryVolumeId
- scondaryVolumeId
- availabilityZone
- replicationPeriod
- replicationMode
- profileId
properties:
tenantId:
type: string
readOnly: true
userId:
type: string
readOnly: true
name:
type: string
example: replication-demo
description:
type: string
example: This is replication demo api specs
availabilityZone:
type: string
example: default
replicationStatus:
type: string
enum:
- available
- creating
- deleting
- enabling
- disabling
- failing_over
- failing_back
- error
- error_deleting
- error_enabling
- error_disabling
- error_failover
- error_failback
- enabled
- disabled
- failed_over
readOnly: true
primaryVolumeId:
type: string
example: 655ec3e2-5840-4138-b5bd-bce930d2acda
secondaryVolumeId:
type: string
example: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
primaryReplicationDriverData:
type: object
additionalProperties:
type: string
secondaryReplicationDriverData:
type: object
additionalProperties:
type: string
replicationMode:
type: string
enum:
- sync
- async
replicationPeriod:
type: integer
minimum: 0
profileId:
type: string
example: a66976e0-9fbf-4cf3-912a-e891dd41b1a5
Error:
description: >-
Detailed HTTP error response, which consists of a HTTP status code, and a
custom error message unique for each failure case.
type: object
required:
- code
- message
properties:
code:
type: integer
message:
type: string
Version:
description: >-
Lists information for all SDS controller API versions. An API version is
a string that consists of a 'v' + number, or 'v' + number + 'alpha' or
'beta' + number.
type: object
properties:
name:
type: string
example: v1beta
status:
type: string
enum:
- CURRENT
- SUPPORTED
- DEPRECATED
updated:
type: string
format: date-time
example: '2017-04-10T14:36:58.014Z'
ExtendVolumeSpec:
description: >-
Extends the size of a volume to a requested size, in gibibytes (GiB).
type: object
required:
- newSize
properties:
newSize:
type: integer
example: 2
parameters:
apiVersion:
name: apiVersion
in: path
required: true
description: API version string
type: string
pattern: 'v([1-9][0-9]*)((alpha)([1-9][0-9]*)|(beta)([1-9][0-9]*))?'
projectId:
name: projectId
in: path
required: true
description: The project UUID in a multi-tenancy environment.
type: string
dockId:
name: dockId
in: path
required: true
description: The UUID of the storage backend (dock) service.
type: string
poolId:
name: poolId
in: path
required: true
description: The UUID of the storage pool.
type: string
profileId:
name: profileId
in: path
required: true
description: The UUID of the profile.
type: string
volumeId:
name: volumeId
in: path
required: true
description: The UUID of the volume.
type: string
customKey:
name: customKey
in: path
required: true
description: The key of the customized properties.
type: string
attachmentId:
name: attachmentId
in: path
required: true
description: The UUID of the volume attachment.
type: string
snapshotId:
name: snapshotId
in: path
required: true
description: The UUID of the volume snapshot.
type: string
volumeGroupId:
name: volumeGroupId
in: path
required: true
description: The UUID of the volume group.
type: string
replicationId:
name: replicationId
in: path
required: true
description: The UUID of the relication.
type: string
responses:
HTTPStatus500:
description: An unexpected error occured.
schema:
$ref: '#/definitions/Error'