This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
543 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
catalystwan/endpoints/configuration/feature_profile/sdwan/uc_voice.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright 2024 Cisco Systems, Inc. and its affiliates | ||
|
||
# mypy: disable-error-code="empty-body" | ||
from uuid import UUID | ||
|
||
from catalystwan.endpoints import APIEndpoints, delete, get, post, put, versions | ||
from catalystwan.models.configuration.feature_profile.common import ( | ||
FeatureProfileCreationPayload, | ||
FeatureProfileCreationResponse, | ||
FeatureProfileDetail, | ||
FeatureProfileEditPayload, | ||
FeatureProfileInfo, | ||
GetFeatureProfilesParams, | ||
) | ||
from catalystwan.models.configuration.feature_profile.parcel import Parcel, ParcelCreationResponse | ||
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice import AnyUcVoiceParcel | ||
from catalystwan.typed_list import DataSequence | ||
|
||
|
||
class UcVoiceFeatureProfile(APIEndpoints): | ||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@post("/v1/feature-profile/sdwan/uc-voice") | ||
def create_uc_voice_feature_profile(self, payload: FeatureProfileCreationPayload) -> FeatureProfileCreationResponse: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@get("/v1/feature-profile/sdwan/uc-voice") | ||
def get_uc_voice_feature_profiles(self, params: GetFeatureProfilesParams) -> DataSequence[FeatureProfileInfo]: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@get("/v1/feature-profile/sdwan/uc-voice/{profile_id}") | ||
def get_uc_voice_feature_profile(self, profile_id: str, params: GetFeatureProfilesParams) -> FeatureProfileDetail: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@put("/v1/feature-profile/sdwan/uc-voice/{profile_id}") | ||
def edit_uc_voice_feature_profile( | ||
self, profile_id: str, payload: FeatureProfileEditPayload | ||
) -> FeatureProfileCreationResponse: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@delete("/v1/feature-profile/sdwan/uc-voice/{profile_id}") | ||
def delete_uc_voice_feature_profile(self, profile_id: str) -> None: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@post("/v1/feature-profile/sdwan/uc-voice/{profile_id}/{uc_voice_list_type}") | ||
def create(self, profile_id: UUID, uc_voice_list_type: str, payload: AnyUcVoiceParcel) -> ParcelCreationResponse: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@delete("/v1/feature-profile/sdwan/uc-voice/{profile_id}/{uc_voice_list_type}/{parcel_id}") | ||
def delete(self, profile_id: UUID, uc_voice_list_type: str, parcel_id: UUID) -> None: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@put("/v1/feature-profile/sdwan/uc-voice/{profile_id}/{uc_voice_list_type}/{parcel_id}") | ||
def update( | ||
self, | ||
profile_id: UUID, | ||
uc_voice_list_type: str, | ||
parcel_id: UUID, | ||
payload: AnyUcVoiceParcel, | ||
) -> ParcelCreationResponse: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@get("/v1/feature-profile/sdwan/uc-voice/{profile_id}/{uc_voice_list_type}/{parcel_id}") | ||
def get_by_id(self, profile_id: UUID, uc_voice_list_type: str, parcel_id: UUID) -> Parcel[AnyUcVoiceParcel]: | ||
... | ||
|
||
@versions(supported_versions=(">=20.13"), raises=False) | ||
@get("/v1/feature-profile/sdwan/uc-voice/{profile_id}/{uc_voice_list_type}", resp_json_key="data") | ||
def get_all(self, profile_id: UUID, uc_voice_list_type: str) -> DataSequence[Parcel[AnyUcVoiceParcel]]: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
catalystwan/models/configuration/feature_profile/sdwan/uc_voice/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2024 Cisco Systems, Inc. and its affiliates | ||
|
||
from typing import List, Union | ||
|
||
from pydantic import Field | ||
from typing_extensions import Annotated | ||
|
||
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice.media_profile import MediaProfileParcel | ||
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice.trunk_group import TrunkGroupParcel | ||
|
||
from .dsp_farm import DspFarmParcel | ||
|
||
AnyUcVoiceParcel = Annotated[ | ||
Union[ | ||
DspFarmParcel, | ||
MediaProfileParcel, | ||
TrunkGroupParcel, | ||
], | ||
Field(discriminator="type_"), | ||
] | ||
|
||
__all__ = ("AnyUcVoiceParcel", "DspFarmParcel", "MediaProfileParcel", "TrunkGroupParcel") | ||
|
||
|
||
def __dir__() -> "List[str]": | ||
return list(__all__) |
Oops, something went wrong.