Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger file update for multi-cloud #1320

Merged
merged 3 commits into from
Dec 31, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
294 changes: 261 additions & 33 deletions openapi-spec/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ paths:
backends:
type: array
items:
$ref: '#/components/schemas/Backend'
$ref: '#/components/schemas/Backend_List'
next:
type: integer
example: 1
Expand Down Expand Up @@ -319,7 +319,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Backend'
$ref: '#/components/schemas/Backend_List'
'401':
description: Unauthorized. Token not found in header
'404':
Expand All @@ -346,11 +346,11 @@ paths:
schema:
type: object
properties:
Access:
access:
description: Updated the specified backend access Id
type: string
example: 'AMIKJGNJLHUEBWTNDL6X'
Security:
security:
description: Updated the specified backend security Id
type: string
example: 'Fsgs5KHAcs12420yGHNDGne8x8i5naHvdf/xZbTH'
Expand Down Expand Up @@ -403,10 +403,28 @@ paths:
backends:
type: array
items:
$ref: '#/components/schemas/Type'
oneOf:
- $ref: '#/components/schemas/AWS_Type'
- $ref: '#/components/schemas/Huawei_Type'
- $ref: '#/components/schemas/Azure_Type'
- $ref: '#/components/schemas/Ceph_Type'
- $ref: '#/components/schemas/GCP_Type'
- $ref: '#/components/schemas/FS_Type'
- $ref: '#/components/schemas/IBM_Type'
- $ref: '#/components/schemas/YIG_Type'
- $ref: '#/components/schemas/Alibaba_Type'
- $ref: '#/components/schemas/AWS_File_Type'
- $ref: '#/components/schemas/Azure_File_Type'
- $ref: '#/components/schemas/GCP_File_Type'
- $ref: '#/components/schemas/AWS_Block_Type'
- $ref: '#/components/schemas/Hw_Block_Type'
- $ref: '#/components/schemas/Hw_File_Type'
- $ref: '#/components/schemas/Sony_Oda_Type'


