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

Rename types module to annotations to avoid collision with existing external module

parent 4de070dd
No related branches found
No related tags found
No related merge requests found
Pipeline #88978 passed
Showing
with 20 additions and 20 deletions
File moved
......@@ -2,12 +2,12 @@
from pydantic import BaseModel
from gso.annotations.coordinates import LatitudeCoordinate, LongitudeCoordinate
from gso.annotations.country_code import CountryCode
from gso.annotations.ip_address import IPAddress
from gso.annotations.site_name import SiteName
from gso.annotations.unique_field import UniqueField
from gso.products.product_blocks.site import SiteTier
from gso.types.coordinates import LatitudeCoordinate, LongitudeCoordinate
from gso.types.country_code import CountryCode
from gso.types.ip_address import IPAddress
from gso.types.site_name import SiteName
from gso.types.unique_field import UniqueField
class BaseSiteValidatorModel(BaseModel):
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
......@@ -10,11 +10,11 @@ from orchestrator.security import authorize
from orchestrator.services.subscriptions import build_extended_domain_model
from starlette import status
from gso.annotations.coordinates import LatitudeCoordinate, LongitudeCoordinate
from gso.annotations.interfaces import PhysicalPortCapacity
from gso.products.product_blocks.iptrunk import IptrunkType
from gso.products.product_blocks.router import RouterRole
from gso.services.subscriptions import get_active_iptrunk_subscriptions
from gso.types.coordinates import LatitudeCoordinate, LongitudeCoordinate
from gso.types.interfaces import PhysicalPortCapacity
from gso.utils.shared_enums import Vendor
router = APIRouter(prefix="/networks", tags=["Network"], dependencies=[Depends(authorize)])
......
......@@ -16,6 +16,8 @@ from orchestrator.types import SubscriptionLifecycle
from pydantic import BaseModel, ValidationError, field_validator, model_validator
from sqlalchemy.exc import SQLAlchemyError
from gso.annotations.base_site import BaseSiteValidatorModel
from gso.annotations.interfaces import LAGMember, LAGMemberList, PhysicalPortCapacity
from gso.db.models import PartnerTable
from gso.products import ProductType
from gso.products.product_blocks.iptrunk import IptrunkType
......@@ -31,8 +33,6 @@ from gso.services.subscriptions import (
get_active_subscriptions_by_field_and_value,
get_subscriptions,
)
from gso.types.base_site import BaseSiteValidatorModel
from gso.types.interfaces import LAGMember, LAGMemberList, PhysicalPortCapacity
from gso.utils.shared_enums import IPv4AddressType, IPv6AddressType, PortNumber, Vendor
app: typer.Typer = typer.Typer()
......
......@@ -10,12 +10,12 @@ from pydantic import AfterValidator
from pydantic_forms.validators import validate_unique_list
from typing_extensions import Doc
from gso.annotations.interfaces import LAGMemberList, PhysicalPortCapacity
from gso.products.product_blocks.router import (
RouterBlock,
RouterBlockInactive,
RouterBlockProvisioning,
)
from gso.types.interfaces import LAGMemberList, PhysicalPortCapacity
class IptrunkType(strEnum):
......
......@@ -3,9 +3,9 @@
from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle, strEnum
from gso.annotations.interfaces import LAGMemberList
from gso.products.product_blocks.router import RouterBlock, RouterBlockInactive, RouterBlockProvisioning
from gso.products.product_blocks.switch import SwitchBlock, SwitchBlockInactive, SwitchBlockProvisioning
from gso.types.interfaces import LAGMemberList
class LanSwitchInterconnectAddressSpace(strEnum):
......
......@@ -3,9 +3,9 @@
from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle, strEnum
from gso.types.coordinates import LatitudeCoordinate, LongitudeCoordinate
from gso.types.ip_address import IPAddress
from gso.types.site_name import SiteName
from gso.annotations.coordinates import LatitudeCoordinate, LongitudeCoordinate
from gso.annotations.ip_address import IPAddress
from gso.annotations.site_name import SiteName
class SiteTier(strEnum):
......
......@@ -9,8 +9,8 @@ import requests
from requests import HTTPError, Response
from requests.adapters import HTTPAdapter
from gso.annotations.snmp import SNMPVersion
from gso.settings import load_oss_params
from gso.types.snmp import SNMPVersion
logger = logging.getLogger(__name__)
......
......@@ -7,11 +7,11 @@ from uuid import UUID
from pydantic_forms.validators import Choice
from gso import settings
from gso.annotations.interfaces import PhysicalPortCapacity
from gso.products.product_blocks.router import RouterRole
from gso.products.product_types.router import Router
from gso.services import subscriptions
from gso.services.netbox_client import NetboxClient
from gso.types.interfaces import PhysicalPortCapacity
from gso.utils.shared_enums import IPv4AddressType, Vendor
if TYPE_CHECKING:
......
......@@ -13,13 +13,13 @@ from orchestrator.workflows.steps import resync, set_status, store_process_subsc
from pydantic import AfterValidator, ConfigDict
from pydantic_forms.validators import validate_unique_list
from gso.annotations.interfaces import LAGMember, LAGMemberList, PhysicalPortCapacity
from gso.products import ProductName
from gso.products.product_blocks.iptrunk import IptrunkInterfaceBlockInactive, IptrunkType
from gso.products.product_types.iptrunk import ImportedIptrunkInactive
from gso.products.product_types.router import Router
from gso.services import subscriptions
from gso.services.partners import get_partner_by_name
from gso.types.interfaces import LAGMember, LAGMemberList, PhysicalPortCapacity
from gso.utils.helpers import active_router_selector
......
......@@ -20,6 +20,9 @@ from pydantic import ConfigDict
from pydantic_forms.validators import ReadOnlyField
from pynetbox.models.dcim import Interfaces
from gso.annotations.interfaces import JuniperLAGMember, LAGMember, LAGMemberList, PhysicalPortCapacity
from gso.annotations.netbox_router import NetboxEnabledRouter
from gso.annotations.tt_number import TTNumber
from gso.products.product_blocks.iptrunk import (
IptrunkInterfaceBlockInactive,
IptrunkSideBlockInactive,
......@@ -34,9 +37,6 @@ from gso.services.partners import get_partner_by_name
from gso.services.sharepoint import SharePointClient
from gso.services.subscriptions import get_non_terminated_iptrunk_subscriptions
from gso.settings import load_oss_params
from gso.types.interfaces import JuniperLAGMember, LAGMember, LAGMemberList, PhysicalPortCapacity
from gso.types.netbox_router import NetboxEnabledRouter
from gso.types.tt_number import TTNumber
from gso.utils.helpers import (
available_interfaces_choices,
available_lags_choices,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment