Skip to content
Snippets Groups Projects
Commit 5cad4fb0 authored by Karel van Klink's avatar Karel van Klink :smiley_cat: Committed by Mohammad Torkashvand
Browse files

Update docstrings in a more product blocks, remove obsolete :class:`` references

parent 7b9ed275
No related branches found
No related tags found
1 merge request!329Feature/update docstrings
......@@ -74,7 +74,7 @@ def available_lags_choices(router_id: UUID) -> Choice | None:
"""Return a list of available lags for a given router.
For Nokia routers, return a list of available lags.
For Juniper routers, return ``None``.
For Juniper routers, return `None`.
"""
if get_router_vendor(router_id) != Vendor.NOKIA:
return None
......@@ -86,7 +86,7 @@ def available_service_lags_choices(router_id: UUID) -> Choice | None:
"""Return a list of available lags for a given router for services.
For Nokia routers, return a list of available lags.
For Juniper routers, return ``None``.
For Juniper routers, return `None`.
"""
if get_router_vendor(router_id) != Vendor.NOKIA:
return None
......@@ -164,7 +164,7 @@ def generate_inventory_for_routers(
router_role: The role of the routers to include in the inventory.
exclude_routers: List of routers to exclude from the inventory.
router_vendor: The vendor of the routers to include in the inventory.
include_provisioning_routers: Include routers that are in a ``PROVISIONING`` state.
include_provisioning_routers: Include routers that are in a `PROVISIONING` state.
Returns:
A dictionary representing the inventory of active routers.
......@@ -262,7 +262,7 @@ def active_edge_port_selector(*, partner_id: UUIDstr | None = None) -> Choice:
)
if partner_id:
# ``partner_id`` is set, so we will filter accordingly.
# `partner_id` is set, so we will filter accordingly.
edge_port_subscriptions = list(
filter(lambda subscription: bool(subscription["customer_id"] == partner_id), edge_port_subscriptions)
)
......
......@@ -25,7 +25,7 @@ class LAGMember(BaseModel):
def validate_interface_names_are_unique(interfaces: list[LAGMember]) -> list[LAGMember]:
"""Verify if interfaces are unique.
Raises a ``ValueError`` if the interfaces are not unique.
Raises a `ValueError` if the interfaces are not unique.
Args:
interfaces: The list of interfaces.
......
""":term:`VRF` Virtual Routing and Forwarding."""
"""VRF Virtual Routing and Forwarding."""
"""A creation workflow for adding a new virtual routing and forwarding (:term:`VRF`) service."""
"""A creation workflow for adding a new virtual routing and forwarding (VRF) service."""
from orchestrator.forms import FormPage
from orchestrator.targets import Target
......@@ -39,7 +39,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
@step("Create subscription")
def create_subscription(product: UUIDstr, partner: str) -> State:
"""Create a new :term:`VRF` subscription."""
"""Create a new VRF subscription."""
subscription = VRFInactive.from_product_id(product, get_partner_by_name(partner)["partner_id"])
return {
......@@ -72,7 +72,7 @@ def initialize_subscription(
target=Target.CREATE,
)
def create_vrf() -> StepList:
"""Create a virtual routing and forwarding (:term:`VRF`) service."""
"""Create a virtual routing and forwarding (VRF) service."""
return (
begin
>> create_subscription
......
"""Modify :term:`VRF` to add or remove routers."""
"""Modify VRF to add or remove routers."""
from typing import Annotated
......@@ -17,7 +17,7 @@ from gso.utils.helpers import active_router_selector
def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
"""Modify :term:`VRF` to add or remove routers."""
"""Modify VRF to add or remove routers."""
subscription = VRF.from_subscription(subscription_id)
class RouterSelection(BaseModel):
......@@ -57,5 +57,5 @@ def update_subscription_model(subscription: VRF, router_list: list[dict[str, UUI
target=Target.MODIFY,
)
def modify_vrf_router_list() -> StepList:
"""Modify the :term:`VRF` router list."""
"""Modify the VRF router list."""
return begin >> store_process_subscription(Target.MODIFY) >> unsync >> update_subscription_model >> resync >> done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment