Skip to content
Snippets Groups Projects
Commit 5292de3f authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Merge branch 'feature/rename-to-lso' into 'develop'

Update name from LARP to LSO

See merge request !5
parents f012122f 36980226
No related branches found
No related tags found
1 merge request!5Update name from LARP to LSO
library 'SWDPipeline' library 'SWDPipeline'
SimplePythonBuild('goat-larp'); SimplePythonBuild('goat-lso');
# Lightweight Ansible Runner Provisioner # Lightweight Service Orchestrator
LARP: an API that allows for remotely executing Ansible playbooks LSO: an API that allows for remotely executing Ansible playbooks
## Running locally ## Running locally
......
...@@ -2,7 +2,7 @@ import json ...@@ -2,7 +2,7 @@ import json
import os import os
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
import larp import lso
config_filename = os.path.join( config_filename = os.path.join(
os.path.dirname(__file__), os.path.dirname(__file__),
...@@ -13,7 +13,7 @@ output_filename = os.path.join( ...@@ -13,7 +13,7 @@ output_filename = os.path.join(
'source', '_static', 'openapi.json') 'source', '_static', 'openapi.json')
os.environ['SETTINGS_FILENAME'] = config_filename os.environ['SETTINGS_FILENAME'] = config_filename
app = larp.create_app() app = lso.create_app()
client = TestClient(app) client = TestClient(app)
rsp = client.get('/openapi.json') rsp = client.get('/openapi.json')
openapi_doc = json.dumps(rsp.json(), indent=2) openapi_doc = json.dumps(rsp.json(), indent=2)
......
GOAT Ansible API GOAT Lightweight Service Orchestrator
========================== ==========================
Documentation for LARP: a Lightweight Ansible Runner Provisioner Documentation for LSO: a Lightweight Service Orchestrator
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
......
...@@ -15,7 +15,7 @@ Install the Module ...@@ -15,7 +15,7 @@ Install the Module
python3 -m venv my-venv-directory python3 -m venv my-venv-directory
. my-venv-directory/bin/activate . my-venv-directory/bin/activate
pip install --pre --extra-index-url https://artifactory.software.geant.org/artifactory/api/pypi/geant-swd-pypi/simple goat-larp pip install --pre --extra-index-url https://artifactory.software.geant.org/artifactory/api/pypi/geant-swd-pypi/simple goat-lso
* Install the source code * Install the source code
...@@ -24,8 +24,8 @@ Install the Module ...@@ -24,8 +24,8 @@ Install the Module
python3 -m venv my-venv-directory python3 -m venv my-venv-directory
. my-venv-directory/bin/activate . my-venv-directory/bin/activate
git clone https://gitlab.geant.org/goat/gap/larp.git git clone https://gitlab.geant.org/goat/gap/lso.git
cd larp cd lso
pip install -e . pip install -e .
# for a full dev environment # for a full dev environment
...@@ -39,7 +39,7 @@ Running the App ...@@ -39,7 +39,7 @@ Running the App
.. code-block:: bash .. code-block:: bash
SETTINGS_FILENAME=/absolute/path/to/config.json python -m goat_larp.app SETTINGS_FILENAME=/absolute/path/to/config.json python -m goat_lso.app
Examples Examples
......
...@@ -6,10 +6,10 @@ import logging ...@@ -6,10 +6,10 @@ import logging
from fastapi import FastAPI from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.cors import CORSMiddleware
from larp import environment from lso import environment
from larp import config from lso import config
from larp.routes import default from lso.routes import default
def create_app(): def create_app():
......
""" """
default app creation default app creation
""" """
import larp import lso
app = larp.create_app() app = lso.create_app()
if __name__ == "__main__": if __name__ == "__main__":
import uvicorn import uvicorn
uvicorn.run( uvicorn.run(
'larp.app:app', 'lso.app:app',
host='0.0.0.0', host='0.0.0.0',
port=44444, port=44444,
log_level='debug') log_level='debug')
File moved
File moved
File moved
...@@ -18,5 +18,5 @@ def version() -> Version: ...@@ -18,5 +18,5 @@ def version() -> Version:
return { return {
'api': API_VERSION, 'api': API_VERSION,
'module': 'module':
pkg_resources.get_distribution('goat-larp').version pkg_resources.get_distribution('goat-lso').version
} }
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup( setup(
name='goat-larp', name='goat-lso',
version='0.0.1', version='0.0.1',
author='GÉANT Orchestration & Automation Team', author='GÉANT Orchestration & Automation Team',
author_email='TBD', author_email='TBD',
description='Lightweight Ansible Runner Provioner', description='Lightweight Ansible Runner Provioner',
url='https://gitlab.geant.org/goat/gap/larp', url='https://gitlab.geant.org/goat/gap/lso',
packages=find_packages(), packages=find_packages(),
install_requires=[ install_requires=[
'jsonschema', 'jsonschema',
......
...@@ -5,7 +5,7 @@ import tempfile ...@@ -5,7 +5,7 @@ import tempfile
import pytest import pytest
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
import larp import lso
@pytest.fixture @pytest.fixture
...@@ -42,5 +42,5 @@ def invalid_config_file(bad_config_data): ...@@ -42,5 +42,5 @@ def invalid_config_file(bad_config_data):
@pytest.fixture @pytest.fixture
def client(config_file): def client(config_file):
app = larp.create_app() app = lso.create_app()
yield TestClient(app) # wait here until calling context ends yield TestClient(app) # wait here until calling context ends
...@@ -2,9 +2,7 @@ import io ...@@ -2,9 +2,7 @@ import io
import json import json
import pytest import pytest
from pydantic.error_wrappers import ValidationError from lso import config
from larp import config
def test_config_with_file(config_file): def test_config_with_file(config_file):
......
...@@ -10,7 +10,7 @@ deps = ...@@ -10,7 +10,7 @@ deps =
commands = commands =
coverage erase coverage erase
coverage run --source larp -m pytest coverage run --source lso -m pytest
coverage xml coverage xml
coverage html coverage html
coverage report --fail-under 80 coverage report --fail-under 80
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment