v2 api: add tenant APIs
The /v2.0/tenant routes are incorrectly in the OS-KSADM APIs. They should be in the v2-admin APIs. Move the sample files accordingly and remove any unused sample files. Route link: https://github.com/openstack/keystone/blob/master/keystone/v2_crud/admin_crud.py#L60-L79 Change-Id: I6e6dd4bbfdb8b46fb146db089eaeaaa1f6d2d86a
This commit is contained in:
parent
50c64f9c66
commit
e00c89e965
@ -29,6 +29,30 @@ Response Example
|
||||
:language: javascript
|
||||
|
||||
|
||||
List users on a tenant
|
||||
======================
|
||||
|
||||
.. rest_method:: GET /v2.0/tenants/{tenantId}/users
|
||||
|
||||
Lists all users for a tenant.
|
||||
|
||||
Normal response codes: 200, 203
|
||||
Error response codes: 413, 405, 404, 403, 401, 400, 503
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenantId: tenantId
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/admin/users-list-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
List roles for user
|
||||
===================
|
||||
|
||||
@ -104,3 +128,95 @@ Response Example
|
||||
|
||||
.. literalinclude:: samples/admin/tenant-show-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Delete tenant
|
||||
=============
|
||||
|
||||
.. rest_method:: DELETE /v2.0/tenants/{tenantId}
|
||||
|
||||
Deletes a tenant.
|
||||
|
||||
Normal response codes: 204
|
||||
Error response codes: 413,415,405,404,403,401,400,503,409
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenantId: tenantId
|
||||
|
||||
|
||||
Update tenant
|
||||
=============
|
||||
|
||||
.. rest_method:: POST /v2.0/tenants/{tenantId}
|
||||
|
||||
Updates a tenant.
|
||||
|
||||
Normal response codes: 200
|
||||
Error response codes: 413,415,405,404,403,401,400,503,409
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant: tenant
|
||||
- enabled: enabled
|
||||
- description: description
|
||||
- name: name
|
||||
- id: id
|
||||
- tenantId: tenantId
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/admin/tenant-update-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant: tenant
|
||||
- enabled: enabled
|
||||
- description: description
|
||||
- name: name
|
||||
- id: id
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/admin/tenant-show-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Create tenant
|
||||
=============
|
||||
|
||||
.. rest_method:: POST /v2.0/tenants
|
||||
|
||||
Creates a tenant.
|
||||
|
||||
Normal response codes: 201
|
||||
Error response codes: 413,415,405,404,403,401,400,503,409
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/admin/tenantwithoutid-create-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant: tenant
|
||||
- enabled: enabled
|
||||
- description: description
|
||||
- name: name
|
||||
- id: id
|
||||
|
@ -100,31 +100,6 @@ Request
|
||||
|
||||
- serviceId: serviceId
|
||||
|
||||
|
||||
List users on a tenant
|
||||
======================
|
||||
|
||||
.. rest_method:: GET /v2.0/tenants/{tenantId}/users
|
||||
|
||||
Lists all users for a tenant.
|
||||
|
||||
Normal response codes: 200,203
|
||||
Error response codes: 413,405,404,403,401,400,503
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenantId: tenantId
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/OS-KSADM/users-list-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Enable user
|
||||
===========
|
||||
|
||||
@ -403,34 +378,6 @@ Response Parameters
|
||||
- Location: Location
|
||||
|
||||
|
||||
Create tenant
|
||||
=============
|
||||
|
||||
.. rest_method:: POST /v2.0/tenants
|
||||
|
||||
Creates a tenant.
|
||||
|
||||
Normal response codes: 201
|
||||
Error response codes: 413,415,405,404,403,401,400,503,409
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/OS-KSADM/tenantwithoutid-create-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant: tenant
|
||||
- enabled: enabled
|
||||
- description: description
|
||||
- name: name
|
||||
- id: id
|
||||
|
||||
|
||||
List global roles for user
|
||||
==========================
|
||||
|
||||
@ -455,70 +402,6 @@ Response Example
|
||||
:language: javascript
|
||||
|
||||
|
||||
Update tenant
|
||||
=============
|
||||
|
||||
.. rest_method:: POST /v2.0/tenants/{tenantId}
|
||||
|
||||
Updates a tenant.
|
||||
|
||||
Normal response codes: 200
|
||||
Error response codes: 413,415,405,404,403,401,400,503,409
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant: tenant
|
||||
- enabled: enabled
|
||||
- description: description
|
||||
- name: name
|
||||
- id: id
|
||||
- tenantId: tenantId
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: samples/OS-KSADM/tenant-update-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant: tenant
|
||||
- enabled: enabled
|
||||
- description: description
|
||||
- name: name
|
||||
- id: id
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: samples/OS-KSADM/tenant-show-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Delete tenant
|
||||
=============
|
||||
|
||||
.. rest_method:: DELETE /v2.0/tenants/{tenantId}
|
||||
|
||||
Deletes a tenant.
|
||||
|
||||
Normal response codes: 204
|
||||
Error response codes: 413,415,405,404,403,401,400,503,409
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenantId: tenantId
|
||||
|
||||
|
||||
Show role details, by ID
|
||||
========================
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"tenant": {
|
||||
"id": "1234",
|
||||
"name": "ACME corp",
|
||||
"description": "A description ...",
|
||||
"enabled": true
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"id": "u1000",
|
||||
"name": "jqsmith",
|
||||
"email": "john.smith@example.org",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "u1001",
|
||||
"name": "jqsmith",
|
||||
"email": "john.smith@example.org",
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"users_links": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user