Skip to content

Commit

Permalink
Add domain config APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Treetreewu committed Jan 6, 2022
1 parent 52707fa commit be0a177
Show file tree
Hide file tree
Showing 21 changed files with 2,077 additions and 99 deletions.
158 changes: 157 additions & 1 deletion keystone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,134 @@ paths:
$ref: '#/components/responses/503'
tags:
- domain
/v3/domains/{domain_id}/config:
parameters:
- description: The domain ID.
in: path
name: domain_id
required: true
schema:
type: string
put:
description: Creates a domain configuration.
operationId: create_domain_config
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/domain_config"
responses:
'200':
description: Domain configuration request.
content:
application/json:
schema:
$ref: "#/components/schemas/domain_config"
'201':
description: Resource was created and is ready to use.
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'503':
$ref: '#/components/responses/503'
tags:
- domain
patch:
description: Updates a domain configuration.
operationId: update_domain_config
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/domain_config"
responses:
'200':
description: Request was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/domain_config"
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'409':
$ref: '#/components/responses/409'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'503':
$ref: '#/components/responses/503'
tags:
- domain
get:
description: Shows details for a domain configuration.
operationId: get_domain_config
responses:
'200':
description: Request was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/domain_config"
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'413':
$ref: '#/components/responses/413'
'503':
$ref: '#/components/responses/503'
tags:
- domain
delete:
description: Deletes a domain configuration.
operationId: delete_domain_config
responses:
'204':
description: The server has fulfilled the request.
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'405':
$ref: '#/components/responses/405'
'409':
$ref: '#/components/responses/409'
'413':
$ref: '#/components/responses/413'
'415':
$ref: '#/components/responses/415'
'503':
$ref: '#/components/responses/503'
tags:
- domain
/v3/projects:
get:
operationId: list_projects
Expand Down Expand Up @@ -2272,7 +2400,6 @@ components:
properties:
application_credential:
$ref: '#/components/schemas/application_credential'

schemas:
domain:
properties:
Expand All @@ -2297,6 +2424,35 @@ components:
items:
type: string
type: object
domain_config:
required:
- config
type: object
properties:
config:
title: DomainConfigConfig
type: object
properties:
identity:
type: object
title: DomainConfigIdentity
properties:
driver:
type: string
description: The Identity backend driver.
ldap:
description: Required to set the LDAP group configuration options.
type: object
title: DomainConfigLDAP
properties:
url:
type: string
description: The LDAP URL.
example: ldap://myldap.com:389/
user_tree_dn:
type: string
description: The base distinguished name (DN) of LDAP, from where all users can be reached.
example: ou=Users,dc=root,dc=org
id_and_name:
type: object
properties:
Expand Down
8 changes: 8 additions & 0 deletions openapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ docs/ApplicationCredentialResponse.md
docs/ApplicationCredentialRole.md
docs/Domain.md
docs/DomainApi.md
docs/DomainConfig.md
docs/DomainConfigConfig.md
docs/DomainConfigIdentity.md
docs/DomainConfigLDAP.md
docs/DomainCreate.md
docs/DomainCreateRequest.md
docs/DomainListResponse.md
Expand Down Expand Up @@ -94,6 +98,10 @@ model_application_credential_list_response.go
model_application_credential_response.go
model_application_credential_role.go
model_domain.go
model_domain_config.go
model_domain_config_config.go
model_domain_config_identity.go
model_domain_config_ldap.go
model_domain_create.go
model_domain_create_request.go
model_domain_list_response.go
Expand Down
10 changes: 9 additions & 1 deletion openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,22 @@ ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables

## Documentation for API Endpoints

All URIs are relative to *http://localhost*
All URIs are relative to *http://keystone-api.openstack.svc.cluster.local*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ApplicationCredentialApi* | [**CreateApplicationCredential**](docs/ApplicationCredentialApi.md#createapplicationcredential) | **Post** /v3/users/{user_id}/application_credentials |
*ApplicationCredentialApi* | [**DeleteApplicationCredential**](docs/ApplicationCredentialApi.md#deleteapplicationcredential) | **Delete** /v3/users/{user_id}/application_credentials/{application_credential_id} |
*ApplicationCredentialApi* | [**ListUserApplicationCredentials**](docs/ApplicationCredentialApi.md#listuserapplicationcredentials) | **Get** /v3/users/{user_id}/application_credentials |
*DomainApi* | [**CreateDomain**](docs/DomainApi.md#createdomain) | **Post** /v3/domains |
*DomainApi* | [**CreateDomainConfig**](docs/DomainApi.md#createdomainconfig) | **Put** /v3/domains/{domain_id}/config |
*DomainApi* | [**DeleteDomain**](docs/DomainApi.md#deletedomain) | **Delete** /v3/domains/{domain_id} |
*DomainApi* | [**DeleteDomainConfig**](docs/DomainApi.md#deletedomainconfig) | **Delete** /v3/domains/{domain_id}/config |
*DomainApi* | [**GetDomain**](docs/DomainApi.md#getdomain) | **Get** /v3/domains/{domain_id} |
*DomainApi* | [**GetDomainConfig**](docs/DomainApi.md#getdomainconfig) | **Get** /v3/domains/{domain_id}/config |
*DomainApi* | [**ListDomains**](docs/DomainApi.md#listdomains) | **Get** /v3/domains |
*DomainApi* | [**UpdateDomain**](docs/DomainApi.md#updatedomain) | **Patch** /v3/domains/{domain_id} |
*DomainApi* | [**UpdateDomainConfig**](docs/DomainApi.md#updatedomainconfig) | **Patch** /v3/domains/{domain_id}/config |
*GroupApi* | [**AddUser**](docs/GroupApi.md#adduser) | **Put** /v3/groups/{group_id}/users/{user_id} |
*GroupApi* | [**CheckUser**](docs/GroupApi.md#checkuser) | **Head** /v3/groups/{group_id}/users/{user_id} |
*GroupApi* | [**CreateGroup**](docs/GroupApi.md#creategroup) | **Post** /v3/groups |
Expand Down Expand Up @@ -144,6 +148,10 @@ Class | Method | HTTP request | Description
- [ApplicationCredentialResponse](docs/ApplicationCredentialResponse.md)
- [ApplicationCredentialRole](docs/ApplicationCredentialRole.md)
- [Domain](docs/Domain.md)
- [DomainConfig](docs/DomainConfig.md)
- [DomainConfigConfig](docs/DomainConfigConfig.md)
- [DomainConfigIdentity](docs/DomainConfigIdentity.md)
- [DomainConfigLDAP](docs/DomainConfigLDAP.md)
- [DomainCreate](docs/DomainCreate.md)
- [DomainCreateRequest](docs/DomainCreateRequest.md)
- [DomainListResponse](docs/DomainListResponse.md)
Expand Down
Loading

0 comments on commit be0a177

Please sign in to comment.