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.
Merge branch 'dev-uxmt' into dev/wan/interface/t1e1serial
- Loading branch information
Showing
13 changed files
with
246 additions
and
15 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
50 changes: 50 additions & 0 deletions
50
catalystwan/endpoints/configuration/policy/definition/url_filtering.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,50 @@ | ||
# 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 | ||
from catalystwan.endpoints.configuration.policy.abstractions import PolicyDefinitionEndpoints | ||
from catalystwan.models.policy.definition.url_filtering import ( | ||
UrlFilteringPolicy, | ||
UrlFilteringPolicyEditPayload, | ||
UrlFilteringPolicyGetResponse, | ||
) | ||
from catalystwan.models.policy.policy_definition import ( | ||
PolicyDefinitionEditResponse, | ||
PolicyDefinitionId, | ||
PolicyDefinitionInfo, | ||
PolicyDefinitionPreview, | ||
) | ||
from catalystwan.typed_list import DataSequence | ||
|
||
|
||
class ConfigurationPolicyUrlFilteringDefinition(APIEndpoints, PolicyDefinitionEndpoints): | ||
@post("/template/policy/definition/urlfiltering") | ||
def create_policy_definition(self, payload: UrlFilteringPolicy) -> PolicyDefinitionId: | ||
... | ||
|
||
@delete("/template/policy/definition/urlfiltering/{id}") | ||
def delete_policy_definition(self, id: UUID) -> None: | ||
... | ||
|
||
@put("/template/policy/definition/urlfiltering/{id}") | ||
def edit_policy_definition(self, id: UUID, payload: UrlFilteringPolicyEditPayload) -> PolicyDefinitionEditResponse: | ||
... | ||
|
||
@get("/template/policy/definition/urlfiltering", "data") | ||
def get_definitions(self) -> DataSequence[PolicyDefinitionInfo]: | ||
... | ||
|
||
@get("/template/policy/definition/urlfiltering/{id}") | ||
def get_policy_definition(self, id: UUID) -> UrlFilteringPolicyGetResponse: | ||
... | ||
|
||
@post("/template/policy/definition/urlfiltering/preview") | ||
def preview_policy_definition(self, payload: UrlFilteringPolicy) -> PolicyDefinitionPreview: | ||
... | ||
|
||
@get("/template/policy/definition/urlfiltering/preview/{id}") | ||
def preview_policy_definition_by_id(self, id: UUID) -> PolicyDefinitionPreview: | ||
... |
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
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
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
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
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
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
Oops, something went wrong.