diff --git a/docs/source/quickstart.md b/docs/source/quickstart.md index 1ddae9ef71a525418d41b15dd949c9be989f825f..11a9104531a642635c7a5424f2c9119d6a8f8e06 100644 --- a/docs/source/quickstart.md +++ b/docs/source/quickstart.md @@ -6,7 +6,7 @@ - ``add-apt-repository ppa:deadsnakes/ppa`` - ``apt install python3.10 python3.10-distutils`` - Follow Steps 1 and 2 from here to install dependencies and setup DB: https://workfloworchestrator.org/orchestrator-core/workshops/beginner/debian/ -- To install the orchestrator GUI, you can follow the steps 5 and 6 from the above link. +- To install the orchestrator GUI, you can follow the steps 5 and 6 from the previous link. - Create a virtual environment: - ``source /usr/share/virtualenvwrapper/virtualenvwrapper.sh`` - ``mkvirtualenv --python python3.10 gso`` @@ -16,7 +16,7 @@ ## Installation -Do all of this inside the virtual environment. +Do all this inside the virtual environment. - Clone this repository and ``cd`` into it - ``pip install -r requirements.txt`` - If you get an error because you pip version is too old, run this: `curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10` @@ -27,11 +27,11 @@ Do all of this inside the virtual environment. ## Run -- The core of workflow orchestrator can be started with ``uvicorn --host 0.0.0.0 --port 8080 main:app`` from inside the ``gso`` directory of this repository. -- The GUI can be started with ``yarn start``. +- Start the workflow orchestrator core with ``uvicorn --host 0.0.0.0 --port 8080 main:app`` from inside the ``gso`` directory of this repository. +- Start the GUI with ``yarn start``. -## Useful WFO Resources +## Useful workflow orchestrator resources - WFO API (Swagger): <https://workfloworchestrator.org/orchestrator-core/architecture/application/api/> - WFO API (repository): <https://github.com/workfloworchestrator/orchestrator-core/tree/main/orchestrator/api/api_v1/endpoints> @@ -53,10 +53,10 @@ Create process that manipulates the state of a subscription (TERMINATE workflow) **Deleting subscriptions** (not the same as running a TERMINATE workflow for a subscription, but to actually erase it from the WFO database) -Delete a subscription: +To do this, you first have to delete the processes first: -``curl -X 'DELETE' 'http://10.98.1.62:8080/api/subscriptions/3f16532b-0a48-4fe3-802a-36b3f54eed0e'`` +``curl -X 'DELETE' 'http://10.98.1.62:8080/api/processes/7447a3e9-7c58-4ae7-8804-c0a75c39c924'`` -To do the above, you first have to delete the processes first: +Delete a subscription: -``curl -X 'DELETE' 'http://10.98.1.62:8080/api/processes/7447a3e9-7c58-4ae7-8804-c0a75c39c924'`` +``curl -X 'DELETE' 'http://10.98.1.62:8080/api/subscriptions/3f16532b-0a48-4fe3-802a-36b3f54eed0e'`` diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index 28644a97d552aca79601800ede03d1c5decf3f46..e7a40f5f63f1b814db8cffe0ab0406a73fac4043 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -8,28 +8,10 @@ Packages = proselint, Microsoft [*] BasedOnStyles = Vale, proselint, Microsoft - -; Disable style rules for headings, as these conflict with what is generated by autodoc -; Microsoft.Headings = NO -; Microsoft.HeadingAcronyms = NO -; Microsoft.Dashes = NO - -; Ignore acronyms if they are tagged as a term -; TokenIgnores = ([^\n]+std-term[^\n]+) -; TokenIgnores = ('<span class="xref std std-term">GSO<\/span>') -; TokenIgnores = ({term}`[^\n]+`) - -; Ignore the table of contents directive -; BlockIgnores = (?s) *(\x60\x60\x60{toctree}.*?\x60\x60\x60) -; BlockIgnores = (?s) *(# {py:mod}\x60[^\n]+\x60) - -; Ignore <link>-style links - -; TokenIgnores = (<http[^\n]+>+?) +Microsoft.Headings = NO [*.html] Microsoft.Dashes = NO -Microsoft.Headings = NO Microsoft.HeadingAcronyms = NO [/docs/source/glossary.md] diff --git a/docs/vale/styles/Vocab/Sphinx/accept.txt b/docs/vale/styles/Vocab/Sphinx/accept.txt index 08664fd56d49a17891d701b7f1e20297bac634b0..50dad4e68dc09599fdf6d1855ec6120ab1fe15b6 100644 --- a/docs/vale/styles/Vocab/Sphinx/accept.txt +++ b/docs/vale/styles/Vocab/Sphinx/accept.txt @@ -1,4 +1,4 @@ toctree [Ss]ubpackages virtualenv -Previous +[Pp]revious diff --git a/docs/vale/styles/Vocab/geant-jargon/accept.txt b/docs/vale/styles/Vocab/geant-jargon/accept.txt index e8cbd9ee75595620ad45edd4c707e60da12dc48a..3c7868e5dc208b634d98373c7f67b225f1018792 100644 --- a/docs/vale/styles/Vocab/geant-jargon/accept.txt +++ b/docs/vale/styles/Vocab/geant-jargon/accept.txt @@ -1,6 +1,10 @@ GÉANT Automation Platform +[GSO|gso] Vereniging TERMINATE WFO Ansible [Dd]eprovision +API +dry_run +Dark_fiber diff --git a/gso/main.py b/gso/main.py index fae6a4f7f2894b17e93819175b6ce5f65ff0bac0..44b826dabd846284fb406e7ebe1efe4edea220d7 100644 --- a/gso/main.py +++ b/gso/main.py @@ -1,4 +1,4 @@ -"""The main module, from where GSO is run.""" +"""The main module that runs {term}`GSO`.""" from orchestrator import OrchestratorCore from orchestrator.cli.main import app as core_cli from orchestrator.settings import AppSettings diff --git a/gso/products/__init__.py b/gso/products/__init__.py index 4bf680530645ebbdae7238a1f1991bfb1c9745c6..1943b09e29867391309756d01713c3500300b9ae 100644 --- a/gso/products/__init__.py +++ b/gso/products/__init__.py @@ -1,4 +1,4 @@ -"""Module that updates the domain model of GSO. Should contain all types of subscriptions.""" +"""Module that updates the domain model of {term}`GSO`. Should contain all types of subscriptions.""" from orchestrator.domain import SUBSCRIPTION_MODEL_REGISTRY from gso.products.product_types.device import Device diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index 1ecd09a06685ac2499d1e082d56fb0659ab2a4b3..862a750e82124e5836c23312e11294e90f58e56c 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -23,9 +23,9 @@ logger = logging.getLogger(__name__) class CUDOperation(strEnum): - """Enum for different C(R)UD operations that the provisioning proxy supports. + """Enumerator for different C(R)UD operations that the provisioning proxy supports. - Read is not applicable, hence these become CUD and not CRUD operations. + Read isn't applicable, hence these become CUD and not CRUD operations. """ #: Creation is done with a POST request @@ -39,12 +39,12 @@ class CUDOperation(strEnum): def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr, operation: CUDOperation) -> None: """Send a request to LSO. The callback address is derived using the process ID provided. - :param str endpoint: The LSO-specific endpoint to call, depending on the type of service object that is acted upon. + :param str endpoint: The LSO-specific endpoint to call, depending on the type of service object that's acted upon. :param dict parameters: JSON body for the request, which will almost always at least consist of a subscription object, and a boolean value to indicate a dry run. :param UUIDstr process_id: The process ID that this request is a part of, used to call back to when the execution of the playbook is completed. - :param :class:`CUDOperation` operation: The specific operation that is performed with the request. + :param :class:`CUDOperation` operation: The specific operation that's performed with the request. """ oss = settings.load_oss_params() pp_params = oss.PROVISIONING_PROXY @@ -73,11 +73,9 @@ def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr, operatio def provision_device(subscription: DeviceProvisioning, process_id: UUIDstr, dry_run: bool = True) -> None: """Provision a new device using LSO. - :param :class:`DeviceProvisioning` subscription: The subscription object - that is to be provisioned. + :param :class:`DeviceProvisioning` subscription: The subscription object that's to be provisioned. :param UUIDstr process_id: The related process ID, used for callback. - :param bool dry_run: A boolean indicating whether this should be a dry run - or not, defaults to ``True``. + :param bool dry_run: A boolean indicating whether this should be a dry run or not, defaults to ``True``. """ parameters = {"dry_run": dry_run, "subscription": json.loads(json_dumps(subscription))} @@ -89,12 +87,10 @@ def provision_ip_trunk( ) -> None: """Provision an IP trunk service using LSO. - :param :class:`IptrunkProvisioning` subscription: The subscription object - that is to be provisioned. + :param :class:`IptrunkProvisioning` subscription: The subscription object that's to be provisioned. :param UUIDstr process_id: The related process ID, used for callback. - :param str config_object: The type of object that is deployed - :param bool dry_run: A boolean indicating whether this should be a dry run - or not, defaults to ``True``. + :param str config_object: The type of object that's deployed + :param bool dry_run: A boolean indicating whether this should be a dry run or not, defaults to ``True``. """ parameters = { "subscription": json.loads(json_dumps(subscription)), @@ -134,11 +130,9 @@ def provision_ip_trunk( def deprovision_ip_trunk(subscription: Iptrunk, process_id: UUIDstr, dry_run: bool = True) -> None: """Deprovision an IP trunk service using LSO. - :param :class:`IptrunkProvisioning` subscription: The subscription object - that is to be provisioned. + :param :class:`IptrunkProvisioning` subscription: The subscription object that's to be provisioned. :param UUIDstr process_id: The related process ID, used for callback. - :param bool dry_run: A boolean indicating whether this should be a dry run - or not, defaults to ``True``. + :param bool dry_run: A boolean indicating whether this should be a dry run or not, defaults to ``True``. """ parameters = {"subscription": json.loads(json_dumps(subscription)), "dry_run": dry_run, "verb": "terminate"}