Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
a2f0a59f
Commit
a2f0a59f
authored
1 year ago
by
Karel van Klink
Committed by
Neda Moeini
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
restrict IPv4 and v6 netmask values to valid range in settings
parent
af39ed7c
No related branches found
No related tags found
1 merge request
!83
Clean up the repo a bit, and add some unit tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
gso/settings.py
+11
-3
11 additions, 3 deletions
gso/settings.py
with
12 additions
and
4 deletions
README.md
+
1
−
1
View file @
a2f0a59f
...
...
@@ -2,4 +2,4 @@
The GÉANT interpretation of
[
`orchestrator-core`
](
https://github.com/workfloworchestrator/orchestrator-core
)
.
## Documentation
You can build the documentation locally using
either
[
build-docs.sh
](
build-docs.sh
)
or
[
test-docs.sh
](
test-docs.sh
)
.
You can build the documentation locally using
[
build-docs.sh
](
build-docs.sh
)
.
This diff is collapsed.
Click to expand it.
gso/settings.py
+
11
−
3
View file @
a2f0a59f
...
...
@@ -8,7 +8,7 @@ import json
import
logging
import
os
from
pydantic
import
BaseSettings
from
pydantic
import
BaseSettings
,
NonNegativeInt
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -31,12 +31,20 @@ class InfoBloxParams(BaseSettings):
password
:
str
class
V4Netmask
(
NonNegativeInt
):
le
=
32
class
V6Netmask
(
NonNegativeInt
):
le
=
128
class
V4NetworkParams
(
BaseSettings
):
"""
A set of parameters that describe an IPv4 network in InfoBlox.
"""
containers
:
list
[
ipaddress
.
IPv4Network
]
networks
:
list
[
ipaddress
.
IPv4Network
]
mask
:
int
# TODO: validation on
mask
?
mask
:
V4Net
mask
class
V6NetworkParams
(
BaseSettings
):
...
...
@@ -44,7 +52,7 @@ class V6NetworkParams(BaseSettings):
containers
:
list
[
ipaddress
.
IPv6Network
]
networks
:
list
[
ipaddress
.
IPv6Network
]
mask
:
int
# TODO: validation on
mask
?
mask
:
V6Net
mask
class
ServiceNetworkParams
(
BaseSettings
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment