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
b25e7012
Verified
Commit
b25e7012
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
resolve various pylint issues
parent
fc1801db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!18
Feature/cleanup
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gso/services/provisioning_proxy.py
+10
-5
10 additions, 5 deletions
gso/services/provisioning_proxy.py
gso/settings.py
+1
-1
1 addition, 1 deletion
gso/settings.py
gso/workflows/__init__.py
+3
-0
3 additions, 0 deletions
gso/workflows/__init__.py
with
14 additions
and
6 deletions
gso/services/provisioning_proxy.py
+
10
−
5
View file @
b25e7012
"""
The Provisioning Proxy service, which interacts with LSO running externally.
LSO is responsible for executing Ansible playbooks, that deploy subscriptions.
"""
import
json
import
logging
...
...
@@ -53,7 +57,8 @@ def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr,
callback_url
=
f
'
{
settings
.
load_oss_params
().
GENERAL
.
public_hostname
}
'
\
f
'
/api/processes/
{
process_id
}
/resume
'
logger
.
debug
(
f
'
[provisioning proxy] provisioning for process
{
process_id
}
'
)
logger
.
debug
(
'
[provisioning proxy] provisioning for process %s
'
,
process_id
)
parameters
.
update
({
'
callback
'
:
callback_url
})
url
=
f
'
{
pp_params
.
scheme
}
://
{
pp_params
.
api_base
}
/api/
{
endpoint
}
'
...
...
@@ -61,11 +66,11 @@ def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr,
request
=
None
if
operation
==
CUDOperation
.
POST
:
request
=
requests
.
post
(
url
,
json
=
parameters
)
request
=
requests
.
post
(
url
,
json
=
parameters
,
timeout
=
10000
)
elif
operation
==
CUDOperation
.
PUT
:
request
=
requests
.
put
(
url
,
json
=
parameters
)
request
=
requests
.
put
(
url
,
json
=
parameters
,
timeout
=
10000
)
elif
operation
==
CUDOperation
.
DELETE
:
request
=
requests
.
delete
(
url
,
json
=
parameters
)
request
=
requests
.
delete
(
url
,
json
=
parameters
,
timeout
=
10000
)
if
request
.
status_code
!=
200
:
print
(
request
.
content
)
...
...
@@ -136,7 +141,7 @@ def provision_ip_trunk(subscription: IptrunkProvisioning,
# 'dry_run': dry_run,
# 'old_subscription': old_subscription,
# 'subscription': new_subscription
# #
FIXME
missing parameters
# #
...
missing parameters
# }
#
# _send_request('ip_trunk', parameters, process_id, CUDOperation.PUT)
...
...
This diff is collapsed.
Click to expand it.
gso/settings.py
+
1
−
1
View file @
b25e7012
...
...
@@ -90,7 +90,7 @@ def load_oss_params() -> OSSParams:
look for OSS_PARAMS_FILENAME in the environment and load the parameters
from that file.
"""
with
open
(
os
.
environ
[
'
OSS_PARAMS_FILENAME
'
])
as
file
:
with
open
(
os
.
environ
[
'
OSS_PARAMS_FILENAME
'
]
,
encoding
=
'
utf-8
'
)
as
file
:
return
OSSParams
(
**
json
.
loads
(
file
.
read
()))
...
...
This diff is collapsed.
Click to expand it.
gso/workflows/__init__.py
+
3
−
0
View file @
b25e7012
"""
init class that imports all workflows into GSO.
"""
from
orchestrator.workflows
import
LazyWorkflowInstance
LazyWorkflowInstance
(
"
gso.workflows.device.create_device
"
,
"
create_device
"
)
...
...
This diff is collapsed.
Click to expand it.
JORGE SASIAIN
@jorge.sasiain
mentioned in commit
06734e5c
·
1 year ago
mentioned in commit
06734e5c
mentioned in commit 06734e5c4849428538be1cb052a71ddbb5464370
Toggle commit list
JORGE SASIAIN
@jorge.sasiain
mentioned in commit
a00152af
·
1 year ago
mentioned in commit
a00152af
mentioned in commit a00152afe898c40221fe03e8945c964a9b44eb59
Toggle commit list
Simone Spinelli
@simone.spinelli
mentioned in merge request
!27 (closed)
·
1 year ago
mentioned in merge request
!27 (closed)
mentioned in merge request !27
Toggle commit list
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