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' into converter/tgapi
- Loading branch information
Showing
26 changed files
with
532 additions
and
258 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
target-branch: "python-dependencies" | ||
open-pull-requests-limit: 1 | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
python-dev: | ||
applies-to: version-updates | ||
update-types: | ||
- "minor" | ||
- "patch" |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: scorecard | ||
|
||
on: | ||
push: | ||
branches: | ||
# Run on pushes to default branch | ||
- main | ||
schedule: | ||
# Run weekly on Saturdays | ||
- cron: "30 1 * * 6" | ||
# Run when branch protection rules change | ||
branch_protection_rule: | ||
# Run the workflow manually | ||
workflow_dispatch: | ||
|
||
# Declare default permissions as read-only | ||
permissions: read-all | ||
|
||
jobs: | ||
run-scorecard: | ||
# Call reusable workflow file | ||
uses: cisco-ospo/.github/.github/workflows/_scorecard.yml@main | ||
permissions: | ||
id-token: write | ||
security-events: write | ||
secrets: inherit | ||
with: | ||
# Publish results of Scorecard analysis | ||
publish-results: true |
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 |
---|---|---|
|
@@ -3,6 +3,8 @@ name: Run unittests | |
on: | ||
pull_request: | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
unittests: | ||
runs-on: ubuntu-latest | ||
|
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.