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
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
4395f40f
Verified
Commit
4395f40f
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
remove unused import
parent
6bbb4651
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/device/create_device.py
+24
-24
24 additions, 24 deletions
gso/workflows/device/create_device.py
with
24 additions
and
24 deletions
gso/workflows/device/create_device.py
+
24
−
24
View file @
4395f40f
...
...
@@ -6,7 +6,7 @@ from orchestrator.db.models import ProductTable, SubscriptionTable
# noinspection PyProtectedMember
from
orchestrator.forms
import
FormPage
from
orchestrator.forms.validators
import
Choice
,
choice_list
from
orchestrator.forms.validators
import
Choice
from
orchestrator.targets
import
Target
from
orchestrator.types
import
FormGenerator
,
State
from
orchestrator.types
import
SubscriptionLifecycle
,
UUIDstr
...
...
@@ -119,13 +119,13 @@ def get_info_from_ipam(subscription: DeviceProvisioning) -> State:
@step
(
"
Initialize subscription
"
)
def
initialize_subscription
(
subscription
:
device
.
DeviceInactive
,
hostname
:
str
,
ts_address
:
ipaddress
.
IPv4Address
,
ts_port
:
str
,
device_vendor
:
device_pb
.
DeviceVendor
,
device_site
:
str
,
device_role
:
device_pb
.
DeviceRole
,
subscription
:
device
.
DeviceInactive
,
hostname
:
str
,
ts_address
:
ipaddress
.
IPv4Address
,
ts_port
:
str
,
device_vendor
:
device_pb
.
DeviceVendor
,
device_site
:
str
,
device_role
:
device_pb
.
DeviceRole
,
)
->
State
:
subscription
.
device
.
device_ts_address
=
str
(
ts_address
)
subscription
.
device
.
device_ts_port
=
str
(
ts_port
)
...
...
@@ -152,7 +152,7 @@ def initialize_subscription(
@step
(
"
Provision device [DRY RUN]
"
)
def
provision_device_dry
(
subscription
:
DeviceProvisioning
,
process_id
:
UUIDstr
subscription
:
DeviceProvisioning
,
process_id
:
UUIDstr
)
->
State
:
provisioning_proxy
.
provision_device
(
subscription
,
process_id
)
...
...
@@ -170,7 +170,7 @@ def provision_device_dry(
@step
(
"
Provision device [FOR REAL]
"
)
def
provision_device_real
(
subscription
:
DeviceProvisioning
,
process_id
:
UUIDstr
subscription
:
DeviceProvisioning
,
process_id
:
UUIDstr
)
->
State
:
provisioning_proxy
.
provision_device
(
subscription
,
process_id
,
False
)
...
...
@@ -195,18 +195,18 @@ def provision_device_real(
)
def
create_device
():
return
(
init
>>
create_subscription
>>
store_process_subscription
(
Target
.
CREATE
)
>>
initialize_subscription
>>
get_info_from_ipam
>>
provision_device_dry
>>
await_pp_results
>>
confirm_pp_results
>>
provision_device_real
>>
await_pp_results
>>
confirm_pp_results
>>
set_status
(
SubscriptionLifecycle
.
ACTIVE
)
>>
resync
>>
done
init
>>
create_subscription
>>
store_process_subscription
(
Target
.
CREATE
)
>>
initialize_subscription
>>
get_info_from_ipam
>>
provision_device_dry
>>
await_pp_results
>>
confirm_pp_results
>>
provision_device_real
>>
await_pp_results
>>
confirm_pp_results
>>
set_status
(
SubscriptionLifecycle
.
ACTIVE
)
>>
resync
>>
done
)
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