From e982247ecd9fc7bfaefaa6bf46b9c6733be439fd Mon Sep 17 00:00:00 2001 From: Szymon Basan <116343782+sbasan@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:22:59 +0200 Subject: [PATCH] fix: both approute/appRoute can be used as assemly item type (#806) --- ENDPOINTS.md | 12 ++++++------ catalystwan/models/policy/centralized.py | 4 +++- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ENDPOINTS.md b/ENDPOINTS.md index c460cb86..d6456b6e 100644 --- a/ENDPOINTS.md +++ b/ENDPOINTS.md @@ -1,6 +1,6 @@ **THIS FILE WAS AUTO-GENERATED DO NOT EDIT** -Generated for: catalystwan-0.35.0.dev0 +Generated for: catalystwan-0.35.0.dev2 All URIs are relative to */dataservice* HTTP request | Supported Versions | Method | Payload Type | Return Type | Tenancy Mode @@ -560,13 +560,13 @@ GET /template/policy/vedge/definition/{id}||[**ConfigurationVEdgeTemplatePolicy. GET /template/policy/assembly/vedge/{id}||[**ConfigurationVEdgeTemplatePolicy.preview_by_id**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vedge_template.py#L50)||[**PolicyPreview**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/policy.py#L99)| POST /template/policy/vsmart/activate/{id}||[**ConfigurationVSmartTemplatePolicy.activate_policy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L33)|None|[**ActivateDeactivateTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L28)| GET /template/policy/vsmart/connectivity/status||[**ConfigurationVSmartTemplatePolicy.check_vsmart_connectivity_status**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L43)||DataSequence[[**VSmartConnectivityStatus**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L15)]| -POST /template/policy/vsmart||[**ConfigurationVSmartTemplatePolicy.create_vsmart_template**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L47)|[**CentralizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L212)|[**PolicyId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/policy.py#L12)| +POST /template/policy/vsmart||[**ConfigurationVSmartTemplatePolicy.create_vsmart_template**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L47)|[**CentralizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L214)|[**PolicyId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/policy.py#L12)| POST /template/policy/vsmart/deactivate/{id}||[**ConfigurationVSmartTemplatePolicy.deactivate_policy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L51)|None|[**ActivateDeactivateTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L28)| DELETE /template/policy/vsmart/{id}||[**ConfigurationVSmartTemplatePolicy.delete_vsmart_template**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L57)||None| -PUT /template/policy/vsmart/central/{id}||[**ConfigurationVSmartTemplatePolicy.edit_template_without_lock_checks**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L61)|[**CentralizedPolicyEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L257)|None| -PUT /template/policy/vsmart/{id}||[**ConfigurationVSmartTemplatePolicy.edit_vsmart_template**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L65)|[**CentralizedPolicyEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L257)|None| -GET /template/policy/vsmart||[**ConfigurationVSmartTemplatePolicy.generate_vsmart_policy_template_list**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L69)||DataSequence[[**CentralizedPolicyInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L261)]| -GET /template/policy/vsmart/definition/{id}||[**ConfigurationVSmartTemplatePolicy.get_template_by_policy_id**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L73)||[**CentralizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L212)| +PUT /template/policy/vsmart/central/{id}||[**ConfigurationVSmartTemplatePolicy.edit_template_without_lock_checks**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L61)|[**CentralizedPolicyEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L259)|None| +PUT /template/policy/vsmart/{id}||[**ConfigurationVSmartTemplatePolicy.edit_vsmart_template**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L65)|[**CentralizedPolicyEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L259)|None| +GET /template/policy/vsmart||[**ConfigurationVSmartTemplatePolicy.generate_vsmart_policy_template_list**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L69)||DataSequence[[**CentralizedPolicyInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L263)]| +GET /template/policy/vsmart/definition/{id}||[**ConfigurationVSmartTemplatePolicy.get_template_by_policy_id**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L73)||[**CentralizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L214)| POST /v1/policy-group|>=20.12|[**PolicyGroupEndpoints.create_policy_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy_group.py#L12)|[**PolicyGroup**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/configuration/policy_group.py#L22)|[**PolicyGroupId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/configuration/policy_group.py#L54)| GET /v1/policy-group|>=20.12|[**PolicyGroupEndpoints.get_all**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy_group.py#L17)||DataSequence[[**PolicyGroupInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/configuration/policy_group.py#L72)]| PUT /v1/policy-group/{group_id}|>=20.12|[**PolicyGroupEndpoints.update**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy_group.py#L22)|[**PolicyGroup**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/configuration/policy_group.py#L22)|None| diff --git a/catalystwan/models/policy/centralized.py b/catalystwan/models/policy/centralized.py index d312ce42..afb5589c 100644 --- a/catalystwan/models/policy/centralized.py +++ b/catalystwan/models/policy/centralized.py @@ -27,6 +27,8 @@ "out", ] +AppRouteItemType = Literal["approute", "appRoute"] + def assert_feature_defintion(definition: Any) -> "CentralizedPolicyDefinition": assert isinstance(definition, CentralizedPolicyDefinition) @@ -169,7 +171,7 @@ class MeshPolicyItem(AssemblyItemBase): class AppRoutePolicyItem(AssemblyItemBase): - type: Literal["approute"] = "approute" + type: AppRouteItemType = "appRoute" class CFlowDPolicyItem(AssemblyItemBase): diff --git a/pyproject.toml b/pyproject.toml index 6dac4a94..91e77db6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "catalystwan" -version = "0.35.0dev1" +version = "0.35.0dev2" description = "Cisco Catalyst WAN SDK for Python" authors = ["kagorski "] readme = "README.md"