Browse Source

Remove v2.0 extension documentation

This commit removes all the v2.0 extension documentation with the
exception of the ec2token API, which is supported until the T
release.

Change-Id: I0f766c9778e92ae5eabff005d5c664dcc331507b
changes/25/540525/3
Lance Bragstad 4 years ago
parent
commit
1dec4d512f
  1. 1
      api-ref/source/v2-ext/index.rst
  2. 26
      api-ref/source/v2-ext/kscrud.inc
  3. 188
      api-ref/source/v2-ext/ksec2-admin.inc
  4. 39
      api-ref/source/v2-ext/parameters.yaml
  5. 7
      api-ref/source/v2-ext/samples/OS-KSADM/role-create-request.json
  6. 7
      api-ref/source/v2-ext/samples/OS-KSADM/role-show-response.json
  7. 10
      api-ref/source/v2-ext/samples/OS-KSADM/roles-list-response.json
  8. 10
      api-ref/source/v2-ext/samples/OS-KSADM/user-show-response.json
  9. 16
      api-ref/source/v2-ext/samples/OS-KSEC2/authenticate-request.json
  10. 31
      api-ref/source/v2-ext/samples/OS-KSEC2/authenticate-response.json
  11. 0
      api-ref/source/v2-ext/samples/OS-KSEC2/credentials-show-response.json

1
api-ref/source/v2-ext/index.rst

@ -7,4 +7,3 @@
.. rest_expand_all::
.. include:: ksec2-admin.inc
.. include:: kscrud.inc

26
api-ref/source/v2-ext/kscrud.inc

@ -1,26 +0,0 @@
.. -*- rst -*-
===================
OS-KSCRUD extension
===================
Supports password changing for a user by themselves
Change user's own password
==========================
.. rest_method:: PATCH /v2.0/OS-KSCRUD/users/{userId}
Changes user's own password and returns the new token
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- userId: user_id_path
- user: user
- original_password: user_original_password
- password: user_new_password

188
api-ref/source/v2-ext/ksec2-admin.inc

@ -6,43 +6,52 @@ OS-KSEC2 admin extension
Supports Amazon Elastic Compute (EC2) style authentication.
EC2 Authentication
==================
Grant credential to user
========================
.. rest_method:: POST /v2.0/ec2tokens
.. rest_method:: POST /v2.0/users/{userId}/OS-KSADM/credentials
Authenticate for token.
Grants a credential to a user.
Request
-------
Normal response codes: 201
Example
~~~~~~~
Error response codes: 413,415,405,404,403,401,400,503,409,
.. literalinclude:: samples/OS-KSEC2/authenticate-request.json
:language: javascript
Request
-------
Parameters
~~~~~~~~~~
.. rest_parameters:: parameters.yaml
Response
--------
- userId: user_id_path
Status Codes
~~~~~~~~~~~~
.. rest_status_code:: success ../v3/status.yaml
Request Example
---------------
- 200
.. literalinclude:: samples/OS-KSEC2/ec2Credentials-create-request.json
:language: javascript
.. rest_status_code:: error ../v3/status.yaml
- 400
- 401
List credentials (EC2 extension)
================================
Example
~~~~~~~
.. rest_method:: GET /v2.0/users/{userId}/OS-KSADM/credentials
.. literalinclude:: samples/OS-KSEC2/authenticate-response.json
:language: javascript
Lists credentials.
Grant credential to user
========================
Normal response codes: 200
.. rest_method:: POST /v2.0/users/{userId}/credentials/OS-EC2
Error response codes: 413,405,404,403,401,400,503,
Grants a credential to a user.
Request
-------
@ -52,23 +61,41 @@ Request
- userId: user_id_path
Response Example
----------------
Example
~~~~~~~
.. literalinclude:: samples/OS-KSEC2/credentialswithec2-list-response.json
.. literalinclude:: samples/OS-KSEC2/ec2Credentials-create-request.json
:language: javascript
Update user credentials
=======================
Response
--------
Status Codes
~~~~~~~~~~~~
.. rest_method:: POST /v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials
.. rest_status_code:: success ../v3/status.yaml
Updates credentials for a user.
- 201
Normal response codes: 200
.. rest_status_code:: error ../v3/status.yaml
Error response codes: 415,405,404,403,401,400,503,409,
- 400
- 401
- 403
- 404
- 405
- 409
- 413
- 415
- 503
List credentials (EC2 extension)
================================
.. rest_method:: GET /v2.0/users/{userId}/credentials/OS-EC2
Lists credentials.
Request
-------
@ -77,86 +104,107 @@ Request
- userId: user_id_path
Response
--------
Request Example
---------------
Status Codes
~~~~~~~~~~~~
.. literalinclude:: samples/OS-KSEC2/ec2Credentials-create-request.json
:language: javascript
.. rest_status_code:: success ../v3/status.yaml
Response Example
----------------
- 200
.. literalinclude:: samples/OS-KSEC2/ec2Credentials-show-response.json
.. rest_status_code:: error ../v3/status.yaml
- 400
- 401
- 403
- 404
- 405
- 413
- 503
Example
~~~~~~~
.. literalinclude:: samples/OS-KSEC2/credentialswithec2-list-response.json
:language: javascript
Delete user credentials
=======================
.. rest_method:: DELETE /v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials
.. rest_method:: DELETE /v2.0/users/{userId}/credentials/OS-EC2/{credentialId}
Deletes user credentials.
Normal response codes: 204
Error response codes: 413,415,405,404,403,401,400,503,409,
Request
-------
.. rest_parameters:: parameters.yaml
- userId: user_id_path
- credentialId: credential_id
Response
--------
Status Codes
~~~~~~~~~~~~
.. rest_status_code:: success ../v3/status.yaml
- 204
.. rest_status_code:: error ../v3/status.yaml
- 400
- 401
- 403
- 404
- 405
- 409
- 413
- 415
- 503
Get user credentials
====================
.. rest_method:: GET /v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials
.. rest_method:: GET /v2.0/users/{userId}/credentials/OS-EC2/{credentialId}
Gets user credentials.
Normal response codes: 200
Error response codes: 413,405,404,403,401,400,503,
Request
-------
.. rest_parameters:: parameters.yaml
- userId: user_id_path
- credentialId: credential_id
Response Example
----------------
.. literalinclude:: samples/OS-KSEC2/ec2Credentials-show-response.json
:language: javascript
List credentials by type
========================
.. rest_method:: GET /v2.0/users/{userId}/OS-KSADM/credentials/OS-KSEC2:ec2Credentials/{type}
Response
--------
Lists credentials by type.
Status Codes
~~~~~~~~~~~~
Normal response codes: 200
.. rest_status_code:: success ../v3/status.yaml
Error response codes: 413,405,404,403,401,400,503,
- 200
Request
-------
.. rest_status_code:: error ../v3/status.yaml
.. rest_parameters:: parameters.yaml
- 400
- 401
- 403
- 404
- 405
- 413
- 503
- userId: user_id_path
- type: credential_type
Response Example
----------------
Example
~~~~~~~
.. literalinclude:: samples/OS-KSADM/credentials-show-response.json
.. literalinclude:: samples/OS-KSEC2/ec2Credentials-show-response.json
:language: javascript

