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

Update documentation of ip trunks

parent 92cf47ee
Branches
Tags
1 merge request!26Feature/iptrunk and docs
python docs/dump-openapi-spec.py python docs/dump-openapi-spec.py
rm -r ./docs/build/*
sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f
vale --config=docs/vale/.vale.ini sync vale --config=docs/vale/.vale.ini sync
vale --config=docs/vale/.vale.ini docs/source/*.rst lso/*.py vale --config=docs/vale/.vale.ini docs/source/*.rst lso/*.py
......
...@@ -48,7 +48,7 @@ def setup(app): ...@@ -48,7 +48,7 @@ def setup(app):
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'Lightweight Ansible Runner Provisioner' project = 'Lightweight Service Orchestrator'
copyright = '2023, GÉANT' copyright = '2023, GÉANT'
author = 'GÉANT Orchestration & Automation Team' author = 'GÉANT Orchestration & Automation Team'
......
...@@ -45,7 +45,7 @@ async def provision_node(params: NodeProvisioningParams) \ ...@@ -45,7 +45,7 @@ async def provision_node(params: NodeProvisioningParams) \
:param params: Parameters for provisioning a new node :param params: Parameters for provisioning a new node
:type params: :class:`NodeProvisioningParams` :type params: :class:`NodeProvisioningParams`
:return: Response from the Ansible runner, including a run ID. :return: Response from the Ansible runner, including a run ID.
:rtype: :class:`PlaybookLaunchResponse` :rtype: :class:`lso.playbook.PlaybookLaunchResponse`
""" """
extra_vars = { extra_vars = {
'wfo_device_json': params.subscription, 'wfo_device_json': params.subscription,
......
...@@ -16,30 +16,47 @@ config_params = config.load() ...@@ -16,30 +16,47 @@ config_params = config.load()
class IPTrunkParams(BaseModel): class IPTrunkParams(BaseModel):
"""Default parameters for an IPtrunk deployment.""" """Default parameters for an IPtrunk deployment."""
#: The address where LSO should call back to upon completion.
callback: HttpUrl callback: HttpUrl
#: A dictionary representation of the IP trunk
#: subscription that is to be provisioned.
subscription: dict subscription: dict
class IPTrunkProvisioningParams(IPTrunkParams): class IPTrunkProvisioningParams(IPTrunkParams):
"""Additional parameters for provisioning an IPtrunk.""" """Additional parameters for provisioning an IPtrunk."""
#: Whether this playbook execution should be a dry run, or run for real.
#: defaults to ``True`` for obvious reasons, also making it an optional
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
#: The type of object that is changed.
object: str object: str
class IPTrunkModifyParams(IPTrunkParams): class IPTrunkModifyParams(IPTrunkParams):
"""Additional parameters for modifying an IPtrunk.""" """Additional parameters for modifying an IPtrunk."""
#: Whether this playbook execution should be a dry run, or run for real.
#: defaults to ``True`` for obvious reasons, also making it an optional
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
#: The old subscription object, represented as a dictionary. This allows
#: for calculating the difference in subscriptions.
old_subscription: dict old_subscription: dict
#: The type of object that is changed.
object: str object: str
class IPTrunkCheckParams(IPTrunkParams): class IPTrunkCheckParams(IPTrunkParams):
"""Additional parameters for checking an IPtrunk.""" """Additional parameters for checking an IPtrunk."""
#: The name of the check that is to be performed.
check_name: str check_name: str
class IPTrunkDeleteParams(IPTrunkParams): class IPTrunkDeleteParams(IPTrunkParams):
"""Additional parameters for deleting an IPtrunk.""" """Additional parameters for deleting an IPtrunk."""
#: Whether this playbook execution should be a dry run, or run for real.
#: defaults to ``True`` for obvious reasons, also making it an optional
#: parameter.
dry_run: Optional[bool] = True dry_run: Optional[bool] = True
...@@ -49,6 +66,12 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) \ ...@@ -49,6 +66,12 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) \
""" """
Launch a playbook to provision a new IP trunk service. Launch a playbook to provision a new IP trunk service.
The response will contain either a job ID, or error information. The response will contain either a job ID, or error information.
:param params: The parameters that define the new subscription object that
is to be deployed.
:type params: :class:`IPTrunkProvisioningParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
""" """
extra_vars = { extra_vars = {
'wfo_trunk_json': params.subscription, 'wfo_trunk_json': params.subscription,
...@@ -77,6 +100,11 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) \ ...@@ -77,6 +100,11 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) \
def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse: def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
""" """
Launch a playbook that modifies an existing IP trunk service. Launch a playbook that modifies an existing IP trunk service.
:param params: The parameters that define the change in configuration.
:type params: :class:`IPTrunkModifyParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
""" """
extra_vars = { extra_vars = {
'wfo_trunk_json': params.subscription, 'wfo_trunk_json': params.subscription,
...@@ -106,6 +134,12 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse: ...@@ -106,6 +134,12 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse: def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
""" """
Launch a playbook that deletes an existing IP trunk service. Launch a playbook that deletes an existing IP trunk service.
:param params: Parameters that define the subscription that should get
terminated.
:type params: :class:`IPTrunkDeleteParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
""" """
extra_vars = { extra_vars = {
'wfo_trunk_json': params.subscription, 'wfo_trunk_json': params.subscription,
...@@ -134,6 +168,12 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse: ...@@ -134,6 +168,12 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
def check_ip_trunk(params: IPTrunkCheckParams) -> PlaybookLaunchResponse: def check_ip_trunk(params: IPTrunkCheckParams) -> PlaybookLaunchResponse:
""" """
Launch a playbook that performs a check on an IP trunk service instance. Launch a playbook that performs a check on an IP trunk service instance.
:param params: Parameters that define the check that is going to be
executed, including on which relevant subscription.
:type params: :class:`IPTrunkCheckParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
""" """
extra_vars = { extra_vars = {
'wfo_ip_trunk_json': params.subscription, 'wfo_ip_trunk_json': params.subscription,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment