Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LSO
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
LSO
Commits
6ce83f8a
Verified
Commit
6ce83f8a
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
resolve some errors, and fix build-docs.sh
parent
d5516885
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!36
resolve some errors, and fix build-docs.sh
Pipeline
#83546
passed
1 year ago
Stage: tox
Stage: documentation
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build-docs.sh
+6
-0
6 additions, 0 deletions
build-docs.sh
lso/playbook.py
+3
-3
3 additions, 3 deletions
lso/playbook.py
lso/routes/default.py
+4
-3
4 additions, 3 deletions
lso/routes/default.py
with
13 additions
and
6 deletions
build-docs.sh
+
6
−
0
View file @
6ce83f8a
pip
install
-r
requirements.txt
pip
install
-e
.
export
SETTINGS_FILENAME
=
./config.json.example
python docs/dump-openapi-spec.py
rm
-r
./docs/build/
*
...
...
@@ -5,3 +9,5 @@ sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f
vale
--config
=
docs/vale/.vale.ini
sync
vale
--config
=
docs/vale/.vale.ini docs/source/
*
.rst lso/
*
.py
sphinx-build
-b
html docs/source docs/build
unset
SETTINGS_FILENAME
This diff is collapsed.
Click to expand it.
lso/playbook.py
+
3
−
3
View file @
6ce83f8a
...
...
@@ -6,7 +6,7 @@ import uuid
import
ansible_runner
import
requests
from
pydantic
import
BaseModel
from
pydantic
import
BaseModel
,
HttpUrl
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -84,14 +84,14 @@ def _run_playbook_proc(job_id: str, playbook_path: str, extra_vars: dict, invent
assert
request_result
.
status_code
==
204
def
run_playbook
(
playbook_path
:
str
,
extra_vars
:
dict
,
inventory
:
str
,
callback
:
str
)
->
PlaybookLaunchResponse
:
def
run_playbook
(
playbook_path
:
str
,
extra_vars
:
dict
,
inventory
:
str
,
callback
:
HttpUrl
)
->
PlaybookLaunchResponse
:
"""
Run an Ansible playbook against a specified inventory.
:param str playbook_path: playbook to be executed.
:param dict extra_vars: Any extra vars needed for the playbook to run.
:param [str] inventory: The inventory that the playbook is executed
against.
:param
str
callback: Callback URL where the playbook should send a status
:param
:class:`HttpUrl`
callback: Callback URL where the playbook should send a status
update when execution is completed. This is used for
workflow-orchestrator to continue with the next step in a workflow.
:return: Result of playbook launch, this could either be successful or
...
...
This diff is collapsed.
Click to expand it.
lso/routes/default.py
+
4
−
3
View file @
6ce83f8a
...
...
@@ -2,12 +2,13 @@
For now only includes a single endpoint that responds with the current version of the API and LSO.
"""
import
pkg_resources
from
importlib
import
metadata
from
fastapi
import
APIRouter
from
pydantic
import
BaseModel
,
constr
API_VERSION
=
"
0.1
"
VERSION_STRING
=
constr
(
regex
=
r
"
\d+\.\d+
"
)
VERSION_STRING
=
constr
(
pattern
=
r
"
\d+\.\d+
"
)
router
=
APIRouter
()
...
...
@@ -25,4 +26,4 @@ def version() -> Version:
:return: Version object with both API and `goat-lso` versions numbers.
"""
return
Version
(
api
=
API_VERSION
,
module
=
pkg_resources
.
get_distribut
ion
(
"
goat-lso
"
)
.
version
)
return
Version
(
api
=
API_VERSION
,
module
=
metadata
.
vers
ion
(
"
goat-lso
"
))
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