diff --git a/Jenkinsfile b/Jenkinsfile index dfc196dc3dd7f83582e0e9b2b2a0660913be7935..8790b36512307f0f6c6edd7aa828eed1789ecca0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,3 @@ library 'SWDPipeline' -SimplePythonBuild('goat-larp'); +SimplePythonBuild('goat-lso'); diff --git a/README.md b/README.md index 62845f773cf4de525ca27dd7a26e3db45442b15f..6cedf58042f54a5eb48d1a6751c1c588faa3025c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# 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 diff --git a/docs/dump-openapi-spec.py b/docs/dump-openapi-spec.py index eae0df9fd8435a2b3b561a3e17ecda050a13c805..7a453a1d066f62a9ba69917727555a81ce39e39e 100644 --- a/docs/dump-openapi-spec.py +++ b/docs/dump-openapi-spec.py @@ -2,7 +2,7 @@ import json import os from fastapi.testclient import TestClient -import larp +import lso config_filename = os.path.join( os.path.dirname(__file__), @@ -13,7 +13,7 @@ output_filename = os.path.join( 'source', '_static', 'openapi.json') os.environ['SETTINGS_FILENAME'] = config_filename -app = larp.create_app() +app = lso.create_app() client = TestClient(app) rsp = client.get('/openapi.json') openapi_doc = json.dumps(rsp.json(), indent=2) diff --git a/docs/source/index.rst b/docs/source/index.rst index 66746d3b68d11646177bc056d661a8db6ef2b0a9..350880637493e7db65d993dedce80a410c964ecb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,7 +1,7 @@ -GOAT Ansible API +GOAT Lightweight Service Orchestrator ========================== -Documentation for LARP: a Lightweight Ansible Runner Provisioner +Documentation for LSO: a Lightweight Service Orchestrator .. toctree:: :maxdepth: 1 diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index f7ce68ccd48950ebda0f95559780e9d9252bcc25..bc0ae93593d6c7a6699160d3563e39d917802d5b 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -15,7 +15,7 @@ Install the Module python3 -m venv my-venv-directory . 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 @@ -24,8 +24,8 @@ Install the Module python3 -m venv my-venv-directory . my-venv-directory/bin/activate - git clone https://gitlab.geant.org/goat/gap/larp.git - cd larp + git clone https://gitlab.geant.org/goat/gap/lso.git + cd lso pip install -e . # for a full dev environment @@ -39,7 +39,7 @@ Running the App .. 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 diff --git a/larp/__init__.py b/lso/__init__.py similarity index 93% rename from larp/__init__.py rename to lso/__init__.py index 33ccfb71b8b6b4b8cc71c066fa8d8565224b6357..7afbc8da32a2c5b2043b4e6a1aec4bcb0e125375 100644 --- a/larp/__init__.py +++ b/lso/__init__.py @@ -6,10 +6,10 @@ import logging from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware -from larp import environment -from larp import config +from lso import environment +from lso import config -from larp.routes import default +from lso.routes import default def create_app(): diff --git a/larp/app.py b/lso/app.py similarity index 73% rename from larp/app.py rename to lso/app.py index 5f36943de9dcbe522d9944d3998a2818f2f7c566..4d83e840392acc9344b5c94eb347100f0a252fa6 100644 --- a/larp/app.py +++ b/lso/app.py @@ -1,14 +1,14 @@ """ default app creation """ -import larp +import lso -app = larp.create_app() +app = lso.create_app() if __name__ == "__main__": import uvicorn uvicorn.run( - 'larp.app:app', + 'lso.app:app', host='0.0.0.0', port=44444, log_level='debug') diff --git a/larp/config.py b/lso/config.py similarity index 100% rename from larp/config.py rename to lso/config.py diff --git a/larp/environment.py b/lso/environment.py similarity index 100% rename from larp/environment.py rename to lso/environment.py diff --git a/larp/routes/__init__.py b/lso/routes/__init__.py similarity index 100% rename from larp/routes/__init__.py rename to lso/routes/__init__.py diff --git a/larp/routes/default.py b/lso/routes/default.py similarity index 85% rename from larp/routes/default.py rename to lso/routes/default.py index 51809b9fdd3d67c214fee5ebbbf776fbf5e9121f..02ef1d97826ab4a55b54cfe13b12f5f910c2ae2d 100644 --- a/larp/routes/default.py +++ b/lso/routes/default.py @@ -18,5 +18,5 @@ def version() -> Version: return { 'api': API_VERSION, 'module': - pkg_resources.get_distribution('goat-larp').version + pkg_resources.get_distribution('goat-lso').version } diff --git a/setup.py b/setup.py index 061160ceba1b387cad25db40dfd12bab939334a7..9fe09dd0814f7a0f72be1758f7b9144d29d338c0 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,12 @@ from setuptools import setup, find_packages setup( - name='goat-larp', + name='goat-lso', version='0.0.1', author='GÉANT Orchestration & Automation Team', author_email='TBD', description='Lightweight Ansible Runner Provioner', - url='https://gitlab.geant.org/goat/gap/larp', + url='https://gitlab.geant.org/goat/gap/lso', packages=find_packages(), install_requires=[ 'jsonschema', diff --git a/test/conftest.py b/test/conftest.py index de3bf6871053e5f5b85e398640c778824e76b87e..16e8ae6bb1a67efed6e6d8554fad414356dbabe5 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -5,7 +5,7 @@ import tempfile import pytest from fastapi.testclient import TestClient -import larp +import lso @pytest.fixture @@ -42,5 +42,5 @@ def invalid_config_file(bad_config_data): @pytest.fixture def client(config_file): - app = larp.create_app() + app = lso.create_app() yield TestClient(app) # wait here until calling context ends diff --git a/test/test_config.py b/test/test_config.py index f05e0cc6f8961bfd25d048784f3b313292ca3ea4..8ab3ab1e05be435f8f7d735207ba9883d6c823d4 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -2,9 +2,7 @@ import io import json import pytest -from pydantic.error_wrappers import ValidationError - -from larp import config +from lso import config def test_config_with_file(config_file): diff --git a/tox.ini b/tox.ini index 3a9b917c21901a4fc4cc998af32f0a3efdebdf62..ab6a6bcce62c94dd93a88ec6683c5e567e29e968 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = commands = coverage erase - coverage run --source larp -m pytest + coverage run --source lso -m pytest coverage xml coverage html coverage report --fail-under 80