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.
Add ux1 endpoints and models. Add converters
- Loading branch information
1 parent
e3c5528
commit 9e3ac83
Showing
11 changed files
with
250 additions
and
26 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
48 changes: 48 additions & 0 deletions
48
catalystwan/endpoints/configuration/policy/list/identity.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,48 @@ | ||
# Copyright 2023 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 PolicyListEndpoints | ||
from catalystwan.models.policy.list.identity import IdentityList, IdentityListEditPayload, IdentityListInfo | ||
from catalystwan.models.policy.policy_list import InfoTag, PolicyListId, PolicyListPreview | ||
from catalystwan.typed_list import DataSequence | ||
|
||
|
||
class ConfigurationPolicyIdentityList(APIEndpoints, PolicyListEndpoints): | ||
@post("/template/policy/list/identity") | ||
def create_policy_list(self, payload: IdentityList) -> PolicyListId: | ||
... | ||
|
||
@delete("/template/policy/list/identity/{id}") | ||
def delete_policy_list(self, id: UUID) -> None: | ||
... | ||
|
||
@delete("/template/policy/list/identity") | ||
def delete_policy_lists_with_info_tag(self, params: InfoTag) -> None: | ||
... | ||
|
||
@put("/template/policy/list/identity/{id}") | ||
def edit_policy_list(self, id: UUID, payload: IdentityListEditPayload) -> None: | ||
... | ||
|
||
@get("/template/policy/list/identity/{id}") | ||
def get_lists_by_id(self, id: UUID) -> IdentityListInfo: | ||
... | ||
|
||
@get("/template/policy/list/identity", "data") | ||
def get_policy_lists(self) -> DataSequence[IdentityListInfo]: | ||
... | ||
|
||
@get("/template/policy/list/identity/filtered", "data") | ||
def get_policy_lists_with_info_tag(self, params: InfoTag) -> DataSequence[IdentityListInfo]: | ||
... | ||
|
||
@post("/template/policy/list/identity/preview") | ||
def preview_policy_list(self, payload: IdentityList) -> PolicyListPreview: | ||
... | ||
|
||
@get("/template/policy/list/identity/preview/{id}") | ||
def preview_policy_list_by_id(self, id: UUID) -> PolicyListPreview: | ||
... |
52 changes: 52 additions & 0 deletions
52
catalystwan/endpoints/configuration/policy/list/scalable_group_tag.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,52 @@ | ||
# Copyright 2023 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 PolicyListEndpoints | ||
from catalystwan.models.policy.list.scalable_group_tag import ( | ||
ScalableGroupTagList, | ||
ScalableGroupTagListEditPayload, | ||
ScalableGroupTagListInfo, | ||
) | ||
from catalystwan.models.policy.policy_list import InfoTag, PolicyListId, PolicyListPreview | ||
from catalystwan.typed_list import DataSequence | ||
|
||
|
||
class ConfigurationPolicyScalableGroupTagList(APIEndpoints, PolicyListEndpoints): | ||
@post("/template/policy/list/scalablegrouptag") | ||
def create_policy_list(self, payload: ScalableGroupTagList) -> PolicyListId: | ||
... | ||
|
||
@delete("/template/policy/list/scalablegrouptag/{id}") | ||
def delete_policy_list(self, id: UUID) -> None: | ||
... | ||
|
||
@delete("/template/policy/list/scalablegrouptag") | ||
def delete_policy_lists_with_info_tag(self, params: InfoTag) -> None: | ||
... | ||
|
||
@put("/template/policy/list/scalablegrouptag/{id}") | ||
def edit_policy_list(self, id: UUID, payload: ScalableGroupTagListEditPayload) -> None: | ||
... | ||
|
||
@get("/template/policy/list/scalablegrouptag/{id}") | ||
def get_lists_by_id(self, id: UUID) -> ScalableGroupTagListInfo: | ||
... | ||
|
||
@get("/template/policy/list/scalablegrouptag", "data") | ||
def get_policy_lists(self) -> DataSequence[ScalableGroupTagListInfo]: | ||
... | ||
|
||
@get("/template/policy/list/scalablegrouptag/filtered", "data") | ||
def get_policy_lists_with_info_tag(self, params: InfoTag) -> DataSequence[ScalableGroupTagListInfo]: | ||
... | ||
|
||
@post("/template/policy/list/scalablegrouptag/preview") | ||
def preview_policy_list(self, payload: ScalableGroupTagList) -> PolicyListPreview: | ||
... | ||
|
||
@get("/template/policy/list/scalablegrouptag/preview/{id}") | ||
def preview_policy_list_by_id(self, id: UUID) -> PolicyListPreview: | ||
... |
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
9 changes: 5 additions & 4 deletions
9
...n/models/configuration/feature_profile/sdwan/policy_object/security/scalable_group_tag.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
Oops, something went wrong.