diff --git a/gso/api/v1/imports.py b/gso/api/v1/imports.py index ae2b7c7df25af8ea8a27334ce02346ca63383f5d..70e0906984e6c56fea8ab433d6e868d89db88c31 100644 --- a/gso/api/v1/imports.py +++ b/gso/api/v1/imports.py @@ -34,15 +34,15 @@ def import_site(site: SiteImportModel) -> Dict[str, Any]: """Import a site by running the import_site workflow. Args: - ---- + ----- site (SiteImportModel): The site information to be imported. Returns: - ------- + -------- dict: A dictionary containing the process id of the started process and detail message. Raises: - ------ + ------- HTTPException: If the site already exists or if there's an error in the process. """ try: @@ -63,15 +63,15 @@ def import_router(router_data: RouterImportModel) -> Dict[str, Any]: """Import a router by running the import_router workflow. Args: - ---- + ----- router_data (RouterImportModel): The router information to be imported. Returns: - ------- + -------- dict: A dictionary containing the process id of the started process and detail message. Raises: - ------ + ------- HTTPException: If there's an error in the process. """ @@ -84,15 +84,15 @@ def import_iptrunk(iptrunk_data: IptrunkImportModel) -> Dict[str, Any]: """Import an iptrunk by running the import_iptrunk workflow. Args: - ---- + ----- iptrunk_data (IptrunkImportModel): The iptrunk information to be imported. Returns: - ------- + -------- dict: A dictionary containing the process id of the started process and detail message. Raises: - ------ + ------- HTTPException: If there's an error in the process. """ diff --git a/gso/products/product_blocks/site.py b/gso/products/product_blocks/site.py index 66075c7a36ddc6ea6eeafa4f40add49d0af91b1b..4a21313b22b5b6f9f23f5184f0c41df0d86b5174 100644 --- a/gso/products/product_blocks/site.py +++ b/gso/products/product_blocks/site.py @@ -55,7 +55,7 @@ class SiteBlock(SiteBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]) site_name: str """The name of the site, that will dictate part of the :term:`FQDN` of routers that are hosted at this site. For - example: `router.X.Y.geant.net`, where X denotes the name of the site.""" + example: ``router.X.Y.geant.net``, where X denotes the name of the site.""" site_city: str """The city at which the site is located.""" site_country: str diff --git a/gso/schemas/types.py b/gso/schemas/types.py index 94aced74e3c6ba4b6703b7afee01d962603cfbd4..114e573611b457a6adf3360517c3bd599021e08b 100644 --- a/gso/schemas/types.py +++ b/gso/schemas/types.py @@ -7,8 +7,8 @@ from pydantic import ConstrainedStr class LatitudeCoordinate(ConstrainedStr): """A latitude coordinate, modeled as a constrained string. - The coordinate must match the format conforming to the latitude - range of `-`90 to +90 degrees. It can be a floating-point number or an integer. + The coordinate must match the format conforming to the latitude range of -90 to +90 degrees. It can be a + floating-point number or an integer. Valid examples: 40.7128, -74.0060, 90, -90, 0 """ @@ -26,7 +26,7 @@ class LongitudeCoordinate(ConstrainedStr): """A longitude coordinate, modeled as a constrained string. The coordinate must match the format conforming to the longitude - range of `-`180 to 180 degrees. It can be a floating point number or an integer. + range of -180 to +180 degrees. It can be a floating point number or an integer. Valid examples: 40.7128, -74.0060, 180, -180, 0 """ diff --git a/gso/services/subscriptions.py b/gso/services/subscriptions.py index 043691bc04a0dbac169b3ab39283c93053013f8c..e11211c56f5b0e438c4fbb6606ad541545e90ebd 100644 --- a/gso/services/subscriptions.py +++ b/gso/services/subscriptions.py @@ -19,12 +19,12 @@ def get_active_subscriptions( """Retrieve active subscriptions for a specific product type. Args: - ---- + ----- product_type (str): The type of the product for which to retrieve subscriptions. fields (list[str]): List of fields to be included in the returned Subscription objects. Returns: - ------- + -------- list[Subscription]: A list of Subscription objects that match the query. """ dynamic_fields = [getattr(SubscriptionTable, field) for field in fields] @@ -44,11 +44,11 @@ def get_active_site_subscriptions(fields: list[str]) -> list[Subscription]: """Retrieve active subscriptions specifically for sites. Args: - ---- + ----- fields (list[str]): The fields to be included in the returned Subscription objects. Returns: - ------- + -------- list[Subscription]: A list of Subscription objects for sites. """ return get_active_subscriptions(ProductType.SITE, fields) @@ -58,11 +58,11 @@ def get_active_router_subscriptions(fields: list[str]) -> list[Subscription]: """Retrieve active subscriptions specifically for routers. Args: - ---- + ----- fields (list[str]): The fields to be included in the returned Subscription objects. Returns: - ------- + -------- list[Subscription]: A list of Subscription objects for routers. """ return get_active_subscriptions(product_type=ProductType.ROUTER, fields=fields) @@ -72,11 +72,11 @@ def get_product_id_by_name(product_name: ProductType) -> UUID: """Retrieve the :term:`UUID` of a product by its name. Args: - ---- + ----- product_name (ProductType): The name of the product. Returns: - ------- + -------- :term:`UUID`: The :term:`UUID` of the product. """ return ProductTable.query.filter_by(name=product_name).first().product_id @@ -86,11 +86,11 @@ def get_active_site_subscription_by_name(site_name: str) -> Subscription: """Retrieve an active subscription for a site by the site's name. Args: - ---- + ----- site_name (str): The name of the site for which to retrieve the subscription. Returns: - ------- + -------- Subscription: The Subscription object for the site. """ return (