Skip to content

Commit

Permalink
20240814 - NGINX One Cloud Console early access finalized (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziofiorucci authored Aug 14, 2024
1 parent 59ea39a commit a305c7a
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 97 deletions.
8 changes: 4 additions & 4 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

NGINX Declarative API has been tested with the following NGINX control plane releases:

| Control plane | API v4.2 | API v5.0 | API v5.1 | Notes |
|--------------------------|----------|--------------|--------------|------------------------|
| NGINX Instance Manager | 2.14+ | 2.14+ | 2.16+ | |
| NGINX One Cloud Console | | Early access | Early access | Early stage / unstable |
| Control plane | API v4.2 | API v5.0 | API v5.1 | Notes |
|--------------------------|----------|--------------|--------------|---------------|
| NGINX Instance Manager | 2.14+ | 2.14+ | 2.16+ | |
| NGINX One Cloud Console | | Early access | Early access | Early access |


### NGINX `http` and `stream` servers
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

This project provides a set of declarative REST API for [NGINX Instance Manager](https://docs.nginx.com/nginx-management-suite/nim/) and [NGINX One Cloud Console](https://docs.nginx.com/nginx-one/) (currently in early stage / unstable).
This project provides a set of declarative REST API for [NGINX Instance Manager](https://docs.nginx.com/nginx-management-suite/nim/) and [NGINX One Cloud Console](https://docs.nginx.com/nginx-one/)

It can be used to manage NGINX Plus configuration lifecycle and to create NGINX Plus configurations using JSON service definitions.

Expand All @@ -28,7 +28,7 @@ A **blog article** to automate NGINX API Gateway management from OpenAPI schemas
## Supported releases

- NGINX Instance Manager 2.14+
- NGINX One Cloud Console (early stage / unstable)
- NGINX One Cloud Console Early Access
- NGINX Plus R30+
- NGINX App Protect WAF 4

Expand Down
2 changes: 1 addition & 1 deletion USAGE-v5.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Version 5.1 supports:

- [NGINX Instance Manager](https://docs.nginx.com/nginx-management-suite/nim/) 2.14+
- [NGINX One Cloud Console](https://docs.nginx.com/nginx-one/) - early stage / unstable
- [NGINX One Cloud Console](https://docs.nginx.com/nginx-one/) - Early Access
- [NGINX Plus](https://docs.nginx.com/nginx/) R30+
- [NGINX App Protect WAF](https://docs.nginx.com/nginx-app-protect-waf/) 4 with precompiled [policy bundles](https://docs.nginx.com/nginx-app-protect-waf/v5/admin-guide/compiler/)

Expand Down
404 changes: 317 additions & 87 deletions contrib/postman/NGINX Declarative API.postman_collection.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/V5_1_NginxConfigDeclaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ class DevPortal_Redocly(BaseModel, extra="forbid"):


class DevPortal_Backstage(BaseModel, extra="forbid"):
name: str
name: str = ""
lifecycle: Optional[str] = "production"
owner: str = ""
system: Optional[str] = ""
Expand Down
4 changes: 2 additions & 2 deletions src/v5_1/NGINXOneOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def NGINXOneOutput(d, declaration: ConfigDeclaration, apiversion: str, b64HttpCo
# NGINX Instance Manager Staged Configuration publish

nOneToken = v5_1.MiscUtils.getDictKey(d, 'output.nginxone.token')
nOneCluster = v5_1.MiscUtils.getDictKey(d, 'output.nginxone.cluster')
nOneConfigSyncGroup = v5_1.MiscUtils.getDictKey(d, 'output.nginxone.configsyncgroup')
nOneNamespace = v5_1.MiscUtils.getDictKey(d, 'output.nginxone.namespace')

nOneSynctime = v5_1.MiscUtils.getDictKey(d, 'output.nginxone.synctime')
Expand Down Expand Up @@ -187,7 +187,7 @@ def NGINXOneOutput(d, declaration: ConfigDeclaration, apiversion: str, b64HttpCo

# Get the instance group id nOneUrl: str, nOneTokenUsername: str, nameSpace: str, clusterName: str
returnCode, igUid = v5_1.NGINXOneUtils.getConfigSyncGroupId(nOneUrl = nOneUrl, nOneToken = nOneToken,
nameSpace = nOneNamespace, configSyncGroupName = nOneCluster)
nameSpace = nOneNamespace, configSyncGroupName = nOneConfigSyncGroup)

# Invalid instance group
if returnCode != 200:
Expand Down
2 changes: 2 additions & 0 deletions templates/v5.1/misc/resolver.tmpl
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# DNS resolver template

resolver {{ resolverprofile.address }}{% if resolverprofile.valid %}valid={{ resolverprofile.valid }}{% endif %} ipv4={% if resolverprofile.ipv4 == True %}on{% else %}off{% endif %} ipv6={% if resolverprofile.ipv6 == True %}on{% else %}off{% endif %};
{% if resolverprofile.timeout %}resolver_timeout {{ resolverprofile.timeout }}{% endif %};
2 changes: 2 additions & 0 deletions templates/v5.1/misc/upstream-http.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# HTTP upstream template

{% if u.name %}
{% if u.origin %}
upstream {{ u.name }} {
Expand Down
2 changes: 2 additions & 0 deletions templates/v5.1/misc/upstream-stream.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Stream upstream template

{% if u.name %}
{% if u.origin %}
upstream {{ u.name }} {
Expand Down

0 comments on commit a305c7a

Please sign in to comment.