catalystwan 0.40.2.dev1__py3-none-any.whl → 2.0.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- catalystwan/core/__init__.py +2 -0
- catalystwan/core/abstractions.py +26 -0
- catalystwan/{apigw_auth.py → core/apigw_auth.py} +27 -14
- catalystwan/core/client.py +71 -0
- catalystwan/core/encoder.py +12 -0
- catalystwan/{exceptions.py → core/exceptions.py} +29 -9
- catalystwan/core/loader.py +37 -0
- catalystwan/{__init__.py → core/metadata.py} +9 -22
- catalystwan/core/models/deserialize.py +204 -0
- catalystwan/core/models/serialize.py +137 -0
- catalystwan/core/request_adapter.py +246 -0
- catalystwan/{request_limiter.py → core/request_limiter.py} +1 -2
- catalystwan/{response.py → core/response.py} +41 -88
- catalystwan/{session.py → core/session.py} +84 -101
- catalystwan/core/types.py +33 -0
- catalystwan/{version.py → core/version.py} +3 -5
- catalystwan/{vmanage_auth.py → core/vmanage_auth.py} +46 -21
- catalystwan-2.0.0a1.dist-info/METADATA +239 -0
- catalystwan-2.0.0a1.dist-info/RECORD +24 -0
- {catalystwan-0.40.2.dev1.dist-info → catalystwan-2.0.0a1.dist-info}/WHEEL +2 -1
- catalystwan-2.0.0a1.dist-info/top_level.txt +1 -0
- catalystwan/abstractions.py +0 -77
- catalystwan/api/admin_tech_api.py +0 -176
- catalystwan/api/administration.py +0 -434
- catalystwan/api/alarms_api.py +0 -186
- catalystwan/api/api_container.py +0 -73
- catalystwan/api/basic_api.py +0 -338
- catalystwan/api/builders/__init__.py +0 -14
- catalystwan/api/builders/feature_profiles/application_priority.py +0 -58
- catalystwan/api/builders/feature_profiles/builder_factory.py +0 -59
- catalystwan/api/builders/feature_profiles/cli.py +0 -76
- catalystwan/api/builders/feature_profiles/other.py +0 -79
- catalystwan/api/builders/feature_profiles/report.py +0 -137
- catalystwan/api/builders/feature_profiles/service.py +0 -213
- catalystwan/api/builders/feature_profiles/system.py +0 -80
- catalystwan/api/builders/feature_profiles/transport.py +0 -214
- catalystwan/api/builders/feature_profiles/uc_voice.py +0 -287
- catalystwan/api/config_device_inventory_api.py +0 -58
- catalystwan/api/config_group_api.py +0 -150
- catalystwan/api/configuration_groups/parcel.py +0 -206
- catalystwan/api/dashboard_api.py +0 -215
- catalystwan/api/device_action_api.py +0 -216
- catalystwan/api/feature_profile_api.py +0 -2401
- catalystwan/api/logs_api.py +0 -63
- catalystwan/api/monitoring_status_api.py +0 -76
- catalystwan/api/mtt_aaa_api.py +0 -197
- catalystwan/api/omp_api.py +0 -124
- catalystwan/api/packet_capture_api.py +0 -152
- catalystwan/api/parcel_api.py +0 -42
- catalystwan/api/partition_manager_api.py +0 -143
- catalystwan/api/policy_api.py +0 -1163
- catalystwan/api/resource_pool_api.py +0 -74
- catalystwan/api/software_action_api.py +0 -269
- catalystwan/api/speedtest_api.py +0 -153
- catalystwan/api/task_status_api.py +0 -171
- catalystwan/api/template_api.py +0 -761
- catalystwan/api/templates/README.md +0 -101
- catalystwan/api/templates/bool_str.py +0 -6
- catalystwan/api/templates/cli_template.py +0 -236
- catalystwan/api/templates/device_template/device_template.py +0 -189
- catalystwan/api/templates/device_variable.py +0 -7
- catalystwan/api/templates/feature_template.py +0 -133
- catalystwan/api/templates/feature_template_field.py +0 -175
- catalystwan/api/templates/feature_template_payload.py +0 -17
- catalystwan/api/templates/models/aaa_model.py +0 -387
- catalystwan/api/templates/models/cisco_aaa_model.py +0 -331
- catalystwan/api/templates/models/cisco_banner_model.py +0 -27
- catalystwan/api/templates/models/cisco_bfd_model.py +0 -61
- catalystwan/api/templates/models/cisco_bgp_model.py +0 -510
- catalystwan/api/templates/models/cisco_logging_model.py +0 -122
- catalystwan/api/templates/models/cisco_ntp_model.py +0 -60
- catalystwan/api/templates/models/cisco_omp_model.py +0 -121
- catalystwan/api/templates/models/cisco_ospf.py +0 -241
- catalystwan/api/templates/models/cisco_ospfv3.py +0 -498
- catalystwan/api/templates/models/cisco_secure_internet_gateway.py +0 -385
- catalystwan/api/templates/models/cisco_snmp_model.py +0 -102
- catalystwan/api/templates/models/cisco_system.py +0 -318
- catalystwan/api/templates/models/cisco_vpn_interface_model.py +0 -822
- catalystwan/api/templates/models/cisco_vpn_model.py +0 -603
- catalystwan/api/templates/models/cli_template.py +0 -18
- catalystwan/api/templates/models/omp_vsmart_model.py +0 -73
- catalystwan/api/templates/models/security_vsmart_model.py +0 -28
- catalystwan/api/templates/models/supported.py +0 -42
- catalystwan/api/templates/models/system_vsmart_model.py +0 -182
- catalystwan/api/templates/models/vpn_vsmart_interface_model.py +0 -198
- catalystwan/api/templates/models/vpn_vsmart_model.py +0 -124
- catalystwan/api/templates/payloads/aaa/aaa_model.py +0 -91
- catalystwan/api/templates/payloads/aaa/feature/aaa.json.j2 +0 -373
- catalystwan/api/templates/payloads/aaa/feature/accounting.json.j2 +0 -40
- catalystwan/api/templates/payloads/aaa/feature/radius.json.j2 +0 -107
- catalystwan/api/templates/payloads/aaa/feature/tacacs.json.j2 +0 -95
- catalystwan/api/templates/payloads/aaa/feature/user.json.j2 +0 -60
- catalystwan/api/templates/payloads/cisco_vpn/cisco_vpn_model.py +0 -92
- catalystwan/api/templates/payloads/cisco_vpn/feature/cisco_vpn.json.j2 +0 -224
- catalystwan/api/templates/payloads/cisco_vpn/feature/dns.json.j2 +0 -86
- catalystwan/api/templates/payloads/cisco_vpn/feature/ipv4route.json.j2 +0 -59
- catalystwan/api/templates/payloads/cisco_vpn/feature/ipv6route.json.j2 +0 -58
- catalystwan/api/templates/payloads/cisco_vpn/feature/mapping.json.j2 +0 -24
- catalystwan/api/templates/payloads/tenant/tenant.json.j2 +0 -127
- catalystwan/api/templates/payloads/tenant/tenant_model.py +0 -43
- catalystwan/api/tenant_backup_restore_api.py +0 -154
- catalystwan/api/tenant_management_api.py +0 -127
- catalystwan/api/tenant_migration_api.py +0 -121
- catalystwan/api/versions_utils.py +0 -414
- catalystwan/api/virtual_image_action_api.py +0 -200
- catalystwan/dataclasses.py +0 -493
- catalystwan/endpoints/__init__.py +0 -606
- catalystwan/endpoints/administration_user_and_group.py +0 -341
- catalystwan/endpoints/api_gateway.py +0 -24
- catalystwan/endpoints/certificate_management_device.py +0 -141
- catalystwan/endpoints/certificate_management_vmanage.py +0 -48
- catalystwan/endpoints/client.py +0 -96
- catalystwan/endpoints/cluster_management.py +0 -130
- catalystwan/endpoints/configuration/device/software_update.py +0 -31
- catalystwan/endpoints/configuration/disaster_recovery.py +0 -305
- catalystwan/endpoints/configuration/feature_profile/sdwan/application_priority.py +0 -107
- catalystwan/endpoints/configuration/feature_profile/sdwan/cli.py +0 -60
- catalystwan/endpoints/configuration/feature_profile/sdwan/dns_security.py +0 -83
- catalystwan/endpoints/configuration/feature_profile/sdwan/embedded_security.py +0 -88
- catalystwan/endpoints/configuration/feature_profile/sdwan/other.py +0 -62
- catalystwan/endpoints/configuration/feature_profile/sdwan/policy_object.py +0 -105
- catalystwan/endpoints/configuration/feature_profile/sdwan/service.py +0 -137
- catalystwan/endpoints/configuration/feature_profile/sdwan/sig_security.py +0 -88
- catalystwan/endpoints/configuration/feature_profile/sdwan/system.py +0 -205
- catalystwan/endpoints/configuration/feature_profile/sdwan/topology.py +0 -93
- catalystwan/endpoints/configuration/feature_profile/sdwan/transport.py +0 -214
- catalystwan/endpoints/configuration/feature_profile/sdwan/uc_voice.py +0 -77
- catalystwan/endpoints/configuration/network_hierarchy.py +0 -32
- catalystwan/endpoints/configuration/policy/abstractions.py +0 -49
- catalystwan/endpoints/configuration/policy/definition/access_control_list.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/access_control_list_ipv6.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/aip.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/amp.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/app_route.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/cflowd.py +0 -46
- catalystwan/endpoints/configuration/policy/definition/control.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/device_access.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/device_access_ipv6.py +0 -59
- catalystwan/endpoints/configuration/policy/definition/dial_peer.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/dns_security.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/fxo_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/fxs_did_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/fxs_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/hub_and_spoke.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/intrusion_prevention.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/mesh.py +0 -53
- catalystwan/endpoints/configuration/policy/definition/pri_isdn_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/qos_map.py +0 -53
- catalystwan/endpoints/configuration/policy/definition/rewrite.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/route_policy.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/rule_set.py +0 -53
- catalystwan/endpoints/configuration/policy/definition/security_group.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/srst_phone_profile.py +0 -59
- catalystwan/endpoints/configuration/policy/definition/ssl_decryption.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/ssl_decryption_utd_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/traffic_data.py +0 -58
- catalystwan/endpoints/configuration/policy/definition/url_filtering.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/vpn_membership.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/vpn_qos_map.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/zone_based_firewall.py +0 -57
- catalystwan/endpoints/configuration/policy/list/app.py +0 -48
- catalystwan/endpoints/configuration/policy/list/app_probe.py +0 -52
- catalystwan/endpoints/configuration/policy/list/as_path.py +0 -48
- catalystwan/endpoints/configuration/policy/list/class_map.py +0 -48
- catalystwan/endpoints/configuration/policy/list/color.py +0 -48
- catalystwan/endpoints/configuration/policy/list/community.py +0 -48
- catalystwan/endpoints/configuration/policy/list/data_ipv6_prefix.py +0 -52
- catalystwan/endpoints/configuration/policy/list/data_prefix.py +0 -48
- catalystwan/endpoints/configuration/policy/list/expanded_community.py +0 -52
- catalystwan/endpoints/configuration/policy/list/extended_community.py +0 -52
- catalystwan/endpoints/configuration/policy/list/fax_protocol.py +0 -48
- catalystwan/endpoints/configuration/policy/list/fqdn.py +0 -48
- catalystwan/endpoints/configuration/policy/list/geo_location.py +0 -48
- catalystwan/endpoints/configuration/policy/list/identity.py +0 -48
- catalystwan/endpoints/configuration/policy/list/ips_signature.py +0 -52
- catalystwan/endpoints/configuration/policy/list/ipv6_prefix.py +0 -48
- catalystwan/endpoints/configuration/policy/list/local_app.py +0 -48
- catalystwan/endpoints/configuration/policy/list/local_domain.py +0 -48
- catalystwan/endpoints/configuration/policy/list/media_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/list/mirror.py +0 -48
- catalystwan/endpoints/configuration/policy/list/modem_pass_through.py +0 -52
- catalystwan/endpoints/configuration/policy/list/policer.py +0 -48
- catalystwan/endpoints/configuration/policy/list/port.py +0 -48
- catalystwan/endpoints/configuration/policy/list/preferred_color_group.py +0 -52
- catalystwan/endpoints/configuration/policy/list/prefix.py +0 -49
- catalystwan/endpoints/configuration/policy/list/protocol_name.py +0 -52
- catalystwan/endpoints/configuration/policy/list/region.py +0 -47
- catalystwan/endpoints/configuration/policy/list/scalable_group_tag.py +0 -52
- catalystwan/endpoints/configuration/policy/list/site.py +0 -52
- catalystwan/endpoints/configuration/policy/list/sla.py +0 -48
- catalystwan/endpoints/configuration/policy/list/supervisory_disconnect.py +0 -52
- catalystwan/endpoints/configuration/policy/list/threat_grid_api_key.py +0 -52
- catalystwan/endpoints/configuration/policy/list/tloc.py +0 -48
- catalystwan/endpoints/configuration/policy/list/translation_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/list/translation_rules.py +0 -52
- catalystwan/endpoints/configuration/policy/list/trunkgroup.py +0 -48
- catalystwan/endpoints/configuration/policy/list/umbrella_data.py +0 -52
- catalystwan/endpoints/configuration/policy/list/url_allow_list.py +0 -48
- catalystwan/endpoints/configuration/policy/list/url_block_list.py +0 -48
- catalystwan/endpoints/configuration/policy/list/vpn.py +0 -50
- catalystwan/endpoints/configuration/policy/list/zone.py +0 -48
- catalystwan/endpoints/configuration/policy/security_template.py +0 -55
- catalystwan/endpoints/configuration/policy/vedge_template.py +0 -52
- catalystwan/endpoints/configuration/policy/voice_template.py +0 -39
- catalystwan/endpoints/configuration/policy/vsmart_template.py +0 -79
- catalystwan/endpoints/configuration/policy_group.py +0 -30
- catalystwan/endpoints/configuration/software_actions.py +0 -201
- catalystwan/endpoints/configuration/topology_group.py +0 -51
- catalystwan/endpoints/configuration_dashboard_status.py +0 -127
- catalystwan/endpoints/configuration_device_actions.py +0 -385
- catalystwan/endpoints/configuration_device_inventory.py +0 -309
- catalystwan/endpoints/configuration_device_template.py +0 -39
- catalystwan/endpoints/configuration_feature_profile.py +0 -135
- catalystwan/endpoints/configuration_general_template.py +0 -31
- catalystwan/endpoints/configuration_group.py +0 -197
- catalystwan/endpoints/configuration_settings.py +0 -753
- catalystwan/endpoints/configuration_template_master.py +0 -48
- catalystwan/endpoints/endpoints_container.py +0 -279
- catalystwan/endpoints/misc.py +0 -21
- catalystwan/endpoints/monitoring/device_details.py +0 -246
- catalystwan/endpoints/monitoring/security_policy.py +0 -12
- catalystwan/endpoints/monitoring/server_info.py +0 -12
- catalystwan/endpoints/monitoring/status.py +0 -76
- catalystwan/endpoints/real_time_monitoring/reboot_history.py +0 -35
- catalystwan/endpoints/sdavc_cloud_connector.py +0 -43
- catalystwan/endpoints/tenant_backup_restore.py +0 -40
- catalystwan/endpoints/tenant_management.py +0 -215
- catalystwan/endpoints/tenant_migration.py +0 -102
- catalystwan/endpoints/troubleshooting_tools/device_connectivity.py +0 -128
- catalystwan/endpoints/url_monitoring.py +0 -26
- catalystwan/integration_tests/__init__.py +0 -0
- catalystwan/integration_tests/base.py +0 -81
- catalystwan/integration_tests/feature_profile/sdwan/__init__.py +0 -0
- catalystwan/integration_tests/feature_profile/sdwan/policy/__init__.py +0 -0
- catalystwan/integration_tests/feature_profile/sdwan/policy/base.py +0 -33
- catalystwan/integration_tests/feature_profile/sdwan/policy/test_extended_community.py +0 -33
- catalystwan/integration_tests/feature_profile/sdwan/policy/test_security_app_list.py +0 -32
- catalystwan/integration_tests/feature_profile/sdwan/test_application_priority.py +0 -433
- catalystwan/integration_tests/feature_profile/sdwan/test_cli.py +0 -54
- catalystwan/integration_tests/feature_profile/sdwan/test_dns_security.py +0 -106
- catalystwan/integration_tests/feature_profile/sdwan/test_other.py +0 -49
- catalystwan/integration_tests/feature_profile/sdwan/test_service.py +0 -1078
- catalystwan/integration_tests/feature_profile/sdwan/test_sig_security.py +0 -322
- catalystwan/integration_tests/feature_profile/sdwan/test_ssl_decryption.py +0 -85
- catalystwan/integration_tests/feature_profile/sdwan/test_system.py +0 -368
- catalystwan/integration_tests/feature_profile/sdwan/test_transport.py +0 -1700
- catalystwan/integration_tests/feature_profile/sdwan/topology/test_topology.py +0 -93
- catalystwan/integration_tests/profile_builder/__init__.py +0 -0
- catalystwan/integration_tests/profile_builder/test_pb_service.py +0 -78
- catalystwan/integration_tests/profile_builder/test_pb_transport.py +0 -56
- catalystwan/integration_tests/profile_builder/test_pb_uc_voice.py +0 -277
- catalystwan/integration_tests/test_data/__init__.py +0 -117
- catalystwan/integration_tests/test_find_template_values.py +0 -38
- catalystwan/integration_tests/test_network_hierarchy.py +0 -82
- catalystwan/integration_tests/test_settings.py +0 -30
- catalystwan/logging.conf +0 -37
- catalystwan/models/common.py +0 -1508
- catalystwan/models/configuration/common.py +0 -11
- catalystwan/models/configuration/feature_profile/README.md +0 -344
- catalystwan/models/configuration/feature_profile/builder.py +0 -22
- catalystwan/models/configuration/feature_profile/common.py +0 -790
- catalystwan/models/configuration/feature_profile/parcel.py +0 -232
- catalystwan/models/configuration/feature_profile/sdwan/acl/__init__.py +0 -13
- catalystwan/models/configuration/feature_profile/sdwan/acl/ipv4acl.py +0 -298
- catalystwan/models/configuration/feature_profile/sdwan/acl/ipv6acl.py +0 -344
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/__init__.py +0 -218
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/cloud_probe.py +0 -61
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/policy_settings.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/qos_policy.py +0 -102
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/traffic_policy.py +0 -1054
- catalystwan/models/configuration/feature_profile/sdwan/cli/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/cli/config.py +0 -18
- catalystwan/models/configuration/feature_profile/sdwan/cli/full_config.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/dns_security/__init__.py +0 -13
- catalystwan/models/configuration/feature_profile/sdwan/dns_security/dns.py +0 -110
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/ngfirewall.py +0 -915
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/policy.py +0 -171
- catalystwan/models/configuration/feature_profile/sdwan/other/__init__.py +0 -25
- catalystwan/models/configuration/feature_profile/sdwan/other/cybervision.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/other/thousandeyes.py +0 -147
- catalystwan/models/configuration/feature_profile/sdwan/other/ucse.py +0 -110
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/__init__.py +0 -178
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/app_probe.py +0 -56
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/application_list.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/as_path.py +0 -22
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/color_list.py +0 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/data_prefix.py +0 -35
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/expanded_community_list.py +0 -25
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/extended_community.py +0 -34
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/fowarding_class.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv4_network_object.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv4_service_object.py +0 -254
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv6_data_prefix.py +0 -28
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv6_prefix_list.py +0 -38
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/mirror.py +0 -27
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/network_object_group.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/object_group.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/policer.py +0 -42
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/prefered_group_color.py +0 -83
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/prefix_list.py +0 -28
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/service_object_group.py +0 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/sla_class.py +0 -130
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/standard_community.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/tloc_list.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/aip.py +0 -64
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/amp.py +0 -79
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/application_list.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/data_prefix.py +0 -22
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/fqdn.py +0 -24
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/geolocation_list.py +0 -32
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/identity.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/intrusion_prevention.py +0 -58
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ips_signature.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/local_domain.py +0 -24
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/protocol_list.py +0 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/scalable_group_tag.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/security_port.py +0 -45
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ssl_decryption.py +0 -126
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ssl_decryption_profile.py +0 -165
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/url.py +0 -32
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/url_filtering.py +0 -148
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/zone.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/routing/__init__.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/routing/bgp.py +0 -609
- catalystwan/models/configuration/feature_profile/sdwan/routing/ospf.py +0 -173
- catalystwan/models/configuration/feature_profile/sdwan/routing/ospfv3.py +0 -301
- catalystwan/models/configuration/feature_profile/sdwan/service/__init__.py +0 -91
- catalystwan/models/configuration/feature_profile/sdwan/service/appqoe.py +0 -270
- catalystwan/models/configuration/feature_profile/sdwan/service/dhcp_server.py +0 -127
- catalystwan/models/configuration/feature_profile/sdwan/service/dual_router_ha.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/service/eigrp.py +0 -103
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/common.py +0 -33
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/ethernet.py +0 -404
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/gre.py +0 -136
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/ipsec.py +0 -119
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/multilink.py +0 -101
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/svi.py +0 -182
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/vpn.py +0 -627
- catalystwan/models/configuration/feature_profile/sdwan/service/multicast.py +0 -242
- catalystwan/models/configuration/feature_profile/sdwan/service/object_tracker.py +0 -84
- catalystwan/models/configuration/feature_profile/sdwan/service/route_policy.py +0 -419
- catalystwan/models/configuration/feature_profile/sdwan/service/service_chain.py +0 -38
- catalystwan/models/configuration/feature_profile/sdwan/service/service_insertion_attachment.py +0 -184
- catalystwan/models/configuration/feature_profile/sdwan/service/switchport.py +0 -110
- catalystwan/models/configuration/feature_profile/sdwan/service/tracker.py +0 -92
- catalystwan/models/configuration/feature_profile/sdwan/service/wireless_lan.py +0 -216
- catalystwan/models/configuration/feature_profile/sdwan/sig_security/__init__.py +0 -19
- catalystwan/models/configuration/feature_profile/sdwan/sig_security/sig_security.py +0 -379
- catalystwan/models/configuration/feature_profile/sdwan/system/__init__.py +0 -59
- catalystwan/models/configuration/feature_profile/sdwan/system/aaa.py +0 -406
- catalystwan/models/configuration/feature_profile/sdwan/system/banner.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/system/basic.py +0 -290
- catalystwan/models/configuration/feature_profile/sdwan/system/bfd.py +0 -69
- catalystwan/models/configuration/feature_profile/sdwan/system/device_access.py +0 -157
- catalystwan/models/configuration/feature_profile/sdwan/system/device_access_ipv6.py +0 -157
- catalystwan/models/configuration/feature_profile/sdwan/system/global_parcel.py +0 -163
- catalystwan/models/configuration/feature_profile/sdwan/system/logging_parcel.py +0 -162
- catalystwan/models/configuration/feature_profile/sdwan/system/mrf.py +0 -75
- catalystwan/models/configuration/feature_profile/sdwan/system/ntp.py +0 -103
- catalystwan/models/configuration/feature_profile/sdwan/system/omp.py +0 -120
- catalystwan/models/configuration/feature_profile/sdwan/system/security.py +0 -179
- catalystwan/models/configuration/feature_profile/sdwan/system/snmp.py +0 -173
- catalystwan/models/configuration/feature_profile/sdwan/topology/__init__.py +0 -29
- catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py +0 -425
- catalystwan/models/configuration/feature_profile/sdwan/topology/hubspoke.py +0 -60
- catalystwan/models/configuration/feature_profile/sdwan/topology/mesh.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/transport/__init__.py +0 -93
- catalystwan/models/configuration/feature_profile/sdwan/transport/cellular_controller.py +0 -58
- catalystwan/models/configuration/feature_profile/sdwan/transport/cellular_profile.py +0 -71
- catalystwan/models/configuration/feature_profile/sdwan/transport/gps.py +0 -37
- catalystwan/models/configuration/feature_profile/sdwan/transport/management/ethernet.py +0 -121
- catalystwan/models/configuration/feature_profile/sdwan/transport/t1e1controller.py +0 -124
- catalystwan/models/configuration/feature_profile/sdwan/transport/vpn.py +0 -285
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/cellular.py +0 -173
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/ethernet.py +0 -389
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/gre.py +0 -46
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/ipsec.py +0 -98
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/multilink.py +0 -219
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/protocol_over.py +0 -405
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/t1e1serial.py +0 -195
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/__init__.py +0 -62
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/analog_interface.py +0 -436
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/call_routing.py +0 -179
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/digital_interface.py +0 -375
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/dsp_farm.py +0 -193
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/media_profile.py +0 -25
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/server_group.py +0 -51
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/srst.py +0 -86
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/supervisory_disconnect.py +0 -68
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/translation_profile.py +0 -42
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/translation_rule.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/trunk_group.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/voice_global.py +0 -55
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/voice_tenant.py +0 -40
- catalystwan/models/configuration/network_hierarchy/__init__.py +0 -22
- catalystwan/models/configuration/network_hierarchy/cflowd.py +0 -120
- catalystwan/models/configuration/network_hierarchy/node.py +0 -88
- catalystwan/models/configuration/policy_group.py +0 -74
- catalystwan/models/configuration/profile_type.py +0 -5
- catalystwan/models/configuration/topology_group.py +0 -52
- catalystwan/models/device_inventory.py +0 -30
- catalystwan/models/feature_profile_parcel.py +0 -15
- catalystwan/models/misc/application_protocols.py +0 -29
- catalystwan/models/monitoring/security_policy.py +0 -16
- catalystwan/models/monitoring/server_info.py +0 -12
- catalystwan/models/policy/__init__.py +0 -392
- catalystwan/models/policy/centralized.py +0 -265
- catalystwan/models/policy/definition/access_control_list.py +0 -193
- catalystwan/models/policy/definition/access_control_list_ipv6.py +0 -187
- catalystwan/models/policy/definition/aip.py +0 -60
- catalystwan/models/policy/definition/amp.py +0 -65
- catalystwan/models/policy/definition/app_route.py +0 -246
- catalystwan/models/policy/definition/cflowd.py +0 -95
- catalystwan/models/policy/definition/control.py +0 -366
- catalystwan/models/policy/definition/device_access.py +0 -117
- catalystwan/models/policy/definition/device_access_ipv6.py +0 -115
- catalystwan/models/policy/definition/dial_peer.py +0 -60
- catalystwan/models/policy/definition/dns_security.py +0 -130
- catalystwan/models/policy/definition/fxo_port.py +0 -63
- catalystwan/models/policy/definition/fxs_did_port.py +0 -58
- catalystwan/models/policy/definition/fxs_port.py +0 -56
- catalystwan/models/policy/definition/hub_and_spoke.py +0 -87
- catalystwan/models/policy/definition/intrusion_prevention.py +0 -55
- catalystwan/models/policy/definition/mesh.py +0 -47
- catalystwan/models/policy/definition/pri_isdn_port.py +0 -48
- catalystwan/models/policy/definition/qos_map.py +0 -111
- catalystwan/models/policy/definition/rewrite.py +0 -47
- catalystwan/models/policy/definition/route_policy.py +0 -187
- catalystwan/models/policy/definition/rule_set.py +0 -270
- catalystwan/models/policy/definition/security_group.py +0 -93
- catalystwan/models/policy/definition/srst_phone_profile.py +0 -37
- catalystwan/models/policy/definition/ssl_decryption.py +0 -209
- catalystwan/models/policy/definition/ssl_decryption_utd_profile.py +0 -87
- catalystwan/models/policy/definition/traffic_data.py +0 -496
- catalystwan/models/policy/definition/url_filtering.py +0 -70
- catalystwan/models/policy/definition/vpn_membership.py +0 -42
- catalystwan/models/policy/definition/vpn_qos_map.py +0 -46
- catalystwan/models/policy/definition/zone_based_firewall.py +0 -301
- catalystwan/models/policy/list/app.py +0 -44
- catalystwan/models/policy/list/app_probe.py +0 -42
- catalystwan/models/policy/list/as_path.py +0 -30
- catalystwan/models/policy/list/class_map.py +0 -30
- catalystwan/models/policy/list/color.py +0 -28
- catalystwan/models/policy/list/communities.py +0 -83
- catalystwan/models/policy/list/data_ipv6_prefix.py +0 -30
- catalystwan/models/policy/list/data_prefix.py +0 -30
- catalystwan/models/policy/list/fax_protocol.py +0 -45
- catalystwan/models/policy/list/fqdn.py +0 -24
- catalystwan/models/policy/list/geo_location.py +0 -33
- catalystwan/models/policy/list/identity.py +0 -29
- catalystwan/models/policy/list/ips_signature.py +0 -27
- catalystwan/models/policy/list/ipv6_prefix.py +0 -33
- catalystwan/models/policy/list/local_app.py +0 -45
- catalystwan/models/policy/list/local_domain.py +0 -36
- catalystwan/models/policy/list/media_profile.py +0 -44
- catalystwan/models/policy/list/mirror.py +0 -27
- catalystwan/models/policy/list/modem_pass_through.py +0 -27
- catalystwan/models/policy/list/policer.py +0 -39
- catalystwan/models/policy/list/port.py +0 -33
- catalystwan/models/policy/list/preferred_color_group.py +0 -82
- catalystwan/models/policy/list/prefix.py +0 -33
- catalystwan/models/policy/list/protocol_name.py +0 -26
- catalystwan/models/policy/list/region.py +0 -45
- catalystwan/models/policy/list/scalable_group_tag.py +0 -30
- catalystwan/models/policy/list/site.py +0 -34
- catalystwan/models/policy/list/sla.py +0 -77
- catalystwan/models/policy/list/supervisory_disconnect.py +0 -62
- catalystwan/models/policy/list/threat_grid_api_key.py +0 -32
- catalystwan/models/policy/list/tloc.py +0 -32
- catalystwan/models/policy/list/translation_profile.py +0 -32
- catalystwan/models/policy/list/translation_rules.py +0 -29
- catalystwan/models/policy/list/trunkgroup.py +0 -56
- catalystwan/models/policy/list/umbrella_data.py +0 -30
- catalystwan/models/policy/list/url.py +0 -39
- catalystwan/models/policy/list/vpn.py +0 -40
- catalystwan/models/policy/list/zone.py +0 -45
- catalystwan/models/policy/localized.py +0 -154
- catalystwan/models/policy/policy.py +0 -100
- catalystwan/models/policy/policy_definition.py +0 -1624
- catalystwan/models/policy/policy_list.py +0 -47
- catalystwan/models/policy/security.py +0 -279
- catalystwan/models/policy/voice.py +0 -77
- catalystwan/models/settings.py +0 -41
- catalystwan/models/templates.py +0 -79
- catalystwan/models/tenant.py +0 -105
- catalystwan/models/url_monitoring.py +0 -28
- catalystwan/tests/__init__.py +0 -0
- catalystwan/tests/builders/uc_voice.py +0 -85
- catalystwan/tests/models/__init__.py +0 -0
- catalystwan/tests/models/test_digital_interface.py +0 -56
- catalystwan/tests/templates/__init__.py +0 -0
- catalystwan/tests/templates/definitions/__init__.py +0 -0
- catalystwan/tests/templates/definitions/aaa_basic.json +0 -96
- catalystwan/tests/templates/definitions/aaa_complex.json +0 -464
- catalystwan/tests/templates/definitions/basic/__init__.py +0 -0
- catalystwan/tests/templates/definitions/basic/alias.json +0 -7
- catalystwan/tests/templates/definitions/basic/basic.json +0 -7
- catalystwan/tests/templates/definitions/basic/basic_no_value.json +0 -7
- catalystwan/tests/templates/definitions/basic/children.json +0 -39
- catalystwan/tests/templates/definitions/basic/children_nested.json +0 -72
- catalystwan/tests/templates/definitions/basic/children_nested_datapath.json +0 -72
- catalystwan/tests/templates/definitions/basic/data_path.json +0 -13
- catalystwan/tests/templates/definitions/cisco_aaa.json +0 -178
- catalystwan/tests/templates/definitions/cisco_aaa_complex.json +0 -361
- catalystwan/tests/templates/definitions/cisco_banner.json +0 -20
- catalystwan/tests/templates/definitions/cisco_bfd.json +0 -90
- catalystwan/tests/templates/definitions/cisco_logging_complex.json +0 -268
- catalystwan/tests/templates/definitions/cisco_ntp_complex.json +0 -143
- catalystwan/tests/templates/definitions/cisco_omp_complex.json +0 -175
- catalystwan/tests/templates/definitions/cisco_ospf_complex.json +0 -302
- catalystwan/tests/templates/definitions/cisco_sig.json +0 -405
- catalystwan/tests/templates/definitions/cisco_snmp_complex.json +0 -258
- catalystwan/tests/templates/definitions/cisco_system_complex.json +0 -502
- catalystwan/tests/templates/definitions/cisco_vpn_basic.json +0 -17
- catalystwan/tests/templates/definitions/cisco_vpn_complex.json +0 -1081
- catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json +0 -821
- catalystwan/tests/templates/definitions/default_cisco_system.json +0 -184
- catalystwan/tests/templates/definitions/omp_vsmart_1.json +0 -26
- catalystwan/tests/templates/definitions/omp_vsmart_2.json +0 -48
- catalystwan/tests/templates/definitions/omp_vsmart_3.json +0 -71
- catalystwan/tests/templates/definitions/omp_vsmart_complex.json +0 -73
- catalystwan/tests/templates/definitions/security_vsmart_complex.json +0 -24
- catalystwan/tests/templates/definitions/system_vsmart_complex.json +0 -193
- catalystwan/tests/templates/definitions/vpn_vsmart_basic.json +0 -17
- catalystwan/tests/templates/definitions/vpn_vsmart_complex.json +0 -179
- catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json +0 -42
- catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json +0 -208
- catalystwan/tests/templates/models/__init__.py +0 -53
- catalystwan/tests/templates/models/aaa.py +0 -106
- catalystwan/tests/templates/models/cisco_aaa.py +0 -124
- catalystwan/tests/templates/models/cisco_banner.py +0 -7
- catalystwan/tests/templates/models/cisco_bfd.py +0 -15
- catalystwan/tests/templates/models/cisco_logging.py +0 -65
- catalystwan/tests/templates/models/cisco_ntp.py +0 -17
- catalystwan/tests/templates/models/cisco_omp.py +0 -37
- catalystwan/tests/templates/models/cisco_ospf.py +0 -60
- catalystwan/tests/templates/models/cisco_secure_internet_gateway.py +0 -95
- catalystwan/tests/templates/models/cisco_snmp.py +0 -40
- catalystwan/tests/templates/models/cisco_system.py +0 -113
- catalystwan/tests/templates/models/cisco_vpn.py +0 -240
- catalystwan/tests/templates/models/cisco_vpn_interface.py +0 -200
- catalystwan/tests/templates/models/omp_vsmart.py +0 -53
- catalystwan/tests/templates/models/security_vsmart.py +0 -11
- catalystwan/tests/templates/models/system_vsmart.py +0 -37
- catalystwan/tests/templates/models/vpn_vsmart.py +0 -32
- catalystwan/tests/templates/models/vpn_vsmart_interface.py +0 -54
- catalystwan/tests/templates/schemas/aaa.json +0 -1096
- catalystwan/tests/templates/schemas/basic/alias.json +0 -24
- catalystwan/tests/templates/schemas/basic/basic.json +0 -23
- catalystwan/tests/templates/schemas/basic/children.json +0 -59
- catalystwan/tests/templates/schemas/basic/children_nested.json +0 -112
- catalystwan/tests/templates/schemas/basic/children_nested_datapath.json +0 -112
- catalystwan/tests/templates/schemas/basic/data_path.json +0 -29
- catalystwan/tests/templates/schemas/cedge_aaa.json +0 -1185
- catalystwan/tests/templates/schemas/cisco_banner.json +0 -44
- catalystwan/tests/templates/schemas/cisco_bfd.json +0 -266
- catalystwan/tests/templates/schemas/cisco_logging.json +0 -577
- catalystwan/tests/templates/schemas/cisco_ntp.json +0 -265
- catalystwan/tests/templates/schemas/cisco_omp.json +0 -479
- catalystwan/tests/templates/schemas/cisco_ospf.json +0 -908
- catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json +0 -1520
- catalystwan/tests/templates/schemas/cisco_snmp.json +0 -561
- catalystwan/tests/templates/schemas/cisco_system.json +0 -3099
- catalystwan/tests/templates/schemas/cisco_vpn.json +0 -2504
- catalystwan/tests/templates/schemas/cisco_vpn_interface.json +0 -3348
- catalystwan/tests/templates/schemas/omp-vsmart.json +0 -222
- catalystwan/tests/templates/schemas/security-vsmart.json +0 -58
- catalystwan/tests/templates/schemas/system-vsmart.json +0 -2585
- catalystwan/tests/templates/schemas/vpn-vsmart-interface.json +0 -859
- catalystwan/tests/templates/schemas/vpn-vsmart.json +0 -445
- catalystwan/tests/templates/test_chose_model.py +0 -32
- catalystwan/tests/templates/test_deserialize_model.py +0 -69
- catalystwan/tests/templates/test_find_template_values.py +0 -193
- catalystwan/tests/templates/test_find_template_values_2.py +0 -193
- catalystwan/tests/templates/test_generate_payload.py +0 -137
- catalystwan/tests/templates/test_serialize_model.py +0 -52
- catalystwan/tests/test_admin_tech_api.py +0 -198
- catalystwan/tests/test_administration.py +0 -470
- catalystwan/tests/test_alarms_api.py +0 -251
- catalystwan/tests/test_cli_template.py +0 -218
- catalystwan/tests/test_creation_tools.py +0 -155
- catalystwan/tests/test_device_action_api.py +0 -117
- catalystwan/tests/test_devices_api.py +0 -674
- catalystwan/tests/test_endpoints.py +0 -907
- catalystwan/tests/test_feature_profile_api.py +0 -282
- catalystwan/tests/test_feature_template_field.py +0 -33
- catalystwan/tests/test_logs_api.py +0 -40
- catalystwan/tests/test_models_common.py +0 -53
- catalystwan/tests/test_monitoring_security_policy.py +0 -65
- catalystwan/tests/test_monitoring_server_info.py +0 -49
- catalystwan/tests/test_monitoring_status_api.py +0 -118
- catalystwan/tests/test_mtt_aaa_api.py +0 -293
- catalystwan/tests/test_omp_api.py +0 -438
- catalystwan/tests/test_packet_capture.py +0 -125
- catalystwan/tests/test_partition_manager_api.py +0 -121
- catalystwan/tests/test_response.py +0 -183
- catalystwan/tests/test_session.py +0 -102
- catalystwan/tests/test_software_action_api.py +0 -154
- catalystwan/tests/test_speed_test_api.py +0 -143
- catalystwan/tests/test_task_status_api.py +0 -381
- catalystwan/tests/test_templates.py +0 -405
- catalystwan/tests/test_tenant_backup_restore_api.py +0 -88
- catalystwan/tests/test_tenant_management_api.py +0 -153
- catalystwan/tests/test_tenant_migration_api.py +0 -102
- catalystwan/tests/test_typed_list.py +0 -426
- catalystwan/tests/test_url_monitoring.py +0 -80
- catalystwan/tests/test_version.py +0 -99
- catalystwan/tests/test_version_utils.py +0 -240
- catalystwan/tests/test_vmanage_auth.py +0 -149
- catalystwan/typed_list.py +0 -288
- catalystwan/utils/__init__.py +0 -0
- catalystwan/utils/alarm_status.py +0 -16
- catalystwan/utils/certificate_status.py +0 -13
- catalystwan/utils/colors.py +0 -12
- catalystwan/utils/config_status.py +0 -8
- catalystwan/utils/creation_tools.py +0 -136
- catalystwan/utils/dashboard.py +0 -255
- catalystwan/utils/device_model.py +0 -322
- catalystwan/utils/dict.py +0 -61
- catalystwan/utils/feature_template/choose_model.py +0 -30
- catalystwan/utils/feature_template/find_template_values.py +0 -111
- catalystwan/utils/model.py +0 -45
- catalystwan/utils/operation_status.py +0 -22
- catalystwan/utils/persona.py +0 -5
- catalystwan/utils/personality.py +0 -10
- catalystwan/utils/pydantic_field.py +0 -12
- catalystwan/utils/reachability.py +0 -14
- catalystwan/utils/session_type.py +0 -17
- catalystwan/utils/template_type.py +0 -8
- catalystwan/utils/type_check.py +0 -22
- catalystwan/utils/upgrades_helper.py +0 -95
- catalystwan/utils/validate_status.py +0 -8
- catalystwan/workflows/backup_restore_device_templates.py +0 -467
- catalystwan/workflows/tenant_migration.py +0 -203
- catalystwan-0.40.2.dev1.dist-info/METADATA +0 -539
- catalystwan-0.40.2.dev1.dist-info/RECORD +0 -628
- /catalystwan/{api → core/models}/__init__.py +0 -0
- /catalystwan/{api/builders/feature_profiles/__init__.py → core/py.typed} +0 -0
- {catalystwan-0.40.2.dev1.dist-info → catalystwan-2.0.0a1.dist-info}/LICENSE +0 -0
|
@@ -1,2401 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Cisco Systems, Inc. and its affiliates
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing import TYPE_CHECKING, Any, Optional, Protocol, Type, Union, overload
|
|
6
|
-
from uuid import UUID
|
|
7
|
-
|
|
8
|
-
from pydantic import Json
|
|
9
|
-
|
|
10
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.cli import CliFeatureProfile
|
|
11
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.other import OtherFeatureProfile
|
|
12
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.service import ServiceFeatureProfile
|
|
13
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.sig_security import SIGSecurity
|
|
14
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.system import SystemFeatureProfile
|
|
15
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.topology import TopologyFeatureProfile
|
|
16
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.transport import TransportFeatureProfile
|
|
17
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.uc_voice import UcVoiceFeatureProfile
|
|
18
|
-
from catalystwan.exceptions import CatalystwanException, ManagerHTTPError
|
|
19
|
-
from catalystwan.models.configuration.feature_profile.sdwan.acl.ipv4acl import Ipv4AclParcel
|
|
20
|
-
from catalystwan.models.configuration.feature_profile.sdwan.acl.ipv6acl import Ipv6AclParcel
|
|
21
|
-
from catalystwan.models.configuration.feature_profile.sdwan.application_priority import (
|
|
22
|
-
AnyApplicationPriorityParcel,
|
|
23
|
-
PolicySettingsParcel,
|
|
24
|
-
QosPolicyParcel,
|
|
25
|
-
TrafficPolicyParcel,
|
|
26
|
-
)
|
|
27
|
-
from catalystwan.models.configuration.feature_profile.sdwan.other import AnyOtherParcel
|
|
28
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.policy.as_path import AsPathParcel
|
|
29
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.policy.mirror import MirrorParcel
|
|
30
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.policy.sla_class import SLAClassParcel
|
|
31
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.security.aip import (
|
|
32
|
-
AdvancedInspectionProfileParcel,
|
|
33
|
-
)
|
|
34
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.security.amp import (
|
|
35
|
-
AdvancedMalwareProtectionParcel,
|
|
36
|
-
)
|
|
37
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.security.intrusion_prevention import (
|
|
38
|
-
IntrusionPreventionParcel,
|
|
39
|
-
)
|
|
40
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.security.ssl_decryption import (
|
|
41
|
-
SslDecryptionParcel,
|
|
42
|
-
)
|
|
43
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.security.ssl_decryption_profile import (
|
|
44
|
-
SslDecryptionProfileParcel,
|
|
45
|
-
)
|
|
46
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object.security.url import URLParcel
|
|
47
|
-
from catalystwan.models.configuration.feature_profile.sdwan.routing import (
|
|
48
|
-
AnyRoutingParcel,
|
|
49
|
-
RoutingBgpParcel,
|
|
50
|
-
RoutingOspfParcel,
|
|
51
|
-
RoutingOspfv3IPv4Parcel,
|
|
52
|
-
RoutingOspfv3IPv6Parcel,
|
|
53
|
-
)
|
|
54
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service import AnyServiceParcel
|
|
55
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.eigrp import EigrpParcel
|
|
56
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.lan.ethernet import (
|
|
57
|
-
InterfaceEthernetParcel as LanInterfaceEthernetParcel,
|
|
58
|
-
)
|
|
59
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.lan.gre import (
|
|
60
|
-
InterfaceGreParcel as LanInterfaceGreParcel,
|
|
61
|
-
)
|
|
62
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.lan.ipsec import (
|
|
63
|
-
InterfaceIpsecParcel as LanInterfaceIpsecParcel,
|
|
64
|
-
)
|
|
65
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.lan.multilink import (
|
|
66
|
-
InterfaceMultilinkParcel as LanInterfaceMultilinkParcel,
|
|
67
|
-
)
|
|
68
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.lan.svi import InterfaceSviParcel
|
|
69
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.lan.vpn import LanVpnParcel
|
|
70
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.multicast import MulticastParcel
|
|
71
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.route_policy import RoutePolicyParcel
|
|
72
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.switchport import SwitchportParcel
|
|
73
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.wireless_lan import WirelessLanParcel
|
|
74
|
-
from catalystwan.models.configuration.feature_profile.sdwan.sig_security.sig_security import SIGParcel
|
|
75
|
-
from catalystwan.models.configuration.feature_profile.sdwan.topology import AnyTopologyParcel
|
|
76
|
-
from catalystwan.models.configuration.feature_profile.sdwan.topology.custom_control import CustomControlParcel
|
|
77
|
-
from catalystwan.models.configuration.feature_profile.sdwan.topology.hubspoke import HubSpokeParcel
|
|
78
|
-
from catalystwan.models.configuration.feature_profile.sdwan.topology.mesh import MeshParcel
|
|
79
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport import AnyTransportParcel
|
|
80
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.cellular_controller import (
|
|
81
|
-
CellularControllerParcel,
|
|
82
|
-
)
|
|
83
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.management.ethernet import (
|
|
84
|
-
InterfaceEthernetParcel as ManagementInterfaceEthernetParcel,
|
|
85
|
-
)
|
|
86
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.t1e1controller import T1E1ControllerParcel
|
|
87
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.vpn import ManagementVpnParcel, TransportVpnParcel
|
|
88
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.cellular import (
|
|
89
|
-
InterfaceCellularParcel,
|
|
90
|
-
)
|
|
91
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.ethernet import (
|
|
92
|
-
InterfaceEthernetParcel as WanInterfaceEthernetParcel,
|
|
93
|
-
)
|
|
94
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.gre import (
|
|
95
|
-
InterfaceGreParcel as WanInterfaceGreParcel,
|
|
96
|
-
)
|
|
97
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.ipsec import (
|
|
98
|
-
InterfaceIpsecParcel as WanInterfaceIpsecParcel,
|
|
99
|
-
)
|
|
100
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.multilink import (
|
|
101
|
-
InterfaceMultilinkParcel as WanInterfaceMultilinkParcel,
|
|
102
|
-
)
|
|
103
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.protocol_over import (
|
|
104
|
-
InterfaceDslIPoEParcel,
|
|
105
|
-
InterfaceDslPPPoAParcel,
|
|
106
|
-
InterfaceDslPPPoEParcel,
|
|
107
|
-
InterfaceEthPPPoEParcel,
|
|
108
|
-
)
|
|
109
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.t1e1serial import T1E1SerialParcel
|
|
110
|
-
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice import AnyUcVoiceParcel
|
|
111
|
-
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice.dsp_farm import DspFarmParcel
|
|
112
|
-
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice.media_profile import MediaProfileParcel
|
|
113
|
-
from catalystwan.models.configuration.feature_profile.sdwan.uc_voice.trunk_group import TrunkGroupParcel
|
|
114
|
-
from catalystwan.typed_list import DataSequence
|
|
115
|
-
|
|
116
|
-
if TYPE_CHECKING:
|
|
117
|
-
from catalystwan.session import ManagerSession
|
|
118
|
-
|
|
119
|
-
from catalystwan.api.parcel_api import SDRoutingFullConfigParcelAPI
|
|
120
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.application_priority import (
|
|
121
|
-
ApplicationPriorityFeatureProfile,
|
|
122
|
-
)
|
|
123
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.dns_security import DnsSecurityFeatureProfile
|
|
124
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.embedded_security import EmbeddedSecurityFeatureProfile
|
|
125
|
-
from catalystwan.endpoints.configuration.feature_profile.sdwan.policy_object import PolicyObjectFeatureProfile
|
|
126
|
-
from catalystwan.endpoints.configuration_feature_profile import SDRoutingConfigurationFeatureProfile
|
|
127
|
-
from catalystwan.models.configuration.feature_profile.common import (
|
|
128
|
-
FeatureProfileCreationPayload,
|
|
129
|
-
FeatureProfileCreationResponse,
|
|
130
|
-
FeatureProfileInfo,
|
|
131
|
-
GetFeatureProfilesParams,
|
|
132
|
-
GetReferenceCountFeatureProfilesPayload,
|
|
133
|
-
)
|
|
134
|
-
from catalystwan.models.configuration.feature_profile.parcel import (
|
|
135
|
-
Parcel,
|
|
136
|
-
ParcelAssociationPayload,
|
|
137
|
-
ParcelCreationResponse,
|
|
138
|
-
)
|
|
139
|
-
from catalystwan.models.configuration.feature_profile.sdwan.cli import AnyCliParcel
|
|
140
|
-
from catalystwan.models.configuration.feature_profile.sdwan.dns_security import AnyDnsSecurityParcel, DnsParcel
|
|
141
|
-
from catalystwan.models.configuration.feature_profile.sdwan.embedded_security import (
|
|
142
|
-
AnyEmbeddedSecurityParcel,
|
|
143
|
-
NgfirewallParcel,
|
|
144
|
-
PolicyParcel,
|
|
145
|
-
)
|
|
146
|
-
from catalystwan.models.configuration.feature_profile.sdwan.policy_object import (
|
|
147
|
-
AnyPolicyObjectParcel,
|
|
148
|
-
ApplicationListParcel,
|
|
149
|
-
AppProbeParcel,
|
|
150
|
-
ColorParcel,
|
|
151
|
-
DataPrefixParcel,
|
|
152
|
-
ExpandedCommunityParcel,
|
|
153
|
-
ExtendedCommunityParcel,
|
|
154
|
-
FowardingClassParcel,
|
|
155
|
-
FQDNDomainParcel,
|
|
156
|
-
GeoLocationListParcel,
|
|
157
|
-
IPSSignatureParcel,
|
|
158
|
-
IPv6DataPrefixParcel,
|
|
159
|
-
IPv6PrefixListParcel,
|
|
160
|
-
LocalDomainParcel,
|
|
161
|
-
PolicerParcel,
|
|
162
|
-
PreferredColorGroupParcel,
|
|
163
|
-
PrefixListParcel,
|
|
164
|
-
ProtocolListParcel,
|
|
165
|
-
SecurityApplicationListParcel,
|
|
166
|
-
SecurityDataPrefixParcel,
|
|
167
|
-
SecurityPortParcel,
|
|
168
|
-
SecurityZoneListParcel,
|
|
169
|
-
StandardCommunityParcel,
|
|
170
|
-
TlocParcel,
|
|
171
|
-
)
|
|
172
|
-
from catalystwan.models.configuration.feature_profile.sdwan.system import (
|
|
173
|
-
AAAParcel,
|
|
174
|
-
AnySystemParcel,
|
|
175
|
-
BannerParcel,
|
|
176
|
-
BasicParcel,
|
|
177
|
-
BFDParcel,
|
|
178
|
-
GlobalParcel,
|
|
179
|
-
LoggingParcel,
|
|
180
|
-
MRFParcel,
|
|
181
|
-
NtpParcel,
|
|
182
|
-
OMPParcel,
|
|
183
|
-
SecurityParcel,
|
|
184
|
-
SNMPParcel,
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
def removeprefix(s: str, prefix: str) -> str:
|
|
189
|
-
if s.startswith(prefix):
|
|
190
|
-
return s[len(prefix) :]
|
|
191
|
-
return s
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
class SDRoutingFeatureProfilesAPI:
|
|
195
|
-
def __init__(self, session: ManagerSession):
|
|
196
|
-
self.cli = SDRoutingCLIFeatureProfileAPI(session=session)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
class SDWANFeatureProfilesAPI:
|
|
200
|
-
def __init__(self, session: ManagerSession):
|
|
201
|
-
self.application_priority = ApplicationPriorityFeatureProfileAPI(session=session)
|
|
202
|
-
self.cli = CliFeatureProfileAPI(session=session)
|
|
203
|
-
self.dns_security = DnsSecurityFeatureProfileAPI(session=session)
|
|
204
|
-
self.embedded_security = EmbeddedSecurityFeatureProfileAPI(session=session)
|
|
205
|
-
self.other = OtherFeatureProfileAPI(session=session)
|
|
206
|
-
self.policy_object = PolicyObjectFeatureProfileAPI(session=session)
|
|
207
|
-
self.service = ServiceFeatureProfileAPI(session=session)
|
|
208
|
-
self.sig_security = SIGSecurityAPI(session=session)
|
|
209
|
-
self.system = SystemFeatureProfileAPI(session=session)
|
|
210
|
-
self.topology = TopologyFeatureProfileAPI(session=session)
|
|
211
|
-
self.transport = TransportFeatureProfileAPI(session=session)
|
|
212
|
-
self.uc_voice = UcVoiceFeatureProfileAPI(session=session)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
class FeatureProfileAPI(Protocol):
|
|
216
|
-
def init_parcels(self, fp_id: str) -> None:
|
|
217
|
-
"""
|
|
218
|
-
Initialized parcel(s) associated with this feature profile
|
|
219
|
-
"""
|
|
220
|
-
...
|
|
221
|
-
|
|
222
|
-
def create(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
223
|
-
"""
|
|
224
|
-
Creates feature profile
|
|
225
|
-
"""
|
|
226
|
-
...
|
|
227
|
-
|
|
228
|
-
def delete(self, fp_id: str) -> None:
|
|
229
|
-
"""
|
|
230
|
-
Deletes feature profile
|
|
231
|
-
"""
|
|
232
|
-
...
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
class SDRoutingCLIFeatureProfileAPI(FeatureProfileAPI):
|
|
236
|
-
"""
|
|
237
|
-
SD-Routing CLI feature-profile APIs
|
|
238
|
-
"""
|
|
239
|
-
|
|
240
|
-
def __init__(self, session: ManagerSession):
|
|
241
|
-
self.session = session
|
|
242
|
-
self.endpoint = SDRoutingConfigurationFeatureProfile(session)
|
|
243
|
-
|
|
244
|
-
def init_parcels(self, fp_id: str) -> None:
|
|
245
|
-
"""
|
|
246
|
-
Initialize CLI full-config parcel associated with this feature profile
|
|
247
|
-
"""
|
|
248
|
-
self.full_config_parcel = SDRoutingFullConfigParcelAPI(session=self.session, fp_id=fp_id)
|
|
249
|
-
|
|
250
|
-
def create(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
251
|
-
"""
|
|
252
|
-
Creates CLI feature profile
|
|
253
|
-
"""
|
|
254
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
255
|
-
|
|
256
|
-
return self.endpoint.create_cli_feature_profile(payload=payload)
|
|
257
|
-
|
|
258
|
-
def delete(self, fp_id: str) -> None:
|
|
259
|
-
"""
|
|
260
|
-
Deletes CLI feature-profile
|
|
261
|
-
"""
|
|
262
|
-
self.endpoint.delete_cli_feature_profile(cli_fp_id=fp_id)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
class TransportFeatureProfileAPI:
|
|
266
|
-
"""
|
|
267
|
-
SDWAN Feature Profile Transport APIs
|
|
268
|
-
"""
|
|
269
|
-
|
|
270
|
-
def __init__(self, session: ManagerSession):
|
|
271
|
-
self.session = session
|
|
272
|
-
self.endpoint = TransportFeatureProfile(session)
|
|
273
|
-
|
|
274
|
-
def get_profiles(
|
|
275
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
276
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
277
|
-
"""
|
|
278
|
-
Get all Transport Feature Profiles
|
|
279
|
-
"""
|
|
280
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
281
|
-
|
|
282
|
-
return self.endpoint.get_transport_feature_profiles(payload)
|
|
283
|
-
|
|
284
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
285
|
-
"""
|
|
286
|
-
Create Transport Feature Profile
|
|
287
|
-
"""
|
|
288
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
289
|
-
return self.endpoint.create_transport_feature_profile(payload)
|
|
290
|
-
|
|
291
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
292
|
-
"""
|
|
293
|
-
Delete Transport Feature Profile
|
|
294
|
-
"""
|
|
295
|
-
self.endpoint.delete_transport_feature_profile(profile_id)
|
|
296
|
-
|
|
297
|
-
def delete_all_profiles(self) -> None:
|
|
298
|
-
"""
|
|
299
|
-
Delete all Transport Feature Profiles
|
|
300
|
-
"""
|
|
301
|
-
profiles = self.get_profiles()
|
|
302
|
-
for profile in profiles:
|
|
303
|
-
self.delete_profile(profile.profile_id)
|
|
304
|
-
|
|
305
|
-
def create_parcel(
|
|
306
|
-
self, profile_id: UUID, payload: AnyTransportParcel, vpn_uuid: Optional[UUID] = None
|
|
307
|
-
) -> ParcelCreationResponse:
|
|
308
|
-
"""
|
|
309
|
-
Create Transport Parcel for selected profile_id based on payload type
|
|
310
|
-
"""
|
|
311
|
-
if vpn_uuid is not None:
|
|
312
|
-
vpn_parcel = self._get_vpn_parcel(profile_id, vpn_uuid).payload
|
|
313
|
-
# All interface parcels start with prefix wan/vpn to diffrentiate between
|
|
314
|
-
# transport and service parcels, but the actual endpoint does not require
|
|
315
|
-
# the prefix, so we remove it here. Same applies to management.
|
|
316
|
-
parcel_type = payload._get_parcel_type().replace("wan/vpn/", "").replace("management/vpn/", "")
|
|
317
|
-
if vpn_parcel._get_parcel_type() == TransportVpnParcel._get_parcel_type():
|
|
318
|
-
return self.endpoint.create_transport_vpn_sub_parcel(profile_id, vpn_uuid, parcel_type, payload)
|
|
319
|
-
else:
|
|
320
|
-
return self.endpoint.create_management_vpn_sub_parcel(profile_id, vpn_uuid, parcel_type, payload)
|
|
321
|
-
return self.endpoint.create_transport_parcel(profile_id, payload._get_parcel_type(), payload)
|
|
322
|
-
|
|
323
|
-
def _get_vpn_parcel(
|
|
324
|
-
self, profile_id: UUID, vpn_uuid: UUID
|
|
325
|
-
) -> Union[Parcel[TransportVpnParcel], Parcel[ManagementVpnParcel]]:
|
|
326
|
-
"""Resolve the VPN parcel type based on the VPN UUID."""
|
|
327
|
-
try:
|
|
328
|
-
return self.endpoint.get_transport_parcel(profile_id, TransportVpnParcel._get_parcel_type(), vpn_uuid)
|
|
329
|
-
except ManagerHTTPError:
|
|
330
|
-
pass
|
|
331
|
-
try:
|
|
332
|
-
return self.endpoint.get_transport_parcel(profile_id, ManagementVpnParcel._get_parcel_type(), vpn_uuid)
|
|
333
|
-
except ManagerHTTPError:
|
|
334
|
-
raise CatalystwanException(f"VPN parcel wih uuid: {vpn_uuid} is not found")
|
|
335
|
-
|
|
336
|
-
@overload
|
|
337
|
-
def get_parcel(
|
|
338
|
-
self, profile_id: UUID, parcel_type: Type[CellularControllerParcel], parcel_id: UUID
|
|
339
|
-
) -> Parcel[CellularControllerParcel]:
|
|
340
|
-
...
|
|
341
|
-
|
|
342
|
-
@overload
|
|
343
|
-
def get_parcel(
|
|
344
|
-
self, profile_id: UUID, parcel_type: Type[T1E1ControllerParcel], parcel_id: UUID
|
|
345
|
-
) -> Parcel[T1E1ControllerParcel]:
|
|
346
|
-
...
|
|
347
|
-
|
|
348
|
-
@overload
|
|
349
|
-
def get_parcel(
|
|
350
|
-
self, profile_id: UUID, parcel_type: Type[TransportVpnParcel], parcel_id: UUID
|
|
351
|
-
) -> Parcel[TransportVpnParcel]:
|
|
352
|
-
...
|
|
353
|
-
|
|
354
|
-
@overload
|
|
355
|
-
def get_parcel(
|
|
356
|
-
self, profile_id: UUID, parcel_type: Type[ManagementVpnParcel], parcel_id: UUID
|
|
357
|
-
) -> Parcel[ManagementVpnParcel]:
|
|
358
|
-
...
|
|
359
|
-
|
|
360
|
-
@overload
|
|
361
|
-
def get_parcel(self, profile_id: UUID, parcel_type: Type[Ipv4AclParcel], parcel_id: UUID) -> Parcel[Ipv4AclParcel]:
|
|
362
|
-
...
|
|
363
|
-
|
|
364
|
-
@overload
|
|
365
|
-
def get_parcel(self, profile_id: UUID, parcel_type: Type[Ipv6AclParcel], parcel_id: UUID) -> Parcel[Ipv6AclParcel]:
|
|
366
|
-
...
|
|
367
|
-
|
|
368
|
-
@overload
|
|
369
|
-
def get_parcel(
|
|
370
|
-
self, profile_id: UUID, parcel_type: Type[RoutePolicyParcel], parcel_id: UUID
|
|
371
|
-
) -> Parcel[RoutePolicyParcel]:
|
|
372
|
-
...
|
|
373
|
-
|
|
374
|
-
@overload
|
|
375
|
-
def get_parcel(
|
|
376
|
-
self, profile_id: UUID, parcel_type: Type[WanInterfaceMultilinkParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
377
|
-
) -> Parcel[WanInterfaceMultilinkParcel]:
|
|
378
|
-
...
|
|
379
|
-
|
|
380
|
-
@overload
|
|
381
|
-
def get_parcel(
|
|
382
|
-
self, profile_id: UUID, parcel_type: Type[InterfaceEthPPPoEParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
383
|
-
) -> Parcel[InterfaceEthPPPoEParcel]:
|
|
384
|
-
...
|
|
385
|
-
|
|
386
|
-
@overload
|
|
387
|
-
def get_parcel(
|
|
388
|
-
self, profile_id: UUID, parcel_type: Type[InterfaceDslPPPoEParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
389
|
-
) -> Parcel[InterfaceDslPPPoEParcel]:
|
|
390
|
-
...
|
|
391
|
-
|
|
392
|
-
@overload
|
|
393
|
-
def get_parcel(
|
|
394
|
-
self, profile_id: UUID, parcel_type: Type[InterfaceDslPPPoAParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
395
|
-
) -> Parcel[InterfaceDslPPPoAParcel]:
|
|
396
|
-
...
|
|
397
|
-
|
|
398
|
-
@overload
|
|
399
|
-
def get_parcel(
|
|
400
|
-
self, profile_id: UUID, parcel_type: Type[InterfaceDslIPoEParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
401
|
-
) -> Parcel[InterfaceDslIPoEParcel]:
|
|
402
|
-
...
|
|
403
|
-
|
|
404
|
-
@overload
|
|
405
|
-
def get_parcel(
|
|
406
|
-
self, profile_id: UUID, parcel_type: Type[WanInterfaceGreParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
407
|
-
) -> Parcel[WanInterfaceGreParcel]:
|
|
408
|
-
...
|
|
409
|
-
|
|
410
|
-
@overload
|
|
411
|
-
def get_parcel(
|
|
412
|
-
self, profile_id: UUID, parcel_type: Type[WanInterfaceEthernetParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
413
|
-
) -> Parcel[WanInterfaceEthernetParcel]:
|
|
414
|
-
...
|
|
415
|
-
|
|
416
|
-
@overload
|
|
417
|
-
def get_parcel(
|
|
418
|
-
self, profile_id: UUID, parcel_type: Type[ManagementInterfaceEthernetParcel], parcel_id: UUID, vpn_uuid: UUID
|
|
419
|
-
) -> Parcel[ManagementInterfaceEthernetParcel]:
|
|
420
|
-
...
|
|
421
|
-
|
|
422
|
-
@overload
|
|
423
|
-
def get_parcel(
|
|
424
|
-
self, profile_id: UUID, parcel_type: Type[RoutingBgpParcel], parcel_id: UUID
|
|
425
|
-
) -> Parcel[RoutingBgpParcel]:
|
|
426
|
-
...
|
|
427
|
-
|
|
428
|
-
@overload
|
|
429
|
-
def get_parcel(
|
|
430
|
-
self, profile_id: UUID, parcel_type: Type[RoutingOspfParcel], parcel_id: UUID
|
|
431
|
-
) -> Parcel[RoutingOspfParcel]:
|
|
432
|
-
...
|
|
433
|
-
|
|
434
|
-
@overload
|
|
435
|
-
def get_parcel(
|
|
436
|
-
self, profile_id: UUID, parcel_type: Type[RoutingOspfv3IPv6Parcel], parcel_id: UUID
|
|
437
|
-
) -> Parcel[RoutingOspfv3IPv6Parcel]:
|
|
438
|
-
...
|
|
439
|
-
|
|
440
|
-
@overload
|
|
441
|
-
def get_parcel(
|
|
442
|
-
self, profile_id: UUID, parcel_type: Type[RoutingOspfv3IPv4Parcel], parcel_id: UUID
|
|
443
|
-
) -> Parcel[RoutingOspfv3IPv4Parcel]:
|
|
444
|
-
...
|
|
445
|
-
|
|
446
|
-
@overload
|
|
447
|
-
def get_parcel(
|
|
448
|
-
self,
|
|
449
|
-
profile_id: UUID,
|
|
450
|
-
parcel_type: Type[InterfaceCellularParcel],
|
|
451
|
-
parcel_id: UUID,
|
|
452
|
-
vpn_uuid: UUID,
|
|
453
|
-
) -> Parcel[InterfaceCellularParcel]:
|
|
454
|
-
...
|
|
455
|
-
|
|
456
|
-
@overload
|
|
457
|
-
def get_parcel(
|
|
458
|
-
self,
|
|
459
|
-
profile_id: UUID,
|
|
460
|
-
parcel_type: Type[T1E1SerialParcel],
|
|
461
|
-
parcel_id: UUID,
|
|
462
|
-
vpn_uuid: UUID,
|
|
463
|
-
) -> Parcel[T1E1SerialParcel]:
|
|
464
|
-
...
|
|
465
|
-
|
|
466
|
-
@overload
|
|
467
|
-
def get_parcel(
|
|
468
|
-
self,
|
|
469
|
-
profile_id: UUID,
|
|
470
|
-
parcel_type: Type[WanInterfaceIpsecParcel],
|
|
471
|
-
parcel_id: UUID,
|
|
472
|
-
vpn_uuid: UUID,
|
|
473
|
-
) -> Parcel[WanInterfaceIpsecParcel]:
|
|
474
|
-
...
|
|
475
|
-
|
|
476
|
-
def get_parcel(
|
|
477
|
-
self,
|
|
478
|
-
profile_id: UUID,
|
|
479
|
-
parcel_type: Type[Union[AnyTransportParcel, AnyRoutingParcel]],
|
|
480
|
-
parcel_id: UUID,
|
|
481
|
-
vpn_uuid: Optional[UUID] = None,
|
|
482
|
-
) -> Parcel:
|
|
483
|
-
"""
|
|
484
|
-
Get one Transport Parcel given profile id, parcel type and parcel id
|
|
485
|
-
"""
|
|
486
|
-
if vpn_uuid is not None:
|
|
487
|
-
vpn_parcel = self._get_vpn_parcel(profile_id, vpn_uuid).payload
|
|
488
|
-
parcel_type_str = parcel_type._get_parcel_type()
|
|
489
|
-
parcel_type_str = removeprefix(parcel_type_str, "wan/vpn/")
|
|
490
|
-
parcel_type_str = removeprefix(parcel_type_str, "management/vpn/")
|
|
491
|
-
if vpn_parcel._get_parcel_type() == TransportVpnParcel._get_parcel_type():
|
|
492
|
-
return self.endpoint.get_transport_vpn_sub_parcel(profile_id, vpn_uuid, parcel_type_str, parcel_id)
|
|
493
|
-
else:
|
|
494
|
-
return self.endpoint.get_management_vpn_sub_parcel(profile_id, vpn_uuid, parcel_type_str, parcel_id)
|
|
495
|
-
return self.endpoint.get_transport_parcel(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
496
|
-
|
|
497
|
-
def update_parcel(
|
|
498
|
-
self, profile_id: UUID, payload: AnyTransportParcel, parcel_id: UUID, vpn_uuid: Optional[UUID] = None
|
|
499
|
-
) -> ParcelCreationResponse:
|
|
500
|
-
"""
|
|
501
|
-
Update Transport Parcel for selected profile_id based on payload type
|
|
502
|
-
"""
|
|
503
|
-
if vpn_uuid is not None:
|
|
504
|
-
vpn_parcel = self._get_vpn_parcel(profile_id, vpn_uuid).payload
|
|
505
|
-
parcel_type = payload._get_parcel_type()
|
|
506
|
-
parcel_type = removeprefix(parcel_type, "wan/vpn/")
|
|
507
|
-
parcel_type = removeprefix(parcel_type, "management/vpn/")
|
|
508
|
-
if vpn_parcel._get_parcel_type() == TransportVpnParcel._get_parcel_type():
|
|
509
|
-
return self.endpoint.update_transport_vpn_sub_parcel(
|
|
510
|
-
profile_id, vpn_uuid, parcel_type, parcel_id, payload
|
|
511
|
-
)
|
|
512
|
-
else:
|
|
513
|
-
return self.endpoint.update_management_vpn_sub_parcel(
|
|
514
|
-
profile_id, vpn_uuid, parcel_type, parcel_id, payload
|
|
515
|
-
)
|
|
516
|
-
return self.endpoint.update_transport_parcel(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
class OtherFeatureProfileAPI:
|
|
520
|
-
"""
|
|
521
|
-
SDWAN Feature Profile System APIs
|
|
522
|
-
"""
|
|
523
|
-
|
|
524
|
-
def __init__(self, session: ManagerSession):
|
|
525
|
-
self.session = session
|
|
526
|
-
self.endpoint = OtherFeatureProfile(session)
|
|
527
|
-
|
|
528
|
-
def get_profiles(
|
|
529
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
530
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
531
|
-
"""
|
|
532
|
-
Get all Other Feature Profiles
|
|
533
|
-
"""
|
|
534
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
535
|
-
|
|
536
|
-
return self.endpoint.get_sdwan_other_feature_profiles(payload)
|
|
537
|
-
|
|
538
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
539
|
-
"""
|
|
540
|
-
Create Other Feature Profile
|
|
541
|
-
"""
|
|
542
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
543
|
-
return self.endpoint.create_sdwan_other_feature_profile(payload)
|
|
544
|
-
|
|
545
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
546
|
-
"""
|
|
547
|
-
Delete Other Feature Profile
|
|
548
|
-
"""
|
|
549
|
-
self.endpoint.delete_sdwan_other_feature_profile(profile_id)
|
|
550
|
-
|
|
551
|
-
def delete_all_profiles(self) -> None:
|
|
552
|
-
"""
|
|
553
|
-
Delete all Other Feature Profiles
|
|
554
|
-
"""
|
|
555
|
-
profiles = self.get_profiles()
|
|
556
|
-
for profile in profiles:
|
|
557
|
-
self.delete_profile(profile.profile_id)
|
|
558
|
-
|
|
559
|
-
def get(
|
|
560
|
-
self,
|
|
561
|
-
profile_id: UUID,
|
|
562
|
-
parcel_type: Type[AnyOtherParcel], # UCSE, 1000-eyes, cybervision
|
|
563
|
-
parcel_id: Union[UUID, None] = None,
|
|
564
|
-
) -> DataSequence[Parcel[Any]]:
|
|
565
|
-
"""
|
|
566
|
-
Get all Other Parcels for selected profile_id and selected type or get one Other Parcel given parcel id
|
|
567
|
-
"""
|
|
568
|
-
|
|
569
|
-
if not parcel_id:
|
|
570
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
571
|
-
return self.endpoint.get_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
572
|
-
|
|
573
|
-
def create_parcel(self, profile_id: UUID, payload: AnyOtherParcel) -> ParcelCreationResponse:
|
|
574
|
-
"""
|
|
575
|
-
Create Other Parcel for selected profile_id based on payload type
|
|
576
|
-
"""
|
|
577
|
-
|
|
578
|
-
return self.endpoint.create(profile_id, payload._get_parcel_type(), payload)
|
|
579
|
-
|
|
580
|
-
def update_parcel(self, profile_id: UUID, payload: AnyOtherParcel, parcel_id: UUID) -> ParcelCreationResponse:
|
|
581
|
-
"""
|
|
582
|
-
Update Other Parcel for selected profile_id based on payload type
|
|
583
|
-
"""
|
|
584
|
-
|
|
585
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
586
|
-
|
|
587
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnyOtherParcel], parcel_id: UUID) -> None:
|
|
588
|
-
"""
|
|
589
|
-
Delete Other Parcel for selected profile_id based on payload type
|
|
590
|
-
"""
|
|
591
|
-
return self.endpoint.delete(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
class ServiceFeatureProfileAPI:
|
|
595
|
-
"""
|
|
596
|
-
SDWAN Feature Profile Service APIs
|
|
597
|
-
"""
|
|
598
|
-
|
|
599
|
-
def __init__(self, session: ManagerSession):
|
|
600
|
-
self.session = session
|
|
601
|
-
self.endpoint = ServiceFeatureProfile(session)
|
|
602
|
-
|
|
603
|
-
def get_profiles(
|
|
604
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
605
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
606
|
-
"""
|
|
607
|
-
Get all Service Feature Profiles
|
|
608
|
-
"""
|
|
609
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
610
|
-
|
|
611
|
-
return self.endpoint.get_sdwan_service_feature_profiles(payload)
|
|
612
|
-
|
|
613
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
614
|
-
"""
|
|
615
|
-
Create Service Feature Profile
|
|
616
|
-
"""
|
|
617
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
618
|
-
return self.endpoint.create_sdwan_service_feature_profile(payload)
|
|
619
|
-
|
|
620
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
621
|
-
"""
|
|
622
|
-
Delete Service Feature Profile
|
|
623
|
-
"""
|
|
624
|
-
self.endpoint.delete_sdwan_service_feature_profile(profile_id)
|
|
625
|
-
|
|
626
|
-
def delete_all_profiles(self) -> None:
|
|
627
|
-
"""
|
|
628
|
-
Delete all Service Feature Profiles
|
|
629
|
-
"""
|
|
630
|
-
profiles = self.get_profiles()
|
|
631
|
-
for profile in profiles:
|
|
632
|
-
self.delete_profile(profile.profile_id)
|
|
633
|
-
|
|
634
|
-
def create_parcel(
|
|
635
|
-
self, profile_id: UUID, payload: AnyServiceParcel, vpn_uuid: Optional[UUID] = None
|
|
636
|
-
) -> ParcelCreationResponse:
|
|
637
|
-
"""
|
|
638
|
-
Create Service Parcel for selected profile_id based on payload type
|
|
639
|
-
"""
|
|
640
|
-
if vpn_uuid is not None:
|
|
641
|
-
if isinstance(payload, MulticastParcel):
|
|
642
|
-
response = self.endpoint.create_service_parcel(profile_id, payload._get_parcel_type(), payload)
|
|
643
|
-
return self.endpoint.associate_parcel_with_vpn(
|
|
644
|
-
profile_id, vpn_uuid, payload._get_parcel_type(), ParcelAssociationPayload(parcel_id=response.id)
|
|
645
|
-
)
|
|
646
|
-
else:
|
|
647
|
-
parcel_type = payload._get_parcel_type().replace("lan/vpn/", "")
|
|
648
|
-
return self.endpoint.create_lan_vpn_sub_parcel(profile_id, vpn_uuid, parcel_type, payload)
|
|
649
|
-
return self.endpoint.create_service_parcel(profile_id, payload._get_parcel_type(), payload)
|
|
650
|
-
|
|
651
|
-
def delete_parcel(
|
|
652
|
-
self,
|
|
653
|
-
profile_uuid: UUID,
|
|
654
|
-
parcel_type: Type[AnyServiceParcel],
|
|
655
|
-
parcel_uuid: UUID,
|
|
656
|
-
vpn_uuid: Optional[UUID] = None,
|
|
657
|
-
) -> None:
|
|
658
|
-
"""
|
|
659
|
-
Delete Service Parcel for selected profile_uuid based on payload type
|
|
660
|
-
"""
|
|
661
|
-
if vpn_uuid is not None:
|
|
662
|
-
return self.endpoint.delete_lan_vpn_sub_parcel(
|
|
663
|
-
profile_uuid, vpn_uuid, removeprefix(parcel_type._get_parcel_type(), "lan/vpn/"), parcel_uuid
|
|
664
|
-
)
|
|
665
|
-
return self.endpoint.delete_service_parcel(profile_uuid, parcel_type._get_parcel_type(), parcel_uuid)
|
|
666
|
-
|
|
667
|
-
@overload
|
|
668
|
-
def get_parcels(
|
|
669
|
-
self,
|
|
670
|
-
profile_id: UUID,
|
|
671
|
-
parcel_type: Type[RoutePolicyParcel],
|
|
672
|
-
) -> DataSequence[Parcel[RoutePolicyParcel]]:
|
|
673
|
-
...
|
|
674
|
-
|
|
675
|
-
@overload
|
|
676
|
-
def get_parcels(
|
|
677
|
-
self,
|
|
678
|
-
profile_id: UUID,
|
|
679
|
-
parcel_type: Type[Ipv4AclParcel],
|
|
680
|
-
) -> DataSequence[Parcel[Ipv4AclParcel]]:
|
|
681
|
-
...
|
|
682
|
-
|
|
683
|
-
@overload
|
|
684
|
-
def get_parcels(
|
|
685
|
-
self,
|
|
686
|
-
profile_id: UUID,
|
|
687
|
-
parcel_type: Type[Ipv6AclParcel],
|
|
688
|
-
) -> DataSequence[Parcel[Ipv6AclParcel]]:
|
|
689
|
-
...
|
|
690
|
-
|
|
691
|
-
@overload
|
|
692
|
-
def get_parcels(
|
|
693
|
-
self,
|
|
694
|
-
profile_id: UUID,
|
|
695
|
-
parcel_type: Type[LanVpnParcel],
|
|
696
|
-
) -> DataSequence[Parcel[LanVpnParcel]]:
|
|
697
|
-
...
|
|
698
|
-
|
|
699
|
-
@overload
|
|
700
|
-
def get_parcels(
|
|
701
|
-
self,
|
|
702
|
-
profile_id: UUID,
|
|
703
|
-
parcel_type: Type[MulticastParcel],
|
|
704
|
-
) -> DataSequence[Parcel[MulticastParcel]]:
|
|
705
|
-
...
|
|
706
|
-
|
|
707
|
-
@overload
|
|
708
|
-
def get_parcels(
|
|
709
|
-
self,
|
|
710
|
-
profile_id: UUID,
|
|
711
|
-
parcel_type: Type[EigrpParcel],
|
|
712
|
-
) -> DataSequence[Parcel[EigrpParcel]]:
|
|
713
|
-
...
|
|
714
|
-
|
|
715
|
-
@overload
|
|
716
|
-
def get_parcels(
|
|
717
|
-
self,
|
|
718
|
-
profile_id: UUID,
|
|
719
|
-
parcel_type: Type[SwitchportParcel],
|
|
720
|
-
) -> DataSequence[Parcel[SwitchportParcel]]:
|
|
721
|
-
...
|
|
722
|
-
|
|
723
|
-
@overload
|
|
724
|
-
def get_parcels(
|
|
725
|
-
self,
|
|
726
|
-
profile_id: UUID,
|
|
727
|
-
parcel_type: Type[WirelessLanParcel],
|
|
728
|
-
) -> DataSequence[Parcel[WirelessLanParcel]]:
|
|
729
|
-
...
|
|
730
|
-
|
|
731
|
-
def get_parcels(
|
|
732
|
-
self,
|
|
733
|
-
profile_id: UUID,
|
|
734
|
-
parcel_type: Type[AnyServiceParcel],
|
|
735
|
-
) -> DataSequence:
|
|
736
|
-
"""
|
|
737
|
-
Get all Service Parcels given profile id and parcel type
|
|
738
|
-
"""
|
|
739
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
740
|
-
|
|
741
|
-
@overload
|
|
742
|
-
def get_parcel(
|
|
743
|
-
self,
|
|
744
|
-
profile_id: UUID,
|
|
745
|
-
parcel_type: Type[RoutePolicyParcel],
|
|
746
|
-
parcel_id: UUID,
|
|
747
|
-
) -> Parcel[RoutePolicyParcel]:
|
|
748
|
-
...
|
|
749
|
-
|
|
750
|
-
@overload
|
|
751
|
-
def get_parcel(
|
|
752
|
-
self,
|
|
753
|
-
profile_id: UUID,
|
|
754
|
-
parcel_type: Type[Ipv4AclParcel],
|
|
755
|
-
parcel_id: UUID,
|
|
756
|
-
) -> Parcel[Ipv4AclParcel]:
|
|
757
|
-
...
|
|
758
|
-
|
|
759
|
-
@overload
|
|
760
|
-
def get_parcel(
|
|
761
|
-
self,
|
|
762
|
-
profile_id: UUID,
|
|
763
|
-
parcel_type: Type[Ipv6AclParcel],
|
|
764
|
-
parcel_id: UUID,
|
|
765
|
-
) -> Parcel[Ipv6AclParcel]:
|
|
766
|
-
...
|
|
767
|
-
|
|
768
|
-
@overload
|
|
769
|
-
def get_parcel(
|
|
770
|
-
self,
|
|
771
|
-
profile_id: UUID,
|
|
772
|
-
parcel_type: Type[LanVpnParcel],
|
|
773
|
-
parcel_id: UUID,
|
|
774
|
-
) -> Parcel[LanVpnParcel]:
|
|
775
|
-
...
|
|
776
|
-
|
|
777
|
-
@overload
|
|
778
|
-
def get_parcel(
|
|
779
|
-
self,
|
|
780
|
-
profile_id: UUID,
|
|
781
|
-
parcel_type: Type[MulticastParcel],
|
|
782
|
-
parcel_id: UUID,
|
|
783
|
-
) -> Parcel[MulticastParcel]:
|
|
784
|
-
...
|
|
785
|
-
|
|
786
|
-
@overload
|
|
787
|
-
def get_parcel(
|
|
788
|
-
self,
|
|
789
|
-
profile_id: UUID,
|
|
790
|
-
parcel_type: Type[EigrpParcel],
|
|
791
|
-
parcel_id: UUID,
|
|
792
|
-
) -> Parcel[EigrpParcel]:
|
|
793
|
-
...
|
|
794
|
-
|
|
795
|
-
@overload
|
|
796
|
-
def get_parcel(
|
|
797
|
-
self,
|
|
798
|
-
profile_id: UUID,
|
|
799
|
-
parcel_type: Type[SwitchportParcel],
|
|
800
|
-
parcel_id: UUID,
|
|
801
|
-
) -> Parcel[SwitchportParcel]:
|
|
802
|
-
...
|
|
803
|
-
|
|
804
|
-
@overload
|
|
805
|
-
def get_parcel(
|
|
806
|
-
self,
|
|
807
|
-
profile_id: UUID,
|
|
808
|
-
parcel_type: Type[WirelessLanParcel],
|
|
809
|
-
parcel_id: UUID,
|
|
810
|
-
) -> Parcel[WirelessLanParcel]:
|
|
811
|
-
...
|
|
812
|
-
|
|
813
|
-
@overload
|
|
814
|
-
def get_parcel(
|
|
815
|
-
self,
|
|
816
|
-
profile_id: UUID,
|
|
817
|
-
parcel_type: Type[LanInterfaceEthernetParcel],
|
|
818
|
-
parcel_id: UUID,
|
|
819
|
-
vpn_uuid: UUID,
|
|
820
|
-
) -> Parcel[LanInterfaceEthernetParcel]:
|
|
821
|
-
...
|
|
822
|
-
|
|
823
|
-
@overload
|
|
824
|
-
def get_parcel(
|
|
825
|
-
self,
|
|
826
|
-
profile_id: UUID,
|
|
827
|
-
parcel_type: Type[LanInterfaceGreParcel],
|
|
828
|
-
parcel_id: UUID,
|
|
829
|
-
vpn_uuid: UUID,
|
|
830
|
-
) -> Parcel[LanInterfaceGreParcel]:
|
|
831
|
-
...
|
|
832
|
-
|
|
833
|
-
@overload
|
|
834
|
-
def get_parcel(
|
|
835
|
-
self,
|
|
836
|
-
profile_id: UUID,
|
|
837
|
-
parcel_type: Type[LanInterfaceIpsecParcel],
|
|
838
|
-
parcel_id: UUID,
|
|
839
|
-
vpn_uuid: UUID,
|
|
840
|
-
) -> Parcel[LanInterfaceIpsecParcel]:
|
|
841
|
-
...
|
|
842
|
-
|
|
843
|
-
@overload
|
|
844
|
-
def get_parcel(
|
|
845
|
-
self,
|
|
846
|
-
profile_id: UUID,
|
|
847
|
-
parcel_type: Type[InterfaceSviParcel],
|
|
848
|
-
parcel_id: UUID,
|
|
849
|
-
vpn_uuid: UUID,
|
|
850
|
-
) -> Parcel[InterfaceSviParcel]:
|
|
851
|
-
...
|
|
852
|
-
|
|
853
|
-
@overload
|
|
854
|
-
def get_parcel(
|
|
855
|
-
self,
|
|
856
|
-
profile_id: UUID,
|
|
857
|
-
parcel_type: Type[LanInterfaceMultilinkParcel],
|
|
858
|
-
parcel_id: UUID,
|
|
859
|
-
vpn_uuid: UUID,
|
|
860
|
-
) -> Parcel[LanInterfaceMultilinkParcel]:
|
|
861
|
-
...
|
|
862
|
-
|
|
863
|
-
@overload
|
|
864
|
-
def get_parcel(
|
|
865
|
-
self,
|
|
866
|
-
profile_id: UUID,
|
|
867
|
-
parcel_type: Type[RoutingBgpParcel],
|
|
868
|
-
parcel_id: UUID,
|
|
869
|
-
) -> Parcel[RoutingBgpParcel]:
|
|
870
|
-
...
|
|
871
|
-
|
|
872
|
-
@overload
|
|
873
|
-
def get_parcel(
|
|
874
|
-
self,
|
|
875
|
-
profile_id: UUID,
|
|
876
|
-
parcel_type: Type[RoutingOspfv3IPv6Parcel],
|
|
877
|
-
parcel_id: UUID,
|
|
878
|
-
) -> Parcel[RoutingOspfv3IPv6Parcel]:
|
|
879
|
-
...
|
|
880
|
-
|
|
881
|
-
@overload
|
|
882
|
-
def get_parcel(
|
|
883
|
-
self,
|
|
884
|
-
profile_id: UUID,
|
|
885
|
-
parcel_type: Type[RoutingOspfParcel],
|
|
886
|
-
parcel_id: UUID,
|
|
887
|
-
) -> Parcel[RoutingOspfParcel]:
|
|
888
|
-
...
|
|
889
|
-
|
|
890
|
-
@overload
|
|
891
|
-
def get_parcel(
|
|
892
|
-
self,
|
|
893
|
-
profile_id: UUID,
|
|
894
|
-
parcel_type: Type[RoutingOspfv3IPv4Parcel],
|
|
895
|
-
parcel_id: UUID,
|
|
896
|
-
) -> Parcel[RoutingOspfv3IPv4Parcel]:
|
|
897
|
-
...
|
|
898
|
-
|
|
899
|
-
def get_parcel(
|
|
900
|
-
self,
|
|
901
|
-
profile_id: UUID,
|
|
902
|
-
parcel_type: Type[AnyServiceParcel],
|
|
903
|
-
parcel_id: UUID,
|
|
904
|
-
vpn_uuid: Optional[UUID] = None,
|
|
905
|
-
) -> Parcel:
|
|
906
|
-
"""
|
|
907
|
-
Get one Service Parcel given profile id, parcel type and parcel id
|
|
908
|
-
"""
|
|
909
|
-
if vpn_uuid is not None:
|
|
910
|
-
return self.endpoint.get_lan_vpn_sub_parcel(
|
|
911
|
-
profile_id, vpn_uuid, removeprefix(parcel_type._get_parcel_type(), "lan/vpn/"), parcel_id
|
|
912
|
-
)
|
|
913
|
-
return self.endpoint.get_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
914
|
-
|
|
915
|
-
def update_parcel(
|
|
916
|
-
self,
|
|
917
|
-
profile_id: UUID,
|
|
918
|
-
payload: AnyServiceParcel,
|
|
919
|
-
parcel_id: UUID,
|
|
920
|
-
vpn_uuid: Optional[UUID] = None,
|
|
921
|
-
) -> ParcelCreationResponse:
|
|
922
|
-
"""
|
|
923
|
-
Update Service Parcel for selected profile_id based on payload type
|
|
924
|
-
"""
|
|
925
|
-
if vpn_uuid is not None:
|
|
926
|
-
return self.endpoint.update_lan_vpn_sub_parcel(
|
|
927
|
-
profile_id, vpn_uuid, removeprefix(payload._get_parcel_type(), "lan/vpn/"), parcel_id, payload
|
|
928
|
-
)
|
|
929
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
class SystemFeatureProfileAPI:
|
|
933
|
-
"""
|
|
934
|
-
SDWAN Feature Profile System APIs
|
|
935
|
-
"""
|
|
936
|
-
|
|
937
|
-
def __init__(self, session: ManagerSession):
|
|
938
|
-
self.session = session
|
|
939
|
-
self.endpoint = SystemFeatureProfile(session)
|
|
940
|
-
|
|
941
|
-
def get_profiles(
|
|
942
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
943
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
944
|
-
"""
|
|
945
|
-
Get all System Feature Profiles
|
|
946
|
-
"""
|
|
947
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
948
|
-
|
|
949
|
-
return self.endpoint.get_sdwan_system_feature_profiles(payload)
|
|
950
|
-
|
|
951
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
952
|
-
"""
|
|
953
|
-
Create System Feature Profile
|
|
954
|
-
"""
|
|
955
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
956
|
-
return self.endpoint.create_sdwan_system_feature_profile(payload)
|
|
957
|
-
|
|
958
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
959
|
-
"""
|
|
960
|
-
Delete System Feature Profile
|
|
961
|
-
"""
|
|
962
|
-
self.endpoint.delete_sdwan_system_feature_profile(profile_id)
|
|
963
|
-
|
|
964
|
-
def delete_all_profiles(self) -> None:
|
|
965
|
-
"""
|
|
966
|
-
Delete all System Feature Profiles
|
|
967
|
-
"""
|
|
968
|
-
profiles = self.get_profiles()
|
|
969
|
-
for profile in profiles:
|
|
970
|
-
self.delete_profile(profile.profile_id)
|
|
971
|
-
|
|
972
|
-
def get_schema(
|
|
973
|
-
self,
|
|
974
|
-
profile_id: UUID,
|
|
975
|
-
parcel_type: Type[AnySystemParcel],
|
|
976
|
-
) -> Json:
|
|
977
|
-
"""
|
|
978
|
-
Get all System Parcels for selected profile_id and selected type or get one Policy Object given parcel id
|
|
979
|
-
"""
|
|
980
|
-
|
|
981
|
-
return self.endpoint.get_schema(profile_id, parcel_type._get_parcel_type())
|
|
982
|
-
|
|
983
|
-
@overload
|
|
984
|
-
def get_parcels(
|
|
985
|
-
self,
|
|
986
|
-
profile_id: UUID,
|
|
987
|
-
parcel_type: Type[AAAParcel],
|
|
988
|
-
) -> DataSequence[Parcel[AAAParcel]]:
|
|
989
|
-
...
|
|
990
|
-
|
|
991
|
-
@overload
|
|
992
|
-
def get_parcels(
|
|
993
|
-
self,
|
|
994
|
-
profile_id: UUID,
|
|
995
|
-
parcel_type: Type[BannerParcel],
|
|
996
|
-
) -> DataSequence[Parcel[BannerParcel]]:
|
|
997
|
-
...
|
|
998
|
-
|
|
999
|
-
@overload
|
|
1000
|
-
def get_parcels(
|
|
1001
|
-
self,
|
|
1002
|
-
profile_id: UUID,
|
|
1003
|
-
parcel_type: Type[BasicParcel],
|
|
1004
|
-
) -> DataSequence[Parcel[BasicParcel]]:
|
|
1005
|
-
...
|
|
1006
|
-
|
|
1007
|
-
@overload
|
|
1008
|
-
def get_parcels(
|
|
1009
|
-
self,
|
|
1010
|
-
profile_id: UUID,
|
|
1011
|
-
parcel_type: Type[BFDParcel],
|
|
1012
|
-
) -> DataSequence[Parcel[BFDParcel]]:
|
|
1013
|
-
...
|
|
1014
|
-
|
|
1015
|
-
@overload
|
|
1016
|
-
def get_parcels(
|
|
1017
|
-
self,
|
|
1018
|
-
profile_id: UUID,
|
|
1019
|
-
parcel_type: Type[GlobalParcel],
|
|
1020
|
-
) -> DataSequence[Parcel[GlobalParcel]]:
|
|
1021
|
-
...
|
|
1022
|
-
|
|
1023
|
-
@overload
|
|
1024
|
-
def get_parcels(
|
|
1025
|
-
self,
|
|
1026
|
-
profile_id: UUID,
|
|
1027
|
-
parcel_type: Type[LoggingParcel],
|
|
1028
|
-
) -> DataSequence[Parcel[LoggingParcel]]:
|
|
1029
|
-
...
|
|
1030
|
-
|
|
1031
|
-
@overload
|
|
1032
|
-
def get_parcels(
|
|
1033
|
-
self,
|
|
1034
|
-
profile_id: UUID,
|
|
1035
|
-
parcel_type: Type[MRFParcel],
|
|
1036
|
-
) -> DataSequence[Parcel[MRFParcel]]:
|
|
1037
|
-
...
|
|
1038
|
-
|
|
1039
|
-
@overload
|
|
1040
|
-
def get_parcels(
|
|
1041
|
-
self,
|
|
1042
|
-
profile_id: UUID,
|
|
1043
|
-
parcel_type: Type[NtpParcel],
|
|
1044
|
-
) -> DataSequence[Parcel[NtpParcel]]:
|
|
1045
|
-
...
|
|
1046
|
-
|
|
1047
|
-
@overload
|
|
1048
|
-
def get_parcels(
|
|
1049
|
-
self,
|
|
1050
|
-
profile_id: UUID,
|
|
1051
|
-
parcel_type: Type[OMPParcel],
|
|
1052
|
-
) -> DataSequence[Parcel[OMPParcel]]:
|
|
1053
|
-
...
|
|
1054
|
-
|
|
1055
|
-
@overload
|
|
1056
|
-
def get_parcels(
|
|
1057
|
-
self,
|
|
1058
|
-
profile_id: UUID,
|
|
1059
|
-
parcel_type: Type[SecurityParcel],
|
|
1060
|
-
) -> DataSequence[Parcel[SecurityParcel]]:
|
|
1061
|
-
...
|
|
1062
|
-
|
|
1063
|
-
@overload
|
|
1064
|
-
def get_parcels(
|
|
1065
|
-
self,
|
|
1066
|
-
profile_id: UUID,
|
|
1067
|
-
parcel_type: Type[SNMPParcel],
|
|
1068
|
-
) -> DataSequence[Parcel[SNMPParcel]]:
|
|
1069
|
-
...
|
|
1070
|
-
|
|
1071
|
-
def get_parcels(
|
|
1072
|
-
self,
|
|
1073
|
-
profile_id: UUID,
|
|
1074
|
-
parcel_type: Type[AnySystemParcel],
|
|
1075
|
-
) -> DataSequence:
|
|
1076
|
-
"""
|
|
1077
|
-
Get all System Parcels given profile id and parcel type
|
|
1078
|
-
"""
|
|
1079
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
1080
|
-
|
|
1081
|
-
@overload
|
|
1082
|
-
def get_parcel(
|
|
1083
|
-
self,
|
|
1084
|
-
profile_id: UUID,
|
|
1085
|
-
parcel_type: Type[AAAParcel],
|
|
1086
|
-
parcel_id: UUID,
|
|
1087
|
-
) -> Parcel[AAAParcel]:
|
|
1088
|
-
...
|
|
1089
|
-
|
|
1090
|
-
@overload
|
|
1091
|
-
def get_parcel(
|
|
1092
|
-
self,
|
|
1093
|
-
profile_id: UUID,
|
|
1094
|
-
parcel_type: Type[BannerParcel],
|
|
1095
|
-
parcel_id: UUID,
|
|
1096
|
-
) -> Parcel[BannerParcel]:
|
|
1097
|
-
...
|
|
1098
|
-
|
|
1099
|
-
@overload
|
|
1100
|
-
def get_parcel(
|
|
1101
|
-
self,
|
|
1102
|
-
profile_id: UUID,
|
|
1103
|
-
parcel_type: Type[BasicParcel],
|
|
1104
|
-
parcel_id: UUID,
|
|
1105
|
-
) -> Parcel[BasicParcel]:
|
|
1106
|
-
...
|
|
1107
|
-
|
|
1108
|
-
@overload
|
|
1109
|
-
def get_parcel(
|
|
1110
|
-
self,
|
|
1111
|
-
profile_id: UUID,
|
|
1112
|
-
parcel_type: Type[BFDParcel],
|
|
1113
|
-
parcel_id: UUID,
|
|
1114
|
-
) -> Parcel[BFDParcel]:
|
|
1115
|
-
...
|
|
1116
|
-
|
|
1117
|
-
@overload
|
|
1118
|
-
def get_parcel(
|
|
1119
|
-
self,
|
|
1120
|
-
profile_id: UUID,
|
|
1121
|
-
parcel_type: Type[GlobalParcel],
|
|
1122
|
-
parcel_id: UUID,
|
|
1123
|
-
) -> Parcel[GlobalParcel]:
|
|
1124
|
-
...
|
|
1125
|
-
|
|
1126
|
-
@overload
|
|
1127
|
-
def get_parcel(
|
|
1128
|
-
self,
|
|
1129
|
-
profile_id: UUID,
|
|
1130
|
-
parcel_type: Type[LoggingParcel],
|
|
1131
|
-
parcel_id: UUID,
|
|
1132
|
-
) -> Parcel[LoggingParcel]:
|
|
1133
|
-
...
|
|
1134
|
-
|
|
1135
|
-
@overload
|
|
1136
|
-
def get_parcel(
|
|
1137
|
-
self,
|
|
1138
|
-
profile_id: UUID,
|
|
1139
|
-
parcel_type: Type[MRFParcel],
|
|
1140
|
-
parcel_id: UUID,
|
|
1141
|
-
) -> Parcel[MRFParcel]:
|
|
1142
|
-
...
|
|
1143
|
-
|
|
1144
|
-
@overload
|
|
1145
|
-
def get_parcel(
|
|
1146
|
-
self,
|
|
1147
|
-
profile_id: UUID,
|
|
1148
|
-
parcel_type: Type[NtpParcel],
|
|
1149
|
-
parcel_id: UUID,
|
|
1150
|
-
) -> Parcel[NtpParcel]:
|
|
1151
|
-
...
|
|
1152
|
-
|
|
1153
|
-
@overload
|
|
1154
|
-
def get_parcel(
|
|
1155
|
-
self,
|
|
1156
|
-
profile_id: UUID,
|
|
1157
|
-
parcel_type: Type[OMPParcel],
|
|
1158
|
-
parcel_id: UUID,
|
|
1159
|
-
) -> Parcel[OMPParcel]:
|
|
1160
|
-
...
|
|
1161
|
-
|
|
1162
|
-
@overload
|
|
1163
|
-
def get_parcel(
|
|
1164
|
-
self,
|
|
1165
|
-
profile_id: UUID,
|
|
1166
|
-
parcel_type: Type[SecurityParcel],
|
|
1167
|
-
parcel_id: UUID,
|
|
1168
|
-
) -> Parcel[SecurityParcel]:
|
|
1169
|
-
...
|
|
1170
|
-
|
|
1171
|
-
@overload
|
|
1172
|
-
def get_parcel(
|
|
1173
|
-
self,
|
|
1174
|
-
profile_id: UUID,
|
|
1175
|
-
parcel_type: Type[SNMPParcel],
|
|
1176
|
-
parcel_id: UUID,
|
|
1177
|
-
) -> Parcel[SNMPParcel]:
|
|
1178
|
-
...
|
|
1179
|
-
|
|
1180
|
-
def get_parcel(
|
|
1181
|
-
self,
|
|
1182
|
-
profile_id: UUID,
|
|
1183
|
-
parcel_type: Type[AnySystemParcel],
|
|
1184
|
-
parcel_id: UUID,
|
|
1185
|
-
) -> Parcel:
|
|
1186
|
-
"""
|
|
1187
|
-
Get one System Parcel given profile id, parcel type and parcel id
|
|
1188
|
-
"""
|
|
1189
|
-
return self.endpoint.get_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
1190
|
-
|
|
1191
|
-
def create_parcel(self, profile_id: UUID, payload: AnySystemParcel) -> ParcelCreationResponse:
|
|
1192
|
-
"""
|
|
1193
|
-
Create System Parcel for selected profile_id based on payload type
|
|
1194
|
-
"""
|
|
1195
|
-
|
|
1196
|
-
return self.endpoint.create(profile_id, payload._get_parcel_type(), payload)
|
|
1197
|
-
|
|
1198
|
-
def update_parcel(self, profile_id: UUID, payload: AnySystemParcel, parcel_id: UUID) -> ParcelCreationResponse:
|
|
1199
|
-
"""
|
|
1200
|
-
Update System Parcel for selected profile_id based on payload type
|
|
1201
|
-
"""
|
|
1202
|
-
|
|
1203
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
1204
|
-
|
|
1205
|
-
@overload
|
|
1206
|
-
def delete_parcel(
|
|
1207
|
-
self,
|
|
1208
|
-
profile_id: UUID,
|
|
1209
|
-
parcel_type: Type[AAAParcel],
|
|
1210
|
-
parcel_id: UUID,
|
|
1211
|
-
) -> None:
|
|
1212
|
-
...
|
|
1213
|
-
|
|
1214
|
-
@overload
|
|
1215
|
-
def delete_parcel(
|
|
1216
|
-
self,
|
|
1217
|
-
profile_id: UUID,
|
|
1218
|
-
parcel_type: Type[BFDParcel],
|
|
1219
|
-
parcel_id: UUID,
|
|
1220
|
-
) -> None:
|
|
1221
|
-
...
|
|
1222
|
-
|
|
1223
|
-
@overload
|
|
1224
|
-
def delete_parcel(
|
|
1225
|
-
self,
|
|
1226
|
-
profile_id: UUID,
|
|
1227
|
-
parcel_type: Type[LoggingParcel],
|
|
1228
|
-
parcel_id: UUID,
|
|
1229
|
-
) -> None:
|
|
1230
|
-
...
|
|
1231
|
-
|
|
1232
|
-
@overload
|
|
1233
|
-
def delete_parcel(
|
|
1234
|
-
self,
|
|
1235
|
-
profile_id: UUID,
|
|
1236
|
-
parcel_type: Type[BannerParcel],
|
|
1237
|
-
parcel_id: UUID,
|
|
1238
|
-
) -> None:
|
|
1239
|
-
...
|
|
1240
|
-
|
|
1241
|
-
@overload
|
|
1242
|
-
def delete_parcel(
|
|
1243
|
-
self,
|
|
1244
|
-
profile_id: UUID,
|
|
1245
|
-
parcel_type: Type[BasicParcel],
|
|
1246
|
-
parcel_id: UUID,
|
|
1247
|
-
) -> None:
|
|
1248
|
-
...
|
|
1249
|
-
|
|
1250
|
-
@overload
|
|
1251
|
-
def delete_parcel(
|
|
1252
|
-
self,
|
|
1253
|
-
profile_id: UUID,
|
|
1254
|
-
parcel_type: Type[GlobalParcel],
|
|
1255
|
-
parcel_id: UUID,
|
|
1256
|
-
) -> None:
|
|
1257
|
-
...
|
|
1258
|
-
|
|
1259
|
-
@overload
|
|
1260
|
-
def delete_parcel(
|
|
1261
|
-
self,
|
|
1262
|
-
profile_id: UUID,
|
|
1263
|
-
parcel_type: Type[NtpParcel],
|
|
1264
|
-
parcel_id: UUID,
|
|
1265
|
-
) -> None:
|
|
1266
|
-
...
|
|
1267
|
-
|
|
1268
|
-
@overload
|
|
1269
|
-
def delete_parcel(
|
|
1270
|
-
self,
|
|
1271
|
-
profile_id: UUID,
|
|
1272
|
-
parcel_type: Type[MRFParcel],
|
|
1273
|
-
parcel_id: UUID,
|
|
1274
|
-
) -> None:
|
|
1275
|
-
...
|
|
1276
|
-
|
|
1277
|
-
@overload
|
|
1278
|
-
def delete_parcel(
|
|
1279
|
-
self,
|
|
1280
|
-
profile_id: UUID,
|
|
1281
|
-
parcel_type: Type[OMPParcel],
|
|
1282
|
-
parcel_id: UUID,
|
|
1283
|
-
) -> None:
|
|
1284
|
-
...
|
|
1285
|
-
|
|
1286
|
-
@overload
|
|
1287
|
-
def delete_parcel(
|
|
1288
|
-
self,
|
|
1289
|
-
profile_id: UUID,
|
|
1290
|
-
parcel_type: Type[SecurityParcel],
|
|
1291
|
-
parcel_id: UUID,
|
|
1292
|
-
) -> None:
|
|
1293
|
-
...
|
|
1294
|
-
|
|
1295
|
-
@overload
|
|
1296
|
-
def delete_parcel(
|
|
1297
|
-
self,
|
|
1298
|
-
profile_id: UUID,
|
|
1299
|
-
parcel_type: Type[SNMPParcel],
|
|
1300
|
-
parcel_id: UUID,
|
|
1301
|
-
) -> None:
|
|
1302
|
-
...
|
|
1303
|
-
|
|
1304
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnySystemParcel], parcel_id: UUID) -> None:
|
|
1305
|
-
"""
|
|
1306
|
-
Delete System Parcel for selected profile_id based on payload type
|
|
1307
|
-
"""
|
|
1308
|
-
return self.endpoint.delete(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
class PolicyObjectFeatureProfileAPI:
|
|
1312
|
-
"""
|
|
1313
|
-
SDWAN Feature Profile Policy Object APIs
|
|
1314
|
-
"""
|
|
1315
|
-
|
|
1316
|
-
def __init__(self, session: ManagerSession):
|
|
1317
|
-
self.session = session
|
|
1318
|
-
self.endpoint = PolicyObjectFeatureProfile(session)
|
|
1319
|
-
|
|
1320
|
-
def get_profiles(self) -> DataSequence[FeatureProfileInfo]:
|
|
1321
|
-
return self.endpoint.get_profiles()
|
|
1322
|
-
|
|
1323
|
-
def create_profile(self, profile: FeatureProfileCreationPayload) -> FeatureProfileCreationResponse:
|
|
1324
|
-
return self.endpoint.create_profile(profile)
|
|
1325
|
-
|
|
1326
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
1327
|
-
return self.endpoint.delete_profile(profile_id=profile_id)
|
|
1328
|
-
|
|
1329
|
-
@overload
|
|
1330
|
-
def get(
|
|
1331
|
-
self, profile_id: UUID, parcel_type: Type[AdvancedInspectionProfileParcel]
|
|
1332
|
-
) -> DataSequence[Parcel[AdvancedInspectionProfileParcel]]:
|
|
1333
|
-
...
|
|
1334
|
-
|
|
1335
|
-
@overload
|
|
1336
|
-
def get(
|
|
1337
|
-
self, profile_id: UUID, parcel_type: Type[AdvancedMalwareProtectionParcel]
|
|
1338
|
-
) -> DataSequence[Parcel[AdvancedMalwareProtectionParcel]]:
|
|
1339
|
-
...
|
|
1340
|
-
|
|
1341
|
-
@overload
|
|
1342
|
-
def get(
|
|
1343
|
-
self, profile_id: UUID, parcel_type: Type[ApplicationListParcel]
|
|
1344
|
-
) -> DataSequence[Parcel[ApplicationListParcel]]:
|
|
1345
|
-
...
|
|
1346
|
-
|
|
1347
|
-
@overload
|
|
1348
|
-
def get(self, profile_id: UUID, parcel_type: Type[AppProbeParcel]) -> DataSequence[Parcel[AppProbeParcel]]:
|
|
1349
|
-
...
|
|
1350
|
-
|
|
1351
|
-
@overload
|
|
1352
|
-
def get(self, profile_id: UUID, parcel_type: Type[AsPathParcel]) -> DataSequence[Parcel[AsPathParcel]]:
|
|
1353
|
-
...
|
|
1354
|
-
|
|
1355
|
-
@overload
|
|
1356
|
-
def get(self, profile_id: UUID, parcel_type: Type[ColorParcel]) -> DataSequence[Parcel[ColorParcel]]:
|
|
1357
|
-
...
|
|
1358
|
-
|
|
1359
|
-
@overload
|
|
1360
|
-
def get(self, profile_id: UUID, parcel_type: Type[DataPrefixParcel]) -> DataSequence[Parcel[DataPrefixParcel]]:
|
|
1361
|
-
...
|
|
1362
|
-
|
|
1363
|
-
@overload
|
|
1364
|
-
def get(
|
|
1365
|
-
self, profile_id: UUID, parcel_type: Type[ExpandedCommunityParcel]
|
|
1366
|
-
) -> DataSequence[Parcel[ExpandedCommunityParcel]]:
|
|
1367
|
-
...
|
|
1368
|
-
|
|
1369
|
-
@overload
|
|
1370
|
-
def get(
|
|
1371
|
-
self, profile_id: UUID, parcel_type: Type[FowardingClassParcel]
|
|
1372
|
-
) -> DataSequence[Parcel[FowardingClassParcel]]:
|
|
1373
|
-
...
|
|
1374
|
-
|
|
1375
|
-
@overload
|
|
1376
|
-
def get(self, profile_id: UUID, parcel_type: Type[FQDNDomainParcel]) -> DataSequence[Parcel[FQDNDomainParcel]]:
|
|
1377
|
-
...
|
|
1378
|
-
|
|
1379
|
-
@overload
|
|
1380
|
-
def get(
|
|
1381
|
-
self, profile_id: UUID, parcel_type: Type[GeoLocationListParcel]
|
|
1382
|
-
) -> DataSequence[Parcel[GeoLocationListParcel]]:
|
|
1383
|
-
...
|
|
1384
|
-
|
|
1385
|
-
@overload
|
|
1386
|
-
def get(
|
|
1387
|
-
self, profile_id: UUID, parcel_type: Type[IntrusionPreventionParcel]
|
|
1388
|
-
) -> DataSequence[Parcel[IntrusionPreventionParcel]]:
|
|
1389
|
-
...
|
|
1390
|
-
|
|
1391
|
-
@overload
|
|
1392
|
-
def get(self, profile_id: UUID, parcel_type: Type[IPSSignatureParcel]) -> DataSequence[Parcel[IPSSignatureParcel]]:
|
|
1393
|
-
...
|
|
1394
|
-
|
|
1395
|
-
@overload
|
|
1396
|
-
def get(
|
|
1397
|
-
self, profile_id: UUID, parcel_type: Type[IPv6DataPrefixParcel]
|
|
1398
|
-
) -> DataSequence[Parcel[IPv6DataPrefixParcel]]:
|
|
1399
|
-
...
|
|
1400
|
-
|
|
1401
|
-
@overload
|
|
1402
|
-
def get(
|
|
1403
|
-
self, profile_id: UUID, parcel_type: Type[IPv6PrefixListParcel]
|
|
1404
|
-
) -> DataSequence[Parcel[IPv6PrefixListParcel]]:
|
|
1405
|
-
...
|
|
1406
|
-
|
|
1407
|
-
@overload
|
|
1408
|
-
def get(self, profile_id: UUID, parcel_type: Type[LocalDomainParcel]) -> DataSequence[Parcel[LocalDomainParcel]]:
|
|
1409
|
-
...
|
|
1410
|
-
|
|
1411
|
-
@overload
|
|
1412
|
-
def get(self, profile_id: UUID, parcel_type: Type[MirrorParcel]) -> DataSequence[Parcel[MirrorParcel]]:
|
|
1413
|
-
...
|
|
1414
|
-
|
|
1415
|
-
@overload
|
|
1416
|
-
def get(self, profile_id: UUID, parcel_type: Type[PolicerParcel]) -> DataSequence[Parcel[PolicerParcel]]:
|
|
1417
|
-
...
|
|
1418
|
-
|
|
1419
|
-
@overload
|
|
1420
|
-
def get(
|
|
1421
|
-
self, profile_id: UUID, parcel_type: Type[PreferredColorGroupParcel]
|
|
1422
|
-
) -> DataSequence[Parcel[PreferredColorGroupParcel]]:
|
|
1423
|
-
...
|
|
1424
|
-
|
|
1425
|
-
@overload
|
|
1426
|
-
def get(self, profile_id: UUID, parcel_type: Type[PrefixListParcel]) -> DataSequence[Parcel[PrefixListParcel]]:
|
|
1427
|
-
...
|
|
1428
|
-
|
|
1429
|
-
@overload
|
|
1430
|
-
def get(self, profile_id: UUID, parcel_type: Type[ProtocolListParcel]) -> DataSequence[Parcel[ProtocolListParcel]]:
|
|
1431
|
-
...
|
|
1432
|
-
|
|
1433
|
-
@overload
|
|
1434
|
-
def get(
|
|
1435
|
-
self, profile_id: UUID, parcel_type: Type[SecurityApplicationListParcel]
|
|
1436
|
-
) -> DataSequence[Parcel[SecurityApplicationListParcel]]:
|
|
1437
|
-
...
|
|
1438
|
-
|
|
1439
|
-
@overload
|
|
1440
|
-
def get(
|
|
1441
|
-
self, profile_id: UUID, parcel_type: Type[SecurityDataPrefixParcel]
|
|
1442
|
-
) -> DataSequence[Parcel[SecurityDataPrefixParcel]]:
|
|
1443
|
-
...
|
|
1444
|
-
|
|
1445
|
-
@overload
|
|
1446
|
-
def get(self, profile_id: UUID, parcel_type: Type[SecurityPortParcel]) -> DataSequence[Parcel[SecurityPortParcel]]:
|
|
1447
|
-
...
|
|
1448
|
-
|
|
1449
|
-
@overload
|
|
1450
|
-
def get(
|
|
1451
|
-
self, profile_id: UUID, parcel_type: Type[SecurityZoneListParcel]
|
|
1452
|
-
) -> DataSequence[Parcel[SecurityZoneListParcel]]:
|
|
1453
|
-
...
|
|
1454
|
-
|
|
1455
|
-
@overload
|
|
1456
|
-
def get(self, profile_id: UUID, parcel_type: Type[SLAClassParcel]) -> DataSequence[Parcel[SLAClassParcel]]:
|
|
1457
|
-
...
|
|
1458
|
-
|
|
1459
|
-
@overload
|
|
1460
|
-
def get(
|
|
1461
|
-
self, profile_id: UUID, parcel_type: Type[SslDecryptionParcel]
|
|
1462
|
-
) -> DataSequence[Parcel[SslDecryptionParcel]]:
|
|
1463
|
-
...
|
|
1464
|
-
|
|
1465
|
-
@overload
|
|
1466
|
-
def get(
|
|
1467
|
-
self, profile_id: UUID, parcel_type: Type[SslDecryptionProfileParcel]
|
|
1468
|
-
) -> DataSequence[Parcel[SslDecryptionProfileParcel]]:
|
|
1469
|
-
...
|
|
1470
|
-
|
|
1471
|
-
@overload
|
|
1472
|
-
def get(
|
|
1473
|
-
self, profile_id: UUID, parcel_type: Type[StandardCommunityParcel]
|
|
1474
|
-
) -> DataSequence[Parcel[StandardCommunityParcel]]:
|
|
1475
|
-
...
|
|
1476
|
-
|
|
1477
|
-
@overload
|
|
1478
|
-
def get(self, profile_id: UUID, parcel_type: Type[TlocParcel]) -> DataSequence[Parcel[TlocParcel]]:
|
|
1479
|
-
...
|
|
1480
|
-
|
|
1481
|
-
@overload
|
|
1482
|
-
def get(self, profile_id: UUID, parcel_type: Type[URLParcel]) -> DataSequence[Parcel[TlocParcel]]:
|
|
1483
|
-
...
|
|
1484
|
-
|
|
1485
|
-
# get by id
|
|
1486
|
-
|
|
1487
|
-
@overload
|
|
1488
|
-
def get(
|
|
1489
|
-
self, profile_id: UUID, parcel_type: Type[AdvancedInspectionProfileParcel], parcel_id: UUID
|
|
1490
|
-
) -> Parcel[AdvancedInspectionProfileParcel]:
|
|
1491
|
-
...
|
|
1492
|
-
|
|
1493
|
-
@overload
|
|
1494
|
-
def get(
|
|
1495
|
-
self, profile_id: UUID, parcel_type: Type[AdvancedMalwareProtectionParcel], parcel_id: UUID
|
|
1496
|
-
) -> Parcel[AdvancedMalwareProtectionParcel]:
|
|
1497
|
-
...
|
|
1498
|
-
|
|
1499
|
-
@overload
|
|
1500
|
-
def get(
|
|
1501
|
-
self, profile_id: UUID, parcel_type: Type[ApplicationListParcel], parcel_id: UUID
|
|
1502
|
-
) -> Parcel[ApplicationListParcel]:
|
|
1503
|
-
...
|
|
1504
|
-
|
|
1505
|
-
@overload
|
|
1506
|
-
def get(self, profile_id: UUID, parcel_type: Type[AppProbeParcel], parcel_id: UUID) -> Parcel[AppProbeParcel]:
|
|
1507
|
-
...
|
|
1508
|
-
|
|
1509
|
-
@overload
|
|
1510
|
-
def get(self, profile_id: UUID, parcel_type: Type[AsPathParcel], parcel_id: UUID) -> Parcel[AsPathParcel]:
|
|
1511
|
-
...
|
|
1512
|
-
|
|
1513
|
-
@overload
|
|
1514
|
-
def get(self, profile_id: UUID, parcel_type: Type[ColorParcel], parcel_id: UUID) -> Parcel[ColorParcel]:
|
|
1515
|
-
...
|
|
1516
|
-
|
|
1517
|
-
@overload
|
|
1518
|
-
def get(self, profile_id: UUID, parcel_type: Type[DataPrefixParcel], parcel_id: UUID) -> Parcel[DataPrefixParcel]:
|
|
1519
|
-
...
|
|
1520
|
-
|
|
1521
|
-
@overload
|
|
1522
|
-
def get(
|
|
1523
|
-
self, profile_id: UUID, parcel_type: Type[ExpandedCommunityParcel], parcel_id: UUID
|
|
1524
|
-
) -> Parcel[ExpandedCommunityParcel]:
|
|
1525
|
-
...
|
|
1526
|
-
|
|
1527
|
-
@overload
|
|
1528
|
-
def get(
|
|
1529
|
-
self, profile_id: UUID, parcel_type: Type[ExtendedCommunityParcel], parcel_id: UUID
|
|
1530
|
-
) -> DataSequence[Parcel[Any]]:
|
|
1531
|
-
...
|
|
1532
|
-
|
|
1533
|
-
@overload
|
|
1534
|
-
def get(
|
|
1535
|
-
self, profile_id: UUID, parcel_type: Type[FowardingClassParcel], parcel_id: UUID
|
|
1536
|
-
) -> Parcel[FowardingClassParcel]:
|
|
1537
|
-
...
|
|
1538
|
-
|
|
1539
|
-
@overload
|
|
1540
|
-
def get(self, profile_id: UUID, parcel_type: Type[FQDNDomainParcel], parcel_id: UUID) -> Parcel[FQDNDomainParcel]:
|
|
1541
|
-
...
|
|
1542
|
-
|
|
1543
|
-
@overload
|
|
1544
|
-
def get(
|
|
1545
|
-
self, profile_id: UUID, parcel_type: Type[GeoLocationListParcel], parcel_id: UUID
|
|
1546
|
-
) -> Parcel[GeoLocationListParcel]:
|
|
1547
|
-
...
|
|
1548
|
-
|
|
1549
|
-
@overload
|
|
1550
|
-
def get(
|
|
1551
|
-
self, profile_id: UUID, parcel_type: Type[IntrusionPreventionParcel], parcel_id: UUID
|
|
1552
|
-
) -> Parcel[IntrusionPreventionParcel]:
|
|
1553
|
-
...
|
|
1554
|
-
|
|
1555
|
-
@overload
|
|
1556
|
-
def get(
|
|
1557
|
-
self, profile_id: UUID, parcel_type: Type[IPSSignatureParcel], parcel_id: UUID
|
|
1558
|
-
) -> Parcel[IPSSignatureParcel]:
|
|
1559
|
-
...
|
|
1560
|
-
|
|
1561
|
-
@overload
|
|
1562
|
-
def get(
|
|
1563
|
-
self, profile_id: UUID, parcel_type: Type[IPv6DataPrefixParcel], parcel_id: UUID
|
|
1564
|
-
) -> Parcel[IPv6DataPrefixParcel]:
|
|
1565
|
-
...
|
|
1566
|
-
|
|
1567
|
-
@overload
|
|
1568
|
-
def get(
|
|
1569
|
-
self, profile_id: UUID, parcel_type: Type[IPv6PrefixListParcel], parcel_id: UUID
|
|
1570
|
-
) -> Parcel[IPv6PrefixListParcel]:
|
|
1571
|
-
...
|
|
1572
|
-
|
|
1573
|
-
@overload
|
|
1574
|
-
def get(self, profile_id: UUID, parcel_type: Type[LocalDomainParcel], parcel_id: UUID) -> Parcel[LocalDomainParcel]:
|
|
1575
|
-
...
|
|
1576
|
-
|
|
1577
|
-
@overload
|
|
1578
|
-
def get(self, profile_id: UUID, parcel_type: Type[MirrorParcel], parcel_id: UUID) -> Parcel[MirrorParcel]:
|
|
1579
|
-
...
|
|
1580
|
-
|
|
1581
|
-
@overload
|
|
1582
|
-
def get(self, profile_id: UUID, parcel_type: Type[PolicerParcel], parcel_id: UUID) -> Parcel[PolicerParcel]:
|
|
1583
|
-
...
|
|
1584
|
-
|
|
1585
|
-
@overload
|
|
1586
|
-
def get(
|
|
1587
|
-
self, profile_id: UUID, parcel_type: Type[PreferredColorGroupParcel], parcel_id: UUID
|
|
1588
|
-
) -> Parcel[PreferredColorGroupParcel]:
|
|
1589
|
-
...
|
|
1590
|
-
|
|
1591
|
-
@overload
|
|
1592
|
-
def get(self, profile_id: UUID, parcel_type: Type[PrefixListParcel], parcel_id: UUID) -> Parcel[PrefixListParcel]:
|
|
1593
|
-
...
|
|
1594
|
-
|
|
1595
|
-
@overload
|
|
1596
|
-
def get(
|
|
1597
|
-
self, profile_id: UUID, parcel_type: Type[ProtocolListParcel], parcel_id: UUID
|
|
1598
|
-
) -> Parcel[ProtocolListParcel]:
|
|
1599
|
-
...
|
|
1600
|
-
|
|
1601
|
-
@overload
|
|
1602
|
-
def get(
|
|
1603
|
-
self, profile_id: UUID, parcel_type: Type[SecurityApplicationListParcel], parcel_id: UUID
|
|
1604
|
-
) -> Parcel[SecurityApplicationListParcel]:
|
|
1605
|
-
...
|
|
1606
|
-
|
|
1607
|
-
@overload
|
|
1608
|
-
def get(
|
|
1609
|
-
self, profile_id: UUID, parcel_type: Type[SecurityDataPrefixParcel], parcel_id: UUID
|
|
1610
|
-
) -> Parcel[SecurityDataPrefixParcel]:
|
|
1611
|
-
...
|
|
1612
|
-
|
|
1613
|
-
@overload
|
|
1614
|
-
def get(
|
|
1615
|
-
self, profile_id: UUID, parcel_type: Type[SecurityPortParcel], parcel_id: UUID
|
|
1616
|
-
) -> Parcel[SecurityPortParcel]:
|
|
1617
|
-
...
|
|
1618
|
-
|
|
1619
|
-
@overload
|
|
1620
|
-
def get(
|
|
1621
|
-
self, profile_id: UUID, parcel_type: Type[SecurityZoneListParcel], parcel_id: UUID
|
|
1622
|
-
) -> Parcel[SecurityZoneListParcel]:
|
|
1623
|
-
...
|
|
1624
|
-
|
|
1625
|
-
@overload
|
|
1626
|
-
def get(self, profile_id: UUID, parcel_type: Type[SLAClassParcel], parcel_id: UUID) -> Parcel[SLAClassParcel]:
|
|
1627
|
-
...
|
|
1628
|
-
|
|
1629
|
-
@overload
|
|
1630
|
-
def get(
|
|
1631
|
-
self, profile_id: UUID, parcel_type: Type[SslDecryptionParcel], parcel_id: UUID
|
|
1632
|
-
) -> Parcel[SslDecryptionParcel]:
|
|
1633
|
-
...
|
|
1634
|
-
|
|
1635
|
-
@overload
|
|
1636
|
-
def get(
|
|
1637
|
-
self, profile_id: UUID, parcel_type: Type[SslDecryptionProfileParcel], parcel_id: UUID
|
|
1638
|
-
) -> Parcel[SslDecryptionProfileParcel]:
|
|
1639
|
-
...
|
|
1640
|
-
|
|
1641
|
-
@overload
|
|
1642
|
-
def get(
|
|
1643
|
-
self, profile_id: UUID, parcel_type: Type[StandardCommunityParcel], parcel_id: UUID
|
|
1644
|
-
) -> Parcel[StandardCommunityParcel]:
|
|
1645
|
-
...
|
|
1646
|
-
|
|
1647
|
-
@overload
|
|
1648
|
-
def get(self, profile_id: UUID, parcel_type: Type[TlocParcel], parcel_id: UUID) -> Parcel[TlocParcel]:
|
|
1649
|
-
...
|
|
1650
|
-
|
|
1651
|
-
@overload
|
|
1652
|
-
def get(self, profile_id: UUID, parcel_type: Type[URLParcel], parcel_id: UUID) -> Parcel[TlocParcel]:
|
|
1653
|
-
...
|
|
1654
|
-
|
|
1655
|
-
def get(
|
|
1656
|
-
self,
|
|
1657
|
-
profile_id: UUID,
|
|
1658
|
-
parcel_type: Type[AnyPolicyObjectParcel],
|
|
1659
|
-
parcel_id: Union[UUID, None] = None,
|
|
1660
|
-
) -> Any:
|
|
1661
|
-
"""
|
|
1662
|
-
Get all Policy Objects for selected profile_id and selected type or get one Policy Object given parcel id
|
|
1663
|
-
"""
|
|
1664
|
-
|
|
1665
|
-
policy_object_list_type = parcel_type._get_parcel_type()
|
|
1666
|
-
if parcel_id is None:
|
|
1667
|
-
return self.endpoint.get_all(profile_id=profile_id, policy_object_list_type=policy_object_list_type)
|
|
1668
|
-
return self.endpoint.get_by_id(
|
|
1669
|
-
profile_id=profile_id, policy_object_list_type=policy_object_list_type, list_object_id=parcel_id
|
|
1670
|
-
)
|
|
1671
|
-
|
|
1672
|
-
def create_parcel(self, profile_id: UUID, payload: AnyPolicyObjectParcel) -> ParcelCreationResponse:
|
|
1673
|
-
"""
|
|
1674
|
-
Create Policy Object for selected profile_id based on payload type
|
|
1675
|
-
"""
|
|
1676
|
-
|
|
1677
|
-
policy_object_list_type = payload._get_parcel_type()
|
|
1678
|
-
return self.endpoint.create(
|
|
1679
|
-
profile_id=profile_id, policy_object_list_type=policy_object_list_type, payload=payload
|
|
1680
|
-
)
|
|
1681
|
-
|
|
1682
|
-
def update(self, profile_id: UUID, payload: AnyPolicyObjectParcel, list_object_id: UUID):
|
|
1683
|
-
"""
|
|
1684
|
-
Update Policy Object for selected profile_id based on payload type
|
|
1685
|
-
"""
|
|
1686
|
-
|
|
1687
|
-
policy_type = payload._get_parcel_type()
|
|
1688
|
-
return self.endpoint.update(
|
|
1689
|
-
profile_id=profile_id, policy_object_list_type=policy_type, list_object_id=list_object_id, payload=payload
|
|
1690
|
-
)
|
|
1691
|
-
|
|
1692
|
-
def delete(self, profile_id: UUID, parcel_type: Type[AnyPolicyObjectParcel], list_object_id: UUID) -> None:
|
|
1693
|
-
"""
|
|
1694
|
-
Delete Policy Object for selected profile_id based on payload type
|
|
1695
|
-
"""
|
|
1696
|
-
|
|
1697
|
-
policy_object_list_type = parcel_type._get_parcel_type()
|
|
1698
|
-
return self.endpoint.delete(
|
|
1699
|
-
profile_id=profile_id, policy_object_list_type=policy_object_list_type, list_object_id=list_object_id
|
|
1700
|
-
)
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
class EmbeddedSecurityFeatureProfileAPI:
|
|
1704
|
-
"""
|
|
1705
|
-
SDWAN Feature Profile Embedded Security APIs
|
|
1706
|
-
"""
|
|
1707
|
-
|
|
1708
|
-
def __init__(self, session: ManagerSession):
|
|
1709
|
-
self.session = session
|
|
1710
|
-
self.endpoint = EmbeddedSecurityFeatureProfile(session)
|
|
1711
|
-
|
|
1712
|
-
def get_profiles(
|
|
1713
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
1714
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
1715
|
-
"""
|
|
1716
|
-
Get all Embedded Security Feature Profiles
|
|
1717
|
-
"""
|
|
1718
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
1719
|
-
|
|
1720
|
-
return self.endpoint.get_embedded_security_feature_profiles(payload)
|
|
1721
|
-
|
|
1722
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
1723
|
-
"""
|
|
1724
|
-
Create Embedded Security Feature Profile
|
|
1725
|
-
"""
|
|
1726
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
1727
|
-
return self.endpoint.create_embedded_security_feature_profile(payload)
|
|
1728
|
-
|
|
1729
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
1730
|
-
"""
|
|
1731
|
-
Delete Embedded Security Feature Profile
|
|
1732
|
-
"""
|
|
1733
|
-
self.endpoint.delete_embedded_security_feature_profile(profile_id)
|
|
1734
|
-
|
|
1735
|
-
def delete_all_profiles(self) -> None:
|
|
1736
|
-
"""
|
|
1737
|
-
Delete Embedded Security Feature Profiles
|
|
1738
|
-
"""
|
|
1739
|
-
profiles = self.get_profiles()
|
|
1740
|
-
for profile in profiles:
|
|
1741
|
-
self.delete_profile(profile.profile_id)
|
|
1742
|
-
|
|
1743
|
-
@overload
|
|
1744
|
-
def get_parcels(
|
|
1745
|
-
self,
|
|
1746
|
-
profile_id: UUID,
|
|
1747
|
-
parcel_type: Type[NgfirewallParcel],
|
|
1748
|
-
) -> DataSequence[Parcel[NgfirewallParcel]]:
|
|
1749
|
-
...
|
|
1750
|
-
|
|
1751
|
-
@overload
|
|
1752
|
-
def get_parcels(
|
|
1753
|
-
self,
|
|
1754
|
-
profile_id: UUID,
|
|
1755
|
-
parcel_type: Type[PolicyParcel],
|
|
1756
|
-
) -> DataSequence[Parcel[PolicyParcel]]:
|
|
1757
|
-
...
|
|
1758
|
-
|
|
1759
|
-
def get_parcels(
|
|
1760
|
-
self,
|
|
1761
|
-
profile_id: UUID,
|
|
1762
|
-
parcel_type: Type[AnyEmbeddedSecurityParcel],
|
|
1763
|
-
) -> DataSequence:
|
|
1764
|
-
"""
|
|
1765
|
-
Get all Embedded Security Parcels given profile id and parcel type
|
|
1766
|
-
"""
|
|
1767
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
1768
|
-
|
|
1769
|
-
@overload
|
|
1770
|
-
def get_parcel(
|
|
1771
|
-
self,
|
|
1772
|
-
profile_id: UUID,
|
|
1773
|
-
parcel_type: Type[NgfirewallParcel],
|
|
1774
|
-
parcel_id: UUID,
|
|
1775
|
-
) -> Parcel[NgfirewallParcel]:
|
|
1776
|
-
...
|
|
1777
|
-
|
|
1778
|
-
@overload
|
|
1779
|
-
def get_parcel(
|
|
1780
|
-
self,
|
|
1781
|
-
profile_id: UUID,
|
|
1782
|
-
parcel_type: Type[PolicyParcel],
|
|
1783
|
-
parcel_id: UUID,
|
|
1784
|
-
) -> Parcel[PolicyParcel]:
|
|
1785
|
-
...
|
|
1786
|
-
|
|
1787
|
-
def get_parcel(
|
|
1788
|
-
self,
|
|
1789
|
-
profile_id: UUID,
|
|
1790
|
-
parcel_type: Type[AnyEmbeddedSecurityParcel],
|
|
1791
|
-
parcel_id: UUID,
|
|
1792
|
-
) -> Parcel:
|
|
1793
|
-
"""
|
|
1794
|
-
Get one Embedded Security Parcel given profile id, parcel type and parcel id
|
|
1795
|
-
"""
|
|
1796
|
-
return self.endpoint.get_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
1797
|
-
|
|
1798
|
-
def create_parcel(self, profile_id: UUID, payload: AnyEmbeddedSecurityParcel) -> ParcelCreationResponse:
|
|
1799
|
-
"""
|
|
1800
|
-
Create Embedded Security Parcel for selected profile_id based on payload type
|
|
1801
|
-
"""
|
|
1802
|
-
|
|
1803
|
-
return self.endpoint.create(profile_id, payload._get_parcel_type(), payload)
|
|
1804
|
-
|
|
1805
|
-
def update_parcel(
|
|
1806
|
-
self, profile_id: UUID, payload: AnyEmbeddedSecurityParcel, parcel_id: UUID
|
|
1807
|
-
) -> ParcelCreationResponse:
|
|
1808
|
-
"""
|
|
1809
|
-
Update Embedded Security Parcel for selected profile_id based on payload type
|
|
1810
|
-
"""
|
|
1811
|
-
|
|
1812
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
1813
|
-
|
|
1814
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnyEmbeddedSecurityParcel], parcel_id: UUID) -> None:
|
|
1815
|
-
"""
|
|
1816
|
-
Delete Embedded Security Parcel for selected profile_id based on payload type
|
|
1817
|
-
"""
|
|
1818
|
-
return self.endpoint.delete(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
class CliFeatureProfileAPI:
|
|
1822
|
-
"""
|
|
1823
|
-
SDWAN Feature Profile CLI APIs
|
|
1824
|
-
"""
|
|
1825
|
-
|
|
1826
|
-
def __init__(self, session: ManagerSession):
|
|
1827
|
-
self.session = session
|
|
1828
|
-
self.endpoint = CliFeatureProfile(session)
|
|
1829
|
-
|
|
1830
|
-
def get_profiles(
|
|
1831
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
1832
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
1833
|
-
"""
|
|
1834
|
-
Get all CLI Feature Profiles
|
|
1835
|
-
"""
|
|
1836
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
1837
|
-
|
|
1838
|
-
return self.endpoint.get_profiles(payload)
|
|
1839
|
-
|
|
1840
|
-
def create_profile(self, name: str, description: str = "") -> FeatureProfileCreationResponse:
|
|
1841
|
-
"""
|
|
1842
|
-
Create CLI Feature Profile
|
|
1843
|
-
"""
|
|
1844
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
1845
|
-
return self.endpoint.create_profile(payload)
|
|
1846
|
-
|
|
1847
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
1848
|
-
"""
|
|
1849
|
-
Delete CLI Feature Profile
|
|
1850
|
-
"""
|
|
1851
|
-
self.endpoint.delete_profile(profile_id)
|
|
1852
|
-
|
|
1853
|
-
def delete_all_profiles(self) -> None:
|
|
1854
|
-
"""
|
|
1855
|
-
Delete all CLI Feature Profiles
|
|
1856
|
-
"""
|
|
1857
|
-
profiles = self.get_profiles()
|
|
1858
|
-
for profile in profiles:
|
|
1859
|
-
self.delete_profile(profile.profile_id)
|
|
1860
|
-
|
|
1861
|
-
def get_parcel_by_id(
|
|
1862
|
-
self,
|
|
1863
|
-
profile_id: UUID,
|
|
1864
|
-
parcel_id: UUID,
|
|
1865
|
-
parcel_type: str = "config",
|
|
1866
|
-
) -> Parcel[AnyCliParcel]:
|
|
1867
|
-
"""
|
|
1868
|
-
Get all CLI Parcels for selected profile_id and selected type or get one CLI Parcel given parcel id
|
|
1869
|
-
"""
|
|
1870
|
-
return self.endpoint.get_by_id(profile_id, parcel_type, parcel_id)
|
|
1871
|
-
|
|
1872
|
-
def get_parcel(
|
|
1873
|
-
self,
|
|
1874
|
-
profile_id: UUID,
|
|
1875
|
-
parcel_type: str = "config",
|
|
1876
|
-
) -> DataSequence[Parcel[AnyCliParcel]]:
|
|
1877
|
-
"""
|
|
1878
|
-
Get all CLI Parcels for selected profile_id and selected type or get one CLI Parcel given parcel id
|
|
1879
|
-
"""
|
|
1880
|
-
return self.endpoint.get_all(profile_id, parcel_type)
|
|
1881
|
-
|
|
1882
|
-
def create_parcel(self, profile_id: UUID, config: AnyCliParcel) -> ParcelCreationResponse:
|
|
1883
|
-
"""
|
|
1884
|
-
Create CLI Parcel for selected profile_id
|
|
1885
|
-
"""
|
|
1886
|
-
return self.endpoint.create(profile_id, config._get_parcel_type(), config)
|
|
1887
|
-
|
|
1888
|
-
def update_parcel(self, profile_id: UUID, config: AnyCliParcel, parcel_id: UUID) -> ParcelCreationResponse:
|
|
1889
|
-
"""
|
|
1890
|
-
Update CLI Parcel for selected profile_id
|
|
1891
|
-
"""
|
|
1892
|
-
return self.endpoint.update(profile_id, config._get_parcel_type(), parcel_id, config)
|
|
1893
|
-
|
|
1894
|
-
def delete_parcel(self, profile_id: UUID, parcel_id: UUID) -> None:
|
|
1895
|
-
"""
|
|
1896
|
-
Delete CLI Parcel for selected profile_id
|
|
1897
|
-
"""
|
|
1898
|
-
return self.endpoint.delete(profile_id, parcel_id)
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
class DnsSecurityFeatureProfileAPI:
|
|
1902
|
-
"""
|
|
1903
|
-
SDWAN Feature Profile DNS Security APIs
|
|
1904
|
-
"""
|
|
1905
|
-
|
|
1906
|
-
def __init__(self, session: ManagerSession):
|
|
1907
|
-
self.session = session
|
|
1908
|
-
self.endpoint = DnsSecurityFeatureProfile(session)
|
|
1909
|
-
|
|
1910
|
-
def get_profiles(
|
|
1911
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
1912
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
1913
|
-
"""
|
|
1914
|
-
Get all DNS Security Feature Profiles
|
|
1915
|
-
"""
|
|
1916
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
1917
|
-
|
|
1918
|
-
return self.endpoint.get_dns_security_feature_profiles(payload)
|
|
1919
|
-
|
|
1920
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
1921
|
-
"""
|
|
1922
|
-
Create DNS Security Feature Profile
|
|
1923
|
-
"""
|
|
1924
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
1925
|
-
return self.endpoint.create_dns_security_feature_profile(payload)
|
|
1926
|
-
|
|
1927
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
1928
|
-
"""
|
|
1929
|
-
Delete DNS Security Feature Profile
|
|
1930
|
-
"""
|
|
1931
|
-
self.endpoint.delete_dns_security_feature_profile(profile_id)
|
|
1932
|
-
|
|
1933
|
-
def delete_all_profiles(self) -> None:
|
|
1934
|
-
"""
|
|
1935
|
-
Delete DNS Security Feature Profiles
|
|
1936
|
-
"""
|
|
1937
|
-
profiles = self.get_profiles()
|
|
1938
|
-
for profile in profiles:
|
|
1939
|
-
self.delete_profile(profile.profile_id)
|
|
1940
|
-
|
|
1941
|
-
def get_parcels(
|
|
1942
|
-
self,
|
|
1943
|
-
profile_id: UUID,
|
|
1944
|
-
parcel_type: Type[DnsParcel],
|
|
1945
|
-
) -> DataSequence[Parcel[DnsParcel]]:
|
|
1946
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
1947
|
-
|
|
1948
|
-
def get_parcel(
|
|
1949
|
-
self,
|
|
1950
|
-
profile_id: UUID,
|
|
1951
|
-
parcel_type: Type[DnsParcel],
|
|
1952
|
-
parcel_id: UUID,
|
|
1953
|
-
) -> Parcel[DnsParcel]:
|
|
1954
|
-
return self.endpoint.get_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
1955
|
-
|
|
1956
|
-
def create_parcel(self, profile_id: UUID, payload: AnyDnsSecurityParcel) -> ParcelCreationResponse:
|
|
1957
|
-
"""
|
|
1958
|
-
Create DNS Security Parcel for selected profile_id based on payload type
|
|
1959
|
-
"""
|
|
1960
|
-
|
|
1961
|
-
return self.endpoint.create(profile_id, payload._get_parcel_type(), payload)
|
|
1962
|
-
|
|
1963
|
-
def update_parcel(self, profile_id: UUID, payload: AnyDnsSecurityParcel, parcel_id: UUID) -> ParcelCreationResponse:
|
|
1964
|
-
"""
|
|
1965
|
-
Update DNS Security Parcel for selected profile_id based on payload type
|
|
1966
|
-
"""
|
|
1967
|
-
|
|
1968
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
1969
|
-
|
|
1970
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnyDnsSecurityParcel], parcel_id: UUID) -> None:
|
|
1971
|
-
"""
|
|
1972
|
-
Delete DNS Security Parcel for selected profile_id based on payload type
|
|
1973
|
-
"""
|
|
1974
|
-
return self.endpoint.delete(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
class SIGSecurityAPI:
|
|
1978
|
-
"""
|
|
1979
|
-
SDWAN Feature Profile Service APIs
|
|
1980
|
-
"""
|
|
1981
|
-
|
|
1982
|
-
def __init__(self, session: ManagerSession):
|
|
1983
|
-
self.session = session
|
|
1984
|
-
self.endpoint = SIGSecurity(session)
|
|
1985
|
-
|
|
1986
|
-
def get_profiles(
|
|
1987
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None, reference_count: Optional[bool] = None
|
|
1988
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
1989
|
-
"""
|
|
1990
|
-
Get all SIG Security Feature Profiles
|
|
1991
|
-
"""
|
|
1992
|
-
payload = GetReferenceCountFeatureProfilesPayload(limit=limit, offset=offset, reference_count=reference_count)
|
|
1993
|
-
|
|
1994
|
-
return self.endpoint.get_sig_security_feature_profiles(payload)
|
|
1995
|
-
|
|
1996
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
1997
|
-
"""
|
|
1998
|
-
Create SIG Security Feature Profile
|
|
1999
|
-
"""
|
|
2000
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
2001
|
-
return self.endpoint.create_sig_security_feature_profile(payload)
|
|
2002
|
-
|
|
2003
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
2004
|
-
"""
|
|
2005
|
-
Delete SIG Security Feature Profile
|
|
2006
|
-
"""
|
|
2007
|
-
self.endpoint.delete_sig_security_feature_profile(str(profile_id))
|
|
2008
|
-
|
|
2009
|
-
def delete_all_profiles(self) -> None:
|
|
2010
|
-
"""
|
|
2011
|
-
Delete all SIG Security Feature Profiles
|
|
2012
|
-
"""
|
|
2013
|
-
profiles = self.get_profiles()
|
|
2014
|
-
for profile in profiles:
|
|
2015
|
-
self.delete_profile(profile.profile_id)
|
|
2016
|
-
|
|
2017
|
-
def create_parcel(self, profile_uuid: UUID, payload: SIGParcel) -> ParcelCreationResponse:
|
|
2018
|
-
"""
|
|
2019
|
-
Create SIG Security Parcel for selected profile_id
|
|
2020
|
-
"""
|
|
2021
|
-
return self.endpoint.create_sig_security_parcel(str(profile_uuid), payload)
|
|
2022
|
-
|
|
2023
|
-
def delete_parcel(self, profile_uuid: UUID, parcel_uuid: UUID) -> None:
|
|
2024
|
-
"""
|
|
2025
|
-
Delete Service Parcel for selected profile_uuid based on payload type
|
|
2026
|
-
"""
|
|
2027
|
-
return self.endpoint.delete_sig_security_parcel(str(profile_uuid), str(parcel_uuid))
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
class ApplicationPriorityFeatureProfileAPI:
|
|
2031
|
-
"""
|
|
2032
|
-
SDWAN Feature Profile Application Priority APIs
|
|
2033
|
-
"""
|
|
2034
|
-
|
|
2035
|
-
def __init__(self, session: ManagerSession):
|
|
2036
|
-
self.session = session
|
|
2037
|
-
self.endpoint = ApplicationPriorityFeatureProfile(session)
|
|
2038
|
-
|
|
2039
|
-
def get_profiles(
|
|
2040
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
2041
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
2042
|
-
"""
|
|
2043
|
-
Get all Application Priority Feature Profiles
|
|
2044
|
-
"""
|
|
2045
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
2046
|
-
|
|
2047
|
-
return self.endpoint.get_application_priority_feature_profiles(payload)
|
|
2048
|
-
|
|
2049
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
2050
|
-
"""
|
|
2051
|
-
Create Application Priority Feature Profile
|
|
2052
|
-
"""
|
|
2053
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
2054
|
-
return self.endpoint.create_application_priority_feature_profile(payload)
|
|
2055
|
-
|
|
2056
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
2057
|
-
"""
|
|
2058
|
-
Delete Application Priority Feature Profile
|
|
2059
|
-
"""
|
|
2060
|
-
self.endpoint.delete_application_priority_feature_profile(str(profile_id))
|
|
2061
|
-
|
|
2062
|
-
def delete_all_profiles(self) -> None:
|
|
2063
|
-
"""
|
|
2064
|
-
Delete all Application Priority Feature Profiles
|
|
2065
|
-
"""
|
|
2066
|
-
profiles = self.get_profiles()
|
|
2067
|
-
for profile in profiles:
|
|
2068
|
-
self.delete_profile(profile.profile_id)
|
|
2069
|
-
|
|
2070
|
-
@overload
|
|
2071
|
-
def get_parcels(
|
|
2072
|
-
self,
|
|
2073
|
-
profile_id: UUID,
|
|
2074
|
-
parcel_type: Type[QosPolicyParcel],
|
|
2075
|
-
) -> DataSequence[Parcel[QosPolicyParcel]]:
|
|
2076
|
-
...
|
|
2077
|
-
|
|
2078
|
-
@overload
|
|
2079
|
-
def get_parcels(
|
|
2080
|
-
self,
|
|
2081
|
-
profile_id: UUID,
|
|
2082
|
-
parcel_type: Type[PolicySettingsParcel],
|
|
2083
|
-
) -> DataSequence[Parcel[PolicySettingsParcel]]:
|
|
2084
|
-
...
|
|
2085
|
-
|
|
2086
|
-
@overload
|
|
2087
|
-
def get_parcels(
|
|
2088
|
-
self,
|
|
2089
|
-
profile_id: UUID,
|
|
2090
|
-
parcel_type: Type[TrafficPolicyParcel],
|
|
2091
|
-
) -> DataSequence[Parcel[TrafficPolicyParcel]]:
|
|
2092
|
-
...
|
|
2093
|
-
|
|
2094
|
-
def get_parcels(
|
|
2095
|
-
self,
|
|
2096
|
-
profile_id: UUID,
|
|
2097
|
-
parcel_type: Type[AnyApplicationPriorityParcel],
|
|
2098
|
-
) -> DataSequence:
|
|
2099
|
-
"""
|
|
2100
|
-
Get all Application Priority Parcels given profile id and parcel type
|
|
2101
|
-
"""
|
|
2102
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
2103
|
-
|
|
2104
|
-
@overload
|
|
2105
|
-
def get_parcel(
|
|
2106
|
-
self,
|
|
2107
|
-
profile_id: UUID,
|
|
2108
|
-
parcel_type: Type[PolicySettingsParcel],
|
|
2109
|
-
parcel_id: UUID,
|
|
2110
|
-
) -> Parcel[PolicySettingsParcel]:
|
|
2111
|
-
...
|
|
2112
|
-
|
|
2113
|
-
@overload
|
|
2114
|
-
def get_parcel(
|
|
2115
|
-
self,
|
|
2116
|
-
profile_id: UUID,
|
|
2117
|
-
parcel_type: Type[TrafficPolicyParcel],
|
|
2118
|
-
parcel_id: UUID,
|
|
2119
|
-
) -> Parcel[TrafficPolicyParcel]:
|
|
2120
|
-
...
|
|
2121
|
-
|
|
2122
|
-
@overload
|
|
2123
|
-
def get_parcel(
|
|
2124
|
-
self,
|
|
2125
|
-
profile_id: UUID,
|
|
2126
|
-
parcel_type: Type[QosPolicyParcel],
|
|
2127
|
-
parcel_id: UUID,
|
|
2128
|
-
) -> Parcel[QosPolicyParcel]:
|
|
2129
|
-
...
|
|
2130
|
-
|
|
2131
|
-
def get_parcel(
|
|
2132
|
-
self,
|
|
2133
|
-
profile_id: UUID,
|
|
2134
|
-
parcel_type: Type[AnyApplicationPriorityParcel],
|
|
2135
|
-
parcel_id: UUID,
|
|
2136
|
-
) -> Parcel:
|
|
2137
|
-
"""
|
|
2138
|
-
Get one Application Priority Parcel given profile id, parcel type and parcel id
|
|
2139
|
-
"""
|
|
2140
|
-
return self.endpoint.get_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
2141
|
-
|
|
2142
|
-
def create_parcel(self, profile_id: UUID, payload: AnyApplicationPriorityParcel) -> ParcelCreationResponse:
|
|
2143
|
-
"""
|
|
2144
|
-
Create Application Priority Parcel for selected profile_id based on payload type
|
|
2145
|
-
"""
|
|
2146
|
-
|
|
2147
|
-
return self.endpoint.create(profile_id, payload._get_parcel_type(), payload)
|
|
2148
|
-
|
|
2149
|
-
def update_parcel(
|
|
2150
|
-
self, profile_id: UUID, payload: AnyApplicationPriorityParcel, parcel_id: UUID
|
|
2151
|
-
) -> ParcelCreationResponse:
|
|
2152
|
-
"""
|
|
2153
|
-
Update Application Priority Parcel for selected profile_id based on payload type
|
|
2154
|
-
"""
|
|
2155
|
-
|
|
2156
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
2157
|
-
|
|
2158
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnyApplicationPriorityParcel], parcel_id: UUID) -> None:
|
|
2159
|
-
"""
|
|
2160
|
-
Delete Application Priority Parcel for selected profile_id based on payload type
|
|
2161
|
-
"""
|
|
2162
|
-
return self.endpoint.delete(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
class TopologyFeatureProfileAPI:
|
|
2166
|
-
"""
|
|
2167
|
-
SDWAN Feature Profile Topology APIs
|
|
2168
|
-
"""
|
|
2169
|
-
|
|
2170
|
-
def __init__(self, session: ManagerSession):
|
|
2171
|
-
self.session = session
|
|
2172
|
-
self.endpoint = TopologyFeatureProfile(session)
|
|
2173
|
-
|
|
2174
|
-
def get_profiles(
|
|
2175
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
2176
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
2177
|
-
"""
|
|
2178
|
-
Get all Topology Feature Profiles
|
|
2179
|
-
"""
|
|
2180
|
-
payload = GetFeatureProfilesParams(limit=limit, offset=offset)
|
|
2181
|
-
return self.endpoint.get_topology_feature_profiles(payload)
|
|
2182
|
-
|
|
2183
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
2184
|
-
"""
|
|
2185
|
-
Create Topology Feature Profile
|
|
2186
|
-
"""
|
|
2187
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
2188
|
-
return self.endpoint.create_topology_feature_profile(payload)
|
|
2189
|
-
|
|
2190
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
2191
|
-
"""
|
|
2192
|
-
Delete Topology Feature Profile
|
|
2193
|
-
"""
|
|
2194
|
-
self.endpoint.delete_topology_feature_profile(str(profile_id))
|
|
2195
|
-
|
|
2196
|
-
def delete_all_profiles(self) -> None:
|
|
2197
|
-
"""
|
|
2198
|
-
Delete all Topology Feature Profiles
|
|
2199
|
-
"""
|
|
2200
|
-
profiles = self.get_profiles()
|
|
2201
|
-
for profile in profiles:
|
|
2202
|
-
self.delete_profile(profile.profile_id)
|
|
2203
|
-
|
|
2204
|
-
def create_parcel(self, profile_id: UUID, parcel: AnyTopologyParcel) -> ParcelCreationResponse:
|
|
2205
|
-
"""
|
|
2206
|
-
Create Topology Parcel for selected profile_id based on payload type
|
|
2207
|
-
"""
|
|
2208
|
-
return self.endpoint.create_any_parcel(profile_id, parcel._get_parcel_type(), parcel)
|
|
2209
|
-
|
|
2210
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnyTopologyParcel], parcel_id: UUID) -> None:
|
|
2211
|
-
"""
|
|
2212
|
-
Delete Topology Parcel for selected profile_id based on payload type
|
|
2213
|
-
"""
|
|
2214
|
-
return self.endpoint.delete_any_parcel(
|
|
2215
|
-
profile_id=profile_id, parcel_type=parcel_type._get_parcel_type(), parcel_id=parcel_id
|
|
2216
|
-
)
|
|
2217
|
-
|
|
2218
|
-
@overload
|
|
2219
|
-
def get_parcel(
|
|
2220
|
-
self,
|
|
2221
|
-
profile_id: UUID,
|
|
2222
|
-
parcel_type: Type[HubSpokeParcel],
|
|
2223
|
-
parcel_id: UUID,
|
|
2224
|
-
) -> Parcel[HubSpokeParcel]:
|
|
2225
|
-
...
|
|
2226
|
-
|
|
2227
|
-
@overload
|
|
2228
|
-
def get_parcel(
|
|
2229
|
-
self,
|
|
2230
|
-
profile_id: UUID,
|
|
2231
|
-
parcel_type: Type[MeshParcel],
|
|
2232
|
-
parcel_id: UUID,
|
|
2233
|
-
) -> Parcel[MeshParcel]:
|
|
2234
|
-
...
|
|
2235
|
-
|
|
2236
|
-
@overload
|
|
2237
|
-
def get_parcel(
|
|
2238
|
-
self,
|
|
2239
|
-
profile_id: UUID,
|
|
2240
|
-
parcel_type: Type[CustomControlParcel],
|
|
2241
|
-
parcel_id: UUID,
|
|
2242
|
-
) -> Parcel[CustomControlParcel]:
|
|
2243
|
-
...
|
|
2244
|
-
|
|
2245
|
-
def get_parcel(
|
|
2246
|
-
self,
|
|
2247
|
-
profile_id: UUID,
|
|
2248
|
-
parcel_type: Type[AnyTopologyParcel],
|
|
2249
|
-
parcel_id: UUID,
|
|
2250
|
-
) -> Parcel:
|
|
2251
|
-
"""
|
|
2252
|
-
Get one Topology Parcel given profile id, parcel type and parcel id
|
|
2253
|
-
"""
|
|
2254
|
-
return self.endpoint.get_any_parcel_by_id(profile_id, parcel_type._get_parcel_type(), parcel_id)
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
class UcVoiceFeatureProfileAPI:
|
|
2258
|
-
"""
|
|
2259
|
-
SDWAN Feature Profile UC Voice APIs
|
|
2260
|
-
"""
|
|
2261
|
-
|
|
2262
|
-
ENDPOINT_PARCEL_TYPE_MAP = {
|
|
2263
|
-
"analog-interface": "tdm-sip/analog-interface",
|
|
2264
|
-
"digital-interface": "tdm-sip/digital-interface",
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
def __init__(self, session: ManagerSession):
|
|
2268
|
-
self.session = session
|
|
2269
|
-
self.endpoint = UcVoiceFeatureProfile(session)
|
|
2270
|
-
|
|
2271
|
-
def _get_endpoint_parcel_type(self, parcel_type: str) -> str:
|
|
2272
|
-
"""
|
|
2273
|
-
Returns the mapped endpoint parcel type if it exists, otherwise returns the input key.
|
|
2274
|
-
|
|
2275
|
-
Args:
|
|
2276
|
-
parcel_type (str): The parcel type to look up.
|
|
2277
|
-
|
|
2278
|
-
Returns:
|
|
2279
|
-
str: The mapped parcel type or the input key if not found.
|
|
2280
|
-
"""
|
|
2281
|
-
return self.ENDPOINT_PARCEL_TYPE_MAP.get(parcel_type, parcel_type)
|
|
2282
|
-
|
|
2283
|
-
def get_profiles(
|
|
2284
|
-
self, limit: Optional[int] = None, offset: Optional[int] = None
|
|
2285
|
-
) -> DataSequence[FeatureProfileInfo]:
|
|
2286
|
-
"""
|
|
2287
|
-
Get all UC Voice Feature Profiles
|
|
2288
|
-
"""
|
|
2289
|
-
payload = GetFeatureProfilesParams(limit=limit if limit else None, offset=offset if offset else None)
|
|
2290
|
-
|
|
2291
|
-
return self.endpoint.get_uc_voice_feature_profiles(payload)
|
|
2292
|
-
|
|
2293
|
-
def create_profile(self, name: str, description: str) -> FeatureProfileCreationResponse:
|
|
2294
|
-
"""
|
|
2295
|
-
Create UC Voice Feature Profile
|
|
2296
|
-
"""
|
|
2297
|
-
payload = FeatureProfileCreationPayload(name=name, description=description)
|
|
2298
|
-
return self.endpoint.create_uc_voice_feature_profile(payload)
|
|
2299
|
-
|
|
2300
|
-
def delete_profile(self, profile_id: UUID) -> None:
|
|
2301
|
-
"""
|
|
2302
|
-
Delete UC Voice Feature Profile
|
|
2303
|
-
"""
|
|
2304
|
-
self.endpoint.delete_uc_voice_feature_profile(str(profile_id))
|
|
2305
|
-
|
|
2306
|
-
def delete_all_profiles(self) -> None:
|
|
2307
|
-
"""
|
|
2308
|
-
Delete all UC Voice Feature Profiles
|
|
2309
|
-
"""
|
|
2310
|
-
profiles = self.get_profiles()
|
|
2311
|
-
for profile in profiles:
|
|
2312
|
-
self.delete_profile(profile.profile_id)
|
|
2313
|
-
|
|
2314
|
-
@overload
|
|
2315
|
-
def get_parcels(
|
|
2316
|
-
self,
|
|
2317
|
-
profile_id: UUID,
|
|
2318
|
-
parcel_type: Type[DspFarmParcel],
|
|
2319
|
-
) -> DataSequence[Parcel[DspFarmParcel]]:
|
|
2320
|
-
...
|
|
2321
|
-
|
|
2322
|
-
@overload
|
|
2323
|
-
def get_parcels(
|
|
2324
|
-
self,
|
|
2325
|
-
profile_id: UUID,
|
|
2326
|
-
parcel_type: Type[MediaProfileParcel],
|
|
2327
|
-
) -> DataSequence[Parcel[MediaProfileParcel]]:
|
|
2328
|
-
...
|
|
2329
|
-
|
|
2330
|
-
@overload
|
|
2331
|
-
def get_parcels(
|
|
2332
|
-
self,
|
|
2333
|
-
profile_id: UUID,
|
|
2334
|
-
parcel_type: Type[TrunkGroupParcel],
|
|
2335
|
-
) -> DataSequence[Parcel[TrunkGroupParcel]]:
|
|
2336
|
-
...
|
|
2337
|
-
|
|
2338
|
-
def get_parcels(self, profile_id: UUID, parcel_type: Type[AnyUcVoiceParcel]) -> DataSequence[Parcel]:
|
|
2339
|
-
"""
|
|
2340
|
-
Get all UC Voice Parcels given profile id and parcel type
|
|
2341
|
-
"""
|
|
2342
|
-
return self.endpoint.get_all(profile_id, parcel_type._get_parcel_type())
|
|
2343
|
-
|
|
2344
|
-
@overload
|
|
2345
|
-
def get_parcel(
|
|
2346
|
-
self,
|
|
2347
|
-
profile_id: UUID,
|
|
2348
|
-
parcel_type: Type[DspFarmParcel],
|
|
2349
|
-
parcel_id: UUID,
|
|
2350
|
-
) -> Parcel[DspFarmParcel]:
|
|
2351
|
-
...
|
|
2352
|
-
|
|
2353
|
-
@overload
|
|
2354
|
-
def get_parcel(
|
|
2355
|
-
self,
|
|
2356
|
-
profile_id: UUID,
|
|
2357
|
-
parcel_type: Type[MediaProfileParcel],
|
|
2358
|
-
parcel_id: UUID,
|
|
2359
|
-
) -> Parcel[MediaProfileParcel]:
|
|
2360
|
-
...
|
|
2361
|
-
|
|
2362
|
-
@overload
|
|
2363
|
-
def get_parcel(
|
|
2364
|
-
self,
|
|
2365
|
-
profile_id: UUID,
|
|
2366
|
-
parcel_type: Type[TrunkGroupParcel],
|
|
2367
|
-
parcel_id: UUID,
|
|
2368
|
-
) -> Parcel[TrunkGroupParcel]:
|
|
2369
|
-
...
|
|
2370
|
-
|
|
2371
|
-
def get_parcel(
|
|
2372
|
-
self,
|
|
2373
|
-
profile_id: UUID,
|
|
2374
|
-
parcel_type: Type[AnyUcVoiceParcel],
|
|
2375
|
-
parcel_id: UUID,
|
|
2376
|
-
) -> Parcel:
|
|
2377
|
-
"""
|
|
2378
|
-
Get one UC Voice Parcel given profile id, parcel type and parcel id
|
|
2379
|
-
"""
|
|
2380
|
-
return self.endpoint.get_by_id(
|
|
2381
|
-
profile_id, self._get_endpoint_parcel_type(parcel_type._get_parcel_type()), parcel_id
|
|
2382
|
-
)
|
|
2383
|
-
|
|
2384
|
-
def create_parcel(self, profile_id: UUID, payload: AnyUcVoiceParcel) -> ParcelCreationResponse:
|
|
2385
|
-
"""
|
|
2386
|
-
Create UC Voice Parcel for selected profile_id based on payload type
|
|
2387
|
-
"""
|
|
2388
|
-
return self.endpoint.create(profile_id, self._get_endpoint_parcel_type(payload._get_parcel_type()), payload)
|
|
2389
|
-
|
|
2390
|
-
def update_parcel(self, profile_id: UUID, payload: AnyUcVoiceParcel, parcel_id: UUID) -> ParcelCreationResponse:
|
|
2391
|
-
"""
|
|
2392
|
-
Update UC Voice Parcel for selected profile_id based on payload type
|
|
2393
|
-
"""
|
|
2394
|
-
|
|
2395
|
-
return self.endpoint.update(profile_id, payload._get_parcel_type(), parcel_id, payload)
|
|
2396
|
-
|
|
2397
|
-
def delete_parcel(self, profile_id: UUID, parcel_type: Type[AnyUcVoiceParcel], parcel_id: UUID) -> None:
|
|
2398
|
-
"""
|
|
2399
|
-
Delete UC Voice Parcel for selected profile_id based on payload type
|
|
2400
|
-
"""
|
|
2401
|
-
return self.endpoint.delete(profile_id, parcel_type._get_parcel_type(), parcel_id)
|