Add quota switcher swagger doc

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-09-17 14:48:51 +08:00
parent 0aa51a568d
commit b603f8ab62
1 changed files with 29 additions and 1 deletions

View File

@ -2415,7 +2415,7 @@ paths:
description: |
This endpoint is for syncing quota usage of registry/chart with database.
tags:
- Products
- Products
responses:
'200':
description: Sync repositories successfully.
@ -2423,6 +2423,28 @@ paths:
description: User need to log in first.
'403':
description: User does not have permission of system admin role.
/internal/switchquota:
put:
summary: Enable or disable quota.
description: |
This endpoint is for enable/disable quota. When quota is disabled, no resource require/release in image/chart push and delete.
tags:
- Products
parameters:
- name: switcher
in: body
required: true
schema:
$ref: '#/definitions/QuotaSwitcher'
responses:
'200':
description: Enable/Disable quota successfully.
'401':
description: User need to log in first.
'403':
description: User does not have permission of system admin role.
'500':
description: Unexpected internal errors.
/systeminfo:
get:
summary: Get general system info
@ -6248,3 +6270,9 @@ definitions:
retained:
type: integer
QuotaSwitcher:
type: object
properties:
enabled:
type: boolean
description: The quota is enable or disable