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
734d5a52
Verified
Commit
734d5a52
authored
10 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
externalize workflow step
parent
9a5789af
No related branches found
No related tags found
1 merge request
!211
Feature/add sharepoint service
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/utils/workflow_steps.py
+21
-1
21 additions, 1 deletion
gso/utils/workflow_steps.py
gso/workflows/router/create_router.py
+6
-16
6 additions, 16 deletions
gso/workflows/router/create_router.py
with
27 additions
and
17 deletions
gso/utils/workflow_steps.py
+
21
−
1
View file @
734d5a52
...
...
@@ -3,9 +3,14 @@
import
json
from
typing
import
Any
from
orchestrator
import
step
from
orchestrator
import
inputstep
,
step
from
orchestrator.config.assignee
import
Assignee
from
orchestrator.types
import
State
,
UUIDstr
from
orchestrator.utils.json
import
json_dumps
from
pydantic
import
ConfigDict
from
pydantic_forms.core
import
FormPage
from
pydantic_forms.types
import
FormGenerator
from
pydantic_forms.validators
import
Label
from
gso.products.product_types.iptrunk
import
Iptrunk
from
gso.services.lso_client
import
execute_playbook
...
...
@@ -101,3 +106,18 @@ def run_checks_after_base_config(subscription: dict[str, Any], callback_route: s
inventory
=
subscription
[
"
router
"
][
"
router_fqdn
"
],
extra_vars
=
{
"
wfo_router_json
"
:
subscription
},
)
@inputstep
(
"
Prompt for new SharePoint checklist
"
,
assignee
=
Assignee
.
SYSTEM
)
def
prompt_sharepoint_checklist_url
(
checklist_url
:
str
)
->
FormGenerator
:
"""
Prompt the operator with the checklist in SharePoint for approving this new router.
"""
class
SharepointPrompt
(
FormPage
):
model_config
=
ConfigDict
(
title
=
"
Complete new checklist
"
)
info_label_1
:
Label
=
f
"
A new checklist has been created at:
{
checklist_url
}
"
info_label_2
:
Label
=
"
Click proceed to finish the workflow.
"
yield
SharepointPrompt
return
{}
This diff is collapsed.
Click to expand it.
gso/workflows/router/create_router.py
+
6
−
16
View file @
734d5a52
...
...
@@ -23,7 +23,12 @@ from gso.services.partners import get_partner_by_name
from
gso.services.sharepoint
import
SharePointClient
from
gso.utils.helpers
import
generate_fqdn
,
iso_from_ipv4
from
gso.utils.shared_enums
import
PortNumber
,
Vendor
from
gso.utils.workflow_steps
import
deploy_base_config_dry
,
deploy_base_config_real
,
run_checks_after_base_config
from
gso.utils.workflow_steps
import
(
deploy_base_config_dry
,
deploy_base_config_real
,
prompt_sharepoint_checklist_url
,
run_checks_after_base_config
,
)
def
_site_selector
()
->
Choice
:
...
...
@@ -228,21 +233,6 @@ def create_new_sharepoint_checklist(subscription: RouterProvisioning, tt_number:
return
{
"
checklist_url
"
:
new_list_item_url
}
@inputstep
(
"
Prompt for new Sharepoint checklist
"
,
assignee
=
Assignee
.
SYSTEM
)
def
prompt_sharepoint_checklist_url
(
checklist_url
:
str
)
->
FormGenerator
:
"""
Prompt the operator with the checklist in SharePoint for approving this new router.
"""
class
SharepointPrompt
(
FormPage
):
model_config
=
ConfigDict
(
title
=
"
Complete new checklist
"
)
info_label_1
:
Label
=
f
"
A new checklist has been created at:
{
checklist_url
}
"
info_label_2
:
Label
=
"
Click proceed to finish the workflow.
"
yield
SharepointPrompt
return
{}
@workflow
(
"
Create router
"
,
initial_input_form
=
wrap_create_initial_input_form
(
initial_input_form_generator
),
...
...
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