Skip to content

Commit

Permalink
[#467] add ServiceConfigurationStep step
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Bakker committed Dec 12, 2024
1 parent fa0c34f commit 318c5a7
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
10 changes: 9 additions & 1 deletion docker/setup_configuration/data.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
...
zgw_consumers_config_enable: true
zgw_consumers:
services:
- identifier: objecttypes-api
label: Objecttypes API
api_root: http://objecttypes.local/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
23 changes: 23 additions & 0 deletions docs/installation/config_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,29 @@ Objects API
Objecttypes connection configuration
------------------------------------

In order to be able to retrieve objecttypes, a corresponding ``Service`` should be
created. An example of a configuration could be seen below:

.. code-block:: yaml
...
zgw_consumers_config_enable: true
zgw_consumers:
services:
- identifier: objecttypes-api-1
label: Objecttypes API 1
api_root: http://objecttypes-1.local/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
- identifier: objecttypes-api-2
label: Objecttypes API 2
api_root: http://objecttypes-2.local/api/v1/
api_connection_check_path: objecttypes
api_type: orc
auth_type: api_key
....
Tokens configuration
-------------------

Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ furl

# Common ground libraries
notifications-api-common
zgw-consumers[setup-configuration]
7 changes: 5 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ django-sendfile2==0.7.0
django-sessionprofile==3.0.0
# via open-api-framework
django-setup-configuration==0.4.0
# via open-api-framework
# via
# open-api-framework
# zgw-consumers
django-simple-certmanager==1.4.1
# via zgw-consumers
django-solo==2.2.0
Expand Down Expand Up @@ -364,8 +366,9 @@ webencodings==0.5.1
# via bleach
wrapt==1.14.1
# via elastic-apm
zgw-consumers==0.35.1
zgw-consumers[setup-configuration]==0.36.1
# via
# -r requirements/base.in
# commonground-api-common
# notifications-api-common
# open-api-framework
Expand Down
3 changes: 2 additions & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ django-setup-configuration==0.4.0
# via
# -r requirements/base.txt
# open-api-framework
# zgw-consumers
django-simple-certmanager==1.4.1
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -627,7 +628,7 @@ wrapt==1.14.1
# vcrpy
yarl==1.9.4
# via vcrpy
zgw-consumers==0.35.1
zgw-consumers[setup-configuration]==0.36.1
# via
# -r requirements/base.txt
# commonground-api-common
Expand Down
3 changes: 2 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ django-setup-configuration==0.4.0
# via
# -r requirements/base.txt
# open-api-framework
# zgw-consumers
django-simple-certmanager==1.4.1
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -689,7 +690,7 @@ wrapt==1.14.1
# vcrpy
yarl==1.9.4
# via vcrpy
zgw-consumers==0.35.1
zgw-consumers[setup-configuration]==0.36.1
# via
# -r requirements/base.txt
# commonground-api-common
Expand Down
4 changes: 3 additions & 1 deletion src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@
#
# Django setup configuration
#
SETUP_CONFIGURATION_STEPS = tuple()
SETUP_CONFIGURATION_STEPS = (
"zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep",
)

0 comments on commit 318c5a7

Please sign in to comment.