Commit 15d05880 authored by George Papathanail's avatar George Papathanail
Browse files

remove patch endpoint

parent bce9c94e
Loading
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ from open_exposure_gateway.api.gsma.federation_manager.v1_2_0.schemas import (
    FederationContextId,
    FederationContextIdResponse,
    FederationDetails,
    FederationPatchRequest,
    FederationRequestData,
    FederationResponseData,
    ProblemDetails,
@@ -80,21 +79,6 @@ async def get_federation_details(federationContextId: FederationContextId) -> An
    raise NotImplementedException(message=_NOT_IMPLEMENTED)


@router.patch(
    "/{federationContextId}/partner",
    tags=["Federation Manager"],
    summary="Update the parameters associated with an existing federation",
    operation_id="update_federation",
    response_model=FederationDetails,
    response_model_exclude_none=True,
    responses=_responses(400, 401, 404, 409, 422, 500, 501, 503, 520),
)
async def update_federation(
    federationContextId: FederationContextId, request: FederationPatchRequest
) -> Any:
    raise NotImplementedException(message=_NOT_IMPLEMENTED)


@router.delete(
    "/{federationContextId}/partner",
    tags=["Federation Manager"],
+2 −31
Original line number Diff line number Diff line
@@ -7,9 +7,8 @@ and LCM) are added as they are implemented.

Schema names follow the OpenAPI ``operationId`` intent rather than the generated
``inline_response_*`` / ``*_body`` names: ``FederationDetails`` is the spec's
``inline_response_200_1``, ``FederationContextIdResponse`` is
``inline_response_200_2`` and ``FederationPatchRequest`` is
``federationContextId_partner_body``.
``inline_response_200_1`` and ``FederationContextIdResponse`` is
``inline_response_200_2``.
"""

from __future__ import annotations
@@ -86,17 +85,6 @@ class PlatformCapability(StrEnum):
    RESOURCE_MONITOR = "resourceMonitor"


class NetworkCodeObjectType(StrEnum):
    MOBILE_NETWORK_CODES = "MOBILE_NETWORK_CODES"
    FIXED_NETWORK_CODES = "FIXED_NETWORK_CODES"


class NetworkCodeOperationType(StrEnum):
    ADD_CODES = "ADD_CODES"
    REMOVE_CODES = "REMOVE_CODES"
    UPDATE_CODES = "UPDATE_CODES"


# --- Object schemas --------------------------------------------------------------


@@ -208,23 +196,6 @@ class FederationContextIdResponse(BaseModel):
    FederationContextId: FederationContextId


class FederationPatchRequest(BaseModel):
    """Body of ``PATCH /{federationContextId}/partner``.

    The spec's ``federationContextId_partner_body``.
    """

    model_config = ConfigDict(extra="forbid")

    objectType: NetworkCodeObjectType
    operationType: NetworkCodeOperationType
    modificationDate: datetime
    addMobileNetworkIds: Optional[MobileNetworkIds] = None
    removeMobileNetworkIds: Optional[MobileNetworkIds] = None
    addFixedNetworkIds: Optional[FixedNetworkIds] = None
    removeFixedNetworkIds: Optional[FixedNetworkIds] = None


# --- AvailabilityZoneInfoSynchronization --------------------------------------
#
# Schemas for ``POST /{federationContextId}/zones`` (``zone_subscribe``): the
+0 −7
Original line number Diff line number Diff line
@@ -26,11 +26,6 @@ _VALID_CREATE = {
    "initialDate": "2026-09-04T12:00:00Z",
    "partnerStatusLink": "https://orig-op.example.com/status",
}
_VALID_PATCH = {
    "objectType": "MOBILE_NETWORK_CODES",
    "operationType": "ADD_CODES",
    "modificationDate": "2026-09-04T12:00:00Z",
}
_VALID_ZONE_SUBSCRIBE = {
    "acceptedAvailabilityZones": ["zone-a"],
    "availZoneNotifLink": "https://orig-op.example.com/zone-notif",
@@ -39,7 +34,6 @@ _VALID_ZONE_SUBSCRIBE = {
_ENDPOINTS = [
    ("post", f"{BASE_PATH}/partner", _VALID_CREATE),
    ("get", f"{BASE_PATH}/{_CTX}/partner", None),
    ("patch", f"{BASE_PATH}/{_CTX}/partner", _VALID_PATCH),
    ("delete", f"{BASE_PATH}/{_CTX}/partner", None),
    ("get", f"{BASE_PATH}/fed-context-id", None),
    ("post", f"{BASE_PATH}/{_CTX}/zones", _VALID_ZONE_SUBSCRIBE),
@@ -48,7 +42,6 @@ _ENDPOINTS = [
_OPERATION_IDS = {
    "create_federation",
    "get_federation_details",
    "update_federation",
    "delete_federation_details",
    "get_federation_context_id",
    "zone_subscribe",