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

Rename to LARP

parent 7abb7dd5
No related branches found
No related tags found
1 merge request!2Rename to LARP
library 'SWDPipeline' library 'SWDPipeline'
SimplePythonBuild('goat-ansible-api'); SimplePythonBuild('goat-larp');
# 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 ## 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 ansible_api import larp
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 = ansible_api.create_app() app = larp.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)
......
...@@ -48,7 +48,7 @@ def setup(app): ...@@ -48,7 +48,7 @@ def setup(app):
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'Ansible API' project = 'Lightweight Ansible Runner Provisioner'
copyright = '2023, GÉANT' copyright = '2023, GÉANT'
author = 'GÉANT Orchestration & Automation Team' author = 'GÉANT Orchestration & Automation Team'
......
GOAT Ansible API GOAT Ansible API
========================== ==========================
Documentation for the GOAT Ansible API Documentation for LARP: a Lightweight Ansible Runner Provisioner
.. 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-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 * 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/ansible-api.git git clone https://gitlab.geant.org/goat/gap/larp.git
cd ansible-api cd larp
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 ansible_api.app SETTINGS_FILENAME=/absolute/path/to/config.json python -m goat_larp.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 ansible_api import environment from larp import environment
from ansible_api import config from larp import config
from ansible_api.routes import default from larp.routes import default
def create_app(): def create_app():
......
""" """
default app creation default app creation
""" """
import ansible_api import larp
app = ansible_api.create_app() app = larp.create_app()
if __name__ == "__main__": if __name__ == "__main__":
import uvicorn import uvicorn
uvicorn.run( uvicorn.run(
'ansible_api.app:app', 'larp.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-ansible-api').version pkg_resources.get_distribution('goat-larp').version
} }
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup( setup(
name='goat-ansible-api', name='goat-larp',
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='GOAT Ansible API', description='Lightweight Ansible Runner Provioner',
url='https://gitlab.geant.org/goat/gap/ansible-api', url='https://gitlab.geant.org/goat/gap/larp',
packages=find_packages(), packages=find_packages(),
install_requires=[ install_requires=[
'jsonschema', 'jsonschema',
......
...@@ -10,7 +10,7 @@ deps = ...@@ -10,7 +10,7 @@ deps =
commands = commands =
coverage erase coverage erase
coverage run --source ansible_api -m pytest coverage run --source larp -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