diff --git a/Jenkinsfile b/Jenkinsfile index 490b869f71ca85ae18798720f3842f62c7b7a8d1..dfc196dc3dd7f83582e0e9b2b2a0660913be7935 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,3 @@ library 'SWDPipeline' -SimplePythonBuild('goat-ansible-api'); +SimplePythonBuild('goat-larp'); diff --git a/README.md b/README.md index 80a01294c2f78ffed586255de065e4853d8b41aa..62845f773cf4de525ca27dd7a26e3db45442b15f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Ansible API +# Lightweight Ansible Runner Provisioner -And API that allows for remotely executing Ansible playbooks +LARP: 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 c1d36bd5330a35f4c81c1d28a2d81df9078b5364..eae0df9fd8435a2b3b561a3e17ecda050a13c805 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 ansible_api +import larp 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 = ansible_api.create_app() +app = larp.create_app() client = TestClient(app) rsp = client.get('/openapi.json') openapi_doc = json.dumps(rsp.json(), indent=2) diff --git a/docs/source/conf.py b/docs/source/conf.py index 56936a1f502d212f868254603381d83bc6170ff5..9d63df7dfbba5eb2740dedec4b8b9b6927ea1b3d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,7 +48,7 @@ def setup(app): # -- Project information ----------------------------------------------------- -project = 'Ansible API' +project = 'Lightweight Ansible Runner Provisioner' copyright = '2023, GÉANT' author = 'GÉANT Orchestration & Automation Team' diff --git a/docs/source/index.rst b/docs/source/index.rst index f3b3481e66b839aefacfa063935f0d376e9758eb..66746d3b68d11646177bc056d661a8db6ef2b0a9 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,7 +1,7 @@ GOAT Ansible API ========================== -Documentation for the GOAT Ansible API +Documentation for LARP: a Lightweight Ansible Runner Provisioner .. toctree:: :maxdepth: 1 diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 81b9962bb171964a9741bec789d4c2797e227e53..f7ce68ccd48950ebda0f95559780e9d9252bcc25 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-ansible-api + pip install --pre --extra-index-url https://artifactory.software.geant.org/artifactory/api/pypi/geant-swd-pypi/simple goat-larp * 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/ansible-api.git - cd ansible-api + git clone https://gitlab.geant.org/goat/gap/larp.git + cd larp 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 ansible_api.app + SETTINGS_FILENAME=/absolute/path/to/config.json python -m goat_larp.app Examples diff --git a/ansible_api/__init__.py b/larp/__init__.py similarity index 91% rename from ansible_api/__init__.py rename to larp/__init__.py index 2b5f2582833670f5c5d2ccd115aa5d360e972083..33ccfb71b8b6b4b8cc71c066fa8d8565224b6357 100644 --- a/ansible_api/__init__.py +++ b/larp/__init__.py @@ -6,10 +6,10 @@ import logging from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware -from ansible_api import environment -from ansible_api import config +from larp import environment +from larp import config -from ansible_api.routes import default +from larp.routes import default def create_app(): diff --git a/ansible_api/app.py b/larp/app.py similarity index 67% rename from ansible_api/app.py rename to larp/app.py index e542ca108437d8cdf74a002406479cd3e2019486..5f36943de9dcbe522d9944d3998a2818f2f7c566 100644 --- a/ansible_api/app.py +++ b/larp/app.py @@ -1,14 +1,14 @@ """ default app creation """ -import ansible_api +import larp -app = ansible_api.create_app() +app = larp.create_app() if __name__ == "__main__": import uvicorn uvicorn.run( - 'ansible_api.app:app', + 'larp.app:app', host='0.0.0.0', port=44444, log_level='debug') diff --git a/ansible_api/config.py b/larp/config.py similarity index 100% rename from ansible_api/config.py rename to larp/config.py diff --git a/ansible_api/environment.py b/larp/environment.py similarity index 100% rename from ansible_api/environment.py rename to larp/environment.py diff --git a/ansible_api/routes/__init__.py b/larp/routes/__init__.py similarity index 100% rename from ansible_api/routes/__init__.py rename to larp/routes/__init__.py diff --git a/ansible_api/routes/default.py b/larp/routes/default.py similarity index 83% rename from ansible_api/routes/default.py rename to larp/routes/default.py index ec22b66fc337269f514826ec97c13a4a991a8660..51809b9fdd3d67c214fee5ebbbf776fbf5e9121f 100644 --- a/ansible_api/routes/default.py +++ b/larp/routes/default.py @@ -18,5 +18,5 @@ def version() -> Version: return { 'api': API_VERSION, 'module': - pkg_resources.get_distribution('goat-ansible-api').version + pkg_resources.get_distribution('goat-larp').version } diff --git a/setup.py b/setup.py index 985cea16c294e0629b509f890cd9558a2ee230dd..061160ceba1b387cad25db40dfd12bab939334a7 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,12 @@ from setuptools import setup, find_packages setup( - name='goat-ansible-api', + name='goat-larp', version='0.0.1', author='GÉANT Orchestration & Automation Team', author_email='TBD', - description='GOAT Ansible API', - url='https://gitlab.geant.org/goat/gap/ansible-api', + description='Lightweight Ansible Runner Provioner', + url='https://gitlab.geant.org/goat/gap/larp', packages=find_packages(), install_requires=[ 'jsonschema', diff --git a/tox.ini b/tox.ini index af515ea2c02bccf7173e0ac6b3e7d6144c1f06ca..3a9b917c21901a4fc4cc998af32f0a3efdebdf62 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = commands = coverage erase - coverage run --source ansible_api -m pytest + coverage run --source larp -m pytest coverage xml coverage html coverage report --fail-under 80