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