next:
type: integer
example: 1
example: 16
'401':
description: Unauthorized. Token not found in header
'/v1/{tenantId}/plans':
Expand Down Expand Up @@ -807,11 +825,7 @@ paths:
operationId: bucketPut
responses:
'200':
description: successful create bucket
content:
application/xml:
schema:
$ref: '#/components/schemas/BaseResponse'
description: No Content, i.e Bucket created successfully
'403':
description: Forbidden; Access Denied, InvalidAccessKey, SignatureDoesNotMatch
'500':
Expand Down Expand Up @@ -844,11 +858,7 @@ paths:
operationId: bucketdelete
responses:
'204':
description: No Content i.e. Successful Delete Bucket
content:
application/xml:
schema:
$ref: '#/components/schemas/BaseResponse'
description: No Content, i.e Bucket deleted successfully
'403':
description: Forbidden; Access Denied, InvalidAccessKey, SignatureDoesNotMatch
'404':
Expand Down Expand Up @@ -1487,46 +1497,97 @@ components:
description: 'Valid User ID'
type: string
example: 558057c4256545bd8a307c37464003c9
Backend:
Backend_Request:
type: object
properties:
Id:
name:
description: The backend name specified by user.
type: string
example: backend001
type:
description: The backend type.
type: string
example: aws-s3
enum: *CLOUD_BACKENDS
region:
type: string
example: ap-south-1
endpoint:
type: string
example: s3.ap-south-1.amazonaws.com
access:
type: string
example: '4X7JQDFTCYUNWFBRYZVC'
security:
type: string
example: '9hr0ekZgg0vZHulEekTVfWuu1lnPFvpVAJQNHXdn'
Backend_List:
type: object
properties:
id:
description: The backend ID, generated by server
type: string
example: '5ea809d2553b0f000116be32'
TenantId:
tenantId:
description: The tenant UUID in a multi-tenancy environment.
type: string
example: '94b280022d0c4401bcf3b0ea85870519'
UserId:
userId:
description: The user UUID in a multi-tenancy environment.
type: string
example: '558057c4256545bd8a307c37464003c9'
Name:
name:
description: The backend name specified by user.
type: string
example: backend001
Type:
type:
description: The backend type.
type: string
example: aws-s3
enum: *CLOUD_BACKENDS
Region:
region:
type: string
example: ap-south-1
Endpoint:
endpoint:
type: string
example: s3.amazonaws.com
BucketName:
example: s3.ap-south-1.amazonaws.com
Backend:
type: object
properties:
id:
description: The backend ID, generated by server
type: string
example: bucket001
Access:
example: '5ea809d2553b0f000116be32'
tenantId:
description: The tenant UUID in a multi-tenancy environment.
type: string
example: '94b280022d0c4401bcf3b0ea85870519'
userId:
description: The user UUID in a multi-tenancy environment.
type: string
example: '558057c4256545bd8a307c37464003c9'
name:
description: The backend name specified by user.
type: string
example: backend001
type:
description: The backend type.
type: string
example: aws-s3
enum: *CLOUD_BACKENDS
region:
type: string
example: ap-south-1
endpoint:
type: string
example: s3.ap-south-1.amazonaws.com
access:
type: string
example: '4X7JQDFTCYUNWFBRYZVC'
Security:
security:
type: string
example: '9hr0ekZgg0vZHulEekTVfWuu1lnPFvpVAJQNHXdn'
Type:
AWS_Type:
type: object
properties:
name:
Expand All @@ -1537,6 +1598,171 @@ components:
description: The backend type description.
type: string
example: AWS Simple Cloud Storage Service(S3)
Huawei_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: hw-obs
description:
description: The backend type description.
type: string
example: Huawei Storage Object Service(OBS)
Azure_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: azure-blob
description:
description: The backend type description.
type: string
example: Azure Blob Storage
Ceph_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: ceph-s3
description:
description: The backend type description.
type: string
example: Ceph Object Storage
GCP_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: gcp-s3
description:
description: The backend type description.
type: string
example: GCP Storage
FS_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: fusionstorage-object
description:
description: The backend type description.
type: string
example: Huawei Fusionstorage Object Storage
IBM_Type:
type: object
properties:
name:
description: The backend type name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: The backend type name.
description: The backend type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

type: string
example: ibm-cos
description:
description: The backend type description.
type: string
example: IBM Cloud Object Storage
YIG_Type:
type: object
properties:
name:
description: The backend type name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar here

type: string
example: yig
description:
description: The backend type description.
type: string
example: YIG Storage
Alibaba_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: alibaba-oss
description:
description: The backend type description.
type: string
example: Alibaba Object Storage Service(OSS)
AWS_File_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: aws-file
description:
description: The backend type description.
type: string
example: AWS File Service
Azure_File_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: azure-file
description:
description: The backend type description.
type: string
example: Azure File Service
GCP_File_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: gcp-file
description:
description: The backend type description.
type: string
example: GCP File Service
AWS_Block_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: aws-block
description:
description: The backend type description.
type: string
example: AWS Block Service
Hw_File_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: hw-file
description:
description: The backend type description.
type: string
example: Huawei File Service
Hw_Block_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: hw-block
description:
description: The backend type description.
type: string
example: Hw Block Service
Sony_Oda_Type:
type: object
properties:
name:
description: The backend type name.
type: string
example: sony-oda
description:
description: The backend type description.
type: string
example: Sony-ODA Object Storage
KV:
type: object
properties:
Expand Down Expand Up @@ -2304,12 +2530,14 @@ components:
BaseResponse:
type: object
properties:
ErrorCode:
ReturnCode:
description: error code
type: string
type: integer
example: 200
Message:
description: sucessfully or failure
type: string
example: 1
CreateBucketConfiguration:
type: object
xml:
Expand Down Expand Up @@ -2712,7 +2940,7 @@ components:
content:
application/json:
schema:
$ref: '#/components/schemas/Backend'
$ref: '#/components/schemas/Backend_Request'
description: Cloud Backend configurations
required: true
Plan:
Expand Down