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
e59ecad2
Verified
Commit
e59ecad2
authored
10 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Update router creation workflow to use sharepoint client
parent
9d1f2ea2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!211
Feature/add sharepoint service
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/router/create_router.py
+16
-11
16 additions, 11 deletions
gso/workflows/router/create_router.py
with
16 additions
and
11 deletions
gso/workflows/router/create_router.py
+
16
−
11
View file @
e59ecad2
...
...
@@ -20,7 +20,7 @@ from gso.services import infoblox, subscriptions
from
gso.services.lso_client
import
lso_interaction
from
gso.services.netbox_client
import
NetboxClient
from
gso.services.partners
import
get_partner_by_name
from
gso.se
ttings
import
load_oss_params
from
gso.se
rvices.sharepoint
import
SPClient
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
...
...
@@ -218,19 +218,23 @@ def prompt_insert_in_radius(subscription: RouterInactive) -> FormGenerator:
return
{}
@step
(
"
Create a new SharePoint checklist
"
)
def
create_new_sharepoint_checklist
(
subscription
:
RouterProvisioning
)
->
State
:
"""
Create a new checklist in SharePoint for approving this router.
"""
new_list_item_url
=
SPClient
().
add_list_item
(
"
p_router
"
,
{
"
Title
"
:
subscription
.
router
.
router_fqdn
})
return
{
"
checklist_url
"
:
new_list_item_url
}
@inputstep
(
"
Prompt for new Sharepoint checklist
"
,
assignee
=
Assignee
.
SYSTEM
)
def
prompt_start_new_checklist
(
subscription
:
RouterProvisioning
)
->
FormGenerator
:
"""
Prompt the operator to start a new checklist in Sharepoint for approving this new router.
"""
oss_params
=
load_oss_params
()
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
=
"
Start
new checklist
"
)
model_config
=
ConfigDict
(
title
=
"
Complete
new checklist
"
)
info_label_1
:
Label
=
(
f
"
Visit
{
oss_params
.
SHAREPOINT
.
checklist_site_url
}
and start a new Sharepoint checklist for
"
f
"
{
subscription
.
router
.
router_fqdn
}
.
"
)
info_label_2
:
Label
=
"
Once this is done, click proceed to finish the workflow.
"
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
...
...
@@ -269,7 +273,8 @@ def create_router() -> StepList:
>>
router_is_nokia
(
create_netbox_device
)
>>
lso_interaction
(
run_checks_after_base_config
)
>>
set_status
(
SubscriptionLifecycle
.
PROVISIONING
)
>>
prompt_start_new_checklist
>>
create_new_sharepoint_checklist
>>
prompt_sharepoint_checklist_url
>>
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