distcloud/distributedcloud/dcdbsync/api
Hugo Brito 766f052295 Update tox pylint/pep8 for dcdbsync
This commit enables the check of new pylint/pep8
violations.

PYLINT - All convention related checks, except:
- missing-class-docstring
- missing-function-docstring
- missing-module-docstring
- consider-using-f-string
- invalid-name
- import-outside-toplevel
- too-many-lines
- consider-iterating-dictionary
- unnecessary-lambda-assignment

PEP8:
- E117: over-indented
- E123: closing bracket does not match indentation
  of opening bracket's line
- E125: continuation line with the same indent as the next
  logical line
- E305: expected 2 blank lines after class or function
  definition
- E402: module level import not at top of file
- E501: line too long
- H216: flag use of third party mock

Test Plan:
1. Perform `tox` command
- Pass in py39, pylint, pep8

Partial-bug: 2033294

Change-Id: Ib3b3d36b8c4f48aa6a62744e01c1de9e11c65ad9
Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
2024-01-18 12:23:49 -03:00
..
controllers Update tox pylint/pep8 for dcdbsync 2024-01-18 12:23:49 -03:00
policies Implement access control for DC API 2022-09-22 18:26:35 -03:00
README.rst Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
api_config.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
app.py Update tox pylint/pep8 for dcdbsync 2024-01-18 12:23:49 -03:00
policy.py Update tox pylint/pep8 for dcdbsync 2024-01-18 12:23:49 -03:00

README.rst

api

DC DBsync API is Web Server Gateway Interface (WSGI) application to receive and process API calls, including keystonemiddleware to do the authentication, parameter check and validation. It receives API calls from DC Orchestrator to read/write/update resources in Databases on behalf of DC Orchestrator. The API calls are processed in synchronous way, so that the caller will wait for the response to come back.

Multiple DC DBsync API could run in parallel, and also can work in multi-worker mode.

Multiple DC DBsync API is designed and run in stateless mode.

Setup and encapsulate the API WSGI app

app.py:

Setup and encapsulate the API WSGI app, including integrate the keystonemiddleware app

api_config.py:

API configuration loading and init

enforcer.py

Enforces policies on the version2 APIs