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
5fece9ca
Verified
Commit
5fece9ca
authored
10 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
rename SPClient to SharePointClient
parent
e59ecad2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!211
Feature/add sharepoint service
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/services/sharepoint.py
+4
-4
4 additions, 4 deletions
gso/services/sharepoint.py
gso/workflows/router/create_router.py
+2
-2
2 additions, 2 deletions
gso/workflows/router/create_router.py
with
6 additions
and
6 deletions
gso/services/sharepoint.py
+
4
−
4
View file @
5fece9ca
...
...
@@ -13,7 +13,7 @@ from msgraph.generated.sites.item.lists.item.items.items_request_builder import
from
gso.settings
import
load_oss_params
class
S
P
Client
:
class
S
harePoint
Client
:
"""
A client for interaction with SharePoint lists.
"""
def
__init__
(
self
)
->
None
:
...
...
@@ -32,7 +32,7 @@ class SPClient:
def
get_site
(
self
)
->
Site
|
None
:
"""
Get the SharePoint site that this orchestrator connects to.
"""
async
def
_get_site
():
async
def
_get_site
()
->
Site
|
None
:
return
await
self
.
client
.
sites
.
by_site_id
(
self
.
site_id
).
get
()
return
asyncio
.
run
(
_get_site
())
...
...
@@ -43,7 +43,7 @@ class SPClient:
:param str list_name: The name of the list.
"""
async
def
_get_list_items
():
async
def
_get_list_items
()
->
ListItemCollectionResponse
|
None
:
query_params
=
ItemsRequestBuilder
.
ItemsRequestBuilderGetQueryParameters
(
expand
=
[
"
fields
"
])
request_configuration
=
ItemsRequestBuilder
.
ItemsRequestBuilderGetRequestConfiguration
(
query_parameters
=
query_params
...
...
@@ -65,7 +65,7 @@ class SPClient:
:return str: The URL of the list in which a new item has been created.
"""
async
def
_new_list_item
():
async
def
_new_list_item
()
->
str
:
request_body
=
ListItem
(
fields
=
FieldValueSet
(
additional_data
=
fields
))
new_item
=
(
await
self
.
client
.
sites
.
by_site_id
(
self
.
site_id
)
...
...
This diff is collapsed.
Click to expand it.
gso/workflows/router/create_router.py
+
2
−
2
View file @
5fece9ca
...
...
@@ -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.services.sharepoint
import
S
P
Client
from
gso.services.sharepoint
import
S
harePoint
Client
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
...
...
@@ -221,7 +221,7 @@ def prompt_insert_in_radius(subscription: RouterInactive) -> FormGenerator:
@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
=
S
P
Client
().
add_list_item
(
"
p_router
"
,
{
"
Title
"
:
subscription
.
router
.
router_fqdn
})
new_list_item_url
=
S
harePoint
Client
().
add_list_item
(
"
p_router
"
,
{
"
Title
"
:
subscription
.
router
.
router_fqdn
})
return
{
"
checklist_url
"
:
new_list_item_url
}
...
...
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