diff --git a/ENDPOINTS.md b/ENDPOINTS.md index 12d78f1d..33043774 100644 --- a/ENDPOINTS.md +++ b/ENDPOINTS.md @@ -1,6 +1,6 @@ **THIS FILE WAS AUTO-GENERATED DO NOT EDIT** -Generated for: catalystwan-0.32.0 +Generated for: catalystwan-0.33.0 All URIs are relative to */dataservice* HTTP request | Supported Versions | Method | Payload Type | Return Type | Tenancy Mode @@ -30,12 +30,12 @@ POST /certificate/generate/csr||[**CertificateManagementDevice.generate_csr**](h POST /certificate/save/vedge/list||[**CertificateManagementDevice.change_vedge_list_validity**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L120)|list[[**VedgeListValidityPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L99)]|[**CertActionResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L107)| POST /certificate/vedge/list?action={action}||[**CertificateManagementDevice.send_to_controllers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L124)||[**CertActionResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L107)| POST /certificate/vsmart/list||[**CertificateManagementDevice.send_to_vbond**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L128)||[**CertActionResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_device.py#L107)| -GET /setting/configuration/webserver/certificate||[**CertificateManagementVManage.show_info**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_vmanage.py#L45)||[**WebServerCertificateInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_vmanage.py#L11)| -GET /client/server||[**Client.server**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L67)||[**ServerInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L23)| -GET /client/server/ready||[**Client.server_ready**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L71)||[**ServerReady**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L62)| -GET /client/about||[**Client.about**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L75)||[**AboutInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L51)| -GET /clusterManagement/tenancy/mode||[**ClusterManagement.get_tenancy_mode**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L69)||[**TenancyMode**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L19)| -GET /clusterManagement/vManage/details/{vmanageIP}||[**ClusterManagement.get_vmanage_details**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L77)||DataSequence[[**VManageDetails**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L26)]| +GET /setting/configuration/webserver/certificate||[**CertificateManagementVManage.show_info**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_vmanage.py#L46)||[**WebServerCertificateInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/certificate_management_vmanage.py#L11)| +GET /client/server||[**Client.server**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L86)||[**ServerInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L23)| +GET /client/server/ready||[**Client.server_ready**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L90)||[**ServerReady**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L80)| +GET /client/about||[**Client.about**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L94)||[**AboutInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/client.py#L64)| +GET /clusterManagement/tenancy/mode||[**ClusterManagement.get_tenancy_mode**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L64)||[**TenancyMode**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L14)| +GET /clusterManagement/vManage/details/{vmanageIP}||[**ClusterManagement.get_vmanage_details**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L72)||DataSequence[[**VManageDetails**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/cluster_management.py#L21)]| POST /system/device/{device_uuid}/unlock|>=20.9|[**ConfigurationDeviceInventory.unlock**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L275)|[**DeviceUnlockPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L20)|[**DeviceUnlockResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L25)| POST /system/device||[**ConfigurationDeviceInventory.create_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L280)|[**DeviceCreationPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L32)|None| DELETE /system/device/{uuid}||[**ConfigurationDeviceInventory.delete_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L284)||[**DeviceDeletionResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_inventory.py#L44)| @@ -449,15 +449,15 @@ GET /template/policy/vedge/devices/{id}||[**ConfigurationVEdgeTemplatePolicy.get GET /template/policy/vedge/devices||[**ConfigurationVEdgeTemplatePolicy.get_vedge_policy_device_list**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vedge_template.py#L42)||DataSequence[[**LocalizedPolicyDeviceInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/localized.py#L131)]| GET /template/policy/vedge/definition/{id}||[**ConfigurationVEdgeTemplatePolicy.get_vedge_template**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vedge_template.py#L46)||[**LocalizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/localized.py#L75)| 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#L94)| -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#L32)|None|[**ActivateDeactivateTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L27)| -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#L42)||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#L46)|[**CentralizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L183)|[**PolicyId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/policy.py#L10)| -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#L50)|None|[**ActivateDeactivateTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/policy/vsmart_template.py#L27)| -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#L56)||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#L60)|[**CentralizedPolicyEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L220)|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#L64)|[**CentralizedPolicyEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L220)|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#L68)||DataSequence[[**CentralizedPolicyInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L224)]| -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#L72)||[**CentralizedPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/centralized.py#L183)| +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#L183)|[**PolicyId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/policy/policy.py#L10)| +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#L220)|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#L220)|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#L224)]| +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#L183)| GET /device/action/remote-server||[**ConfigurationSoftwareActions.get_list_of_remote_servers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L165)||DataSequence[[**RemoteServerInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L70)]| POST /device/action/remote-server||[**ConfigurationSoftwareActions.add_new_remote_server**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L169)|[**RemoteServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L45)|None| GET /device/action/remote-server/{id}||[**ConfigurationSoftwareActions.get_remote_server**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L173)||[**RemoteServerInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L70)| @@ -467,15 +467,15 @@ GET /device/action/software||[**ConfigurationSoftwareActions.get_software_images POST /device/action/software||[**ConfigurationSoftwareActions.upload_software_from_remote_server**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L189)|[**SoftwareRemoteServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L100)|None| DELETE /device/action/software/{version_id}||[**ConfigurationSoftwareActions.delete_software_from_software_repository**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L193)||None| GET /device/action/software/images||[**ConfigurationSoftwareActions.get_list_of_all_images**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L197)||DataSequence[[**SoftwareImageDetails**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration/software_actions.py#L111)]| -GET /device/action/status/{task_id}||[**ConfigurationDashboardStatus.find_status**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L91)||[**TaskData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L78)| -GET /device/action/status/tasks||[**ConfigurationDashboardStatus.find_running_tasks**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L95)||[**TasksData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L86)| +GET /device/action/status/{task_id}||[**ConfigurationDashboardStatus.find_status**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L121)||[**TaskData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L100)| +GET /device/action/status/tasks||[**ConfigurationDashboardStatus.find_running_tasks**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L125)||[**TasksData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_dashboard_status.py#L113)| GET /device/action/install/devices/{device_type}||[**ConfigurationDeviceActions.get_list_of_installed_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L182)||DataSequence[[**InstalledDeviceData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L118)]| GET /device/action/ztp/upgrade/setting||[**ConfigurationDeviceActions.get_ztp_upgrade_config_setting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L216)||DataSequence[[**ZTPUpgradeSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L33)]| POST /device/action/changepartition||[**ConfigurationDeviceActions.process_mark_change_partition**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L232)|[**PartitionActionPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L61)|[**ActionId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L25)| POST /device/action/defaultpartition||[**ConfigurationDeviceActions.process_mark_default_partition**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L240)|[**PartitionActionPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L61)|[**ActionId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L25)| POST /device/action/install||[**ConfigurationDeviceActions.process_install_operation**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L248)|[**InstallActionPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L109)|[**ActionId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L25)| POST /device/action/removepartition||[**ConfigurationDeviceActions.process_remove_partition**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L280)|[**RemovePartitionActionPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L69)|[**ActionId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_actions.py#L25)| -POST /template/device/config/config/||[**ConfigurationDeviceTemplate.get_device_configuration_preview**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_template.py#L21)|[**FeatureToCLIPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_template.py#L12)|str|PROVIDER +POST /template/device/config/config/||[**ConfigurationDeviceTemplate.get_device_configuration_preview**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_template.py#L22)|[**FeatureToCLIPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_device_template.py#L12)|str|PROVIDER GET /v1/feature-profile/sdwan/system/aaa/schema|>=20.9|[**ConfigurationFeatureProfile.get_sdwan_system_aaa_parcel_schema**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L41)||None| GET /v1/feature-profile/sdwan/transport/cellular-controller/schema|>=20.9|[**ConfigurationFeatureProfile.get_sdwan_transport_cellular_controller_parcel_schema**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L46)||None| GET /v1/feature-profile/sdwan/transport|>=20.9|[**ConfigurationFeatureProfile.get_sdwan_transport_feature_profiles**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L51)|Optional[[**GetFeatureProfilesPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L35)]|DataSequence[[**FeatureProfileInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/configuration/feature_profile/common.py#L79)]| @@ -493,110 +493,110 @@ DELETE /v1/feature-profile/sd-routing/cli/{cli_fp_id}|>=20.13|[**SDRoutingConfig DELETE /v1/feature-profile/sd-routing/cli/{cli_fp_id}/full-config/{parcel_id}|>=20.13|[**SDRoutingConfigurationFeatureProfile.delete_cli_full_config_parcel**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L123)||None| PUT /v1/feature-profile/sd-routing/cli/{cli_fp_id}/full-config/{parcel_id}|>=20.13|[**SDRoutingConfigurationFeatureProfile.edit_cli_full_config_parcel**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L128)|[**FullConfigParcel**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/feature_profile_parcel.py#L12)|None| GET /v1/feature-profile/sd-routing/cli|>=20.13|[**SDRoutingConfigurationFeatureProfile.get_cli_feature_profiles**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L133)|Optional[[**GetFeatureProfilesPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_feature_profile.py#L35)]|DataSequence[[**FeatureProfileInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/configuration/feature_profile/common.py#L79)]| -PUT /v1/config-group/{config_group_id}/device/associate|>=20.9|[**ConfigurationGroup.associate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L122)|[**ConfigGroupAssociatePayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L61)|None| -POST /v1/config-group|>=20.9|[**ConfigurationGroup.create_config_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L127)|[**ConfigGroupCreationPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L20)|[**ConfigGroupCreationResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L108)| -POST /v1/config-group/{config_group_id}/device/variables|>=20.9|[**ConfigurationGroup.create_variables**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L132)|[**ConfigGroupVariablesCreatePayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L65)|[**ConfigGroupVariablesCreateResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L85)| -DELETE /v1/config-group/{config_group_id}|>=20.9|[**ConfigurationGroup.delete_config_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L139)||None| -POST /v1/config-group/{config_group_id}/device/deploy|>=20.9|[**ConfigurationGroup.deploy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L144)|[**ConfigGroupDeployPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L96)|[**ConfigGroupDeployResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L100)| -DELETE /v1/config-group/{config_group_id}/device/associate|>=20.9|[**ConfigurationGroup.disassociate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L149)|[**ConfigGroupAssociatePayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L61)|[**ConfigGroupDisassociateResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L104)| -PUT /v1/config-group/{config_group_id}|>=20.9|[**ConfigurationGroup.edit_config_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L156)|[**ConfigGroupEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L50)|[**ConfigGroupEditResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L116)| -GET /v1/config-group|>=20.9|[**ConfigurationGroup.get**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L161)||DataSequence[[**ConfigGroup**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L39)]| -PUT /v1/config-group/{config_group_id}/device/variables|>=20.9|[**ConfigurationGroup.update_variables**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L166)|[**ConfigGroupVariablesEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L91)|None| -GET /settings/configuration/{setting_type}||[**ConfigurationSettings.get_configuration_by_setting_type**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L357)||None| -GET /settings/configuration/organization||[**ConfigurationSettings.get_organizations**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L361)||DataSequence[[**Organization**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L44)]| -GET /settings/configuration/device||[**ConfigurationSettings.get_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L365)||DataSequence[[**Device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L53)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/emailNotificationSettings||[**ConfigurationSettings.get_email_notification_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L370)||DataSequence[[**EmailNotificationSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L61)]| -GET /settings/configuration/hardwarerootca||[**ConfigurationSettings.get_hardware_root_cas**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L374)||DataSequence[[**HardwareRootCA**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L65)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/certificate||[**ConfigurationSettings.get_certificates**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L379)||DataSequence[[**Certificate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L73)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/vedgecloud||[**ConfigurationSettings.get_vedge_cloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L384)||DataSequence[[**VEdgeCloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L85)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/crlSetting||[**ConfigurationSettings.get_clr_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L389)||DataSequence[[**CRLSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L316)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/banner||[**ConfigurationSettings.get_banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L394)||DataSequence[[**Banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L89)]| -GET /settings/configuration/proxyHttpServer||[**ConfigurationSettings.get_proxy_http_servers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L398)||DataSequence[[**ProxyHTTPServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L97)]| -GET /settings/configuration/reverseproxy||[**ConfigurationSettings.get_reverse_proxies**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L402)||DataSequence[[**ReverseProxy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L106)]| -GET /settings/configuration/cloudx||[**ConfigurationSettings.get_cloudx**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L406)||DataSequence[[**CloudX**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L110)]| -GET /settings/configuration/manageEncryptedPassword||[**ConfigurationSettings.get_manage_encrypted_password**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L410)||DataSequence[[**ManageEncryptedPassword**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L114)]| -GET /settings/configuration/cloudservices||[**ConfigurationSettings.get_cloudservices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L414)||DataSequence[[**CloudServices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L121)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/clientSessionTimeout||[**ConfigurationSettings.get_client_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L419)||DataSequence[[**ClientSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L134)]| -GET /settings/configuration/sessionLifeTime||[**ConfigurationSettings.get_session_life_time**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L423)||DataSequence[[**SessionLifeTime**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L142)]| -GET /settings/configuration/serverSessionTimeout||[**ConfigurationSettings.get_server_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L427)||DataSequence[[**ServerSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L149)]| -GET /settings/configuration/maxSessionsPerUser||[**ConfigurationSettings.get_max_sessions_per_user**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L431)||DataSequence[[**MaxSessionsPerUser**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L156)]| -GET /settings/configuration/passwordPolicy||[**ConfigurationSettings.get_password_policy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L435)||DataSequence[[**PasswordPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L163)]| -GET /settings/configuration/vmanagedatastream||[**ConfigurationSettings.get_vmanage_data_stream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L439)||DataSequence[[**VManageDataStream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L173)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/dataCollectionOnNotification||[**ConfigurationSettings.get_data_collection_on_notification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L444)||DataSequence[[**DataCollectionOnNotification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L183)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/sdWanTelemetry||[**ConfigurationSettings.get_sdwan_telemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L449)||DataSequence[[**SDWANTelemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L187)]|PROVIDER, SINGLE_TENANT -GET /management/statsconfig||[**ConfigurationSettings.get_stats_config**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L454)||DataSequence[[**StatsOperation**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L191)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/spMetadata||[**ConfigurationSettings.get_sp_metadata**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L459)||str| -GET /management/elasticsearch/index/size||[**ConfigurationSettings.get_elasticsearch_db_size**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L463)||DataSequence[[**ElasticSearchDBSize**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L211)]| -GET /settings/configuration/googleMapKey||[**ConfigurationSettings.get_google_map_key**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L467)||DataSequence[[**GoogleMapKey**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L219)]| -GET /settings/configuration/maintenanceWindow||[**ConfigurationSettings.get_maintenance_window**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L471)||DataSequence[[**MaintenanceWindow**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L201)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/softwareMaintenance||[**ConfigurationSettings.get_software_install_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L476)||DataSequence[[**SoftwareInstallTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L223)]| -GET /settings/configuration/credentials||[**ConfigurationSettings.get_ips_signature_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L480)||DataSequence[[**IPSSignatureSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L253)]| -GET /settings/configuration/smartaccountcredentials||[**ConfigurationSettings.get_smart_account_credentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L484)||DataSequence[[**SmartAccountCredentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L264)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/pnpConnectSync||[**ConfigurationSettings.get_pnp_connect_sync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L489)||DataSequence[[**PnPConnectSync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L269)]|PROVIDER, SINGLE_TENANT -GET /settings/configuration/claimDevice||[**ConfigurationSettings.get_claim_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L494)||DataSequence[[**ClaimDevice**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L273)]| -GET /settings/configuration/walkme||[**ConfigurationSettings.get_walkme**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L498)||DataSequence[[**WalkMe**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L277)]| -GET /settings/configuration/smartLicensing||[**ConfigurationSettings.get_smart_licensing_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L502)||DataSequence[[**SmartLicensingSetting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L285)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/{setting_type}||[**ConfigurationSettings.edit_configuration_by_setting_type**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L515)|None|None| -PUT /settings/configuration/organization||[**ConfigurationSettings.edit_organizations**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L519)|[**Organization**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L44)|DataSequence[[**Organization**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L44)]| -PUT /settings/configuration/device||[**ConfigurationSettings.edit_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L523)|[**Device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L53)|DataSequence[[**Device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L53)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/emailNotificationSettings||[**ConfigurationSettings.edit_email_notification_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L528)|[**EmailNotificationSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L61)|DataSequence[[**EmailNotificationSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L61)]| -PUT /settings/configuration/hardwarerootca||[**ConfigurationSettings.edit_hardware_root_cas**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L534)|[**HardwareRootCA**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L65)|DataSequence[[**HardwareRootCA**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L65)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/certificate||[**ConfigurationSettings.edit_certificates**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L539)|[**Certificate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L73)|DataSequence[[**Certificate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L73)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/vedgecloud||[**ConfigurationSettings.edit_vedge_cloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L544)|[**VEdgeCloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L85)|DataSequence[[**VEdgeCloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L85)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/banner||[**ConfigurationSettings.edit_banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L549)|[**Banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L89)|DataSequence[[**Banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L89)]| -PUT /settings/configuration/proxyHttpServer||[**ConfigurationSettings.edit_proxy_http_servers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L553)|[**ProxyHTTPServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L97)|DataSequence[[**ProxyHTTPServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L97)]| -PUT /settings/configuration/reverseproxy||[**ConfigurationSettings.edit_reverse_proxies**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L557)|[**ReverseProxy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L106)|DataSequence[[**ReverseProxy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L106)]| -PUT /settings/configuration/cloudx||[**ConfigurationSettings.edit_cloudx**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L561)|[**CloudX**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L110)|DataSequence[[**CloudX**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L110)]| -PUT /settings/configuration/manageEncryptedPassword||[**ConfigurationSettings.edit_manage_encrypted_password**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L565)|[**ManageEncryptedPassword**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L114)|DataSequence[[**ManageEncryptedPassword**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L114)]| -PUT /settings/configuration/cloudservices||[**ConfigurationSettings.edit_cloudservices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L569)|[**CloudServices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L121)|DataSequence[[**CloudServices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L121)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/clientSessionTimeout||[**ConfigurationSettings.edit_client_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L574)|[**ClientSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L134)|DataSequence[[**ClientSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L134)]| -PUT /settings/configuration/sessionLifeTime||[**ConfigurationSettings.edit_session_life_time**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L578)|[**SessionLifeTime**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L142)|DataSequence[[**SessionLifeTime**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L142)]| -PUT /settings/configuration/serverSessionTimeout||[**ConfigurationSettings.edit_server_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L582)|[**ServerSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L149)|DataSequence[[**ServerSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L149)]| -PUT /settings/configuration/maxSessionsPerUser||[**ConfigurationSettings.edit_max_sessions_per_user**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L586)|[**MaxSessionsPerUser**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L156)|DataSequence[[**MaxSessionsPerUser**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L156)]| -PUT /settings/configuration/passwordPolicy||[**ConfigurationSettings.edit_password_policy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L590)|[**PasswordPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L163)|DataSequence[[**PasswordPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L163)]| -PUT /settings/configuration/vmanagedatastream||[**ConfigurationSettings.edit_vmanage_data_stream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L594)|[**VManageDataStream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L173)|DataSequence[[**VManageDataStream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L173)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/dataCollectionOnNotification||[**ConfigurationSettings.edit_data_collection_on_notification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L599)|[**DataCollectionOnNotification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L183)|DataSequence[[**DataCollectionOnNotification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L183)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/sdWanTelemetry||[**ConfigurationSettings.edit_sdwan_telemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L606)|[**SDWANTelemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L187)|DataSequence[[**SDWANTelemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L187)]|PROVIDER, SINGLE_TENANT -POST /management/statsconfig||[**ConfigurationSettings.edit_stats_config**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L611)|[**StatsConfig**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L308)|DataSequence[[**StatsOperation**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L191)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/spMetadata||[**ConfigurationSettings.edit_sp_metadata**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L616)|str|str| -PUT /management/elasticsearch/index/size||[**ConfigurationSettings.edit_elasticsearch_db_size**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L620)|[**ElasticSearchDBSize**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L211)|DataSequence[[**ElasticSearchDBSize**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L211)]| -PUT /settings/configuration/googleMapKey||[**ConfigurationSettings.edit_google_map_key**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L624)|[**GoogleMapKey**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L219)|DataSequence[[**GoogleMapKey**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L219)]| -PUT /settings/configuration/maintenanceWindow||[**ConfigurationSettings.edit_maintenance_window**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L628)|[**MaintenanceWindow**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L201)|DataSequence[[**MaintenanceWindow**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L201)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/softwareMaintenance||[**ConfigurationSettings.edit_software_install_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L633)|[**SoftwareInstallTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L223)|DataSequence[[**SoftwareInstallTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L223)]| -PUT /settings/configuration/credentials||[**ConfigurationSettings.edit_ips_signature_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L637)|[**IPSSignatureSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L253)|DataSequence[[**IPSSignatureSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L253)]| -PUT /settings/configuration/smartaccountcredentials||[**ConfigurationSettings.edit_smart_account_credentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L641)|[**SmartAccountCredentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L264)|DataSequence[[**SmartAccountCredentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L264)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/pnpConnectSync||[**ConfigurationSettings.edit_pnp_connect_sync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L646)|[**PnPConnectSync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L269)|DataSequence[[**PnPConnectSync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L269)]|PROVIDER, SINGLE_TENANT -PUT /settings/configuration/claimDevice||[**ConfigurationSettings.edit_claim_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L651)|[**ClaimDevice**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L273)|DataSequence[[**ClaimDevice**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L273)]| -PUT /settings/configuration/walkme||[**ConfigurationSettings.edit_walkme**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L655)|[**WalkMe**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L277)|DataSequence[[**WalkMe**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L277)]| -PUT /settings/configuration/smartLicensing||[**ConfigurationSettings.edit_smart_licensing_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L659)|[**SmartLicensingSetting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L285)|DataSequence[[**SmartLicensingSetting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L285)]|PROVIDER, SINGLE_TENANT +PUT /v1/config-group/{config_group_id}/device/associate|>=20.9|[**ConfigurationGroup.associate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L127)|[**ConfigGroupAssociatePayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L62)|None| +POST /v1/config-group|>=20.9|[**ConfigurationGroup.create_config_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L132)|[**ConfigGroupCreationPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L20)|[**ConfigGroupCreationResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L113)| +POST /v1/config-group/{config_group_id}/device/variables|>=20.9|[**ConfigurationGroup.create_variables**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L137)|[**ConfigGroupVariablesCreatePayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L66)|[**ConfigGroupVariablesCreateResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L90)| +DELETE /v1/config-group/{config_group_id}|>=20.9|[**ConfigurationGroup.delete_config_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L144)||None| +POST /v1/config-group/{config_group_id}/device/deploy|>=20.9|[**ConfigurationGroup.deploy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L149)|[**ConfigGroupDeployPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L101)|[**ConfigGroupDeployResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L105)| +DELETE /v1/config-group/{config_group_id}/device/associate|>=20.9|[**ConfigurationGroup.disassociate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L154)|[**ConfigGroupAssociatePayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L62)|[**ConfigGroupDisassociateResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L109)| +PUT /v1/config-group/{config_group_id}|>=20.9|[**ConfigurationGroup.edit_config_group**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L161)|[**ConfigGroupEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L51)|[**ConfigGroupEditResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L121)| +GET /v1/config-group|>=20.9|[**ConfigurationGroup.get**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L166)||DataSequence[[**ConfigGroup**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L40)]| +PUT /v1/config-group/{config_group_id}/device/variables|>=20.9|[**ConfigurationGroup.update_variables**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L171)|[**ConfigGroupVariablesEditPayload**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_group.py#L96)|None| +GET /settings/configuration/{setting_type}||[**ConfigurationSettings.get_configuration_by_setting_type**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L355)||None| +GET /settings/configuration/organization||[**ConfigurationSettings.get_organizations**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L359)||DataSequence[[**Organization**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L20)]| +GET /settings/configuration/device||[**ConfigurationSettings.get_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L363)||DataSequence[[**Device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L29)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/emailNotificationSettings||[**ConfigurationSettings.get_email_notification_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L368)||DataSequence[[**EmailNotificationSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L35)]| +GET /settings/configuration/hardwarerootca||[**ConfigurationSettings.get_hardware_root_cas**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L372)||DataSequence[[**HardwareRootCA**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L39)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/certificate||[**ConfigurationSettings.get_certificates**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L377)||DataSequence[[**Certificate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L49)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/vedgecloud||[**ConfigurationSettings.get_vedge_cloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L382)||DataSequence[[**VEdgeCloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L59)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/crlSetting||[**ConfigurationSettings.get_clr_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L387)||DataSequence[[**CRLSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L316)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/banner||[**ConfigurationSettings.get_banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L392)||DataSequence[[**Banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L63)]| +GET /settings/configuration/proxyHttpServer||[**ConfigurationSettings.get_proxy_http_servers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L396)||DataSequence[[**ProxyHTTPServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L69)]| +GET /settings/configuration/reverseproxy||[**ConfigurationSettings.get_reverse_proxies**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L400)||DataSequence[[**ReverseProxy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L76)]| +GET /settings/configuration/cloudx||[**ConfigurationSettings.get_cloudx**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L404)||DataSequence[[**CloudX**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L80)]| +GET /settings/configuration/manageEncryptedPassword||[**ConfigurationSettings.get_manage_encrypted_password**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L408)||DataSequence[[**ManageEncryptedPassword**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L84)]| +GET /settings/configuration/cloudservices||[**ConfigurationSettings.get_cloudservices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L412)||DataSequence[[**CloudServices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L91)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/clientSessionTimeout||[**ConfigurationSettings.get_client_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L417)||DataSequence[[**ClientSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L112)]| +GET /settings/configuration/sessionLifeTime||[**ConfigurationSettings.get_session_life_time**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L421)||DataSequence[[**SessionLifeTime**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L118)]| +GET /settings/configuration/serverSessionTimeout||[**ConfigurationSettings.get_server_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L425)||DataSequence[[**ServerSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L129)]| +GET /settings/configuration/maxSessionsPerUser||[**ConfigurationSettings.get_max_sessions_per_user**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L429)||DataSequence[[**MaxSessionsPerUser**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L140)]| +GET /settings/configuration/passwordPolicy||[**ConfigurationSettings.get_password_policy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L433)||DataSequence[[**PasswordPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L147)]| +GET /settings/configuration/vmanagedatastream||[**ConfigurationSettings.get_vmanage_data_stream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L437)||DataSequence[[**VManageDataStream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L162)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/dataCollectionOnNotification||[**ConfigurationSettings.get_data_collection_on_notification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L442)||DataSequence[[**DataCollectionOnNotification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L172)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/sdWanTelemetry||[**ConfigurationSettings.get_sdwan_telemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L447)||DataSequence[[**SDWANTelemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L176)]|PROVIDER, SINGLE_TENANT +GET /management/statsconfig||[**ConfigurationSettings.get_stats_config**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L452)||DataSequence[[**StatsOperation**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L180)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/spMetadata||[**ConfigurationSettings.get_sp_metadata**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L457)||str| +GET /management/elasticsearch/index/size||[**ConfigurationSettings.get_elasticsearch_db_size**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L461)||DataSequence[[**ElasticSearchDBSize**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L210)]| +GET /settings/configuration/googleMapKey||[**ConfigurationSettings.get_google_map_key**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L465)||DataSequence[[**GoogleMapKey**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L216)]| +GET /settings/configuration/maintenanceWindow||[**ConfigurationSettings.get_maintenance_window**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L469)||DataSequence[[**MaintenanceWindow**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L198)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/softwareMaintenance||[**ConfigurationSettings.get_software_install_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L474)||DataSequence[[**SoftwareInstallTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L220)]| +GET /settings/configuration/credentials||[**ConfigurationSettings.get_ips_signature_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L478)||DataSequence[[**IPSSignatureSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L248)]| +GET /settings/configuration/smartaccountcredentials||[**ConfigurationSettings.get_smart_account_credentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L482)||DataSequence[[**SmartAccountCredentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L262)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/pnpConnectSync||[**ConfigurationSettings.get_pnp_connect_sync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L487)||DataSequence[[**PnPConnectSync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L267)]|PROVIDER, SINGLE_TENANT +GET /settings/configuration/claimDevice||[**ConfigurationSettings.get_claim_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L492)||DataSequence[[**ClaimDevice**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L271)]| +GET /settings/configuration/walkme||[**ConfigurationSettings.get_walkme**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L496)||DataSequence[[**WalkMe**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L275)]| +GET /settings/configuration/smartLicensing||[**ConfigurationSettings.get_smart_licensing_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L500)||DataSequence[[**SmartLicensingSetting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L281)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/{setting_type}||[**ConfigurationSettings.edit_configuration_by_setting_type**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L513)|None|None| +PUT /settings/configuration/organization||[**ConfigurationSettings.edit_organizations**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L517)|[**Organization**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L20)|DataSequence[[**Organization**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L20)]| +PUT /settings/configuration/device||[**ConfigurationSettings.edit_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L521)|[**Device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L29)|DataSequence[[**Device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L29)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/emailNotificationSettings||[**ConfigurationSettings.edit_email_notification_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L526)|[**EmailNotificationSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L35)|DataSequence[[**EmailNotificationSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L35)]| +PUT /settings/configuration/hardwarerootca||[**ConfigurationSettings.edit_hardware_root_cas**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L532)|[**HardwareRootCA**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L39)|DataSequence[[**HardwareRootCA**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L39)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/certificate||[**ConfigurationSettings.edit_certificates**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L537)|[**Certificate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L49)|DataSequence[[**Certificate**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L49)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/vedgecloud||[**ConfigurationSettings.edit_vedge_cloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L542)|[**VEdgeCloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L59)|DataSequence[[**VEdgeCloud**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L59)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/banner||[**ConfigurationSettings.edit_banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L547)|[**Banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L63)|DataSequence[[**Banner**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L63)]| +PUT /settings/configuration/proxyHttpServer||[**ConfigurationSettings.edit_proxy_http_servers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L551)|[**ProxyHTTPServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L69)|DataSequence[[**ProxyHTTPServer**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L69)]| +PUT /settings/configuration/reverseproxy||[**ConfigurationSettings.edit_reverse_proxies**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L555)|[**ReverseProxy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L76)|DataSequence[[**ReverseProxy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L76)]| +PUT /settings/configuration/cloudx||[**ConfigurationSettings.edit_cloudx**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L559)|[**CloudX**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L80)|DataSequence[[**CloudX**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L80)]| +PUT /settings/configuration/manageEncryptedPassword||[**ConfigurationSettings.edit_manage_encrypted_password**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L563)|[**ManageEncryptedPassword**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L84)|DataSequence[[**ManageEncryptedPassword**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L84)]| +PUT /settings/configuration/cloudservices||[**ConfigurationSettings.edit_cloudservices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L567)|[**CloudServices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L91)|DataSequence[[**CloudServices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L91)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/clientSessionTimeout||[**ConfigurationSettings.edit_client_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L572)|[**ClientSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L112)|DataSequence[[**ClientSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L112)]| +PUT /settings/configuration/sessionLifeTime||[**ConfigurationSettings.edit_session_life_time**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L576)|[**SessionLifeTime**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L118)|DataSequence[[**SessionLifeTime**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L118)]| +PUT /settings/configuration/serverSessionTimeout||[**ConfigurationSettings.edit_server_session_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L580)|[**ServerSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L129)|DataSequence[[**ServerSessionTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L129)]| +PUT /settings/configuration/maxSessionsPerUser||[**ConfigurationSettings.edit_max_sessions_per_user**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L584)|[**MaxSessionsPerUser**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L140)|DataSequence[[**MaxSessionsPerUser**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L140)]| +PUT /settings/configuration/passwordPolicy||[**ConfigurationSettings.edit_password_policy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L588)|[**PasswordPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L147)|DataSequence[[**PasswordPolicy**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L147)]| +PUT /settings/configuration/vmanagedatastream||[**ConfigurationSettings.edit_vmanage_data_stream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L592)|[**VManageDataStream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L162)|DataSequence[[**VManageDataStream**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L162)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/dataCollectionOnNotification||[**ConfigurationSettings.edit_data_collection_on_notification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L597)|[**DataCollectionOnNotification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L172)|DataSequence[[**DataCollectionOnNotification**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L172)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/sdWanTelemetry||[**ConfigurationSettings.edit_sdwan_telemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L604)|[**SDWANTelemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L176)|DataSequence[[**SDWANTelemetry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L176)]|PROVIDER, SINGLE_TENANT +POST /management/statsconfig||[**ConfigurationSettings.edit_stats_config**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L609)|[**StatsConfig**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L308)|DataSequence[[**StatsOperation**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L180)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/spMetadata||[**ConfigurationSettings.edit_sp_metadata**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L614)|str|str| +PUT /management/elasticsearch/index/size||[**ConfigurationSettings.edit_elasticsearch_db_size**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L618)|[**ElasticSearchDBSize**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L210)|DataSequence[[**ElasticSearchDBSize**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L210)]| +PUT /settings/configuration/googleMapKey||[**ConfigurationSettings.edit_google_map_key**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L622)|[**GoogleMapKey**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L216)|DataSequence[[**GoogleMapKey**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L216)]| +PUT /settings/configuration/maintenanceWindow||[**ConfigurationSettings.edit_maintenance_window**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L626)|[**MaintenanceWindow**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L198)|DataSequence[[**MaintenanceWindow**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L198)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/softwareMaintenance||[**ConfigurationSettings.edit_software_install_timeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L631)|[**SoftwareInstallTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L220)|DataSequence[[**SoftwareInstallTimeout**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L220)]| +PUT /settings/configuration/credentials||[**ConfigurationSettings.edit_ips_signature_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L635)|[**IPSSignatureSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L248)|DataSequence[[**IPSSignatureSettings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L248)]| +PUT /settings/configuration/smartaccountcredentials||[**ConfigurationSettings.edit_smart_account_credentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L639)|[**SmartAccountCredentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L262)|DataSequence[[**SmartAccountCredentials**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L262)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/pnpConnectSync||[**ConfigurationSettings.edit_pnp_connect_sync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L644)|[**PnPConnectSync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L267)|DataSequence[[**PnPConnectSync**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L267)]|PROVIDER, SINGLE_TENANT +PUT /settings/configuration/claimDevice||[**ConfigurationSettings.edit_claim_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L649)|[**ClaimDevice**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L271)|DataSequence[[**ClaimDevice**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L271)]| +PUT /settings/configuration/walkme||[**ConfigurationSettings.edit_walkme**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L653)|[**WalkMe**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L275)|DataSequence[[**WalkMe**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L275)]| +PUT /settings/configuration/smartLicensing||[**ConfigurationSettings.edit_smart_licensing_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L657)|[**SmartLicensingSetting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L281)|DataSequence[[**SmartLicensingSetting**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/configuration_settings.py#L281)]|PROVIDER, SINGLE_TENANT GET /app/json/application_protocol.json||[**MiscellaneousEndpoints.get_application_protocols**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/misc.py#L14)||DataSequence[[**ApplicationProtocolMap**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/misc/application_protocols.py#L28)]| -GET /device/tier||[**MonitoringDeviceDetails.get_tiers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L159)||DataSequence[[**Tier**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L17)]| -GET /device||[**MonitoringDeviceDetails.list_all_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L183)||DataSequence[[**DeviceData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L37)]| +GET /device/tier||[**MonitoringDeviceDetails.get_tiers**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L185)||DataSequence[[**Tier**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L17)]| +GET /device||[**MonitoringDeviceDetails.list_all_devices**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L209)||DataSequence[[**DeviceData**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_device_details.py#L46)]| GET /statistics/settings/disable/devicelist/{indexName}||[**MonitoringStatus.get_disabled_device_list**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L58)||[**DisabledDeviceListResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L45)| PUT /statistics/settings/disable/devicelist/{indexName}||[**MonitoringStatus.update_statistics_device_list**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L62)|[**DisabledDeviceList**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L41)|[**UpdateIndexResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L49)| GET /statistics/settings/status||[**MonitoringStatus.get_statistics_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L66)||DataSequence[[**Status**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L23)]| PUT /statistics/settings/status||[**MonitoringStatus.update_statistics_settings**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L70)|list[[**UpdateStatus**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L29)]|DataSequence[[**Status**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L23)]| GET /statistics/settings/status/device||[**MonitoringStatus.get_enabled_index_for_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L74)||[**EnabledIndexDeviceListResponse**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/monitoring_status.py#L53)| GET /device/reboothistory||[**RealTimeMonitoringRebootHistory.create_reboot_history_list**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/real_time_monitoring/reboot_history.py#L25)||DataSequence[[**RebootEntry**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/real_time_monitoring/reboot_history.py#L13)]| -GET /sdavc/cloudconnector||[**SDAVCCloudConnector.get_cloud_connector**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/sdavc_cloud_connector.py#L30)||[**CloudConnector**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/sdavc_cloud_connector.py#L12)| +GET /sdavc/cloudconnector||[**SDAVCCloudConnector.get_cloud_connector**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/sdavc_cloud_connector.py#L37)||[**CloudConnector**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/sdavc_cloud_connector.py#L12)| GET /tenantbackup/list||[**TenantBackupRestore.list_tenant_backup**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_backup_restore.py#L37)||[**BackupFiles**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_backup_restore.py#L12)|PROVIDER_AS_TENANT, TENANT -POST /tenant||[**TenantManagement.create_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L120)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)|PROVIDER -POST /tenant/async||[**TenantManagement.create_tenant_async**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L125)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)|[**TenantTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L23)|PROVIDER -POST /tenant/bulk/async|>=20.4|[**TenantManagement.create_tenant_async_bulk**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L130)|list[[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)]|[**TenantTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L23)|PROVIDER -DELETE /tenant/{tenant_id}/delete||[**TenantManagement.delete_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L136)|[**TenantDeleteRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L14)|None|PROVIDER -DELETE /tenant/bulk/async|>=20.4|[**TenantManagement.delete_tenant_async_bulk**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L141)|[**TenantBulkDeleteRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L18)|[**TenantTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L23)|PROVIDER -GET /tenantstatus||[**TenantManagement.get_all_tenant_statuses**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L151)||DataSequence[[**TenantStatus**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L56)]|PROVIDER, PROVIDER_AS_TENANT -GET /tenant||[**TenantManagement.get_all_tenants**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L156)||DataSequence[[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)]|PROVIDER, PROVIDER_AS_TENANT -GET /tenant/{tenant_id}||[**TenantManagement.get_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L161)||[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)|PROVIDER, PROVIDER_AS_TENANT -GET /tenant/vsmart/capacity||[**TenantManagement.get_tenant_hosting_capacity_on_vsmarts**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L166)||DataSequence[[**vSmartTenantCapacity**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L105)]|PROVIDER -GET /tenant/vsmart||[**TenantManagement.get_tenant_vsmart_mapping**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L171)||[**vSmartTenantMap**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L111)|PROVIDER, PROVIDER_AS_TENANT -PUT /tenant/{tenant_id}||[**TenantManagement.update_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L184)|[**TenantUpdateRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L65)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L23)|PROVIDER -PUT /tenant/{tenant_id}/vsmart||[**TenantManagement.update_tenant_vsmart_placement**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L189)|[**vSmartPlacementUpdateRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L100)|None|PROVIDER -POST /tenant/{tenant_id}/vsessionid||[**TenantManagement.vsession_id**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L194)||[**vSessionId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L115)|PROVIDER -GET /tenantmigration/download/{path}|>=20.6|[**TenantMigration.download_tenant_data**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L50)||bytes|PROVIDER, SINGLE_TENANT -POST /tenantmigration/export|>=20.6|[**TenantMigration.export_tenant_data**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L56)|[**TenantExport**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L54)|[**ExportInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L18)|PROVIDER, SINGLE_TENANT -GET /tenantmigration/migrationToken|>=20.6|[**TenantMigration.get_migration_token**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L62)||str|PROVIDER, SINGLE_TENANT -POST /tenantmigration/import|<20.13,>=20.6|[**TenantMigration.import_tenant_data**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L68)|[**MigrationFile**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L40)|[**ImportInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L22)|PROVIDER, SINGLE_TENANT -POST /tenantmigration/import/{migration_key}|>=20.13|[**TenantMigration.import_tenant_data_with_key**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L74)|[**MigrationFile**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L40)|[**ImportInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L22)|PROVIDER, SINGLE_TENANT -POST /tenantmigration/networkMigration|>=20.6|[**TenantMigration.migrate_network**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L80)|str|[**MigrationInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L36)|PROVIDER, SINGLE_TENANT +POST /tenant||[**TenantManagement.create_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L138)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)|PROVIDER +POST /tenant/async||[**TenantManagement.create_tenant_async**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L143)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)|[**TenantTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L24)|PROVIDER +POST /tenant/bulk/async|>=20.4|[**TenantManagement.create_tenant_async_bulk**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L148)|list[[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)]|[**TenantTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L24)|PROVIDER +DELETE /tenant/{tenant_id}/delete||[**TenantManagement.delete_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L154)|[**TenantDeleteRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L14)|None|PROVIDER +DELETE /tenant/bulk/async|>=20.4|[**TenantManagement.delete_tenant_async_bulk**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L159)|[**TenantBulkDeleteRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L18)|[**TenantTaskId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L24)|PROVIDER +GET /tenantstatus||[**TenantManagement.get_all_tenant_statuses**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L169)||DataSequence[[**TenantStatus**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L59)]|PROVIDER, PROVIDER_AS_TENANT +GET /tenant||[**TenantManagement.get_all_tenants**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L174)||DataSequence[[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)]|PROVIDER, PROVIDER_AS_TENANT +GET /tenant/{tenant_id}||[**TenantManagement.get_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L179)||[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)|PROVIDER, PROVIDER_AS_TENANT +GET /tenant/vsmart/capacity||[**TenantManagement.get_tenant_hosting_capacity_on_vsmarts**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L184)||DataSequence[[**vSmartTenantCapacity**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L119)]|PROVIDER +GET /tenant/vsmart||[**TenantManagement.get_tenant_vsmart_mapping**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L189)||[**vSmartTenantMap**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L128)|PROVIDER, PROVIDER_AS_TENANT +PUT /tenant/{tenant_id}||[**TenantManagement.update_tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L202)|[**TenantUpdateRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L69)|[**Tenant**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L31)|PROVIDER +PUT /tenant/{tenant_id}/vsmart||[**TenantManagement.update_tenant_vsmart_placement**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L207)|[**vSmartPlacementUpdateRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L113)|None|PROVIDER +POST /tenant/{tenant_id}/vsessionid||[**TenantManagement.vsession_id**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L212)||[**vSessionId**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_management.py#L132)|PROVIDER +GET /tenantmigration/download/{path}|>=20.6|[**TenantMigration.download_tenant_data**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L62)||bytes|PROVIDER, SINGLE_TENANT +POST /tenantmigration/export|>=20.6|[**TenantMigration.export_tenant_data**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L68)|[**TenantExport**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/models/tenant.py#L84)|[**ExportInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L28)|PROVIDER, SINGLE_TENANT +GET /tenantmigration/migrationToken|>=20.6|[**TenantMigration.get_migration_token**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L74)||str|PROVIDER, SINGLE_TENANT +POST /tenantmigration/import|<20.13,>=20.6|[**TenantMigration.import_tenant_data**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L80)|[**MigrationFile**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L52)|[**ImportInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L33)|PROVIDER, SINGLE_TENANT +POST /tenantmigration/import/{migration_key}|>=20.13|[**TenantMigration.import_tenant_data_with_key**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L86)|[**MigrationFile**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L52)|[**ImportInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L33)|PROVIDER, SINGLE_TENANT +POST /tenantmigration/networkMigration|>=20.6|[**TenantMigration.migrate_network**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L92)|str|[**MigrationInfo**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/tenant_migration.py#L47)|PROVIDER, SINGLE_TENANT POST /device/tools/nping/{device_ip}||[**TroubleshootingToolsDeviceConnectivity.nping_device**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/troubleshooting_tools/device_connectivity.py#L94)|[**NPingRequest**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/troubleshooting_tools/device_connectivity.py#L18)|[**NPingResult**](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/endpoints/troubleshooting_tools/device_connectivity.py#L37)| diff --git a/README.md b/README.md index f4316ca2..066a2e01 100644 --- a/README.md +++ b/README.md @@ -288,13 +288,13 @@ api = session.api.tenant_management tenants = [ Tenant( name="tenant1", - orgName="CiscoDevNet", - subDomain="alpha.bravo.net", + org_name="CiscoDevNet", + subdomain="alpha.bravo.net", desc="This is tenant for unit tests", - edgeConnectorEnable=True, - edgeConnectorSystemIp="172.16.255.81", - edgeConnectorTunnelInterfaceName="GigabitEthernet1", - wanEdgeForecast=1, + edge_connector_enable=True, + edge_connector_system_ip="172.16.255.81", + edge_connector_tunnel_interface_name="GigabitEthernet1", + wan_edge_forecast=1, ) ] create_task = api.create(tenants) diff --git a/catalystwan/api/tenant_management_api.py b/catalystwan/api/tenant_management_api.py index ee44ee0c..97bd6123 100644 --- a/catalystwan/api/tenant_management_api.py +++ b/catalystwan/api/tenant_management_api.py @@ -74,7 +74,7 @@ def delete(self, tenant_id_list: List[str], password: Optional[str] = None) -> T """ if password is None: password = self.session.password - delete_request = TenantBulkDeleteRequest(tenantIdList=tenant_id_list, password=password) + delete_request = TenantBulkDeleteRequest(tenant_id_list=tenant_id_list, password=password) task_id = self._endpoints.delete_tenant_async_bulk(delete_request).id return Task(self.session, task_id) @@ -105,7 +105,7 @@ def update_vsmart_placement(self, tenant_id: str, src_vsmart_uuid: str, dst_vsma self._endpoints.update_tenant_vsmart_placement( tenant_id=tenant_id, vsmart_placement_update_request=vSmartPlacementUpdateRequest( - srcvSmartUuid=src_vsmart_uuid, destvSmartUuid=dst_vsmart_uuid + src_vsmart_uuid=src_vsmart_uuid, dest_vsmart_uuid=dst_vsmart_uuid ), ) diff --git a/catalystwan/api/tenant_migration_api.py b/catalystwan/api/tenant_migration_api.py index 76d9e207..4b1e421b 100644 --- a/catalystwan/api/tenant_migration_api.py +++ b/catalystwan/api/tenant_migration_api.py @@ -101,7 +101,7 @@ def store_token(self, migration_id: str, download_path: Path): migration_id (str): migration identifier (it is obtained after import tenant task is finished) download_path (Path): full download path containing a filename eg.: Path("/home/user/import-token.txt") """ - params = MigrationTokenQueryParams(migrationId=migration_id) + params = MigrationTokenQueryParams(migration_id=migration_id) token = self.session.endpoints.tenant_migration.get_migration_token(params) with open(download_path, "w") as file: file.write(token) diff --git a/catalystwan/dataclasses.py b/catalystwan/dataclasses.py index 22526c9d..8d021625 100644 --- a/catalystwan/dataclasses.py +++ b/catalystwan/dataclasses.py @@ -4,7 +4,7 @@ from typing import List, Optional from attr import define, field # type: ignore -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.exceptions import RetrieveIntervalOutOfRange from catalystwan.utils.alarm_status import Severity @@ -504,16 +504,17 @@ class SoftwareInstallTimeout(DataclassBase): class FeatureTemplatesTypes(BaseModel): + model_config = ConfigDict(populate_by_name=True) parent: str default: str - display_name: str = Field(alias="displayName") + display_name: str = Field(serialization_alias="displayName", validation_alias="displayName") name: str - type_class: str = Field(alias="typeClass") + type_class: str = Field(serialization_alias="typeClass", validation_alias="typeClass") description: str write_permission: bool read_permission: bool - helper_type: List[str] = Field(default=[], alias="helperType") - device_models: List[dict] = Field(default=[], alias="deviceModels") + helper_type: List[str] = Field(default=[], serialization_alias="helperType", validation_alias="helperType") + device_models: List[dict] = Field(default=[], serialization_alias="deviceModels", validation_alias="deviceModels") @define diff --git a/catalystwan/endpoints/__init__.py b/catalystwan/endpoints/__init__.py index f4534174..e8cc249c 100644 --- a/catalystwan/endpoints/__init__.py +++ b/catalystwan/endpoints/__init__.py @@ -61,8 +61,7 @@ from packaging.specifiers import SpecifierSet # type: ignore from packaging.version import Version # type: ignore -from pydantic import BaseModel as BaseModelV2 -from pydantic.v1 import BaseModel as BaseModelV1 +from pydantic import BaseModel from typing_extensions import Annotated, get_args, get_origin from catalystwan.abstractions import APIEndpointClient, APIEndpointClientResponse @@ -82,12 +81,10 @@ def prepared(self) -> PreparedPayload: JSON = Union[str, int, float, bool, None, Dict[str, "JSON"], List["JSON"]] -ModelPayloadType = Union[BaseModelV1, BaseModelV2, Sequence[BaseModelV1], Sequence[BaseModelV2]] +ModelPayloadType = Union[BaseModel, Sequence[BaseModel]] PayloadType = Union[None, JSON, str, bytes, dict, ModelPayloadType, CustomPayloadType] -ReturnType = Union[ - None, JSON, bytes, str, dict, BaseModelV1, BaseModelV2, DataSequence[BaseModelV1], DataSequence[BaseModelV2] -] -RequestParamsType = Union[Dict[str, str], BaseModelV1, BaseModelV2] +ReturnType = Union[None, JSON, bytes, str, dict, BaseModel, DataSequence[BaseModel]] +RequestParamsType = Union[Dict[str, str], BaseModel] @dataclass @@ -119,12 +116,12 @@ def model_union(cls, models: Sequence[type]) -> TypeSpecifier: @classmethod def resolve_nested_base_model_unions( - cls, annotation: Any, models_types: List[Union[Type[BaseModelV1], Type[BaseModelV2]]] - ) -> List[Union[Type[BaseModelV1], Type[BaseModelV2]]]: + cls, annotation: Any, models_types: List[Type[BaseModel]] + ) -> List[Type[BaseModel]]: type_origin = get_origin(annotation) if isclass(annotation): try: - if issubclass(annotation, (BaseModelV1, BaseModelV2)): + if issubclass(annotation, BaseModel): return [annotation] raise APIEndpointError(f"Expected: {PayloadType}") except TypeError: @@ -135,7 +132,7 @@ def resolve_nested_base_model_unions( if (len(annotated_origin) >= 1) and get_origin(annotated_origin[0]) == Union: type_args = get_args(annotated_origin[0]) if all(isclass(t) for t in type_args) and all( - issubclass(t, (BaseModelV1, BaseModelV2)) for t in type_args + issubclass(t, BaseModel) for t in type_args ): models_types.extend(list(type_args)) return models_types @@ -148,7 +145,7 @@ def resolve_nested_base_model_unions( # Check if Union[PayloadModelType, ...], only unions of pydantic models allowed elif type_origin == Union: type_args = get_args(annotation) - if all(isclass(t) for t in type_args) and all(issubclass(t, (BaseModelV1, BaseModelV2)) for t in type_args): + if all(isclass(t) for t in type_args) and all(issubclass(t, BaseModel) for t in type_args): models_types.extend(list(type_args)) return models_types else: @@ -212,7 +209,7 @@ def _prepare_payload(cls, payload: PayloadType, force_json: bool = False) -> Pre return PreparedPayload(data=json.dumps(payload), headers={"content-type": "application/json"}) if isinstance(payload, (str, bytes)): return PreparedPayload(data=payload) - elif isinstance(payload, (BaseModelV1, BaseModelV2)): + elif isinstance(payload, (BaseModel)): return cls._prepare_basemodel_payload(payload) elif isinstance(payload, Sequence) and not isinstance(payload, (str, bytes)): return cls._prepare_sequence_payload(payload) # type: ignore[arg-type] @@ -223,34 +220,25 @@ def _prepare_payload(cls, payload: PayloadType, force_json: bool = False) -> Pre raise APIRequestPayloadTypeError(payload) @classmethod - def _prepare_basemodel_payload(cls, payload: Union[BaseModelV1, BaseModelV2]) -> PreparedPayload: + def _prepare_basemodel_payload(cls, payload: BaseModel) -> PreparedPayload: """Helper method to prepare BaseModel instance for sending""" - if isinstance(payload, BaseModelV1): - return PreparedPayload( - data=payload.json(exclude_none=True, by_alias=True), headers={"content-type": "application/json"} - ) return PreparedPayload( data=payload.model_dump_json(exclude_none=True, by_alias=True), headers={"content-type": "application/json"} ) @classmethod - def _prepare_sequence_payload(cls, payload: Iterable[Union[BaseModelV1, BaseModelV2]]) -> PreparedPayload: + def _prepare_sequence_payload(cls, payload: Iterable[BaseModel]) -> PreparedPayload: """Helper method to prepare sequences for sending""" items = [] for item in payload: - if isinstance(item, BaseModelV1): - items.append(item.dict(exclude_none=True, by_alias=True)) - elif isinstance(item, BaseModelV2): - items.append(item.model_dump(exclude_none=True, by_alias=True)) + items.append(item.model_dump(exclude_none=True, by_alias=True)) data = json.dumps(items) return PreparedPayload(data=data, headers={"content-type": "application/json"}) @classmethod def _prepare_params(cls, params: RequestParamsType) -> Dict[str, Any]: """Helper method to prepare params for sending""" - if isinstance(params, BaseModelV1): - return params.dict(exclude_none=True, by_alias=True) - elif isinstance(params, BaseModelV2): + if isinstance(params, BaseModel): return params.model_dump(exclude_none=True, by_alias=True) return params @@ -433,13 +421,13 @@ def specify_return_type(self) -> TypeSpecifier: (type_args := get_args(annotation)) and (len(type_args) == 1) and isclass(type_args[0]) - and issubclass(type_args[0], (BaseModelV1, BaseModelV2)) + and issubclass(type_args[0], BaseModel) ): return TypeSpecifier(True, DataSequence, type_args[0]) raise APIEndpointError(f"Expected: {ReturnType} but return type {annotation}") elif isclass(annotation): try: - if issubclass(annotation, (bytes, str, dict, BinaryIO, (BaseModelV1, BaseModelV2))): + if issubclass(annotation, (bytes, str, dict, BinaryIO, BaseModel)): return TypeSpecifier(True, None, annotation) raise APIEndpointError(f"Expected: {ReturnType} but return type {annotation}") except TypeError: @@ -479,7 +467,7 @@ def specify_payload_type(self) -> TypeSpecifier: # Check if regular class if isclass(annotation): - if issubclass(annotation, (bytes, str, dict, BinaryIO, BaseModelV1, BaseModelV2, CustomPayloadType)): + if issubclass(annotation, (bytes, str, dict, BinaryIO, BaseModel, CustomPayloadType)): return TypeSpecifier(True, None, annotation, None, False, is_optional) else: raise APIEndpointError(f"'payload' param must be annotated with supported type: {PayloadType}") @@ -492,7 +480,7 @@ def specify_payload_type(self) -> TypeSpecifier: (type_args := get_args(annotation)) and (len(type_args) == 1) and isclass(type_args[0]) - and issubclass(type_args[0], (BaseModelV1, BaseModelV2)) + and issubclass(type_args[0], BaseModel) ): return TypeSpecifier(True, type_origin, type_args[0], None, False, is_optional) else: @@ -509,10 +497,7 @@ def check_params(self): parameters = self.sig.parameters if params_param := parameters.get("params"): - if not ( - isclass(params_param.annotation) - and issubclass(params_param.annotation, (BaseModelV1, BaseModelV2, Dict)) - ): + if not (isclass(params_param.annotation) and issubclass(params_param.annotation, (BaseModel, Dict))): raise APIEndpointError(f"'params' param must be annotated with supported type: {RequestParamsType}") general_purpose_arg_names = { @@ -603,7 +588,7 @@ def wrapper(*args, **kwargs): return full_json if self.return_spec.payload_type is None: pass - elif issubclass(self.return_spec.payload_type, (BaseModelV1, BaseModelV2)): + elif issubclass(self.return_spec.payload_type, BaseModel): if self.return_spec.sequence_type == DataSequence: return response.dataseq(self.return_spec.payload_type, self.resp_json_key) else: diff --git a/catalystwan/endpoints/certificate_management_vmanage.py b/catalystwan/endpoints/certificate_management_vmanage.py index bbc13b9c..ad52e435 100644 --- a/catalystwan/endpoints/certificate_management_vmanage.py +++ b/catalystwan/endpoints/certificate_management_vmanage.py @@ -3,21 +3,22 @@ # mypy: disable-error-code="empty-body" import datetime -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, get class WebServerCertificateInfo(BaseModel): + model_config = ConfigDict(populate_by_name=True) org_unit: str org: str location: str state: str country: str company_name: str - not_before: datetime.datetime = Field(alias="notBefore") - not_after: datetime.datetime = Field(alias="notAfter") - certificate_details: str = Field(alias="certificateDetails") + not_before: datetime.datetime = Field(serialization_alias="notBefore", validation_alias="notBefore") + not_after: datetime.datetime = Field(serialization_alias="notAfter", validation_alias="notAfter") + certificate_details: str = Field(serialization_alias="certificateDetails", validation_alias="certificateDetails") validity: str diff --git a/catalystwan/endpoints/client.py b/catalystwan/endpoints/client.py index 3a746fc5..c2586a04 100644 --- a/catalystwan/endpoints/client.py +++ b/catalystwan/endpoints/client.py @@ -5,7 +5,7 @@ from typing import Any, List, Optional from packaging.version import Version # type: ignore -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, get @@ -21,46 +21,65 @@ def validate(cls, value): class ServerInfo(BaseModel): - server: Optional[str] - tenancy_mode: Optional[str] = Field(alias="tenancyMode") - user_mode: Optional[str] = Field(alias="userMode") - vsession_id: Optional[str] = Field(alias="VSessionId") - is_saml_user: Optional[bool] = Field(alias="isSamlUser") - is_rbac_vpn_user: Optional[bool] = Field(alias="isRbacVpnUser") + model_config = ConfigDict(populate_by_name=True) + server: Optional[str] = None + tenancy_mode: Optional[str] = Field(default=None, serialization_alias="tenancyMode", validation_alias="tenancyMode") + user_mode: Optional[str] = Field(default=None, serialization_alias="userMode", validation_alias="userMode") + vsession_id: Optional[str] = Field(default=None, serialization_alias="VSessionId", validation_alias="VSessionId") + is_saml_user: Optional[bool] = Field(default=None, serialization_alias="isSamlUser", validation_alias="isSamlUser") + is_rbac_vpn_user: Optional[bool] = Field( + default=None, serialization_alias="isRbacVpnUser", validation_alias="isRbacVpnUser" + ) vpns: List[Any] = [] - csrf_token: Optional[str] = Field(alias="CSRFToken") - provider_domain: Optional[str] = Field(alias="providerDomain") - tenant_id: Optional[str] = Field(alias="tenantId") - provider_id: Optional[str] = Field(alias="providerId") - view_mode: Optional[str] = Field(alias="viewMode") + csrf_token: Optional[str] = Field(default=None, serialization_alias="CSRFToken", validation_alias="CSRFToken") + provider_domain: Optional[str] = Field( + default=None, serialization_alias="providerDomain", validation_alias="providerDomain" + ) + tenant_id: Optional[str] = Field(default=None, serialization_alias="tenantId", validation_alias="tenantId") + provider_id: Optional[str] = Field(default=None, serialization_alias="providerId", validation_alias="providerId") + view_mode: Optional[str] = Field(default=None, serialization_alias="viewMode", validation_alias="viewMode") capabilities: List[str] = [] - user: Optional[str] - description: Optional[str] - locale: Optional[str] + user: Optional[str] = None + description: Optional[str] = None + locale: Optional[str] = None roles: List[str] = [] - external_user: Optional[bool] = Field(alias="externalUser") - platform_version: str = Field(default="", alias="platformVersion") - general_template: Optional[bool] = Field(alias="generalTemplate") - disable_full_config_push: Optional[bool] = Field(alias="disableFullConfigPush") - enable_server_events: Optional[bool] = Field(alias="enableServerEvents") - cloudx: Optional[str] - reverseproxy: Optional[str] - vmanage_mode: Optional[str] = Field(alias="vmanageMode") + external_user: Optional[bool] = Field( + default=None, serialization_alias="externalUser", validation_alias="externalUser" + ) + platform_version: str = Field(default="", serialization_alias="platformVersion", validation_alias="platformVersion") + general_template: Optional[bool] = Field( + default=None, serialization_alias="generalTemplate", validation_alias="generalTemplate" + ) + disable_full_config_push: Optional[bool] = Field( + default=None, serialization_alias="disableFullConfigPush", validation_alias="disableFullConfigPush" + ) + enable_server_events: Optional[bool] = Field( + default=None, serialization_alias="enableServerEvents", validation_alias="enableServerEvents" + ) + cloudx: Optional[str] = None + reverseproxy: Optional[str] = None + vmanage_mode: Optional[str] = Field(default=None, serialization_alias="vmanageMode", validation_alias="vmanageMode") class AboutInfo(BaseModel): + model_config = ConfigDict(populate_by_name=True) title: Optional[str] version: str = Field(default="") - application_version: Optional[str] = Field(alias="applicationVersion") - application_server: Optional[str] = Field(alias="applicationServer") + application_version: Optional[str] = Field( + serialization_alias="applicationVersion", validation_alias="applicationVersion" + ) + application_server: Optional[str] = Field( + serialization_alias="applicationServer", validation_alias="applicationServer" + ) copyright: Optional[str] time: Optional[datetime] - time_zone: Optional[str] = Field(alias="timeZone") + time_zone: Optional[str] = Field(serialization_alias="timeZone", validation_alias="timeZone") logo: Optional[str] class ServerReady(BaseModel): - is_server_ready: bool = Field(alias="isServerReady") + model_config = ConfigDict(populate_by_name=True) + is_server_ready: bool = Field(serialization_alias="isServerReady", validation_alias="isServerReady") class Client(APIEndpoints): diff --git a/catalystwan/endpoints/cluster_management.py b/catalystwan/endpoints/cluster_management.py index 3994e499..bfbaf99b 100644 --- a/catalystwan/endpoints/cluster_management.py +++ b/catalystwan/endpoints/cluster_management.py @@ -1,23 +1,18 @@ # Copyright 2023 Cisco Systems, Inc. and its affiliates # mypy: disable-error-code="empty-body" +from typing import Literal, Optional -from enum import Enum -from typing import Optional - -from pydantic.v1 import BaseModel +from pydantic import BaseModel from catalystwan.endpoints import APIEndpoints, get from catalystwan.typed_list import DataSequence - -class TenancyModeEnum(str, Enum): - st = "SingleTenant" - mt = "MultiTenant" +TenancyModes = Literal["SingleTenant", "MultiTenant"] class TenancyMode(BaseModel): - mode: TenancyModeEnum + mode: TenancyModes deploymentmode: str domain: Optional[str] = None clusterid: Optional[str] = None diff --git a/catalystwan/endpoints/configuration/policy/vsmart_template.py b/catalystwan/endpoints/configuration/policy/vsmart_template.py index 837c2448..ef13d201 100644 --- a/catalystwan/endpoints/configuration/policy/vsmart_template.py +++ b/catalystwan/endpoints/configuration/policy/vsmart_template.py @@ -1,10 +1,10 @@ # Copyright 2023 Cisco Systems, Inc. and its affiliates # mypy: disable-error-code="empty-body" - +from typing import Literal from uuid import UUID -from pydantic.v1 import BaseModel, Field, IPvAnyAddress +from pydantic import BaseModel, ConfigDict, Field, IPvAnyAddress from catalystwan.endpoints import JSON, APIEndpoints, delete, get, post, put from catalystwan.models.policy.centralized import CentralizedPolicy, CentralizedPolicyEditPayload, CentralizedPolicyInfo @@ -13,15 +13,16 @@ class VSmartConnectivityStatus(BaseModel): - device_uuid: UUID = Field(alias="deviceUUID") - operation_mode: str = Field(alias="operationMode") - device_ip: IPvAnyAddress = Field(alias="deviceIp") - local_system_ip: IPvAnyAddress = Field(alias="local-system-ip") - is_online: bool = Field(alias="isOnline") + model_config = ConfigDict(populate_by_name=True) + device_uuid: UUID = Field(serialization_alias="deviceUUID", validation_alias="deviceUUID") + operation_mode: str = Field(serialization_alias="operationMode", validation_alias="operationMode") + device_ip: IPvAnyAddress = Field(serialization_alias="deviceIp", validation_alias="deviceIp") + local_system_ip: IPvAnyAddress = Field(serialization_alias="local-system-ip", validation_alias="local-system-ip") + is_online: bool = Field(serialization_alias="isOnline", validation_alias="isOnline") class AutoConfirm(BaseModel): - confirm: str = Field(default="true", const=True) + confirm: Literal["true"] = "true" class ActivateDeactivateTaskId(BaseModel): diff --git a/catalystwan/endpoints/configuration_dashboard_status.py b/catalystwan/endpoints/configuration_dashboard_status.py index 530de910..0df41fd1 100644 --- a/catalystwan/endpoints/configuration_dashboard_status.py +++ b/catalystwan/endpoints/configuration_dashboard_status.py @@ -3,23 +3,28 @@ # mypy: disable-error-code="empty-body" from typing import Dict, List, Optional, Union -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, get from catalystwan.utils.operation_status import OperationStatus class SubTaskData(BaseModel): + model_config = ConfigDict(populate_by_name=True) status: str - status_id: str = Field(alias="statusId") - action: Optional[str] - activity: List[str] - current_activity: Optional[str] = Field(alias="currentActivity") - action_config: Optional[Union[str, Dict]] = Field(alias="actionConfig") - order: Optional[int] - uuid: Optional[str] - hostname: Optional[str] = Field(alias="host-name") - site_id: Optional[str] = Field(alias="site-id") + status_id: str = Field(serialization_alias="statusId", validation_alias="statusId") + action: Optional[str] = None + activity: List[str] = [] + current_activity: Optional[str] = Field( + default=None, serialization_alias="currentActivity", validation_alias="currentActivity" + ) + action_config: Optional[Union[str, Dict]] = Field( + default=None, serialization_alias="actionConfig", validation_alias="actionConfig" + ) + order: Optional[int] = None + uuid: Optional[str] = None + hostname: Optional[str] = Field(default=None, serialization_alias="host-name", validation_alias="host-name") + site_id: Optional[str] = Field(default=None, serialization_alias="site-id", validation_alias="site-id") class TaskResult(BaseModel): @@ -28,63 +33,88 @@ class TaskResult(BaseModel): class RunningTaskData(BaseModel): - details_url: Optional[str] = Field(alias="detailsURL") - user_session_username: Optional[str] = Field(alias="userSessionUserName") - rid: Optional[int] = Field(alias="@rid") - tenant_name: Optional[str] = Field("tenantName") - process_id: Optional[str] = Field(alias="processId") - name: Optional[str] - tenant_id: Optional[str] = Field(alias="tenantId") - user_session_ip: Optional[str] = Field(alias="userSessionIP") - action: Optional[str] - start_time: Optional[int] = Field(alias="startTime") - end_time: Optional[int] = Field(alias="endTime") - status: Optional[str] + model_config = ConfigDict(populate_by_name=True) + details_url: Optional[str] = Field(default=None, serialization_alias="detailsURL", validation_alias="detailsURL") + user_session_username: Optional[str] = Field( + default=None, serialization_alias="userSessionUserName", validation_alias="userSessionUserName" + ) + rid: Optional[int] = Field(default=None, serialization_alias="@rid", validation_alias="@rid") + tenant_name: Optional[str] = Field(default=None, serialization_alias="tenantName", validation_alias="tenantName") + process_id: Optional[str] = Field(default=None, serialization_alias="processId", validation_alias="processId") + name: Optional[str] = None + tenant_id: Optional[str] = Field(default=None, serialization_alias="tenantId", validation_alias="tenantId") + user_session_ip: Optional[str] = Field( + default=None, serialization_alias="userSessionIP", validation_alias="userSessionIP" + ) + action: Optional[str] = None + start_time: Optional[int] = Field(default=None, serialization_alias="startTime", validation_alias="startTime") + end_time: Optional[int] = Field(default=None, serialization_alias="endTime", validation_alias="endTime") + status: Optional[str] = None class Validation(BaseModel): - status_type: Optional[str] = Field(alias="statusType") - activity: Optional[List[str]] = Field(alias="activity") - vmanage_ip: Optional[str] = Field(alias="vmanageIP") - system_ip: Optional[str] = Field(alias="system-ip") - device_id: Optional[str] = Field(alias="deviceID") - uuid: Optional[str] = Field(alias="uuid") - rid: Optional[int] = Field(alias="@rid") - status_id: str = Field(alias="statusId") - process_id: Optional[str] = Field(alias="processId") - action_config: Optional[Union[str, Dict]] = Field(alias="actionConfig") - current_activity: Optional[str] = Field(alias="currentActivity") - action: Optional[str] = Field(alias="action") - start_time: Optional[int] = Field(alias="startTime") - request_status: Optional[str] = Field(alias="requestStatus") - status: OperationStatus = Field(alias="status") - order: Optional[int] = Field(alias="order") + model_config = ConfigDict(populate_by_name=True) + status_type: Optional[str] = Field(default=None, serialization_alias="statusType", validation_alias="statusType") + activity: Optional[List[str]] = Field(default=None, serialization_alias="activity", validation_alias="activity") + vmanage_ip: Optional[str] = Field(default=None, serialization_alias="vmanageIP", validation_alias="vmanageIP") + system_ip: Optional[str] = Field(default=None, serialization_alias="system-ip", validation_alias="system-ip") + device_id: Optional[str] = Field(default=None, serialization_alias="deviceID", validation_alias="deviceID") + uuid: Optional[str] = Field(default=None, serialization_alias="uuid", validation_alias="uuid") + rid: Optional[int] = Field(default=None, serialization_alias="@rid", validation_alias="@rid") + status_id: str = Field(default=None, serialization_alias="statusId", validation_alias="statusId") + process_id: Optional[str] = Field(default=None, serialization_alias="processId", validation_alias="processId") + action_config: Optional[Union[str, Dict]] = Field( + default=None, serialization_alias="actionConfig", validation_alias="actionConfig" + ) + current_activity: Optional[str] = Field( + default=None, serialization_alias="currentActivity", validation_alias="currentActivity" + ) + action: Optional[str] = Field(default=None, serialization_alias="action", validation_alias="action") + start_time: Optional[int] = Field(default=None, serialization_alias="startTime", validation_alias="startTime") + request_status: Optional[str] = Field( + default=None, serialization_alias="requestStatus", validation_alias="requestStatus" + ) + status: OperationStatus = Field(default=None, serialization_alias="status", validation_alias="status") + order: Optional[int] = Field(default=None, serialization_alias="order", validation_alias="order") class Summary(BaseModel): - action: Optional[str] = Field(alias="action") - name: Optional[str] = Field(alias="name") - details_url: Optional[str] = Field(alias="detailsURL") - start_time: Optional[str] = Field(alias="startTime") - end_time: Optional[str] = Field(alias="endTime") - user_session_user_name: Optional[str] = Field(alias="userSessionUserName") - user_session_ip: Optional[str] = Field(alias="userSessionIP") - tenant_name: Optional[str] = Field(alias="tenantName") - total: Optional[int] = Field(alias="total") - status: Optional[str] = Field(alias="status") - count: Optional[dict] = Field(alias="count") + model_config = ConfigDict(populate_by_name=True) + action: Optional[str] = Field(default=None, serialization_alias="action", validation_alias="action") + name: Optional[str] = Field(default=None, serialization_alias="name", validation_alias="name") + details_url: Optional[str] = Field(default=None, serialization_alias="detailsURL", validation_alias="detailsURL") + start_time: Optional[str] = Field(default=None, serialization_alias="startTime", validation_alias="startTime") + end_time: Optional[str] = Field(default=None, serialization_alias="endTime", validation_alias="endTime") + user_session_user_name: Optional[str] = Field( + default=None, serialization_alias="userSessionUserName", validation_alias="userSessionUserName" + ) + user_session_ip: Optional[str] = Field( + default=None, serialization_alias="userSessionIP", validation_alias="userSessionIP" + ) + tenant_name: Optional[str] = Field(default=None, serialization_alias="tenantName", validation_alias="tenantName") + total: Optional[int] = Field(default=None, serialization_alias="total", validation_alias="total") + status: Optional[str] = Field(default=None, serialization_alias="status", validation_alias="status") + count: Optional[dict] = Field(default=None, serialization_alias="count", validation_alias="count") class TaskData(BaseModel): - data: List[SubTaskData] = Field(default=[]) - validation: Optional[Validation] - summary: Optional[Summary] - is_cancel_enabled: Optional[bool] = Field(alias="isCancelEnabled") - is_parallel_execution_enabled: Optional[bool] = Field(alias="isParallelExecutionEnabled") + model_config = ConfigDict(populate_by_name=True) + data: List[SubTaskData] = [] + validation: Optional[Validation] = None + summary: Optional[Summary] = None + is_cancel_enabled: Optional[bool] = Field( + default=None, serialization_alias="isCancelEnabled", validation_alias="isCancelEnabled" + ) + is_parallel_execution_enabled: Optional[bool] = Field( + default=None, serialization_alias="isParallelExecutionEnabled", validation_alias="isParallelExecutionEnabled" + ) class TasksData(BaseModel): - running_tasks: List[RunningTaskData] = Field(alias="runningTasks") + model_config = ConfigDict(populate_by_name=True) + running_tasks: List[RunningTaskData] = Field( + default=[], serialization_alias="runningTasks", validation_alias="runningTasks" + ) class ConfigurationDashboardStatus(APIEndpoints): diff --git a/catalystwan/endpoints/configuration_device_template.py b/catalystwan/endpoints/configuration_device_template.py index b1da0d79..48698b27 100644 --- a/catalystwan/endpoints/configuration_device_template.py +++ b/catalystwan/endpoints/configuration_device_template.py @@ -3,13 +3,14 @@ # mypy: disable-error-code="empty-body" from typing import Dict -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, post, view from catalystwan.utils.session_type import ProviderView class FeatureToCLIPayload(BaseModel): + model_config = ConfigDict(populate_by_name=True) device_specific_variables: Dict[str, str] = Field(alias="device") is_edited: bool = Field(alias="isEdited") is_master_edited: bool = Field(alias="isMasterEdited") diff --git a/catalystwan/endpoints/configuration_group.py b/catalystwan/endpoints/configuration_group.py index b8467639..b15295fe 100644 --- a/catalystwan/endpoints/configuration_group.py +++ b/catalystwan/endpoints/configuration_group.py @@ -5,7 +5,7 @@ from typing import List, Optional from uuid import UUID -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, delete, get, post, put, versions from catalystwan.models.configuration.common import Solution @@ -26,15 +26,16 @@ class ConfigGroupCreationPayload(BaseModel): class FeatureProfile(BaseModel): + model_config = ConfigDict(populate_by_name=True) id: str name: str description: Optional[str] solution: str type: ProfileType - created_by: str = Field(alias="createdBy") - last_updated_by: str = Field(alias="lastUpdatedBy") - created_on: datetime = Field(alias="createdOn") - last_updated_on: datetime = Field(alias="lastUpdatedOn") + created_by: str = Field(serialization_alias="createdBy", validation_alias="createdBy") + last_updated_by: str = Field(serialization_alias="lastUpdatedBy", validation_alias="lastUpdatedBy") + created_on: datetime = Field(serialization_alias="createdOn", validation_alias="createdOn") + last_updated_on: datetime = Field(serialization_alias="lastUpdatedOn", validation_alias="lastUpdatedOn") class ConfigGroup(BaseModel): @@ -88,13 +89,17 @@ class VariableData(BaseModel): class DeviceVariables(BaseModel): - device_id: str = Field(alias="device-id") + model_config = ConfigDict(populate_by_name=True) + device_id: str = Field(serialization_alias="device-id", validation_alias="device-id") variables: List[VariableData] class GroupVariables(BaseModel): + model_config = ConfigDict(populate_by_name=True) name: str - group_variables: List[VariableData] = Field(alias="group-variables") + group_variables: List[VariableData] = Field( + serialization_alias="group-variables", validation_alias="group-variables" + ) class ConfigGroupVariablesCreateResponse(BaseModel): diff --git a/catalystwan/endpoints/configuration_settings.py b/catalystwan/endpoints/configuration_settings.py index cd9fdf31..ecc47248 100644 --- a/catalystwan/endpoints/configuration_settings.py +++ b/catalystwan/endpoints/configuration_settings.py @@ -2,59 +2,33 @@ # mypy: disable-error-code="empty-body" import datetime -from enum import Enum from typing import List, Literal, Optional, Union -from pydantic.v1 import BaseModel, Field, IPvAnyAddress, validator +from pydantic import BaseModel, ConfigDict, Field, IPvAnyAddress, field_validator from catalystwan.endpoints import JSON, APIEndpoints, get, post, put, view from catalystwan.typed_list import DataSequence from catalystwan.utils.session_type import ProviderView, SingleTenantView - -class ModeEnum(str, Enum): - ON = "on" - OFF = "off" - - -class DataStreamIPTypeEnum(str, Enum): - SYSTEM = "systemIp" - MGMT = "mgmtIp" - TRANSPORT = "transportIp" - - -class PasswordPolicyEnum(str, Enum): - DISABLED = "disabled" - MEDIUM = "mediumSecurity" - HIGH = "highSecurity" - - -class SmartLicensingSettingModeEnum(str, Enum): - ONPREM = "on-prem" - OFFLINE = "offline" - ONLINE = "online" - - -class CRLActionEnum(str, Enum): - DISABLE = "disable" - REVOKE = "revoke" - QUARANTINE = "quarantine" +OnOffMode = Literal["on", "off"] +DataStreamIPTypes = Literal["systemIp", "mgmtIp", "transportIp"] +PasswordPolicies = Literal["disabled", "mediumSecurity", "highSecurity"] +SmartLicensingSettingModes = Literal["on-prem", "offline", "online"] +CRLActions = Literal["disable", "revoke", "quarantine"] class Organization(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict(populate_by_name=True) org: Optional[str] = Field(default=None) - domain_id: Optional[str] = Field(alias="domain-id") - control_connection_up: Optional[bool] = Field(alias="controlConnectionUp") + domain_id: Optional[str] = Field(serialization_alias="domain-id", validation_alias="domain-id") + control_connection_up: Optional[bool] = Field( + serialization_alias="controlConnectionUp", validation_alias="controlConnectionUp" + ) class Device(BaseModel): - class Config: - allow_population_by_field_name = True - - domain_ip: Optional[str] = Field(default=None, alias="domainIp") + model_config = ConfigDict(populate_by_name=True) + domain_ip: Optional[str] = Field(default=None, serialization_alias="domainIp", validation_alias="domainIp") port: Optional[str] = Field(default="12346") @@ -63,22 +37,22 @@ class EmailNotificationSettings(BaseModel): class HardwareRootCA(BaseModel): - class Config: - allow_population_by_field_name = True - - hardware_certificate: Optional[str] = Field(default=None, alias="hardwareCertificate") - control_connection_up: Optional[bool] = Field(default=False, alias="controlConnectionUp") + model_config = ConfigDict(populate_by_name=True) + hardware_certificate: Optional[str] = Field( + default=None, serialization_alias="hardwareCertificate", validation_alias="hardwareCertificate" + ) + control_connection_up: Optional[bool] = Field( + default=False, serialization_alias="controlConnectionUp", validation_alias="controlConnectionUp" + ) class Certificate(BaseModel): - class Config: - allow_population_by_field_name = True - - certificate_signing: str = Field(alias="certificateSigning") - validity_period: str = Field(alias="validityPeriod") - retrieve_interval: str = Field(alias="retrieveInterval") - first_name: Optional[str] = Field(default=None, alias="firstName") - last_name: Optional[str] = Field(default=None, alias="lastName") + model_config = ConfigDict(populate_by_name=True) + certificate_signing: str = Field(serialization_alias="certificateSigning", validation_alias="certificateSigning") + validity_period: str = Field(serialization_alias="validityPeriod", validation_alias="validityPeriod") + retrieve_interval: str = Field(serialization_alias="retrieveInterval", validation_alias="retrieveInterval") + first_name: Optional[str] = Field(default=None, serialization_alias="firstName", validation_alias="firstName") + last_name: Optional[str] = Field(default=None, serialization_alias="lastName", validation_alias="lastName") email: Optional[str] = Field(default=None) @@ -87,96 +61,111 @@ class VEdgeCloud(BaseModel): class Banner(BaseModel): - class Config: - allow_population_by_field_name = True - - mode: Optional[ModeEnum] = ModeEnum.OFF - banner_detail: Optional[str] = Field(alias="bannerDetail") + model_config = ConfigDict(populate_by_name=True) + mode: Optional[OnOffMode] = "off" + banner_detail: Optional[str] = Field(serialization_alias="bannerDetail", validation_alias="bannerDetail") class ProxyHTTPServer(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict(populate_by_name=True) proxy: bool - proxy_ip: str = Field(default="", alias="proxyIp") - proxy_port: str = Field(default="", alias="proxyPort") + proxy_ip: str = Field(default="", serialization_alias="proxyIp", validation_alias="proxyIp") + proxy_port: str = Field(default="", serialization_alias="proxyPort", validation_alias="proxyPort") class ReverseProxy(BaseModel): - mode: Optional[ModeEnum] = ModeEnum.OFF + mode: Optional[OnOffMode] = "off" class CloudX(BaseModel): - mode: Optional[ModeEnum] = ModeEnum.OFF + mode: Optional[OnOffMode] = "off" class ManageEncryptedPassword(BaseModel): - class Config: - allow_population_by_field_name = True - - manage_type8_password: Optional[bool] = Field(default=False, alias="manageType8Password") + model_config = ConfigDict(populate_by_name=True) + manage_type8_password: Optional[bool] = Field( + default=False, serialization_alias="manageType8Password", validation_alias="manageType8Password" + ) class CloudServices(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict(populate_by_name=True) enabled: Optional[bool] = False - vanalytics_enabled: Optional[bool] = Field(default=False, alias="vanalyticsEnabled") - vmonitoring_enabled: Optional[bool] = Field(default=False, alias="vmonitoringEnabled") + vanalytics_enabled: Optional[bool] = Field( + default=False, serialization_alias="vanalyticsEnabled", validation_alias="vanalyticsEnabled" + ) + vmonitoring_enabled: Optional[bool] = Field( + default=False, serialization_alias="vmonitoringEnabled", validation_alias="vmonitoringEnabled" + ) otp: Optional[str] = None - cloud_gateway_url: Optional[str] = Field(default=None, alias="cloudGatewayUrl") - vanalytics_enabled_time: Optional[datetime.datetime] = Field(default=None, alias="vanalyticsEnabledTime") - vmonitoring_enabled_time: Optional[datetime.datetime] = Field(default=None, alias="vmonitoringEnabledTime") + cloud_gateway_url: Optional[str] = Field( + default=None, serialization_alias="cloudGatewayUrl", validation_alias="cloudGatewayUrl" + ) + vanalytics_enabled_time: Optional[datetime.datetime] = Field( + default=None, serialization_alias="vanalyticsEnabledTime", validation_alias="vanalyticsEnabledTime" + ) + vmonitoring_enabled_time: Optional[datetime.datetime] = Field( + default=None, serialization_alias="vmonitoringEnabledTime", validation_alias="vmonitoringEnabledTime" + ) class ClientSessionTimeout(BaseModel): - class Config: - allow_population_by_field_name = True - - is_enabled: Optional[bool] = Field(default=False, alias="isEnabled") + model_config = ConfigDict(populate_by_name=True) + is_enabled: Optional[bool] = Field(default=False, serialization_alias="isEnabled", validation_alias="isEnabled") timeout: Optional[int] = Field(default=None, ge=10, description="timeout in minutes") class SessionLifeTime(BaseModel): - class Config: - allow_population_by_field_name = True - - session_life_time: int = Field(alias="sessionLifeTime", ge=30, le=10080, description="lifetime in minutes") + model_config = ConfigDict(populate_by_name=True) + session_life_time: int = Field( + serialization_alias="sessionLifeTime", + validation_alias="sessionLifeTime", + ge=30, + le=10080, + description="lifetime in minutes", + ) class ServerSessionTimeout(BaseModel): - class Config: - allow_population_by_field_name = True - - server_session_timeout: int = Field(alias="serverSessionTimeout", ge=10, le=30, description="timeout in minutes") + model_config = ConfigDict(populate_by_name=True) + server_session_timeout: int = Field( + serialization_alias="serverSessionTimeout", + validation_alias="serverSessionTimeout", + ge=10, + le=30, + description="timeout in minutes", + ) class MaxSessionsPerUser(BaseModel): - class Config: - allow_population_by_field_name = True - - max_sessions_per_user: int = Field(alias="maxSessionsPerUser", ge=1, le=8) + model_config = ConfigDict(populate_by_name=True) + max_sessions_per_user: int = Field( + serialization_alias="maxSessionsPerUser", validation_alias="maxSessionsPerUser", ge=1, le=8 + ) class PasswordPolicy(BaseModel): - class Config: - allow_population_by_field_name = True - - password_policy: Union[bool, PasswordPolicyEnum] = Field(alias="passwordPolicy") + model_config = ConfigDict(populate_by_name=True) + password_policy: Union[bool, PasswordPolicies] = Field( + serialization_alias="passwordPolicy", validation_alias="passwordPolicy" + ) password_expiration_time: Optional[int] = Field( - default=False, alias="passwordExpirationTime", ge=1, le=90, description="timeout in days" + default=False, + serialization_alias="passwordExpirationTime", + validation_alias="passwordExpirationTime", + ge=1, + le=90, + description="timeout in days", ) class VManageDataStream(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict(populate_by_name=True) enable: Optional[bool] = False - ip_type: Optional[DataStreamIPTypeEnum] = Field(default=None, alias="ipType") - server_host_name: Union[IPvAnyAddress, DataStreamIPTypeEnum, None] = Field(default=None, alias="serverHostName") + ip_type: Optional[DataStreamIPTypes] = Field(default=None, serialization_alias="ipType", validation_alias="ipType") + server_host_name: Union[IPvAnyAddress, DataStreamIPTypes, None] = Field( + default=None, serialization_alias="serverHostName", validation_alias="serverHostName" + ) vpn: Optional[int] = Field(default=None, le=512) @@ -189,31 +178,39 @@ class SDWANTelemetry(BaseModel): class StatsOperation(BaseModel): - class Config: - allow_population_by_field_name = True - - stats_operation: str = Field(alias="statsOperation") - rid: int = Field(alias="@rid") - operation_interval: int = Field(alias="operationInterval", ge=1, description="interval in minutes") - default_interval: int = Field(alias="defaultInterval", ge=1, description="interval in minutes") + model_config = ConfigDict(populate_by_name=True) + stats_operation: str = Field(serialization_alias="statsOperation", validation_alias="statsOperation") + rid: int = Field(serialization_alias="@rid", validation_alias="@rid") + operation_interval: int = Field( + serialization_alias="operationInterval", + validation_alias="operationInterval", + ge=1, + description="interval in minutes", + ) + default_interval: int = Field( + serialization_alias="defaultInterval", + validation_alias="defaultInterval", + ge=1, + description="interval in minutes", + ) class MaintenanceWindow(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict(populate_by_name=True) enabled: Optional[bool] = False message: Optional[str] = "" - start: Optional[int] = Field(default=None, alias="epochStartTimeInMillis") - end: Optional[int] = Field(default=None, alias="epochEndTimeInMillis") + start: Optional[int] = Field( + default=None, serialization_alias="epochStartTimeInMillis", validation_alias="epochStartTimeInMillis" + ) + end: Optional[int] = Field( + default=None, serialization_alias="epochEndTimeInMillis", validation_alias="epochEndTimeInMillis" + ) class ElasticSearchDBSize(BaseModel): - class Config: - allow_population_by_field_name = True - - index_name: str = Field(alias="indexName") - size_in_gb: int = Field(alias="sizeInGB") + model_config = ConfigDict(populate_by_name=True) + index_name: str = Field(serialization_alias="indexName", validation_alias="indexName") + size_in_gb: int = Field(serialization_alias="sizeInGB", validation_alias="sizeInGB") class GoogleMapKey(BaseModel): @@ -221,28 +218,26 @@ class GoogleMapKey(BaseModel): class SoftwareInstallTimeout(BaseModel): - class Config: - allow_population_by_field_name = True - - download_timeout: str = Field(alias="downloadTimeoutInMin") - activate_timeout: str = Field(alias="activateTimeoutInMin") - control_pps: Optional[str] = Field(alias="controlPps") + model_config = ConfigDict(populate_by_name=True) + download_timeout: str = Field(serialization_alias="downloadTimeoutInMin", validation_alias="downloadTimeoutInMin") + activate_timeout: str = Field(serialization_alias="activateTimeoutInMin", validation_alias="activateTimeoutInMin") + control_pps: Optional[str] = Field(serialization_alias="controlPps", validation_alias="controlPps") - @validator("download_timeout") + @field_validator("download_timeout") def check_download_timeout(cls, download_timeout_str: str): download_timeout = int(download_timeout_str) if download_timeout < 60 or download_timeout > 360: raise ValueError("download timeout should be in range 60-360") return download_timeout_str - @validator("activate_timeout") + @field_validator("activate_timeout") def check_activate_timeout(cls, activate_timeout_str: str): activate_timeout = int(activate_timeout_str) if activate_timeout < 30 or activate_timeout > 180: raise ValueError("activate timeout should be in range 30-180") return activate_timeout_str - @validator("control_pps") + @field_validator("control_pps") def check_control_pps(cls, control_pps_str: str): control_pps = int(control_pps_str) if control_pps < 300 or control_pps > 65535: @@ -251,13 +246,16 @@ def check_control_pps(cls, control_pps_str: str): class IPSSignatureSettings(BaseModel): - class Config: - allow_population_by_field_name = True - - is_enabled: Optional[bool] = Field(default=False, alias="isEnabled") + model_config = ConfigDict(populate_by_name=True) + is_enabled: Optional[bool] = Field(default=False, serialization_alias="isEnabled", validation_alias="isEnabled") username: Optional[str] = None update_interval: Optional[int] = Field( - default=None, alias="updateInterval", description="interval in minutes", ge=1, le=1440 + default=None, + serialization_alias="updateInterval", + validation_alias="updateInterval", + description="interval in minutes", + ge=1, + le=1440, ) @@ -267,7 +265,7 @@ class SmartAccountCredentials(BaseModel): class PnPConnectSync(BaseModel): - mode: Optional[ModeEnum] = ModeEnum.OFF + mode: Optional[OnOffMode] = "off" class ClaimDevice(BaseModel): @@ -275,30 +273,32 @@ class ClaimDevice(BaseModel): class WalkMe(BaseModel): - class Config: - allow_population_by_field_name = True - + model_config = ConfigDict(populate_by_name=True) walkme: bool - walkme_analytics: bool = Field(alias="walkmeAnalytics") + walkme_analytics: bool = Field(serialization_alias="walkmeAnalytics", validation_alias="walkmeAnalytics") class SmartLicensingSetting(BaseModel): - class Config: - allow_population_by_field_name = True - - mode: Optional[SmartLicensingSettingModeEnum] = None - ssm_server_url: Optional[str] = Field(None, alias="ssmServerUrl") - ssm_client_id: Optional[str] = Field(None, alias="ssmClientId") - ssm_client_secret: Optional[str] = Field(None, alias="ssmClientSecret") + model_config = ConfigDict(populate_by_name=True) + mode: Optional[SmartLicensingSettingModes] = None + ssm_server_url: Optional[str] = Field(None, serialization_alias="ssmServerUrl", validation_alias="ssmServerUrl") + ssm_client_id: Optional[str] = Field(None, serialization_alias="ssmClientId", validation_alias="ssmClientId") + ssm_client_secret: Optional[str] = Field( + None, serialization_alias="ssmClientSecret", validation_alias="ssmClientSecret" + ) class StatsCollectionInterval(BaseModel): - class Config: - allow_population_by_field_name = True - - config_name: Literal["statsCollection"] = Field(default="statsCollection", alias="configName") + model_config = ConfigDict(populate_by_name=True) + config_name: Literal["statsCollection"] = Field( + default="statsCollection", serialization_alias="configName", validation_alias="configName" + ) operation_interval: int = Field( - ge=5, le=180, alias="operationInterval", desctiption="collecion interval in minutes" + ge=5, + le=180, + serialization_alias="operationInterval", + validation_alias="operationInterval", + description="collecion interval in minutes", ) @@ -310,26 +310,24 @@ class StatsConfig(BaseModel): @staticmethod def from_collection_interval(interval: int) -> "StatsConfig": - return StatsConfig(config=[StatsCollectionInterval(operationInterval=interval)]) + return StatsConfig(config=[StatsCollectionInterval(operation_interval=interval)]) class CRLSettings(BaseModel): - class Config: - allow_population_by_field_name = True - - action: CRLActionEnum - crl_url: Optional[str] = Field(None, alias="crlUrl") + model_config = ConfigDict(populate_by_name=True) + action: CRLActions + crl_url: Optional[str] = Field(None, serialization_alias="crlUrl", validation_alias="crlUrl") polling_interval: Optional[str] = Field(description="Retrieval interval (1-24 hours)") vpn: Optional[str] - @validator("polling_interval") + @field_validator("polling_interval") def check_polling_interval(cls, polling_interval_str: str): polling_interval = int(polling_interval_str) if polling_interval < 1 or polling_interval > 24: raise ValueError("Polling interval should be in range 1-24") return polling_interval_str - @validator("vpn") + @field_validator("vpn") def check_vpn(cls, vpn_str: str): vpn = int(vpn_str) if vpn < 0 or vpn > 65530: diff --git a/catalystwan/endpoints/monitoring_device_details.py b/catalystwan/endpoints/monitoring_device_details.py index ef533365..955843e0 100644 --- a/catalystwan/endpoints/monitoring_device_details.py +++ b/catalystwan/endpoints/monitoring_device_details.py @@ -3,7 +3,7 @@ # mypy: disable-error-code="empty-body" from typing import List, Optional -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, get from catalystwan.typed_list import DataSequence @@ -20,60 +20,86 @@ class Tier(BaseModel): Since vManage 20.12 version, object has been renamed to "Resource Profile". """ - name: str = Field(alias="tierName") + model_config = ConfigDict(populate_by_name=True) + name: str = Field(serialization_alias="tierName", validation_alias="tierName") vpn: int - rid: int = Field(alias="@rid") - ipv4_route_limit_type: Optional[str] = Field(alias="ipv4RouteLimitType") - ipv4_route_limit_threshold: Optional[int] = Field(alias="ipv4RouteLimitThreshold") - ipv4_route_limit: Optional[int] = Field(alias="ipv4RouteLimit") - ipv6_route_limit_type: Optional[str] = Field(alias="ipv6RouteLimitType") - ipv6_route_limit_threshold: Optional[int] = Field(alias="ipv6RouteLimitThreshold") - ipv6_route_limit: Optional[int] = Field(alias="ipv6RouteLimit") + rid: int = Field(serialization_alias="@rid", validation_alias="@rid") + ipv4_route_limit_type: Optional[str] = Field( + serialization_alias="ipv4RouteLimitType", validation_alias="ipv4RouteLimitType" + ) + ipv4_route_limit_threshold: Optional[int] = Field( + serialization_alias="ipv4RouteLimitThreshold", validation_alias="ipv4RouteLimitThreshold" + ) + ipv4_route_limit: Optional[int] = Field(serialization_alias="ipv4RouteLimit", validation_alias="ipv4RouteLimit") + ipv6_route_limit_type: Optional[str] = Field( + serialization_alias="ipv6RouteLimitType", validation_alias="ipv6RouteLimitType" + ) + ipv6_route_limit_threshold: Optional[int] = Field( + serialization_alias="ipv6RouteLimitThreshold", validation_alias="ipv6RouteLimitThreshold" + ) + ipv6_route_limit: Optional[int] = Field(serialization_alias="ipv6RouteLimit", validation_alias="ipv6RouteLimit") tlocs: List[TLOC] = Field(default=[]) # New in 20.12 version - nat_session_limit: Optional[int] = Field(alias="natSessionLimit") + nat_session_limit: Optional[int] = Field(serialization_alias="natSessionLimit", validation_alias="natSessionLimit") class DeviceData(BaseModel): - board_serial: Optional[str] = Field(None, alias="board-serial") - certificate_validity: Optional[str] = Field(None, alias="certificate-validity") - connected_vmanages: Optional[List[str]] = Field(None, alias="connectedVManages") - control_connections: Optional[str] = Field(None, alias="controlConnections") - device_groups: Optional[List[str]] = Field(None, alias="device-groups") - device_model: Optional[str] = Field(None, alias="device-model") - device_os: Optional[str] = Field(None, alias="device-os") - device_type: Optional[str] = Field(None, alias="device-type") - device_id: str = Field(alias="deviceId") - domain_id: Optional[str] = Field(None, alias="domain-id") - host_name: Optional[str] = Field(None, alias="host-name") - is_device_geo_data: Optional[bool] = Field(None, alias="isDeviceGeoData") + # Field "model_sku" has conflict with protected namespace "model_" + model_config = ConfigDict(populate_by_name=True, protected_namespaces=()) + board_serial: Optional[str] = Field( + default=None, serialization_alias="board-serial", validation_alias="board-serial" + ) + certificate_validity: Optional[str] = Field( + default=None, serialization_alias="certificate-validity", validation_alias="certificate-validity" + ) + connected_vmanages: Optional[List[str]] = Field( + default=None, serialization_alias="connectedVManages", validation_alias="connectedVManages" + ) + control_connections: Optional[str] = Field( + default=None, serialization_alias="controlConnections", validation_alias="controlConnections" + ) + device_groups: Optional[List[str]] = Field( + default=None, serialization_alias="device-groups", validation_alias="device-groups" + ) + device_model: Optional[str] = Field( + default=None, serialization_alias="device-model", validation_alias="device-model" + ) + device_os: Optional[str] = Field(default=None, serialization_alias="device-os", validation_alias="device-os") + device_type: Optional[str] = Field(default=None, serialization_alias="device-type", validation_alias="device-type") + device_id: str = Field(serialization_alias="deviceId", validation_alias="deviceId") + domain_id: Optional[str] = Field(default=None, serialization_alias="domain-id", validation_alias="domain-id") + host_name: Optional[str] = Field(default=None, serialization_alias="host-name", validation_alias="host-name") + is_device_geo_data: Optional[bool] = Field( + default=None, serialization_alias="isDeviceGeoData", validation_alias="isDeviceGeoData" + ) lastupdated: Optional[str] = None latitude: Optional[str] = None - layout_level: Optional[int] = Field(None, alias="layoutLevel") - local_system_ip: Optional[str] = Field(None, alias="local-system-ip") + layout_level: Optional[int] = Field(default=None, serialization_alias="layoutLevel", validation_alias="layoutLevel") + local_system_ip: Optional[str] = Field( + default=None, serialization_alias="local-system-ip", validation_alias="local-system-ip" + ) longitude: Optional[str] = None - max_controllers: Optional[str] = Field(None, alias="max-controllers") + max_controllers: Optional[str] = Field( + default=None, serialization_alias="max-controllers", validation_alias="max-controllers" + ) model_sku: Optional[str] = None personality: Optional[str] = None platform: Optional[str] = None reachability: Optional[str] = None - site_id: Optional[str] = Field(None, alias="site-id") + site_id: Optional[str] = Field(default=None, serialization_alias="site-id", validation_alias="site-id") state: Optional[str] = None state_description: Optional[str] = None status: Optional[str] = None - status_order: Optional[str] = Field(None, alias="statusOrder") - system_ip: Optional[str] = Field(None, alias="system-ip") + status_order: Optional[str] = Field(default=None, serialization_alias="statusOrder", validation_alias="statusOrder") + system_ip: Optional[str] = Field(default=None, serialization_alias="system-ip", validation_alias="system-ip") testbed_mode: Optional[bool] = None timezone: Optional[str] = None total_cpu_count: Optional[str] = None - uptime_date: Optional[str] = Field(None, alias="uptime-date") + uptime_date: Optional[str] = Field(default=None, serialization_alias="uptime-date", validation_alias="uptime-date") uuid: Optional[str] = None validity: Optional[str] = None version: Optional[str] = None - class Config: - allow_population_by_field_name = True - class MonitoringDeviceDetails(APIEndpoints): def add_tier(self): diff --git a/catalystwan/endpoints/sdavc_cloud_connector.py b/catalystwan/endpoints/sdavc_cloud_connector.py index c674c9ec..db13ee4a 100644 --- a/catalystwan/endpoints/sdavc_cloud_connector.py +++ b/catalystwan/endpoints/sdavc_cloud_connector.py @@ -4,18 +4,25 @@ from typing import Optional -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, get class CloudConnector(BaseModel): - cloud_enabled: Optional[bool] = Field(default=False, alias="cloudEnabled") - client_id: Optional[str] = Field(default=None, alias="clientId") - client_secret: Optional[str] = Field(default=None, alias="clientSecret") - org_name: Optional[str] = Field(default=None, alias="orgName") + model_config = ConfigDict(populate_by_name=True) + cloud_enabled: Optional[bool] = Field( + default=False, serialization_alias="cloudEnabled", validation_alias="cloudEnabled" + ) + client_id: Optional[str] = Field(default=None, serialization_alias="clientId", validation_alias="clientId") + client_secret: Optional[str] = Field( + default=None, serialization_alias="clientSecret", validation_alias="clientSecret" + ) + org_name: Optional[str] = Field(default=None, serialization_alias="orgName", validation_alias="orgName") affinity: Optional[str] = None - telemetry_enabled: Optional[bool] = Field(default=None, alias="telemetryEnabled") + telemetry_enabled: Optional[bool] = Field( + default=None, serialization_alias="telemetryEnabled", validation_alias="telemetryEnabled" + ) class SDAVCCloudConnector(APIEndpoints): diff --git a/catalystwan/endpoints/tenant_backup_restore.py b/catalystwan/endpoints/tenant_backup_restore.py index bd022cbe..ca03872c 100644 --- a/catalystwan/endpoints/tenant_backup_restore.py +++ b/catalystwan/endpoints/tenant_backup_restore.py @@ -3,7 +3,7 @@ # mypy: disable-error-code="empty-body" from typing import List -from pydantic.v1 import BaseModel +from pydantic import BaseModel from catalystwan.endpoints import APIEndpoints, get, view from catalystwan.utils.session_type import ProviderAsTenantView, TenantView diff --git a/catalystwan/endpoints/tenant_management.py b/catalystwan/endpoints/tenant_management.py index d41b80ef..c17a41b0 100644 --- a/catalystwan/endpoints/tenant_management.py +++ b/catalystwan/endpoints/tenant_management.py @@ -3,7 +3,7 @@ # mypy: disable-error-code="empty-body" from typing import Dict, List, Optional -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from catalystwan.endpoints import APIEndpoints, delete, get, post, put, versions, view from catalystwan.models.tenant import Tenant @@ -16,8 +16,9 @@ class TenantDeleteRequest(BaseModel): class TenantBulkDeleteRequest(BaseModel): + model_config = ConfigDict(populate_by_name=True) password: str - tenant_id_list: List[str] = Field(alias="tenantIdList") + tenant_id_list: List[str] = Field(serialization_alias="tenantIdList", validation_alias="tenantIdList") class TenantTaskId(BaseModel): @@ -31,15 +32,17 @@ class CertificatesStatus(BaseModel): class ControlStatus(BaseModel): - control_up: int = Field(alias="controlUp") + model_config = ConfigDict(populate_by_name=True) + control_up: int = Field(serialization_alias="controlUp", validation_alias="controlUp") partial: int - control_down: int = Field(alias="controlDown") + control_down: int = Field(serialization_alias="controlDown", validation_alias="controlDown") class SiteHealth(BaseModel): - full_connectivity: int = Field(alias="fullConnectivity") - partial_connectivity: int = Field(alias="partialConnectivity") - no_connectivity: int = Field(alias="noConnectivity") + model_config = ConfigDict(populate_by_name=True) + full_connectivity: int = Field(serialization_alias="fullConnectivity", validation_alias="fullConnectivity") + partial_connectivity: int = Field(serialization_alias="partialConnectivity", validation_alias="partialConnectivity") + no_connectivity: int = Field(serialization_alias="noConnectivity", validation_alias="noConnectivity") class vEdgeHealth(BaseModel): @@ -54,22 +57,32 @@ class vSmartStatus(BaseModel): class TenantStatus(BaseModel): - tenant_id: str = Field(alias="tenantId") - tenant_name: str = Field(alias="tenantName") - control_status: ControlStatus = Field(alias="controlStatus") - site_health: SiteHealth = Field(alias="siteHealth") - vedge_health: vEdgeHealth = Field(alias="vEdgeHealth") - vsmart_status: vSmartStatus = Field(alias="vSmartStatus") + model_config = ConfigDict(populate_by_name=True) + tenant_id: str = Field(serialization_alias="tenantId", validation_alias="tenantId") + tenant_name: str = Field(serialization_alias="tenantName", validation_alias="tenantName") + control_status: ControlStatus = Field(serialization_alias="controlStatus", validation_alias="controlStatus") + site_health: SiteHealth = Field(serialization_alias="siteHealth", validation_alias="siteHealth") + vedge_health: vEdgeHealth = Field(serialization_alias="vEdgeHealth", validation_alias="vEdgeHealth") + vsmart_status: vSmartStatus = Field(serialization_alias="vSmartStatus", validation_alias="vSmartStatus") class TenantUpdateRequest(BaseModel): - tenant_id: str = Field(alias="tenantId") - subdomain: str = Field(alias="subDomain") + model_config = ConfigDict(populate_by_name=True) + tenant_id: str = Field(serialization_alias="tenantId", validation_alias="tenantId") + subdomain: str = Field(serialization_alias="subDomain", validation_alias="subDomain") desc: str - wan_edge_forecast: Optional[int] = Field(alias="wanEdgeForecast") - edge_connector_enable: Optional[bool] = Field(alias="edgeConnectorEnable") - edge_connector_system_ip: Optional[str] = Field(alias="edgeConnectorSystemIp") - edge_connector_tunnel_interface_name: Optional[str] = Field(alias="edgeConnectorTunnelInterfaceName") + wan_edge_forecast: Optional[int] = Field(serialization_alias="wanEdgeForecast", validation_alias="wanEdgeForecast") + edge_connector_enable: Optional[bool] = Field( + serialization_alias="edgeConnectorEnable", validation_alias="edgeConnectorEnable" + ) + edge_connector_system_ip: Optional[str] = Field( + default=None, serialization_alias="edgeConnectorSystemIp", validation_alias="edgeConnectorSystemIp" + ) + edge_connector_tunnel_interface_name: Optional[str] = Field( + default=None, + serialization_alias="edgeConnectorTunnelInterfaceName", + validation_alias="edgeConnectorTunnelInterfaceName", + ) @classmethod def from_tenant(cls, tenant: Tenant) -> "TenantUpdateRequest": @@ -87,25 +100,29 @@ def from_tenant(cls, tenant: Tenant) -> "TenantUpdateRequest": if not tenant.tenant_id: raise TypeError("tenantId required for update request") return TenantUpdateRequest( - tenantId=tenant.tenant_id, + tenant_id=tenant.tenant_id, desc=tenant.desc, - subDomain=tenant.subdomain, - wanEdgeForecast=tenant.wan_edge_forecast, - edgeConnectorEnable=tenant.edge_connector_enable, - edgeConnectorSystemIp=tenant.edge_connector_system_ip, - edgeConnectorTunnelInterfaceName=tenant.edge_connector_tunnel_interface_name, + subdomain=tenant.subdomain, + wan_edge_forecast=tenant.wan_edge_forecast, + edge_connector_enable=tenant.edge_connector_enable, + edge_connector_system_ip=tenant.edge_connector_system_ip, + edge_connector_tunnel_interface_name=tenant.edge_connector_tunnel_interface_name, ) class vSmartPlacementUpdateRequest(BaseModel): - src_vsmart_uuid: str = Field(alias="srcvSmartUuid") - dest_vsmart_uuid: str = Field(alias="destvSmartUuid") + model_config = ConfigDict(populate_by_name=True) + src_vsmart_uuid: str = Field(serialization_alias="srcvSmartUuid", validation_alias="srcvSmartUuid") + dest_vsmart_uuid: str = Field(serialization_alias="destvSmartUuid", validation_alias="destvSmartUuid") class vSmartTenantCapacity(BaseModel): - vsmart_uuid: str = Field(alias="vSmartUuid") - total_tenant_capacity: int = Field(alias="totalTenantCapacity") - current_tenant_count: int = Field(alias="currentTenantCount") + model_config = ConfigDict(populate_by_name=True) + vsmart_uuid: str = Field(serialization_alias="vSmartUuid", validation_alias="vSmartUuid") + total_tenant_capacity: int = Field( + serialization_alias="totalTenantCapacity", validation_alias="totalTenantCapacity" + ) + current_tenant_count: int = Field(serialization_alias="currentTenantCount", validation_alias="currentTenantCount") class vSmartTenantMap(BaseModel): @@ -113,7 +130,8 @@ class vSmartTenantMap(BaseModel): class vSessionId(BaseModel): - vsessionid: str = Field(alias="VSessionId") + model_config = ConfigDict(populate_by_name=True) + vsessionid: str = Field(serialization_alias="VSessionId", validation_alias="VSessionId") class TenantManagement(APIEndpoints): diff --git a/catalystwan/endpoints/tenant_migration.py b/catalystwan/endpoints/tenant_migration.py index 1bef10f6..d12b0b5c 100644 --- a/catalystwan/endpoints/tenant_migration.py +++ b/catalystwan/endpoints/tenant_migration.py @@ -2,9 +2,10 @@ # mypy: disable-error-code="empty-body" from pathlib import Path -from urllib.parse import parse_qsl, urlsplit +from typing import Any +from urllib.parse import parse_qs, urlsplit -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field, model_validator from catalystwan.endpoints import APIEndpoints, CustomPayloadType, PreparedPayload, get, post, versions, view from catalystwan.models.tenant import TenantExport @@ -12,16 +13,27 @@ class MigrationTokenQueryParams(BaseModel): - migration_id: str = Field(alias="migrationId") + model_config = ConfigDict(populate_by_name=True, extra="allow") + migration_id: str = Field(serialization_alias="migrationId", validation_alias="migrationId") + + @model_validator(mode="before") + @classmethod + def single_migration_id_required(cls, values: Any): + migration_id = values.get("migrationId") + if isinstance(migration_id, list) and len(migration_id) == 1: + values["migrationId"] = migration_id[0] + return values class ExportInfo(BaseModel): - process_id: str = Field(alias="processId") + model_config = ConfigDict(populate_by_name=True) + process_id: str = Field(serialization_alias="processId", validation_alias="processId") class ImportInfo(BaseModel): - process_id: str = Field(alias="processId") - migration_token_url: str = Field(alias="migrationTokenURL") + model_config = ConfigDict(populate_by_name=True) + process_id: str = Field(serialization_alias="processId", validation_alias="processId") + migration_token_url: str = Field(serialization_alias="migrationTokenURL", validation_alias="migrationTokenURL") @property def migration_token_query(self) -> str: @@ -29,12 +41,12 @@ def migration_token_query(self) -> str: @property def migration_token_query_params(self) -> MigrationTokenQueryParams: - query = self.migration_token_query - return MigrationTokenQueryParams.parse_obj(parse_qsl(query)) + return MigrationTokenQueryParams.model_validate(parse_qs(self.migration_token_query)) class MigrationInfo(BaseModel): - process_id: str = Field(alias="processId") + model_config = ConfigDict(populate_by_name=True) + process_id: str = Field(serialization_alias="processId", validation_alias="processId") class MigrationFile(CustomPayloadType): diff --git a/catalystwan/models/feature_profile_parcel.py b/catalystwan/models/feature_profile_parcel.py index c12ddf45..9eb9b368 100644 --- a/catalystwan/models/feature_profile_parcel.py +++ b/catalystwan/models/feature_profile_parcel.py @@ -2,7 +2,7 @@ from typing import Optional -from pydantic.v1 import BaseModel, Field +from pydantic import BaseModel, Field class FullConfig(BaseModel): @@ -10,6 +10,6 @@ class FullConfig(BaseModel): class FullConfigParcel(BaseModel): - name: str = Field(regex=r'^[^&<>! "]+$', min_length=1, max_length=128) + name: str = Field(pattern=r'^[^&<>! "]+$', min_length=1, max_length=128) description: Optional[str] data: FullConfig diff --git a/catalystwan/models/tenant.py b/catalystwan/models/tenant.py index 8a80506d..61743f32 100644 --- a/catalystwan/models/tenant.py +++ b/catalystwan/models/tenant.py @@ -3,66 +3,103 @@ from datetime import datetime from typing import Dict, List, Optional, Union -from pydantic.v1 import BaseModel, Field, IPvAnyAddress +from pydantic import BaseModel, ConfigDict, Field, IPvAnyAddress class MTEdge(BaseModel): + model_config = ConfigDict(populate_by_name=True) uuid: str - configured_hostname: Optional[str] = Field(alias="configuredHostname") - configured_system_ip: Optional[IPvAnyAddress] = Field(alias="configuredSystemIP") - management_system_ip: Optional[IPvAnyAddress] = Field(alias="managementSystemIP") - device_model: Optional[str] = Field(alias="deviceModel") - device_type: Optional[str] = Field(alias="deviceType") + configured_hostname: Optional[str] = Field( + serialization_alias="configuredHostname", validation_alias="configuredHostname" + ) + configured_system_ip: Optional[IPvAnyAddress] = Field( + serialization_alias="configuredSystemIP", validation_alias="configuredSystemIP" + ) + management_system_ip: Optional[IPvAnyAddress] = Field( + serialization_alias="managementSystemIP", validation_alias="managementSystemIP" + ) + device_model: Optional[str] = Field(serialization_alias="deviceModel", validation_alias="deviceModel") + device_type: Optional[str] = Field(serialization_alias="deviceType", validation_alias="deviceType") class TenantVPNMap(BaseModel): - tenant_vpn: int = Field(alias="tenantVPN") - device_vpn: int = Field(alias="deviceVPN") + model_config = ConfigDict(populate_by_name=True) + tenant_vpn: int = Field(serialization_alias="tenantVPN", validation_alias="tenantVPN") + device_vpn: int = Field(serialization_alias="deviceVPN", validation_alias="deviceVPN") class Tenant(BaseModel): + model_config = ConfigDict(populate_by_name=True) name: str desc: str - org_name: str = Field(alias="orgName") - subdomain: str = Field(alias="subDomain") - flake_id: Optional[int] = Field(alias="flakeId") - vbond_address: Optional[str] = Field(alias="vBondAddress") - edge_connector_system_ip: Optional[str] = Field(alias="edgeConnectorSystemIp") - edge_connector_enable: Optional[bool] = Field(alias="edgeConnectorEnable") - vsmarts: Optional[List[str]] = Field(alias="vSmarts") - wan_edge_forecast: Optional[int] = Field(alias="wanEdgeForecast") - saml_sp_info: Optional[str] = Field(alias="samlSpInfo") - idp_map: Union[Dict, str, None] = Field(alias="idpMap") - config_db_cluster_service_name: Optional[str] = Field(alias="configDBClusterServiceName") - old_idp_map: Union[Dict, str, None] = Field(alias="oldIdpMap") - created_at: Optional[datetime] = Field(alias="createdAt") - rid: Optional[int] = Field(alias="@rid") - edge_connector_tunnel_interface_name: Optional[str] = Field(alias="edgeConnectorTunnelInterfaceName") - tenant_id: Optional[str] = Field(alias="tenantId") - sp_metadata: Optional[str] = Field(alias="spMetadata") - state: Optional[str] - wan_edge_present: Optional[int] = Field(alias="wanEdgePresent") - mt_edge: Optional[List[MTEdge]] = Field(alias="mtEdge") - mt_edge_count: Optional[int] = Field(alias="mtEdgeCount") - tenant_vpn_map: Optional[List[TenantVPNMap]] = Field(alias="tenantVPNmap") - tenant_provider_vpn_count: Optional[int] = Field(alias="tenantProviderVPNCount") - - class Config: - allow_population_by_field_name = True + org_name: str = Field(serialization_alias="orgName", validation_alias="orgName") + subdomain: str = Field(serialization_alias="subDomain", validation_alias="subDomain") + flake_id: Optional[int] = Field(default=None, serialization_alias="flakeId", validation_alias="flakeId") + vbond_address: Optional[str] = Field( + default=None, serialization_alias="vBondAddress", validation_alias="vBondAddress" + ) + edge_connector_system_ip: Optional[str] = Field( + default=None, serialization_alias="edgeConnectorSystemIp", validation_alias="edgeConnectorSystemIp" + ) + edge_connector_enable: Optional[bool] = Field( + default=None, serialization_alias="edgeConnectorEnable", validation_alias="edgeConnectorEnable" + ) + vsmarts: Optional[List[str]] = Field(default=None, serialization_alias="vSmarts", validation_alias="vSmarts") + wan_edge_forecast: Optional[int] = Field( + default=None, serialization_alias="wanEdgeForecast", validation_alias="wanEdgeForecast" + ) + saml_sp_info: Optional[str] = Field(default=None, serialization_alias="samlSpInfo", validation_alias="samlSpInfo") + idp_map: Union[Dict, str, None] = Field(default=None, serialization_alias="idpMap", validation_alias="idpMap") + config_db_cluster_service_name: Optional[str] = Field( + default=None, serialization_alias="configDBClusterServiceName", validation_alias="configDBClusterServiceName" + ) + old_idp_map: Union[Dict, str, None] = Field( + default=None, serialization_alias="oldIdpMap", validation_alias="oldIdpMap" + ) + created_at: Optional[datetime] = Field(default=None, serialization_alias="createdAt", validation_alias="createdAt") + rid: Optional[int] = Field(default=None, serialization_alias="@rid", validation_alias="@rid") + edge_connector_tunnel_interface_name: Optional[str] = Field( + default=None, + serialization_alias="edgeConnectorTunnelInterfaceName", + validation_alias="edgeConnectorTunnelInterfaceName", + ) + tenant_id: Optional[str] = Field(default=None, serialization_alias="tenantId", validation_alias="tenantId") + sp_metadata: Optional[str] = Field(default=None, serialization_alias="spMetadata", validation_alias="spMetadata") + state: Optional[str] = None + wan_edge_present: Optional[int] = Field( + default=None, serialization_alias="wanEdgePresent", validation_alias="wanEdgePresent" + ) + mt_edge: Optional[List[MTEdge]] = Field(default=None, serialization_alias="mtEdge", validation_alias="mtEdge") + mt_edge_count: Optional[int] = Field( + default=None, serialization_alias="mtEdgeCount", validation_alias="mtEdgeCount" + ) + tenant_vpn_map: Optional[List[TenantVPNMap]] = Field( + default=None, serialization_alias="tenantVPNmap", validation_alias="tenantVPNmap" + ) + tenant_provider_vpn_count: Optional[int] = Field( + default=None, serialization_alias="tenantProviderVPNCount", validation_alias="tenantProviderVPNCount" + ) class TenantExport(BaseModel): + model_config = ConfigDict(populate_by_name=True) name: str desc: str - org_name: str = Field(alias="orgName") - subdomain: str = Field(alias="subDomain") - wan_edge_forecast: Optional[int] = Field(alias="wanEdgeForecast") + org_name: str = Field(serialization_alias="orgName", validation_alias="orgName") + subdomain: str = Field(serialization_alias="subDomain", validation_alias="subDomain") + wan_edge_forecast: Optional[int] = Field( + default=None, serialization_alias="wanEdgeForecast", validation_alias="wanEdgeForecast" + ) is_destination_overlay_mt: Optional[bool] = Field( - alias="isDestinationOverlayMT", description="required starting from 20.13" + default=None, + serialization_alias="isDestinationOverlayMT", + validation_alias="isDestinationOverlayMT", + description="required starting from 20.13", ) migration_key: Optional[str] = Field( - alias="migrationKey", regex=r"^[a-zA-Z0-9]{8,32}$", description="required starting from 20.13" + default=None, + serialization_alias="migrationKey", + validation_alias="migrationKey", + pattern=r"^[a-zA-Z0-9]{8,32}$", + description="required starting from 20.13", ) - - class Config: - allow_population_by_field_name = True diff --git a/catalystwan/response.py b/catalystwan/response.py index 19ebdb48..450c9fe9 100644 --- a/catalystwan/response.py +++ b/catalystwan/response.py @@ -8,8 +8,7 @@ from typing import Any, Callable, Dict, Optional, Sequence, Type, TypeVar, Union, cast from urllib.parse import urlparse -from pydantic import BaseModel as BaseModelV2 -from pydantic.v1 import BaseModel as BaseModelV1 +from pydantic import BaseModel from requests import PreparedRequest, Request, Response from requests.cookies import RequestsCookieJar from requests.exceptions import JSONDecodeError @@ -178,7 +177,7 @@ def info(self, history: bool = False) -> str: def dataseq(self, cls: Type[T], sourcekey: Optional[str] = "data") -> DataSequence[T]: """Returns data contents from JSON payload parsed as DataSequence of Dataclass/BaseModel instances Args: - cls: Dataclass/BaseModelV1 subtype (eg. Devices) + cls: Dataclass/BaseModel subtype (eg. Devices) sourcekey: name of the JSON key from response payload to be parsed. If None whole JSON payload will be used Returns: @@ -195,9 +194,7 @@ def dataseq(self, cls: Type[T], sourcekey: Optional[str] = "data") -> DataSequen else: sequence = [cast(dict, data)] - if issubclass(cls, BaseModelV1): - return DataSequence(cls, [cls.parse_obj(item) for item in sequence]) # type: ignore - if issubclass(cls, BaseModelV2): + if issubclass(cls, BaseModel): return DataSequence(cls, [cls.model_validate(item) for item in sequence]) # type: ignore return DataSequence(cls, [create_dataclass(cls, item) for item in sequence]) @@ -216,10 +213,8 @@ def dataobj(self, cls: Type[T], sourcekey: Optional[str] = "data") -> T: else: data = self.payload.json.get(sourcekey) - if issubclass(cls, BaseModelV1): - return cls.parse_obj(data) # type: ignore - if issubclass(cls, BaseModelV2): - return cls.model_validate(data) # type: ignore + if issubclass(cls, BaseModel): + return cls.model_validate(data) # type: ignore[return-value] return create_dataclass(cls, data) def get_error_info(self) -> ManagerErrorInfo: diff --git a/catalystwan/tests/test_endpoints.py b/catalystwan/tests/test_endpoints.py index 4bbc7ffb..0216bbb6 100644 --- a/catalystwan/tests/test_endpoints.py +++ b/catalystwan/tests/test_endpoints.py @@ -13,9 +13,7 @@ import pytest # type: ignore from packaging.version import Version # type: ignore from parameterized import parameterized # type: ignore -from pydantic import BaseModel as BaseModelV2 -from pydantic import Field as FieldV2 -from pydantic.v1 import BaseModel as BaseModelV1 +from pydantic import BaseModel, Field from typing_extensions import Annotated from catalystwan.endpoints import ( @@ -35,31 +33,19 @@ from catalystwan.utils.session_type import ProviderAsTenantView, ProviderView, TenantView -class BaseModelV1Example(BaseModelV1): +class BaseModelExample(BaseModel): id: str size: int capacity: float active: bool -class ParamsModelV1Example(BaseModelV1): - name: str - color: str - - -class BaseModelV2Example(BaseModelV2): - id: str - size: int - capacity: float - active: bool - - -class BaseModelV2Example2(BaseModelV2): +class BaseModelExample2(BaseModel): other_id: str active: bool -class ParamsModelV2Example(BaseModelV2): +class ParamsModelExample(BaseModel): name: str color: str @@ -88,17 +74,14 @@ def setUp(self): "active": True, } self.json_payload = json.dumps(self.dict_payload) - self.basemodel_v1_payload = BaseModelV1Example.parse_obj(self.dict_payload) - self.basemodel_v2_payload = BaseModelV2Example.model_validate(self.dict_payload) + self.basemodel_payload = BaseModelExample.model_validate(self.dict_payload) self.list_dict_payload = [self.dict_payload] * 2 self.dict_params = { "name": "purple", "color": "haze", } - self.basemodel_v1_params = ParamsModelV1Example.parse_obj(self.dict_params) - self.basemodel_v2_params = ParamsModelV2Example.model_validate(self.dict_params) - self.basemodel_v1_sequence_payload = [self.basemodel_v1_payload] * 2 - self.basemodel_v2_sequence_payload = [self.basemodel_v2_payload] * 2 + self.basemodel_params = ParamsModelExample.model_validate(self.dict_params) + self.basemodel_sequence_payload = [self.basemodel_payload] * 2 @parameterized.expand( [ @@ -203,25 +186,15 @@ def versions_decorated_method(self): assert str(allowed) in log.output[0] assert str(current_session) in log.output[0] - def test_basemodel_v1_payload(self): - self.endpoints._request("GET", f"/{__name__}", payload=self.basemodel_v1_payload) - _, kwargs = self.session_mock.request.call_args - assert json.loads(kwargs.get("data")) == self.dict_payload - @pytest.mark.filterwarnings("ignore::DeprecationWarning") - def test_basemodel_v2_payload(self): - self.endpoints._request("GET", f"/{__name__}", payload=self.basemodel_v2_payload) + def test_basemodel_payload(self): + self.endpoints._request("GET", f"/{__name__}", payload=self.basemodel_payload) _, kwargs = self.session_mock.request.call_args assert json.loads(kwargs.get("data")) == self.dict_payload - def test_basemodel_v1_sequence_payload(self): - self.endpoints._request("GET", f"/{__name__}", payload=self.basemodel_v1_sequence_payload) - _, kwargs = self.session_mock.request.call_args - assert json.loads(kwargs.get("data")) == self.list_dict_payload - @pytest.mark.filterwarnings("ignore::DeprecationWarning") - def test_basemodel_v2_sequence_payload(self): - self.endpoints._request("GET", f"/{__name__}", payload=self.basemodel_v2_sequence_payload) + def test_basemodel_sequence_payload(self): + self.endpoints._request("GET", f"/{__name__}", payload=self.basemodel_sequence_payload) _, kwargs = self.session_mock.request.call_args assert json.loads(kwargs.get("data")) == self.list_dict_payload @@ -281,14 +254,9 @@ def test_dict_params(self): _, kwargs = self.session_mock.request.call_args assert kwargs.get("params") == self.dict_params - def test_basemodel_v1_params(self): - self.endpoints._request("POST", f"/{__name__}", params=self.basemodel_v1_params) - _, kwargs = self.session_mock.request.call_args - assert kwargs.get("params") == self.dict_params - @pytest.mark.filterwarnings("ignore::DeprecationWarning") - def test_basemodel_v2_params(self): - self.endpoints._request("POST", f"/{__name__}", params=self.basemodel_v2_params) + def test_basemodel_params(self): + self.endpoints._request("POST", f"/{__name__}", params=self.basemodel_params) _, kwargs = self.session_mock.request.call_args assert kwargs.get("params") == self.dict_params @@ -321,7 +289,7 @@ def test_request_decorator_unsupported_composite_return_type(self): class TestAPI(APIEndpoints): @request("GET", "/v1/data") - def get_data(self) -> List[BaseModelV1Example]: # type: ignore [empty-body] + def get_data(self) -> List[BaseModelExample]: # type: ignore [empty-body] ... def test_request_decorator_unsupported_payload_type(self): @@ -345,40 +313,40 @@ def test_request_decorator_unsupported_payload_composite_type(self): class TestAPI(APIEndpoints): @request("POST", "/v1/data") - def get_data(self, payload: Dict[str, BaseModelV1Example]) -> None: # type: ignore [empty-body] + def get_data(self, payload: Dict[str, BaseModelExample]) -> None: # type: ignore [empty-body] ... @parameterized.expand( [ - (BaseModelV1Example, False, TypeSpecifier(True, None, BaseModelV1Example, None, False, False)), - (List[BaseModelV1Example], False, TypeSpecifier(True, list, BaseModelV1Example, None, False, False)), - (Optional[BaseModelV1Example], False, TypeSpecifier(True, None, BaseModelV1Example, None, False, True)), + (BaseModelExample, False, TypeSpecifier(True, None, BaseModelExample, None, False, False)), + (List[BaseModelExample], False, TypeSpecifier(True, list, BaseModelExample, None, False, False)), + (Optional[BaseModelExample], False, TypeSpecifier(True, None, BaseModelExample, None, False, True)), ( - Optional[List[BaseModelV1Example]], + Optional[List[BaseModelExample]], False, - TypeSpecifier(True, list, BaseModelV1Example, None, False, True), + TypeSpecifier(True, list, BaseModelExample, None, False, True), ), - (List[Optional[BaseModelV1Example]], True, None), - (List[BaseModelV2Example], False, TypeSpecifier(True, list, BaseModelV2Example, None, False, False)), - (Optional[BaseModelV2Example], False, TypeSpecifier(True, None, BaseModelV2Example, None, False, True)), + (List[Optional[BaseModelExample]], True, None), + (List[BaseModelExample], False, TypeSpecifier(True, list, BaseModelExample, None, False, False)), + (Optional[BaseModelExample], False, TypeSpecifier(True, None, BaseModelExample, None, False, True)), ( - Optional[List[BaseModelV2Example]], + Optional[List[BaseModelExample]], False, - TypeSpecifier(True, list, BaseModelV2Example, None, False, True), + TypeSpecifier(True, list, BaseModelExample, None, False, True), ), - (List[Optional[BaseModelV2Example]], True, None), + (List[Optional[BaseModelExample]], True, None), (JSON, False, TypeSpecifier(True, None, None, None, True, False)), (str, False, TypeSpecifier(True, None, str, None, False, False)), (bytes, False, TypeSpecifier(True, None, bytes, None, False, False)), ( - Union[BaseModelV2Example, BaseModelV2Example2], + Union[BaseModelExample, BaseModelExample2], False, - TypeSpecifier(True, None, None, [BaseModelV2Example, BaseModelV2Example2], False, False), + TypeSpecifier(True, None, None, [BaseModelExample, BaseModelExample2], False, False), ), ( - Annotated[Union[BaseModelV2Example, BaseModelV2Example2], None], + Annotated[Union[BaseModelExample, BaseModelExample2], None], False, - TypeSpecifier(True, None, None, [BaseModelV2Example, BaseModelV2Example2], False, False), + TypeSpecifier(True, None, None, [BaseModelExample, BaseModelExample2], False, False), ), (None, True, None), ] @@ -427,24 +395,24 @@ def test_request_decorator_bogus_params(self): class TestAPI(APIEndpoints): @request("POST", "/v1/data/{id}") # type: ignore [empty-body] - def get_data(self, id: str, payload: BaseModelV1Example, bogus: str) -> None: + def get_data(self, id: str, payload: BaseModelExample, bogus: str) -> None: ... def test_request_decorator_accepts_optional_payload(self): # Arrange class TestAPIOptional(APIEndpoints): @request("GET", "/v1/data") - def get_data1(self, payload: Optional[BaseModelV1Example]) -> None: # type: ignore [empty-body] + def get_data1(self, payload: Optional[BaseModelExample]) -> None: # type: ignore [empty-body] ... class TestAPIUnion(APIEndpoints): @request("GET", "/v2/data") - def get_data2(self, payload: Union[None, BaseModelV1Example]) -> None: # type: ignore [empty-body] + def get_data2(self, payload: Union[None, BaseModelExample]) -> None: # type: ignore [empty-body] ... class TestAPIOptionalModelSequence(APIEndpoints): @request("GET", "/v3/data") - def get_data3(self, payload: Optional[List[BaseModelV1Example]]) -> None: # type: ignore [empty-body] + def get_data3(self, payload: Optional[List[BaseModelExample]]) -> None: # type: ignore [empty-body] ... def test_request_decorator_call_from_unsuitable_base_class(self): @@ -461,17 +429,17 @@ def test_request_decorator_call_with_positional_arguments(self): # Arrange class TestAPI(APIEndpoints): @request("GET", "/v1/data/{id}") - def get_data(self, id: str, payload: BaseModelV2Example) -> None: # type: ignore [empty-body] + def get_data(self, id: str, payload: BaseModelExample) -> None: # type: ignore [empty-body] ... api = TestAPI(self.session_mock) # Act - api.get_data("ID123", self.basemodel_v1_payload) + api.get_data("ID123", self.basemodel_payload) # Assert self.session_mock.request.assert_called_once_with( "GET", self.base_path + "/v1/data/ID123", - data=self.json_payload, + data=self.basemodel_payload.model_dump_json(), headers={"content-type": "application/json"}, ) @@ -480,20 +448,20 @@ def test_request_decorator_call_with_mixed_positional_arguments(self): class TestAPI(APIEndpoints): @request("GET", "/v2/{category}/items") def get_data( - self, payload: BaseModelV2Example, category: str, params: ParamsModelV1Example + self, payload: BaseModelExample, category: str, params: ParamsModelExample ) -> None: # type: ignore [empty-body] ... api = TestAPI(self.session_mock) # Act - api.get_data(self.basemodel_v1_payload, "clothes", self.basemodel_v1_params) + api.get_data(self.basemodel_payload, "clothes", self.basemodel_params) # Assert self.session_mock.request.assert_called_once_with( "GET", self.base_path + "/v2/clothes/items", - data=self.json_payload, + data=self.basemodel_payload.model_dump_json(), headers={"content-type": "application/json"}, - params=self.basemodel_v1_params, + params=self.basemodel_params.model_dump(), ) def test_request_decorator_call_with_keyword_arguments(self): @@ -501,20 +469,20 @@ def test_request_decorator_call_with_keyword_arguments(self): class TestAPI(APIEndpoints): @request("GET", "/v2/{category}/items") def get_data( - self, payload: BaseModelV2Example, category: str, params: ParamsModelV1Example + self, payload: BaseModelExample, category: str, params: ParamsModelExample ) -> None: # type: ignore [empty-body] ... api = TestAPI(self.session_mock) # Act - api.get_data(category="clothes", params=self.basemodel_v1_params, payload=self.basemodel_v1_payload) + api.get_data(category="clothes", params=self.basemodel_params, payload=self.basemodel_payload) # Assert self.session_mock.request.assert_called_once_with( "GET", self.base_path + "/v2/clothes/items", - data=self.json_payload, + data=self.basemodel_payload.model_dump_json(), headers={"content-type": "application/json"}, - params=self.basemodel_v1_params, + params=self.basemodel_params.model_dump(), ) def test_request_decorator_call_with_json_payload(self): @@ -540,7 +508,7 @@ def test_request_decorator_call_optional_model_payload(self): # Arrange class TestAPI(APIEndpoints): @request("PUT", "/v1/data/{id}") - def put_data(self, id: str, payload: Optional[BaseModelV1Example]) -> None: # type: ignore [empty-body] + def put_data(self, id: str, payload: Optional[BaseModelExample]) -> None: # type: ignore [empty-body] ... api = TestAPI(self.session_mock) @@ -556,31 +524,31 @@ def test_request_decorator_call_and_return_model(self): # Arrange class TestAPI(APIEndpoints): @request("GET", "/v1/items") - def get_data(self) -> BaseModelV1Example: # type: ignore [empty-body] + def get_data(self) -> BaseModelExample: # type: ignore [empty-body] ... - self.session_mock.request.return_value.dataobj = MagicMock(return_value=self.basemodel_v1_payload) + self.session_mock.request.return_value.dataobj = MagicMock(return_value=self.basemodel_payload) api = TestAPI(self.session_mock) # Act retval = api.get_data() # Assert self.session_mock.request.return_value.dataobj.assert_called_once() - assert retval == self.basemodel_v1_payload + assert retval == self.basemodel_payload def test_request_decorator_call_and_return_model_datasequece(self): # Arrange class TestAPI(APIEndpoints): @request("GET", "/v1/items") - def get_data(self) -> DataSequence[BaseModelV1Example]: # type: ignore [empty-body] + def get_data(self) -> DataSequence[BaseModelExample]: # type: ignore [empty-body] ... - self.session_mock.request.return_value.dataseq = MagicMock(return_value=self.basemodel_v1_sequence_payload) + self.session_mock.request.return_value.dataseq = MagicMock(return_value=self.basemodel_sequence_payload) api = TestAPI(self.session_mock) # Act retval = api.get_data() # Assert self.session_mock.request.return_value.dataseq.assert_called_once() - assert retval == self.basemodel_v1_sequence_payload + assert retval == self.basemodel_sequence_payload def test_request_decorator_call_and_return_str(self): # Arrange @@ -717,7 +685,7 @@ def test_no_mutable_state_when_calling_endpoint(self): class TestAPI(APIEndpoints): @request("GET", "/v2/{category}/items") def get_data( - self, payload: BaseModelV1Example, category: str, params: ParamsModelV1Example + self, payload: BaseModelExample, category: str, params: ParamsModelExample ) -> None: # type: ignore [empty-body] ... @@ -728,31 +696,31 @@ def get_data( {"id": "id2", "size": 120, "capacity": 1.9, "active": False}, ]: for params in [ - ParamsModelV1Example(name="submarine", color="yellow"), - ParamsModelV1Example(name="oyster", color="blue"), + ParamsModelExample(name="submarine", color="yellow"), + ParamsModelExample(name="oyster", color="blue"), ]: # Act - payload = BaseModelV1Example.parse_obj(dict_payload) + payload = BaseModelExample.model_validate(dict_payload) api.get_data(category=category, params=params, payload=payload) # Assert self.session_mock.request.assert_called_once_with( "GET", self.base_path + f"/v2/{category}/items", - data=json.dumps(dict_payload), + data=payload.model_dump_json(), headers={"content-type": "application/json"}, - params=params, + params=params.model_dump(), ) self.session_mock.reset_mock() - def test_request_decorator_call_with_defaults_arguments(self): + def test_request_decorator_call_with_default_arguments(self): # Arrange class TestAPI(APIEndpoints): @request("GET", "/v2/{category}/items") def get_data( self, - payload: BaseModelV1Example = self.basemodel_v1_payload, + payload: BaseModelExample = self.basemodel_payload, category: str = "default-category", - params: ParamsModelV1Example = self.basemodel_v1_params, + params: ParamsModelExample = self.basemodel_params, ) -> None: # type: ignore [empty-body] ... @@ -763,9 +731,9 @@ def get_data( self.session_mock.request.assert_called_once_with( "GET", self.base_path + "/v2/default-category/items", - data=self.json_payload, + data=self.basemodel_payload.model_dump_json(), headers={"content-type": "application/json"}, - params=self.basemodel_v1_params, + params=self.dict_params, ) def test_request_decorator_call_with_defaults_arguments_override(self): @@ -774,25 +742,25 @@ class TestAPI(APIEndpoints): @request("GET", "/v2/{category}/items") def get_data( self, - payload: BaseModelV1Example = self.basemodel_v1_payload, + payload: BaseModelExample = self.basemodel_payload, category: str = "default", - params: ParamsModelV1Example = self.basemodel_v1_params, + params: ParamsModelExample = self.basemodel_params, ) -> None: # type: ignore [empty-body] ... api = TestAPI(self.session_mock) # Act - payload_override = BaseModelV1Example(id="override-id", size=500, capacity=9.0001, active=False) + payload_override = BaseModelExample(id="override-id", size=500, capacity=9.0001, active=False) category_override = "override-category!" - params_override = ParamsModelV1Example(name="override-Name", color="override with orange!") + params_override = ParamsModelExample(name="override-Name", color="override with orange!") api.get_data(payload_override, category_override, params_override) # Assert self.session_mock.request.assert_called_once_with( "GET", self.base_path + f"/v2/{category_override}/items", - data=payload_override.json(), + data=payload_override.model_dump_json(), headers={"content-type": "application/json"}, - params=params_override, + params=params_override.model_dump(), ) def test_decorator_chaining_order(self): @@ -801,7 +769,7 @@ class TestAPIMixedOrder1(APIEndpoints): @request("GET", "/v2/{category}/items") @versions("<2") def get_data( - self, payload: BaseModelV1Example, category: str, params: ParamsModelV1Example + self, payload: BaseModelExample, category: str, params: ParamsModelExample ) -> None: # type: ignore [empty-body] ... @@ -810,7 +778,7 @@ class TestAPIMixedOrder2(APIEndpoints): @versions("<2") @view({ProviderView}) def get_data( - self, payload: BaseModelV1Example, category: str, params: ParamsModelV1Example + self, payload: BaseModelExample, category: str, params: ParamsModelExample ) -> None: # type: ignore [empty-body] ... @@ -887,20 +855,20 @@ def test_request_decorator_accept_union_of_models(self): class TestAPI(APIEndpoints): @request("GET", "/v1/data") def get_data( - self, payload: Union[BaseModelV2Example, BaseModelV2Example2] + self, payload: Union[BaseModelExample, BaseModelExample2] ) -> None: # type: ignore [empty-body] ... def test_request_decorator_accept_annotated_union_of_models(self): - class BaseModelV2_A(BaseModelV2): + class BaseModel_A(BaseModel): field: Literal["number"] = "number" num: float - class BaseModelV2_B(BaseModelV2): + class BaseModel_B(BaseModel): field: Literal["name"] = "name" name: str - AnyBaseModel = Annotated[Union[BaseModelV2_A, BaseModelV2_B], FieldV2(discriminator="field")] + AnyBaseModel = Annotated[Union[BaseModel_A, BaseModel_B], Field(discriminator="field")] class TestAPI(APIEndpoints): @request("POST", "/v1/data") diff --git a/catalystwan/tests/test_response.py b/catalystwan/tests/test_response.py index a7508211..55038c4b 100644 --- a/catalystwan/tests/test_response.py +++ b/catalystwan/tests/test_response.py @@ -6,10 +6,7 @@ from attr import define, field # type: ignore from parameterized import parameterized # type: ignore -from pydantic import BaseModel as BaseModelV2 -from pydantic import Field as FieldV2 -from pydantic.v1 import BaseModel as BaseModelV1 -from pydantic.v1 import Field as FieldV1 +from pydantic import BaseModel, Field from catalystwan.dataclasses import DataclassBase from catalystwan.response import ManagerErrorInfo, ManagerResponse @@ -23,16 +20,10 @@ class ParsedDataTypeAttrs(DataclassBase): key3: Optional[float] = field(default=None) -class ParsedDataTypePydanticV1(BaseModelV1): +class ParsedDataTypePydanticV2(BaseModel): key1: str key2: int - key3: Optional[float] = FieldV1(default=None) - - -class ParsedDataTypePydanticV2(BaseModelV2): - key1: str - key2: int - key3: Optional[float] = FieldV2(default=None) + key3: Optional[float] = Field(default=None) PARSE_DATASEQ_TEST_DATA: List = [ @@ -87,19 +78,7 @@ def test_dataseq_attrs(self, raises: bool, json: Any, expected_len: int, sourcek vmng_response.dataseq(ParsedDataTypeAttrs, sourcekey) @parameterized.expand(PARSE_DATASEQ_TEST_DATA) - def test_dataseq_pydantic_v1(self, raises: bool, json: Any, expected_len: int, sourcekey: str): - self.response_mock.json.return_value = json - vmng_response = ManagerResponse(self.response_mock) - if not raises: - data_sequence = vmng_response.dataseq(ParsedDataTypePydanticV1, sourcekey) - assert isinstance(data_sequence, DataSequence) - assert len(data_sequence) == expected_len - else: - with self.assertRaises(Exception): - vmng_response.dataseq(ParsedDataTypePydanticV1, sourcekey) - - @parameterized.expand(PARSE_DATASEQ_TEST_DATA) - def test_dataseq_pydantic_v2(self, raises: bool, json: Any, expected_len: int, sourcekey: str): + def test_dataseq_pydantic(self, raises: bool, json: Any, expected_len: int, sourcekey: str): self.response_mock.json.return_value = json vmng_response = ManagerResponse(self.response_mock) if not raises: @@ -122,18 +101,7 @@ def test_dataobj_attrs(self, raises: bool, json: Any, sourcekey: str): vmng_response.dataobj(ParsedDataTypeAttrs, sourcekey) @parameterized.expand(PARSE_DATAOBJ_TEST_DATA) - def test_dataobj_pydantic_v1(self, raises: bool, json: Any, sourcekey: str): - self.response_mock.json.return_value = json - vmng_response = ManagerResponse(self.response_mock) - if not raises: - data_object = vmng_response.dataobj(ParsedDataTypePydanticV1, sourcekey) - assert isinstance(data_object, ParsedDataTypePydanticV1) - else: - with self.assertRaises(Exception): - vmng_response.dataobj(ParsedDataTypePydanticV1, sourcekey) - - @parameterized.expand(PARSE_DATAOBJ_TEST_DATA) - def test_dataobj_pydantic_v2(self, raises: bool, json: Any, sourcekey: str): + def test_dataobj_pydantic(self, raises: bool, json: Any, sourcekey: str): self.response_mock.json.return_value = json vmng_response = ManagerResponse(self.response_mock) if not raises: diff --git a/catalystwan/tests/test_task_status_api.py b/catalystwan/tests/test_task_status_api.py index 79a0ce67..6e184776 100644 --- a/catalystwan/tests/test_task_status_api.py +++ b/catalystwan/tests/test_task_status_api.py @@ -307,7 +307,7 @@ def setUp(self, mock_session): @patch.object(ConfigurationDashboardStatus, "find_status") def test_wait_for_completed_success(self, mock_task_response, mock_validation): # Arrange - mock_task_response.return_value = TaskData.parse_obj(self.success_response) + mock_task_response.return_value = TaskData.model_validate(self.success_response) # Act answer = self.task.wait_for_completed(interval_seconds=1).result @@ -322,8 +322,8 @@ def test_wait_for_completed_empty_data(self, mock_task_response, mock_validation # Arrange mock_task_response.side_effect = [ - TaskData.parse_obj(self.empty_data), - TaskData.parse_obj(self.success_response), + TaskData.model_validate(self.empty_data), + TaskData.model_validate(self.success_response), ] # Act @@ -336,7 +336,7 @@ def test_wait_for_completed_empty_data(self, mock_task_response, mock_validation @patch.object(ConfigurationDashboardStatus, "find_status") def test_wait_for_completed_with_action_config_as_dict(self, mock_task_response, mock_validation): # Arrange - mock_task_response.return_value = TaskData.parse_obj(self.response_with_action_config_as_dict) + mock_task_response.return_value = TaskData.model_validate(self.response_with_action_config_as_dict) # Act answer = self.task.wait_for_completed(interval_seconds=1).result @@ -350,7 +350,10 @@ def test_wait_for_completed_no_data(self, mock_task_response, mock_validation): # No data in first call, and then response is success # Arrange - mock_task_response.side_effect = [TaskData.parse_obj(self.no_data), TaskData.parse_obj(self.success_response)] + mock_task_response.side_effect = [ + TaskData.model_validate(self.no_data), + TaskData.model_validate(self.success_response), + ] # Act answer = self.task.wait_for_completed(timeout_seconds=2, interval_seconds=1).result @@ -361,7 +364,7 @@ def test_wait_for_completed_no_data(self, mock_task_response, mock_validation): @patch.object(ConfigurationDashboardStatus, "find_status") def test_wait_for_completed_no_validation_field(self, mock_task_response_response): # Arrange - mock_task_response_response.return_value = TaskData.parse_obj(self.no_validation) + mock_task_response_response.return_value = TaskData.model_validate(self.no_validation) # Act answer = self.task.wait_for_completed(interval_seconds=1).result @@ -372,7 +375,7 @@ def test_wait_for_completed_no_validation_field(self, mock_task_response_respons @patch.object(ConfigurationDashboardStatus, "find_status") def test_wait_for_completed_raise_TaskValidationError(self, mock_task_response_response): # Arrange - mock_task_response_response.return_value = TaskData.parse_obj(self.validation_failure) + mock_task_response_response.return_value = TaskData.model_validate(self.validation_failure) # Act&Assert self.assertRaises(TaskValidationError, self.task.wait_for_completed) diff --git a/catalystwan/tests/test_tenant_management_api.py b/catalystwan/tests/test_tenant_management_api.py index aef88c57..5841649f 100644 --- a/catalystwan/tests/test_tenant_management_api.py +++ b/catalystwan/tests/test_tenant_management_api.py @@ -33,13 +33,13 @@ def test_get(self): expected_tenants = [ Tenant( name="tenant1", - orgName="CiscoDevNet", - subDomain="alpha.bravo.net", + org_name="CiscoDevNet", + subdomain="alpha.bravo.net", desc="This is tenant for unit tests", - edgeConnectorEnable=True, - edgeConnectorSystemIp="172.16.255.81", - edgeConnectorTunnelInterfaceName="GigabitEthernet1", - wanEdgeForecast=1, + edge_connector_enable=True, + edge_connector_system_ip="172.16.255.81", + edge_connector_tunnel_interface_name="GigabitEthernet1", + wan_edge_forecast=1, ) ] self.api._endpoints.get_all_tenants = MagicMock(return_value=expected_tenants) @@ -50,13 +50,13 @@ def test_create(self): tenants = [ Tenant( name="tenant1", - orgName="CiscoDevNet", - subDomain="alpha.bravo.net", + org_name="CiscoDevNet", + subdomain="alpha.bravo.net", desc="This is tenant for unit tests", - edgeConnectorEnable=True, - edgeConnectorSystemIp="172.16.255.81", - edgeConnectorTunnelInterfaceName="GigabitEthernet1", - wanEdgeForecast=1, + edge_connector_enable=True, + edge_connector_system_ip="172.16.255.81", + edge_connector_tunnel_interface_name="GigabitEthernet1", + wan_edge_forecast=1, ) ] task = self.api.create(tenants) @@ -65,11 +65,11 @@ def test_create(self): def test_update(self): # Arrange tenant_update_request = TenantUpdateRequest( - tenantId="apo605#", - subDomain="doamin.tenant.net", + tenant_id="apo605#", + subdomain="doamin.tenant.net", desc="Tenant1 description", - wanEdgeForecast=1, - edgeConnectorEnable=False, + wan_edge_forecast=1, + edge_connector_enable=False, ) self.api._endpoints.update_tenant = MagicMock() # Act @@ -85,8 +85,8 @@ def test_update_vsmart_placement(self): dst_uuid = "!_0ac%$asfDS" tenant_id = "apo605#" vsmart_placement_update = vSmartPlacementUpdateRequest( - srcvSmartUuid=src_uuid, - destvSmartUuid=dst_uuid, + src_vsmart_uuid=src_uuid, + dest_vsmart_uuid=dst_uuid, ) self.api._endpoints.update_tenant_vsmart_placement = MagicMock() # Act @@ -110,12 +110,12 @@ def test_delete_auto_password(self): def test_get_statuses(self): tenant_status = TenantStatus( - tenantId="tenant2", - tenantName="TeanantTwo", - controlStatus=ControlStatus(controlUp=1, controlDown=0, partial=1), - siteHealth=SiteHealth(fullConnectivity=2, partialConnectivity=1, noConnectivity=0), - vEdgeHealth=vEdgeHealth(normal=3, warning=1, error=0), - vSmartStatus=vSmartStatus(up=1, down=0), + tenant_id="tenant2", + tenant_name="TeanantTwo", + control_status=ControlStatus(control_up=1, control_down=0, partial=1), + site_health=SiteHealth(full_connectivity=2, partial_connectivity=1, no_connectivity=0), + vedge_health=vEdgeHealth(normal=3, warning=1, error=0), + vsmart_status=vSmartStatus(up=1, down=0), ) expected_statuses = DataSequence(TenantStatus, [tenant_status]) self.api._endpoints.get_all_tenant_statuses = MagicMock(return_value=expected_statuses) @@ -123,7 +123,7 @@ def test_get_statuses(self): assert expected_statuses == observed_statuses def test_get_hosting_capacity_on_vsmarts(self): - capacity = vSmartTenantCapacity(vSmartUuid="ABCD-1234", totalTenantCapacity=12, currentTenantCount=5) + capacity = vSmartTenantCapacity(vsmart_uuid="ABCD-1234", total_tenant_capacity=12, current_tenant_count=5) expected_capacities = DataSequence(vSmartTenantCapacity, [capacity]) self.api._endpoints.get_tenant_hosting_capacity_on_vsmarts = MagicMock(return_value=expected_capacities) observed_capacities = self.api.get_hosting_capacity_on_vsmarts() @@ -135,10 +135,10 @@ def test_get_vsmart_mapping(self): "vsmart1": [ Tenant( name="tenant1", - orgName="Tenant1-organization", + org_name="Tenant1-organization", desc="Tenant1 description", - subDomain="tenant1.organization.org", - flakeId=9987, + subdomain="tenant1.organization.org", + flake_id=9987, ) ] } @@ -149,6 +149,6 @@ def test_get_vsmart_mapping(self): def test_vsession_id(self): expected_vsession_id = "567-DEF" - self.api._endpoints.vsession_id = MagicMock(return_value=vSessionId(VSessionId=expected_vsession_id)) + self.api._endpoints.vsession_id = MagicMock(return_value=vSessionId(vsessionid=expected_vsession_id)) observed_vsession_id = self.api.vsession_id("1") assert expected_vsession_id == observed_vsession_id diff --git a/catalystwan/tests/test_tenant_migration_api.py b/catalystwan/tests/test_tenant_migration_api.py index 581c2d03..2a4987dc 100644 --- a/catalystwan/tests/test_tenant_migration_api.py +++ b/catalystwan/tests/test_tenant_migration_api.py @@ -4,6 +4,7 @@ import unittest from pathlib import Path from unittest.mock import MagicMock, patch +from uuid import uuid4 from packaging.version import Version # type: ignore @@ -46,19 +47,16 @@ def test_download(self): def test_import_tenant(self): self.session.api_version = Version("20.12") - migration_key = "Cisco12345" - migration_id = "dcbed267-eb0d-4dcd-9c12-2536e8562f75" + migration_key = "mkey1" + migration_id = str(uuid4()) with tempfile.TemporaryDirectory() as tmpdir: import_file = Path(tmpdir) / "tenant.tar.gz" with open(import_file, "wb") as f: f.write(b"\xFEtest_data") self.session.endpoints.tenant_migration.import_tenant_data = MagicMock( return_value=ImportInfo( - processId="123", - migrationTokenURL=( - "/dataservice/tenantmigration/migrationToken?" - "migrationId=dcbed267-eb0d-4dcd-9c12-2536e8562f75" - ), + process_id="123", + migration_token_url=("/dataservice/tenantmigration/migrationToken?" f"migrationId={migration_id}"), ) ) task = self.api.import_tenant(import_file, migration_key) @@ -67,19 +65,16 @@ def test_import_tenant(self): def test_import_tenant_with_key(self): self.session.api_version = Version("20.13") - migration_key = "Cisco12345" - migration_id = "dcbed267-eb0d-4dcd-9c12-2536e8562f75" + migration_key = "mkey2" + migration_id = str(uuid4()) with tempfile.TemporaryDirectory() as tmpdir: import_file = Path(tmpdir) / "tenant.tar.gz" with open(import_file, "wb") as f: f.write(b"\xFEtest_data") self.session.endpoints.tenant_migration.import_tenant_data_with_key = MagicMock( return_value=ImportInfo( - processId="123", - migrationTokenURL=( - "/dataservice/tenantmigration/migrationToken?" - "migrationId=dcbed267-eb0d-4dcd-9c12-2536e8562f75" - ), + process_id="123", + migration_token_url=("/dataservice/tenantmigration/migrationToken?" f"migrationId={migration_id}"), ) ) task = self.api.import_tenant(import_file, migration_key) diff --git a/catalystwan/typed_list.py b/catalystwan/typed_list.py index 38743c51..154c44f8 100644 --- a/catalystwan/typed_list.py +++ b/catalystwan/typed_list.py @@ -4,8 +4,7 @@ from typing import Any, Generic, Iterable, MutableSequence, Type, TypeVar, overload -from pydantic import BaseModel as BaseModelV2 -from pydantic.v1 import BaseModel as BaseModelV1 +from pydantic import BaseModel from catalystwan.exceptions import InvalidOperationError from catalystwan.utils.creation_tools import AttrsInstance, asdict @@ -152,13 +151,9 @@ def __init__(self, _type: Type[T], _iterable: Iterable[T], /) -> None: ... def __init__(self, _type, _iterable=None, /): - if ( - not isinstance(_type, AttrsInstance) - and not issubclass(_type, BaseModelV1) - and not issubclass(_type, BaseModelV2) - ): + if not isinstance(_type, AttrsInstance) and not issubclass(_type, BaseModel): raise TypeError( - f"Expected {AttrsInstance.__name__} or {BaseModelV1.__name__} item type, got {_type.__name__}." + f"Expected {AttrsInstance.__name__} or {BaseModel.__name__} item type, got {_type.__name__}." ) super().__init__(_type, _iterable) @@ -176,7 +171,7 @@ def __repr__(self) -> str: def __str__(self) -> str: pretty_message = "" for element in self: - if issubclass(element.__class__, (BaseModelV1, BaseModelV2)): + if issubclass(element.__class__, BaseModel): pprint = "\n".join(f" {attr[0]}: {attr[1]}, " for attr in element.dict().items()) # type: ignore else: pprint = "\n".join(f" {attr[0]}: {attr[1]}, " for attr in asdict(element).items()) # type: ignore diff --git a/pyproject.toml b/pyproject.toml index 8ad3581b..1d92303c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "catalystwan" -version = "0.32.0dev0" +version = "0.33.0dev0" description = "Cisco Catalyst WAN SDK for Python" authors = ["kagorski "] readme = "README.md"