39
api-ref/source/v2-ext/parameters.yaml

@ -1,44 +1,13 @@
# variables in header
Location:
format: uri
in: header
required: false
type: string
# variables in path
credential_type:
credential_id:
description: |
The credential type.
The credential id.
in: path
required: true
type: string
role_id_path:
description: |
The role ID.
in: path
required: true
type: string
role_name_path:
description: |
The role name.
in: path
required: true
type: string
service_id_path:
description: |
The service ID.
in: path
required: true
type: string
service_name_path:
description: |
The service name.
in: path
required: true
type: string
tenant_id_path:
credential_type:
description: |
The tenant ID.
The credential type.
in: path
required: true
type: string

7
api-ref/source/v2-ext/samples/OS-KSADM/role-create-request.json

@ -1,7 +0,0 @@
{
"role": {
"id": "123",
"name": "Guest",
"description": "Guest Access"
}
}

7
api-ref/source/v2-ext/samples/OS-KSADM/role-show-response.json

@ -1,7 +0,0 @@
{
"role": {
"id": "123",
"name": "Guest",
"description": "Guest Access"
}
}

10
api-ref/source/v2-ext/samples/OS-KSADM/roles-list-response.json

@ -1,10 +0,0 @@
{
"roles": [
{
"id": "123",
"name": "compute:admin",
"description": "Nova Administrator"
}
],
"roles_links": []
}

10
api-ref/source/v2-ext/samples/OS-KSADM/user-show-response.json

@ -1,10 +0,0 @@
{
"user": {
"id": "3c9530e",
"name": "admin",
"email": "admin@example.org",
"username": "admin",
"enabled": true,
"tenantId": "1ca8e0"
}
}

16
api-ref/source/v2-ext/samples/OS-KSEC2/authenticate-request.json

@ -0,0 +1,16 @@
{
"credentials": {
"access": "8cff51dc66594df4a2ae121f796df36c",
"host": "localhost",
"params": {
"Action": "Test",
"SignatureMethod": "HmacSHA256",
"SignatureVersion": "2",
"Timestamp": "2007-01-31T23:59:59Z"
},
"path": "/",
"secret": "df8daeaa981b40cea1217fead123bc64",
"signature": "Fra2UBKKtqy3GQ0mj+JqzR8GTGsbWQW+yN5Nih9ThfI=",
"verb": "GET"
}
}

31
api-ref/source/v2-ext/samples/OS-KSEC2/authenticate-response.json

@ -0,0 +1,31 @@
{
"access": {
"metadata": {
"is_admin": 0,
"roles": ["9fe2ff9ee4384b1894a90878d3e92bab"]
},
"serviceCatalog": [],
"token": {
"audit_ids": ["AVUi_tN8SFWnHYaYpCcMEQ"],
"expires": "2018-02-02T21:13:19.000000Z",
"id": "gAAAAABadMZfZa_PZNOSi5iQoqPZ1b-VIo2Gnlf4Z_oJotw8qTh1Yv8_CFysOnoxRIrfFI-EcrErdJM2CrP7o6aDNR5AbfnFtSN_zgzzesEWaOaQkoLpk9X1lLada2KcQpWAeNafjNYSiP7JFjW6N4ngAm9U7egUW6MwUPPxi5e8igR5DtNc0FU",
"issued_at": "2018-02-02T20:13:19.000000Z",
"tenant": {
"description": "description",
"enabled": true,
"id": "6b85a6ff4e0b4040a81708d6e063e4e7",
"name": "BAR",
"tags": []
}
},
"user": {
"id": "b245550742cf4c2fb9cf37aa1eda866e",
"name": "foo",
"roles": [
{"name": "_member_"}
],
"roles_links": [],
"username": "foo"
}
}
}

0
api-ref/source/v2-ext/samples/OS-KSADM/credentials-show-response.json → api-ref/source/v2-ext/samples/OS-KSEC2/credentials-show-response.json

Loading…
Cancel
Save