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
28cc952c
Commit
28cc952c
authored
2 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
pep8
parent
f83593dd
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!5
Device workflows
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geant_service_orchestrator/services/ipam.py
+1
-0
1 addition, 0 deletions
geant_service_orchestrator/services/ipam.py
geant_service_orchestrator/workflows/device/create_device.py
+9
-3
9 additions, 3 deletions
geant_service_orchestrator/workflows/device/create_device.py
with
10 additions
and
3 deletions
geant_service_orchestrator/services/ipam.py
+
1
−
0
View file @
28cc952c
...
...
@@ -2,6 +2,7 @@ import ipaddress
from
pydantic
import
BaseSettings
from
geant_service_orchestrator
import
settings
class
ServiceNetworks
(
BaseSettings
):
v4
:
ipaddress
.
IPv4Network
v6
:
ipaddress
.
IPv6Network
...
...
This diff is collapsed.
Click to expand it.
geant_service_orchestrator/workflows/device/create_device.py
+
9
−
3
View file @
28cc952c
...
...
@@ -95,7 +95,10 @@ def initialize_subscription(
@step
(
"
Provision device [DRY RUN]
"
)
def
provision_device_dry
(
subscription
:
device
.
DeviceProvisioning
,
fqdn
:
str
,
ts_address
:
str
,
ts_port
:
str
subscription
:
device
.
DeviceProvisioning
,
fqdn
:
str
,
ts_address
:
str
,
ts_port
:
str
)
->
State
:
import
ansible_runner
...
...
@@ -117,7 +120,7 @@ def provision_device_dry(
)
out
=
r
.
stdout
.
read
()
out_splitted
=
out
.
splitlines
()
#if r.rc != 0:
#
if r.rc != 0:
# raise ValueError("Ansible has failed")
return
{
"
dry_run_output
"
:
out_splitted
,
"
return_code
"
:
r
.
rc
}
...
...
@@ -134,7 +137,10 @@ def confirm_step() -> FormGenerator:
@step
(
"
Provision device [FOR REAL]
"
)
def
provision_device_real
(
subscription
:
device
.
DeviceProvisioning
,
fqdn
:
str
,
ts_address
:
str
,
ts_port
:
str
subscription
:
device
.
DeviceProvisioning
,
fqdn
:
str
,
ts_address
:
str
,
ts_port
:
str
)
->
State
:
import
ansible_runner
...
...
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