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
|
@@ -1,18 +1,47 @@
|
|
|
1
1
|
# Copyright 2023 Cisco Systems, Inc. and its affiliates
|
|
2
2
|
|
|
3
3
|
import datetime
|
|
4
|
+
from dataclasses import dataclass, field
|
|
4
5
|
from functools import wraps
|
|
5
|
-
from ipaddress import IPv4Address, IPv4Network, IPv6Network
|
|
6
|
-
from typing import Any, Dict, List, MutableSequence, Optional,
|
|
6
|
+
from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network
|
|
7
|
+
from typing import Any, Dict, List, MutableSequence, Optional, Sequence, Set, Tuple, Union, overload
|
|
7
8
|
from uuid import UUID
|
|
8
9
|
|
|
9
|
-
from pydantic import BaseModel, ConfigDict, Field, RootModel, model_validator
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field, PlainSerializer, RootModel, field_validator, model_validator
|
|
10
11
|
from typing_extensions import Annotated, Literal
|
|
11
12
|
|
|
12
|
-
from catalystwan.models.common import
|
|
13
|
+
from catalystwan.models.common import (
|
|
14
|
+
AcceptDropActionType,
|
|
15
|
+
AcceptRejectActionType,
|
|
16
|
+
CarrierType,
|
|
17
|
+
ControlPathType,
|
|
18
|
+
DestinationRegion,
|
|
19
|
+
DNSEntryType,
|
|
20
|
+
DNSTypeEntryType,
|
|
21
|
+
EncapType,
|
|
22
|
+
IcmpMsgType,
|
|
23
|
+
IntStr,
|
|
24
|
+
LossProtectionType,
|
|
25
|
+
MultiRegionRole,
|
|
26
|
+
OriginProtocol,
|
|
27
|
+
SequenceIpType,
|
|
28
|
+
ServiceChainNumber,
|
|
29
|
+
ServiceType,
|
|
30
|
+
SpaceSeparatedInterfaceStr,
|
|
31
|
+
SpaceSeparatedIPv4,
|
|
32
|
+
SpaceSeparatedIPv6,
|
|
33
|
+
SpaceSeparatedNonNegativeIntList,
|
|
34
|
+
SpaceSeparatedServiceAreaList,
|
|
35
|
+
SpaceSeparatedTLOCColorStr,
|
|
36
|
+
SpaceSeparatedUUIDList,
|
|
37
|
+
TLOCActionType,
|
|
38
|
+
TLOCColor,
|
|
39
|
+
TrafficCategory,
|
|
40
|
+
TrafficTargetType,
|
|
41
|
+
check_fields_exclusive,
|
|
42
|
+
str_as_str_list,
|
|
43
|
+
)
|
|
13
44
|
from catalystwan.models.misc.application_protocols import ApplicationProtocol
|
|
14
|
-
from catalystwan.models.policy.lists_entries import EncapType
|
|
15
|
-
from catalystwan.typed_list import DataSequence
|
|
16
45
|
|
|
17
46
|
|
|
18
47
|
def port_set_and_ranges_to_str(ports: Set[int] = set(), port_ranges: List[Tuple[int, int]] = []) -> str:
|
|
@@ -32,47 +61,6 @@ PLPEntryType = Literal[
|
|
|
32
61
|
"high",
|
|
33
62
|
]
|
|
34
63
|
|
|
35
|
-
DNSEntryType = Literal[
|
|
36
|
-
"request",
|
|
37
|
-
"response",
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
TrafficTargetType = Literal[
|
|
41
|
-
"access",
|
|
42
|
-
"core",
|
|
43
|
-
"service",
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
DestinationRegion = Literal[
|
|
47
|
-
"primary-region",
|
|
48
|
-
"secondary-region",
|
|
49
|
-
"other-region",
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
OriginProtocol = Literal[
|
|
53
|
-
"aggregate",
|
|
54
|
-
"bgp",
|
|
55
|
-
"bgp-external",
|
|
56
|
-
"bgp-internal",
|
|
57
|
-
"connected",
|
|
58
|
-
"eigrp",
|
|
59
|
-
"ospf",
|
|
60
|
-
"ospf-inter-area",
|
|
61
|
-
"ospf-intra-area",
|
|
62
|
-
"ospf-external1",
|
|
63
|
-
"ospf-external2",
|
|
64
|
-
"rip",
|
|
65
|
-
"static",
|
|
66
|
-
"eigrp-summary",
|
|
67
|
-
"eigrp-internal",
|
|
68
|
-
"eigrp-external",
|
|
69
|
-
"lisp",
|
|
70
|
-
"nat-dia",
|
|
71
|
-
"natpool",
|
|
72
|
-
"isis",
|
|
73
|
-
"isis-level1",
|
|
74
|
-
"isis-level2",
|
|
75
|
-
]
|
|
76
64
|
|
|
77
65
|
PathType = Literal[
|
|
78
66
|
"hierarchical-path",
|
|
@@ -80,19 +68,6 @@ PathType = Literal[
|
|
|
80
68
|
"transport-gateway-path",
|
|
81
69
|
]
|
|
82
70
|
|
|
83
|
-
SequenceIpType = Literal[
|
|
84
|
-
"ipv4",
|
|
85
|
-
"ipv6",
|
|
86
|
-
"all",
|
|
87
|
-
]
|
|
88
|
-
|
|
89
|
-
PolicyActionType = Literal[
|
|
90
|
-
"drop",
|
|
91
|
-
"accept",
|
|
92
|
-
"pass",
|
|
93
|
-
"inspect",
|
|
94
|
-
"reject",
|
|
95
|
-
]
|
|
96
71
|
|
|
97
72
|
SequenceType = Literal[
|
|
98
73
|
"applicationFirewall",
|
|
@@ -107,6 +82,10 @@ SequenceType = Literal[
|
|
|
107
82
|
"aclv6",
|
|
108
83
|
"deviceaccesspolicy",
|
|
109
84
|
"deviceaccesspolicyv6",
|
|
85
|
+
"sslDecryption",
|
|
86
|
+
"vedgeRoute",
|
|
87
|
+
"vedgeroute",
|
|
88
|
+
"appRoute",
|
|
110
89
|
]
|
|
111
90
|
|
|
112
91
|
|
|
@@ -115,65 +94,141 @@ Optimized = Literal[
|
|
|
115
94
|
"false",
|
|
116
95
|
]
|
|
117
96
|
|
|
118
|
-
|
|
119
|
-
"host",
|
|
120
|
-
"umbrella",
|
|
121
|
-
]
|
|
122
|
-
|
|
123
|
-
LossProtectionType = Literal[
|
|
124
|
-
"fecAdaptive",
|
|
125
|
-
"fecAlways",
|
|
126
|
-
"packetDuplication",
|
|
127
|
-
]
|
|
97
|
+
AdvancedCommunityMatchFlag = Literal["or", "and", "exact"]
|
|
128
98
|
|
|
129
|
-
|
|
130
|
-
"border-router",
|
|
131
|
-
"edge-router",
|
|
132
|
-
]
|
|
99
|
+
MetricType = Literal["type1", "type2"]
|
|
133
100
|
|
|
134
|
-
|
|
135
|
-
"FW",
|
|
136
|
-
"IDP",
|
|
137
|
-
"IDS",
|
|
138
|
-
"netsvc1",
|
|
139
|
-
"netsvc2",
|
|
140
|
-
"netsvc3",
|
|
141
|
-
"netsvc4",
|
|
142
|
-
]
|
|
101
|
+
SlaNotMetAction = Literal["strict", "fallbackToBestPath"]
|
|
143
102
|
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
103
|
+
VoicePortType = Literal[
|
|
104
|
+
"potsDialPeer",
|
|
105
|
+
"sipDialPeer",
|
|
106
|
+
"srstPhone",
|
|
107
|
+
"voicePort",
|
|
149
108
|
]
|
|
150
109
|
|
|
151
|
-
Carrier = Literal[
|
|
152
|
-
"default",
|
|
153
|
-
"carrier1",
|
|
154
|
-
"carrier2",
|
|
155
|
-
"carrier3",
|
|
156
|
-
"carrier4",
|
|
157
|
-
"carrier5",
|
|
158
|
-
"carrier6",
|
|
159
|
-
"carrier7",
|
|
160
|
-
"carrier8",
|
|
161
|
-
]
|
|
162
110
|
|
|
163
|
-
|
|
111
|
+
class Reference(BaseModel):
|
|
112
|
+
ref: UUID
|
|
164
113
|
|
|
165
114
|
|
|
166
|
-
class
|
|
115
|
+
class ReferenceWithId(BaseModel):
|
|
116
|
+
field: Literal["id"] = "id"
|
|
167
117
|
ref: UUID
|
|
168
118
|
|
|
169
119
|
|
|
120
|
+
class ReferenceList(BaseModel):
|
|
121
|
+
ref: SpaceSeparatedUUIDList
|
|
122
|
+
|
|
123
|
+
|
|
170
124
|
class VariableName(BaseModel):
|
|
171
125
|
vip_variable_name: str = Field(serialization_alias="vipVariableName", validation_alias="vipVariableName")
|
|
172
126
|
|
|
173
127
|
|
|
128
|
+
class CommonStation(BaseModel):
|
|
129
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
130
|
+
name: str
|
|
131
|
+
number: str
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class MediaProfileRef(BaseModel):
|
|
135
|
+
name: int
|
|
136
|
+
ref: UUID
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class LineParams(BaseModel):
|
|
140
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
141
|
+
gain: IntStr
|
|
142
|
+
attenuation: IntStr
|
|
143
|
+
echo_cancellor: bool = Field(validation_alias="echoCancellor", serialization_alias="echoCancellor")
|
|
144
|
+
vad: bool
|
|
145
|
+
compand_type: str = Field(serialization_alias="compandType", validation_alias="compandType")
|
|
146
|
+
cptone: str
|
|
147
|
+
impedance: Optional[str] = Field(default=None)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class DidTimers(BaseModel):
|
|
151
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
152
|
+
answer_winkwidth: IntStr = Field(
|
|
153
|
+
ge=110, le=290, serialization_alias="answerWinkwidth", validation_alias="answerWinkwidth"
|
|
154
|
+
)
|
|
155
|
+
clear_wait: IntStr = Field(ge=200, le=2000, serialization_alias="clearWait", validation_alias="clearWait")
|
|
156
|
+
wait_wink: IntStr = Field(ge=100, le=6500, serialization_alias="waitWink", validation_alias="waitWink")
|
|
157
|
+
wink_duration: IntStr = Field(ge=50, le=3000, serialization_alias="winkDuration", validation_alias="winkDuration")
|
|
158
|
+
dial_pulse_min_delay: IntStr = Field(
|
|
159
|
+
ge=0, le=5000, serialization_alias="dialPulseMinDelay", validation_alias="dialPulseMinDelay"
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class FxoTuningParams(BaseModel):
|
|
164
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
165
|
+
pre_dial_delay: int = Field(ge=0, serialization_alias="preDialDelay", validation_alias="preDialDelay")
|
|
166
|
+
timing_sup_disc: IntStr = Field(serialization_alias="timingSupDisc", validation_alias="timingSupDisc")
|
|
167
|
+
supervisory_disconnect: str = Field(
|
|
168
|
+
serialization_alias="supervisoryDisconnect", validation_alias="supervisoryDisconnect"
|
|
169
|
+
)
|
|
170
|
+
dial_type: str = Field(serialization_alias="dialType", validation_alias="dialType")
|
|
171
|
+
timing_hookflash_out: IntStr = Field(
|
|
172
|
+
serialization_alias="timingHookflashOut", validation_alias="timingHookflashOut"
|
|
173
|
+
)
|
|
174
|
+
timing_guard_out: IntStr = Field(serialization_alias="timingGuardOut", validation_alias="timingGuardOut")
|
|
175
|
+
battery_reversal_det_delay: Optional[IntStr] = Field(
|
|
176
|
+
default=None, serialization_alias="batteryReversalDetDelay", validation_alias="batteryReversalDetDelay"
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class FxsTuningParams(BaseModel):
|
|
181
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
182
|
+
timing_hookflash_in_min: IntStr = Field(
|
|
183
|
+
ge=0, le=400, serialization_alias="timingHookflashInMin", validation_alias="timingHookflashInMin"
|
|
184
|
+
)
|
|
185
|
+
timing_hookflash_in_max: IntStr = Field(
|
|
186
|
+
ge=50, le=1500, serialization_alias="timingHookflashInMax", validation_alias="timingHookflashInMax"
|
|
187
|
+
)
|
|
188
|
+
loop_length: str = Field(serialization_alias="loopLength", validation_alias="loopLength")
|
|
189
|
+
ring_frequency: IntStr = Field(serialization_alias="ringFrequency", validation_alias="ringFrequency")
|
|
190
|
+
ring_dc_offset: Optional[str] = Field(
|
|
191
|
+
default=None, serialization_alias="ringDcOffset", validation_alias="ringDcOffset"
|
|
192
|
+
)
|
|
193
|
+
pulse_digit_detection: bool = Field(
|
|
194
|
+
serialization_alias="pulseDigitDetection", validation_alias="pulseDigitDetection"
|
|
195
|
+
)
|
|
196
|
+
ren: IntStr = Field(ge=1, le=5)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class TrunkGroupPreference(BaseModel):
|
|
200
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
201
|
+
ref: UUID
|
|
202
|
+
preference: int
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class TranslationRuleEntry(BaseModel):
|
|
206
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
207
|
+
ref: UUID
|
|
208
|
+
name: str
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class TranslationProfileEntry(BaseModel):
|
|
212
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
213
|
+
ref: UUID
|
|
214
|
+
name: str
|
|
215
|
+
calling_translation_rule: Optional[TranslationRuleEntry] = Field(
|
|
216
|
+
default=None, serialization_alias="callingTranslationRule", validation_alias="callingTranslationRule"
|
|
217
|
+
)
|
|
218
|
+
called_translation_rule: Optional[TranslationRuleEntry] = Field(
|
|
219
|
+
default=None, serialization_alias="calledTranslationRule", validation_alias="calledTranslationRule"
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class SupervisoryDisconnectEntry(BaseModel):
|
|
224
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
225
|
+
ref: UUID
|
|
226
|
+
name: str
|
|
227
|
+
|
|
228
|
+
|
|
174
229
|
class LocalTLOCListEntryValue(BaseModel):
|
|
175
|
-
color:
|
|
176
|
-
encap: EncapType
|
|
230
|
+
color: SpaceSeparatedTLOCColorStr
|
|
231
|
+
encap: Optional[EncapType] = None
|
|
177
232
|
restrict: Optional[str] = None
|
|
178
233
|
|
|
179
234
|
|
|
@@ -226,25 +281,36 @@ class ProtocolEntry(BaseModel):
|
|
|
226
281
|
|
|
227
282
|
class DSCPEntry(BaseModel):
|
|
228
283
|
field: Literal["dscp"] = "dscp"
|
|
229
|
-
value:
|
|
284
|
+
value: SpaceSeparatedNonNegativeIntList = Field(description="0-63 single numbers separate by space")
|
|
230
285
|
|
|
231
286
|
|
|
232
287
|
class SourceIPEntry(BaseModel):
|
|
288
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
289
|
+
|
|
233
290
|
field: Literal["sourceIp"] = "sourceIp"
|
|
234
|
-
value:
|
|
291
|
+
value: Optional[SpaceSeparatedIPv4] = Field(default=None, description="IP network specifiers separate by space")
|
|
292
|
+
vip_variable_name: Optional[str] = Field(
|
|
293
|
+
default=None, serialization_alias="vipVariableName", validation_alias="vipVariableName"
|
|
294
|
+
)
|
|
235
295
|
|
|
236
296
|
@staticmethod
|
|
237
297
|
def from_ipv4_networks(networks: List[IPv4Network]) -> "SourceIPEntry":
|
|
238
|
-
return SourceIPEntry(value=
|
|
298
|
+
return SourceIPEntry(value=[IPv4Interface(ip) for ip in networks])
|
|
299
|
+
|
|
300
|
+
def as_ipv4_networks(self) -> List[IPv4Network]:
|
|
301
|
+
return [] if not self.value else [IPv4Network(val) for val in self.value]
|
|
239
302
|
|
|
240
303
|
|
|
241
304
|
class SourceIPv6Entry(BaseModel):
|
|
242
305
|
field: Literal["sourceIpv6"] = "sourceIpv6"
|
|
243
|
-
value:
|
|
306
|
+
value: SpaceSeparatedIPv6
|
|
244
307
|
|
|
245
308
|
@staticmethod
|
|
246
309
|
def from_ipv6_networks(networks: List[IPv6Network]) -> "SourceIPv6Entry":
|
|
247
|
-
return SourceIPv6Entry(value=
|
|
310
|
+
return SourceIPv6Entry(value=[IPv6Interface(ip) for ip in networks])
|
|
311
|
+
|
|
312
|
+
def as_ipv6_networks(self) -> List[IPv6Network]:
|
|
313
|
+
return [] if not self.value else [IPv6Network(val) for val in self.value]
|
|
248
314
|
|
|
249
315
|
|
|
250
316
|
class IPAddressEntry(BaseModel):
|
|
@@ -262,21 +328,32 @@ class SourcePortEntry(BaseModel):
|
|
|
262
328
|
|
|
263
329
|
|
|
264
330
|
class DestinationIPEntry(BaseModel):
|
|
331
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
332
|
+
|
|
265
333
|
field: Literal["destinationIp"] = "destinationIp"
|
|
266
|
-
value:
|
|
334
|
+
value: Optional[SpaceSeparatedIPv4] = Field(default=None)
|
|
335
|
+
vip_variable_name: Optional[str] = Field(
|
|
336
|
+
default=None, serialization_alias="vipVariableName", validation_alias="vipVariableName"
|
|
337
|
+
)
|
|
267
338
|
|
|
268
339
|
@staticmethod
|
|
269
340
|
def from_ipv4_networks(networks: List[IPv4Network]) -> "DestinationIPEntry":
|
|
270
|
-
return DestinationIPEntry(value=
|
|
341
|
+
return DestinationIPEntry(value=[IPv4Interface(ip) for ip in networks])
|
|
342
|
+
|
|
343
|
+
def as_ipv4_networks(self) -> List[IPv4Network]:
|
|
344
|
+
return [] if not self.value else [IPv4Network(val) for val in self.value]
|
|
271
345
|
|
|
272
346
|
|
|
273
347
|
class DestinationIPv6Entry(BaseModel):
|
|
274
348
|
field: Literal["destinationIpv6"] = "destinationIpv6"
|
|
275
|
-
value:
|
|
349
|
+
value: SpaceSeparatedIPv6
|
|
276
350
|
|
|
277
351
|
@staticmethod
|
|
278
352
|
def from_ipv6_networks(networks: List[IPv6Network]) -> "DestinationIPv6Entry":
|
|
279
|
-
return DestinationIPv6Entry(value=
|
|
353
|
+
return DestinationIPv6Entry(value=[IPv6Interface(ip) for ip in networks])
|
|
354
|
+
|
|
355
|
+
def as_ipv6_networks(self) -> List[IPv6Network]:
|
|
356
|
+
return [] if not self.value else [IPv6Network(val) for val in self.value]
|
|
280
357
|
|
|
281
358
|
|
|
282
359
|
class DestinationPortEntry(BaseModel):
|
|
@@ -318,6 +395,26 @@ class DestinationRegionEntry(BaseModel):
|
|
|
318
395
|
value: DestinationRegion
|
|
319
396
|
|
|
320
397
|
|
|
398
|
+
class AddressEntry(BaseModel):
|
|
399
|
+
field: Literal["address"] = "address"
|
|
400
|
+
ref: UUID
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
class AsPathListMatchEntry(BaseModel):
|
|
404
|
+
field: Literal["asPath"] = "asPath"
|
|
405
|
+
ref: UUID
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
class AsPathActionEntryValue(BaseModel):
|
|
409
|
+
prepend: Optional[SpaceSeparatedNonNegativeIntList] = None
|
|
410
|
+
exclude: Optional[SpaceSeparatedNonNegativeIntList] = None
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
class AsPathActionEntry(BaseModel):
|
|
414
|
+
field: Literal["asPath"] = "asPath"
|
|
415
|
+
value: AsPathActionEntryValue
|
|
416
|
+
|
|
417
|
+
|
|
321
418
|
class SourceFQDNEntry(BaseModel):
|
|
322
419
|
field: Literal["sourceFqdn"] = "sourceFqdn"
|
|
323
420
|
value: str = Field(max_length=120)
|
|
@@ -364,22 +461,55 @@ class UseVPNEntry(BaseModel):
|
|
|
364
461
|
|
|
365
462
|
class FallBackEntry(BaseModel):
|
|
366
463
|
field: Literal["fallback"] = "fallback"
|
|
367
|
-
value:
|
|
464
|
+
value: Literal["", "true"]
|
|
465
|
+
|
|
466
|
+
@property
|
|
467
|
+
def as_bool(self) -> bool:
|
|
468
|
+
return True if self.value == "true" else False
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
class DiaPoolEntry(BaseModel):
|
|
472
|
+
field: Literal["diaPool"] = "diaPool"
|
|
473
|
+
value: SpaceSeparatedNonNegativeIntList
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
class DiaInterfaceEntry(BaseModel):
|
|
477
|
+
field: Literal["diaInterface"] = "diaInterface"
|
|
478
|
+
value: SpaceSeparatedInterfaceStr
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
class BypassEntry(BaseModel):
|
|
482
|
+
field: Literal["bypass"] = "bypass"
|
|
483
|
+
value: Literal["", "true"]
|
|
368
484
|
|
|
485
|
+
@property
|
|
486
|
+
def as_bool(self) -> bool:
|
|
487
|
+
return True if self.value == "true" else False
|
|
369
488
|
|
|
370
|
-
|
|
489
|
+
|
|
490
|
+
class NextHopActionEntry(BaseModel):
|
|
371
491
|
field: Literal["nextHop"] = "nextHop"
|
|
372
|
-
value: IPv4Address
|
|
492
|
+
value: Union[IPv4Address, IPv6Address]
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
class NextHopIpv6ActionEntry(BaseModel):
|
|
496
|
+
field: Literal["nextHopIpv6"] = "nextHopIpv6"
|
|
497
|
+
value: IPv6Address
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
class NextHopMatchEntry(BaseModel):
|
|
501
|
+
field: Literal["nextHop"] = "nextHop"
|
|
502
|
+
ref: UUID
|
|
373
503
|
|
|
374
504
|
|
|
375
505
|
class NextHopLooseEntry(BaseModel):
|
|
376
506
|
field: Literal["nextHopLoose"] = "nextHopLoose"
|
|
377
|
-
value: str
|
|
507
|
+
value: Annotated[bool, PlainSerializer(lambda x: str(x).lower(), return_type=str, when_used="json-unless-none")]
|
|
378
508
|
|
|
379
509
|
|
|
380
510
|
class OMPTagEntry(BaseModel):
|
|
381
511
|
field: Literal["ompTag"] = "ompTag"
|
|
382
|
-
value:
|
|
512
|
+
value: IntStr = Field(description="Number in range 0-4294967295", ge=0, le=4294967295)
|
|
383
513
|
|
|
384
514
|
|
|
385
515
|
class OriginEntry(BaseModel):
|
|
@@ -399,7 +529,7 @@ class PreferenceEntry(BaseModel):
|
|
|
399
529
|
|
|
400
530
|
class PathTypeEntry(BaseModel):
|
|
401
531
|
field: Literal["pathType"] = "pathType"
|
|
402
|
-
value:
|
|
532
|
+
value: ControlPathType
|
|
403
533
|
|
|
404
534
|
|
|
405
535
|
class RegionEntry(BaseModel):
|
|
@@ -443,8 +573,17 @@ class TLOCEntry(BaseModel):
|
|
|
443
573
|
|
|
444
574
|
|
|
445
575
|
class CommunityEntry(BaseModel):
|
|
576
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
446
577
|
field: Literal["community"] = "community"
|
|
447
|
-
value: str = Field(
|
|
578
|
+
value: Optional[str] = Field(
|
|
579
|
+
default=None, description="Example: 1000:10000 or internet or local-AS or no advertise or no-export"
|
|
580
|
+
)
|
|
581
|
+
vip_variable_name: Optional[str] = Field(
|
|
582
|
+
default=None,
|
|
583
|
+
serialization_alias="vipVariableName",
|
|
584
|
+
validation_alias="vipVariableName",
|
|
585
|
+
description="Example: 1000:10000 or internet or local-AS or no advertise or no-export",
|
|
586
|
+
)
|
|
448
587
|
|
|
449
588
|
|
|
450
589
|
class CommunityAdditiveEntry(BaseModel):
|
|
@@ -454,7 +593,7 @@ class CommunityAdditiveEntry(BaseModel):
|
|
|
454
593
|
|
|
455
594
|
class CarrierEntry(BaseModel):
|
|
456
595
|
field: Literal["carrier"] = "carrier"
|
|
457
|
-
value:
|
|
596
|
+
value: CarrierType
|
|
458
597
|
|
|
459
598
|
|
|
460
599
|
class DomainIDEntry(BaseModel):
|
|
@@ -472,39 +611,175 @@ class NextHeaderEntry(BaseModel):
|
|
|
472
611
|
value: str = Field(description="0-63 single numbers separate by space")
|
|
473
612
|
|
|
474
613
|
|
|
614
|
+
class AggregatorActionEntryValue(BaseModel):
|
|
615
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
616
|
+
aggregator: IntStr = Field(description="Number in range 1-4294967295", ge=0, le=4294967295)
|
|
617
|
+
ip_address: Union[IPv4Address, IPv6Address] = Field(serialization_alias="ipAddress", validation_alias="ipAddress")
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
class AggregatorActionEntry(BaseModel):
|
|
621
|
+
field: Literal["aggregator"] = "aggregator"
|
|
622
|
+
value: AggregatorActionEntryValue
|
|
623
|
+
|
|
624
|
+
|
|
475
625
|
class TrafficClassEntry(BaseModel):
|
|
476
626
|
field: Literal["trafficClass"] = "trafficClass"
|
|
477
627
|
value: str = Field(description="Number in range 0-63")
|
|
478
628
|
|
|
479
629
|
|
|
630
|
+
class LocalPreferenceEntry(BaseModel):
|
|
631
|
+
field: Literal["localPreference"] = "localPreference"
|
|
632
|
+
value: IntStr = Field(ge=0, le=4294967295, description="Number in range 0-4294967295")
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
class MetricEntry(BaseModel):
|
|
636
|
+
field: Literal["metric"] = "metric"
|
|
637
|
+
value: IntStr = Field(ge=0, le=4294967295, description="Number in range 0-4294967295")
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
class MetricTypeEntry(BaseModel):
|
|
641
|
+
field: Literal["metricType"] = "metricType"
|
|
642
|
+
value: MetricType
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
class OspfTagEntry(BaseModel):
|
|
646
|
+
field: Literal["ospfTag"] = "ospfTag"
|
|
647
|
+
value: IntStr = Field(ge=0, le=4294967295, description="Number in range 0-4294967295")
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
class PeerEntry(BaseModel):
|
|
651
|
+
field: Literal["peer"] = "peer"
|
|
652
|
+
value: Union[IPv4Address, IPv6Address]
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
class AtomicAggregateActionEntry(BaseModel):
|
|
656
|
+
field: Literal["atomicAggregate"] = "atomicAggregate"
|
|
657
|
+
value: Literal["true"] = "true"
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
class WeightEntry(BaseModel):
|
|
661
|
+
field: Literal["weight"] = "weight"
|
|
662
|
+
value: IntStr = Field(ge=0, le=4294967295, description="Number in range 0-4294967295")
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
class AdvancedCommunityEntry(BaseModel):
|
|
666
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
667
|
+
|
|
668
|
+
field: Literal["advancedCommunity"] = "advancedCommunity"
|
|
669
|
+
|
|
670
|
+
match_flag: AdvancedCommunityMatchFlag = Field(
|
|
671
|
+
default="or",
|
|
672
|
+
serialization_alias="matchFlag",
|
|
673
|
+
validation_alias="matchFlag",
|
|
674
|
+
description="The 'and' and 'exact' conditions are applicable to only one community list",
|
|
675
|
+
)
|
|
676
|
+
|
|
677
|
+
refs: List[UUID] = []
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
class ExpandedCommunityInLineEntry(BaseModel):
|
|
681
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
682
|
+
|
|
683
|
+
field: Literal["expandedCommunityInline"] = "expandedCommunityInline"
|
|
684
|
+
vip_variable_name: str = Field(serialization_alias="vipVariableName", validation_alias="vipVariableName")
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
class ExtendedCommunityEntry(BaseModel):
|
|
688
|
+
field: Literal["extCommunity"] = "extCommunity"
|
|
689
|
+
ref: UUID
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
NATVPNEntries = Annotated[
|
|
693
|
+
Union[
|
|
694
|
+
BypassEntry,
|
|
695
|
+
DiaPoolEntry,
|
|
696
|
+
DiaInterfaceEntry,
|
|
697
|
+
FallBackEntry,
|
|
698
|
+
UseVPNEntry,
|
|
699
|
+
],
|
|
700
|
+
Field(discriminator="field"),
|
|
701
|
+
]
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
@dataclass
|
|
705
|
+
class NATVPNParams:
|
|
706
|
+
bypass: bool = False
|
|
707
|
+
dia_pool: List[int] = field(default_factory=list)
|
|
708
|
+
dia_interface: List[str] = field(default_factory=list)
|
|
709
|
+
fallback: bool = False
|
|
710
|
+
vpn: Optional[int] = None
|
|
711
|
+
|
|
712
|
+
def as_entry_list(self) -> List[NATVPNEntries]:
|
|
713
|
+
entries: List[NATVPNEntries] = []
|
|
714
|
+
if self.bypass:
|
|
715
|
+
entries.append(BypassEntry(value="true"))
|
|
716
|
+
if self.dia_pool:
|
|
717
|
+
entries.append(DiaPoolEntry(value=self.dia_pool))
|
|
718
|
+
if self.dia_interface:
|
|
719
|
+
entries.append(DiaInterfaceEntry(value=self.dia_interface))
|
|
720
|
+
if self.fallback:
|
|
721
|
+
entries.append(FallBackEntry(value="true"))
|
|
722
|
+
if self.vpn is not None:
|
|
723
|
+
entries.append(UseVPNEntry(value=str(self.vpn)))
|
|
724
|
+
return entries
|
|
725
|
+
|
|
726
|
+
|
|
480
727
|
class NATVPNEntry(RootModel):
|
|
481
|
-
root: List[
|
|
728
|
+
root: List[NATVPNEntries]
|
|
482
729
|
|
|
483
730
|
@staticmethod
|
|
484
|
-
def
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
731
|
+
def from_params(params: NATVPNParams) -> "NATVPNEntry":
|
|
732
|
+
return NATVPNEntry(root=params.as_entry_list())
|
|
733
|
+
|
|
734
|
+
def get_params(self) -> NATVPNParams:
|
|
735
|
+
params = NATVPNParams()
|
|
736
|
+
for param in self.root:
|
|
737
|
+
if param.field == "bypass":
|
|
738
|
+
params.bypass = param.as_bool
|
|
739
|
+
elif param.field == "diaInterface":
|
|
740
|
+
params.dia_interface = param.value
|
|
741
|
+
elif param.field == "diaPool":
|
|
742
|
+
params.dia_pool = param.value
|
|
743
|
+
elif param.field == "fallback":
|
|
744
|
+
params.fallback = param.as_bool
|
|
745
|
+
elif param.field == "useVpn":
|
|
746
|
+
params.vpn = int(param.value)
|
|
747
|
+
return params
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
class ICMPMessageEntry(BaseModel):
|
|
751
|
+
field: Literal["icmpMessage"] = "icmpMessage"
|
|
752
|
+
value: List[IcmpMsgType]
|
|
753
|
+
|
|
754
|
+
_value = field_validator("value", mode="before")(str_as_str_list)
|
|
488
755
|
|
|
489
756
|
|
|
490
757
|
class SourceDataPrefixListEntry(BaseModel):
|
|
491
758
|
field: Literal["sourceDataPrefixList"] = "sourceDataPrefixList"
|
|
492
|
-
ref:
|
|
759
|
+
ref: SpaceSeparatedUUIDList = Field(
|
|
760
|
+
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
761
|
+
)
|
|
493
762
|
|
|
494
763
|
|
|
495
764
|
class SourceDataIPv6PrefixListEntry(BaseModel):
|
|
496
765
|
field: Literal["sourceDataIpv6PrefixList"] = "sourceDataIpv6PrefixList"
|
|
497
|
-
ref:
|
|
766
|
+
ref: SpaceSeparatedUUIDList = Field(
|
|
767
|
+
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
768
|
+
)
|
|
498
769
|
|
|
499
770
|
|
|
500
771
|
class DestinationDataPrefixListEntry(BaseModel):
|
|
501
772
|
field: Literal["destinationDataPrefixList"] = "destinationDataPrefixList"
|
|
502
|
-
ref:
|
|
773
|
+
ref: SpaceSeparatedUUIDList = Field(
|
|
774
|
+
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
775
|
+
)
|
|
503
776
|
|
|
504
777
|
|
|
505
778
|
class DestinationDataIPv6PrefixListEntry(BaseModel):
|
|
506
779
|
field: Literal["destinationDataIpv6PrefixList"] = "destinationDataIpv6PrefixList"
|
|
507
|
-
ref:
|
|
780
|
+
ref: SpaceSeparatedUUIDList = Field(
|
|
781
|
+
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
782
|
+
)
|
|
508
783
|
|
|
509
784
|
|
|
510
785
|
class DNSAppListEntry(BaseModel):
|
|
@@ -514,9 +789,19 @@ class DNSAppListEntry(BaseModel):
|
|
|
514
789
|
|
|
515
790
|
class AppListEntry(BaseModel):
|
|
516
791
|
field: Literal["appList"] = "appList"
|
|
792
|
+
ref: SpaceSeparatedUUIDList
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
class SaaSAppListEntry(BaseModel):
|
|
796
|
+
field: Literal["saasAppList"] = "saasAppList"
|
|
517
797
|
ref: UUID
|
|
518
798
|
|
|
519
799
|
|
|
800
|
+
class AppListFlatEntry(BaseModel):
|
|
801
|
+
field: Literal["appListFlat"] = "appListFlat"
|
|
802
|
+
ref: SpaceSeparatedUUIDList
|
|
803
|
+
|
|
804
|
+
|
|
520
805
|
class SourceFQDNListEntry(BaseModel):
|
|
521
806
|
field: Literal["sourceFqdnList"] = "sourceFqdnList"
|
|
522
807
|
ref: UUID
|
|
@@ -524,41 +809,59 @@ class SourceFQDNListEntry(BaseModel):
|
|
|
524
809
|
|
|
525
810
|
class DestinationFQDNListEntry(BaseModel):
|
|
526
811
|
field: Literal["destinationFqdnList"] = "destinationFqdnList"
|
|
527
|
-
ref:
|
|
812
|
+
ref: SpaceSeparatedUUIDList
|
|
528
813
|
|
|
529
814
|
|
|
530
815
|
class SourceGeoLocationListEntry(BaseModel):
|
|
531
816
|
field: Literal["sourceGeoLocationList"] = "sourceGeoLocationList"
|
|
532
|
-
ref:
|
|
817
|
+
ref: SpaceSeparatedUUIDList
|
|
533
818
|
|
|
534
819
|
|
|
535
820
|
class DestinationGeoLocationListEntry(BaseModel):
|
|
536
821
|
field: Literal["destinationGeoLocationList"] = "destinationGeoLocationList"
|
|
537
|
-
ref:
|
|
822
|
+
ref: SpaceSeparatedUUIDList
|
|
538
823
|
|
|
539
824
|
|
|
540
825
|
class ProtocolNameListEntry(BaseModel):
|
|
541
826
|
field: Literal["protocolNameList"] = "protocolNameList"
|
|
542
|
-
ref:
|
|
827
|
+
ref: SpaceSeparatedUUIDList
|
|
543
828
|
|
|
544
829
|
|
|
545
830
|
class SourcePortListEntry(BaseModel):
|
|
546
831
|
field: Literal["sourcePortList"] = "sourcePortList"
|
|
547
|
-
ref:
|
|
832
|
+
ref: SpaceSeparatedUUIDList
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
class SourceScalableGroupTagListEntry(BaseModel):
|
|
836
|
+
field: Literal["sourceScalableGroupTagList"] = "sourceScalableGroupTagList"
|
|
837
|
+
ref: SpaceSeparatedUUIDList
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
class SourceSecurityGroupEntry(BaseModel):
|
|
841
|
+
field: Literal["sourceSecurityGroup"] = "sourceSecurityGroup"
|
|
842
|
+
ref: SpaceSeparatedUUIDList
|
|
548
843
|
|
|
549
844
|
|
|
550
845
|
class DestinationPortListEntry(BaseModel):
|
|
551
846
|
field: Literal["destinationPortList"] = "destinationPortList"
|
|
552
|
-
ref:
|
|
847
|
+
ref: SpaceSeparatedUUIDList = Field(
|
|
848
|
+
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
849
|
+
)
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
class DestinationScalableGroupTagListEntry(BaseModel):
|
|
853
|
+
field: Literal["destinationScalableGroupTagList"] = "destinationScalableGroupTagList"
|
|
854
|
+
ref: SpaceSeparatedUUIDList
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
class DestinationSecurityGroupEntry(BaseModel):
|
|
858
|
+
field: Literal["destinationSecurityGroup"] = "destinationSecurityGroup"
|
|
859
|
+
ref: SpaceSeparatedUUIDList
|
|
553
860
|
|
|
554
861
|
|
|
555
862
|
class RuleSetListEntry(BaseModel):
|
|
556
863
|
field: Literal["ruleSetList"] = "ruleSetList"
|
|
557
|
-
ref:
|
|
558
|
-
|
|
559
|
-
@staticmethod
|
|
560
|
-
def from_rule_set_ids(rule_set_ids: Set[UUID]) -> "RuleSetListEntry":
|
|
561
|
-
return RuleSetListEntry(ref=" ".join(str(rule_set_ids)))
|
|
864
|
+
ref: SpaceSeparatedUUIDList
|
|
562
865
|
|
|
563
866
|
|
|
564
867
|
class PolicerListEntry(BaseModel):
|
|
@@ -571,6 +874,16 @@ class TLOCListEntry(BaseModel):
|
|
|
571
874
|
ref: UUID
|
|
572
875
|
|
|
573
876
|
|
|
877
|
+
class SourceVpnEntry(BaseModel):
|
|
878
|
+
field: Literal["sourceVpn"] = "sourceVpn"
|
|
879
|
+
value: str = Field(description="VPN ids numbers separated by space")
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
class DestinationVpnEntry(BaseModel):
|
|
883
|
+
field: Literal["destinationVpn"] = "destinationVpn"
|
|
884
|
+
value: str = Field(description="VPN ids numbers separated by space")
|
|
885
|
+
|
|
886
|
+
|
|
574
887
|
class PrefferedColorGroupListEntry(BaseModel):
|
|
575
888
|
field: Literal["preferredColorGroup"] = "preferredColorGroup"
|
|
576
889
|
ref: UUID
|
|
@@ -608,6 +921,11 @@ class PrefixListEntry(BaseModel):
|
|
|
608
921
|
ref: UUID
|
|
609
922
|
|
|
610
923
|
|
|
924
|
+
class Ipv6PrefixListEntry(BaseModel):
|
|
925
|
+
field: Literal["ipv6prefixList"] = "ipv6prefixList"
|
|
926
|
+
ref: UUID
|
|
927
|
+
|
|
928
|
+
|
|
611
929
|
class RegionListEntry(BaseModel):
|
|
612
930
|
field: Literal["regionList"] = "regionList"
|
|
613
931
|
ref: UUID
|
|
@@ -621,15 +939,17 @@ class ClassMapListEntry(BaseModel):
|
|
|
621
939
|
class ServiceEntryValue(BaseModel):
|
|
622
940
|
model_config = ConfigDict(populate_by_name=True)
|
|
623
941
|
type: ServiceType
|
|
624
|
-
vpn:
|
|
942
|
+
vpn: Optional[IntStr] = None
|
|
625
943
|
tloc: Optional[TLOCEntryValue] = None
|
|
626
944
|
tloc_list: Optional[TLOCListEntry] = Field(
|
|
627
945
|
default=None, validation_alias="tlocList", serialization_alias="tlocList"
|
|
628
946
|
)
|
|
947
|
+
restrict: Optional[str] = None
|
|
948
|
+
local: Optional[str] = None
|
|
629
949
|
|
|
630
950
|
@model_validator(mode="after")
|
|
631
951
|
def tloc_xor_tloc_list(self):
|
|
632
|
-
check_fields_exclusive(self.__dict__, {"tloc", "tloc_list"},
|
|
952
|
+
check_fields_exclusive(self.__dict__, {"tloc", "tloc_list"}, False)
|
|
633
953
|
return self
|
|
634
954
|
|
|
635
955
|
|
|
@@ -651,6 +971,16 @@ class AffinityEntry(BaseModel):
|
|
|
651
971
|
RedirectDNSActionEntry = Union[IPAddressEntry, DNSTypeEntry]
|
|
652
972
|
|
|
653
973
|
|
|
974
|
+
class ServiceAreaEntry(BaseModel):
|
|
975
|
+
field: Literal["serviceArea"] = "serviceArea"
|
|
976
|
+
value: SpaceSeparatedServiceAreaList
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
class TrafficCategoryEntry(BaseModel):
|
|
980
|
+
field: Literal["trafficCategory"] = "trafficCategory"
|
|
981
|
+
value: TrafficCategory
|
|
982
|
+
|
|
983
|
+
|
|
654
984
|
class LogAction(BaseModel):
|
|
655
985
|
type: Literal["log"] = "log"
|
|
656
986
|
parameter: str = ""
|
|
@@ -670,8 +1000,34 @@ class NATAction(BaseModel):
|
|
|
670
1000
|
return NATAction(parameter=NATPoolEntry(value=str(nat_pool)))
|
|
671
1001
|
|
|
672
1002
|
@staticmethod
|
|
673
|
-
def from_nat_vpn(
|
|
674
|
-
|
|
1003
|
+
def from_nat_vpn(
|
|
1004
|
+
use_vpn: int = 0,
|
|
1005
|
+
*,
|
|
1006
|
+
fallback: bool = False,
|
|
1007
|
+
bypass: bool = False,
|
|
1008
|
+
dia_pool: List[int] = [],
|
|
1009
|
+
dia_interface: List[str] = [],
|
|
1010
|
+
) -> "NATAction":
|
|
1011
|
+
params = NATVPNParams(
|
|
1012
|
+
bypass=bypass,
|
|
1013
|
+
dia_pool=dia_pool,
|
|
1014
|
+
dia_interface=dia_interface,
|
|
1015
|
+
fallback=fallback,
|
|
1016
|
+
vpn=use_vpn,
|
|
1017
|
+
)
|
|
1018
|
+
return NATAction(parameter=NATVPNEntry.from_params(params))
|
|
1019
|
+
|
|
1020
|
+
@property
|
|
1021
|
+
def nat_pool(self) -> Optional[int]:
|
|
1022
|
+
if isinstance(self.parameter, NATPoolEntry):
|
|
1023
|
+
return int(self.parameter.value)
|
|
1024
|
+
return None
|
|
1025
|
+
|
|
1026
|
+
@property
|
|
1027
|
+
def nat_vpn(self) -> Optional[NATVPNParams]:
|
|
1028
|
+
if isinstance(self.parameter, NATVPNEntry):
|
|
1029
|
+
return self.parameter.get_params()
|
|
1030
|
+
return None
|
|
675
1031
|
|
|
676
1032
|
|
|
677
1033
|
class CFlowDAction(BaseModel):
|
|
@@ -690,6 +1046,16 @@ class RedirectDNSAction(BaseModel):
|
|
|
690
1046
|
def from_dns_type(dns_type: DNSTypeEntryType = "host") -> "RedirectDNSAction":
|
|
691
1047
|
return RedirectDNSAction(parameter=DNSTypeEntry(value=dns_type))
|
|
692
1048
|
|
|
1049
|
+
def get_ip(self) -> Optional[IPv4Address]:
|
|
1050
|
+
if self.parameter.field == "ipAddress":
|
|
1051
|
+
return self.parameter.value
|
|
1052
|
+
return None
|
|
1053
|
+
|
|
1054
|
+
def get_dns_type(self) -> Optional[DNSTypeEntryType]:
|
|
1055
|
+
if self.parameter.field == "dnsType":
|
|
1056
|
+
return self.parameter.value
|
|
1057
|
+
return None
|
|
1058
|
+
|
|
693
1059
|
|
|
694
1060
|
class TCPOptimizationAction(BaseModel):
|
|
695
1061
|
type: Literal["tcpOptimization"] = "tcpOptimization"
|
|
@@ -752,17 +1118,121 @@ class PolicerAction(BaseModel):
|
|
|
752
1118
|
parameter: Reference
|
|
753
1119
|
|
|
754
1120
|
|
|
1121
|
+
class ConnectionEventsAction(BaseModel):
|
|
1122
|
+
type: Literal["connectionEvents"] = "connectionEvents"
|
|
1123
|
+
parameter: str = ""
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
class AdvancedInspectionProfileAction(BaseModel):
|
|
1127
|
+
type: Literal["advancedInspectionProfile"] = "advancedInspectionProfile"
|
|
1128
|
+
parameter: ReferenceWithId
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
class BackupSlaPrefferedColorAction(BaseModel):
|
|
1132
|
+
type: Literal["backupSlaPreferredColor"] = "backupSlaPreferredColor"
|
|
1133
|
+
parameter: SpaceSeparatedTLOCColorStr
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
class SlaName(BaseModel):
|
|
1137
|
+
field: Literal["name"] = "name"
|
|
1138
|
+
ref: UUID
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
class SlaPreferredColor(BaseModel):
|
|
1142
|
+
field: Literal["preferredColor"] = "preferredColor"
|
|
1143
|
+
value: SpaceSeparatedTLOCColorStr
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
class SlaPreferredRemoteColor(BaseModel):
|
|
1147
|
+
field: Literal["preferredRemoteColor"] = "preferredRemoteColor"
|
|
1148
|
+
value: TLOCColor
|
|
1149
|
+
remote_color_restrict: Optional[bool] = Field(
|
|
1150
|
+
default=None, serialization_alias="remoteColorRestrict", validation_alias="remoteColorRestrict"
|
|
1151
|
+
)
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
class SlaPreferredColorGroup(BaseModel):
|
|
1155
|
+
field: Literal["preferredColorGroup"] = "preferredColorGroup"
|
|
1156
|
+
ref: UUID
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
class SlaNotMet(BaseModel):
|
|
1160
|
+
field: SlaNotMetAction
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
SlaClassActionParam = Annotated[
|
|
1164
|
+
Union[
|
|
1165
|
+
SlaName,
|
|
1166
|
+
SlaPreferredColor,
|
|
1167
|
+
SlaPreferredColorGroup,
|
|
1168
|
+
SlaPreferredRemoteColor,
|
|
1169
|
+
SlaNotMet,
|
|
1170
|
+
],
|
|
1171
|
+
Field(discriminator="field"),
|
|
1172
|
+
]
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
class SlaClassAction(BaseModel):
|
|
1176
|
+
type: Literal["slaClass"] = "slaClass"
|
|
1177
|
+
parameter: List[SlaClassActionParam] = Field(default_factory=list)
|
|
1178
|
+
|
|
1179
|
+
@overload
|
|
1180
|
+
@staticmethod
|
|
1181
|
+
def from_params(
|
|
1182
|
+
sla_class: UUID, not_met_action: Optional[SlaNotMetAction] = None, *, preferred_color: List[TLOCColor]
|
|
1183
|
+
) -> "SlaClassAction": ...
|
|
1184
|
+
|
|
1185
|
+
@overload
|
|
1186
|
+
@staticmethod
|
|
1187
|
+
def from_params(
|
|
1188
|
+
sla_class: UUID, not_met_action: Optional[SlaNotMetAction] = None, *, preferred_color_group: UUID
|
|
1189
|
+
) -> "SlaClassAction": ...
|
|
1190
|
+
|
|
1191
|
+
@staticmethod
|
|
1192
|
+
def from_params(
|
|
1193
|
+
sla_class: UUID,
|
|
1194
|
+
not_met_action: Optional[SlaNotMetAction] = None,
|
|
1195
|
+
*,
|
|
1196
|
+
preferred_color: Optional[List[TLOCColor]] = None,
|
|
1197
|
+
preferred_color_group: Optional[UUID] = None,
|
|
1198
|
+
) -> "SlaClassAction":
|
|
1199
|
+
action = SlaClassAction()
|
|
1200
|
+
action.parameter.append(SlaName(ref=sla_class))
|
|
1201
|
+
if not_met_action:
|
|
1202
|
+
action.parameter.append(SlaNotMet(field=not_met_action))
|
|
1203
|
+
if preferred_color:
|
|
1204
|
+
action.parameter.append(SlaPreferredColor(value=preferred_color))
|
|
1205
|
+
if preferred_color_group:
|
|
1206
|
+
action.parameter.append(SlaPreferredColorGroup(ref=preferred_color_group))
|
|
1207
|
+
return action
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
class CloudSaaSAction(BaseModel):
|
|
1211
|
+
type: Literal["cloudSaas"] = "cloudSaas"
|
|
1212
|
+
parameter: str = Field(default="")
|
|
1213
|
+
|
|
1214
|
+
|
|
755
1215
|
ActionSetEntry = Annotated[
|
|
756
1216
|
Union[
|
|
757
1217
|
AffinityEntry,
|
|
1218
|
+
AggregatorActionEntry,
|
|
1219
|
+
AsPathActionEntry,
|
|
1220
|
+
AtomicAggregateActionEntry,
|
|
758
1221
|
CommunityAdditiveEntry,
|
|
759
1222
|
CommunityEntry,
|
|
760
1223
|
DSCPEntry,
|
|
761
1224
|
ForwardingClassEntry,
|
|
1225
|
+
LocalPreferenceEntry,
|
|
762
1226
|
LocalTLOCListEntry,
|
|
763
|
-
|
|
1227
|
+
MetricEntry,
|
|
1228
|
+
MetricTypeEntry,
|
|
1229
|
+
NextHopActionEntry,
|
|
1230
|
+
NextHopIpv6ActionEntry,
|
|
764
1231
|
NextHopLooseEntry,
|
|
765
1232
|
OMPTagEntry,
|
|
1233
|
+
OriginatorEntry,
|
|
1234
|
+
OriginEntry,
|
|
1235
|
+
OspfTagEntry,
|
|
766
1236
|
PolicerListEntry,
|
|
767
1237
|
PreferenceEntry,
|
|
768
1238
|
PrefferedColorGroupListEntry,
|
|
@@ -773,6 +1243,7 @@ ActionSetEntry = Annotated[
|
|
|
773
1243
|
TLOCListEntry,
|
|
774
1244
|
TrafficClassEntry,
|
|
775
1245
|
VPNEntry,
|
|
1246
|
+
WeightEntry,
|
|
776
1247
|
],
|
|
777
1248
|
Field(discriminator="field"),
|
|
778
1249
|
]
|
|
@@ -780,16 +1251,21 @@ ActionSetEntry = Annotated[
|
|
|
780
1251
|
|
|
781
1252
|
class ActionSet(BaseModel):
|
|
782
1253
|
type: Literal["set"] = "set"
|
|
783
|
-
parameter: List[ActionSetEntry] =
|
|
1254
|
+
parameter: List[ActionSetEntry] = Field(default_factory=list)
|
|
784
1255
|
|
|
785
1256
|
|
|
786
1257
|
ActionEntry = Annotated[
|
|
787
1258
|
Union[
|
|
788
1259
|
ActionSet,
|
|
1260
|
+
AdvancedInspectionProfileAction,
|
|
1261
|
+
BackupSlaPrefferedColorAction,
|
|
789
1262
|
CFlowDAction,
|
|
790
1263
|
ClassMapAction,
|
|
1264
|
+
CloudSaaSAction,
|
|
1265
|
+
ConnectionEventsAction,
|
|
791
1266
|
CountAction,
|
|
792
1267
|
DREOptimizationAction,
|
|
1268
|
+
ExportToAction,
|
|
793
1269
|
FallBackToRoutingAction,
|
|
794
1270
|
LogAction,
|
|
795
1271
|
LossProtectionAction,
|
|
@@ -801,15 +1277,19 @@ ActionEntry = Annotated[
|
|
|
801
1277
|
RedirectDNSAction,
|
|
802
1278
|
SecureInternetGatewayAction,
|
|
803
1279
|
ServiceNodeGroupAction,
|
|
1280
|
+
SlaClassAction,
|
|
804
1281
|
TCPOptimizationAction,
|
|
805
|
-
ExportToAction,
|
|
806
1282
|
],
|
|
807
1283
|
Field(discriminator="type"),
|
|
808
1284
|
]
|
|
809
1285
|
|
|
810
1286
|
MatchEntry = Annotated[
|
|
811
1287
|
Union[
|
|
1288
|
+
AddressEntry,
|
|
1289
|
+
AdvancedCommunityEntry,
|
|
812
1290
|
AppListEntry,
|
|
1291
|
+
AppListFlatEntry,
|
|
1292
|
+
AsPathListMatchEntry,
|
|
813
1293
|
CarrierEntry,
|
|
814
1294
|
ClassMapListEntry,
|
|
815
1295
|
ColorListEntry,
|
|
@@ -825,18 +1305,31 @@ MatchEntry = Annotated[
|
|
|
825
1305
|
DestinationPortEntry,
|
|
826
1306
|
DestinationPortListEntry,
|
|
827
1307
|
DestinationRegionEntry,
|
|
1308
|
+
DestinationScalableGroupTagListEntry,
|
|
1309
|
+
DestinationSecurityGroupEntry,
|
|
1310
|
+
DestinationVpnEntry,
|
|
828
1311
|
DNSAppListEntry,
|
|
829
1312
|
DNSEntry,
|
|
830
1313
|
DomainIDEntry,
|
|
831
1314
|
DSCPEntry,
|
|
1315
|
+
ExpandedCommunityInLineEntry,
|
|
1316
|
+
ExpandedCommunityListEntry,
|
|
832
1317
|
ExpandedCommunityListEntry,
|
|
1318
|
+
ExtendedCommunityEntry,
|
|
833
1319
|
GroupIDEntry,
|
|
1320
|
+
ICMPMessageEntry,
|
|
1321
|
+
Ipv6PrefixListEntry,
|
|
1322
|
+
LocalPreferenceEntry,
|
|
1323
|
+
MetricEntry,
|
|
834
1324
|
NextHeaderEntry,
|
|
1325
|
+
NextHopMatchEntry,
|
|
835
1326
|
OMPTagEntry,
|
|
836
1327
|
OriginatorEntry,
|
|
837
1328
|
OriginEntry,
|
|
1329
|
+
OspfTagEntry,
|
|
838
1330
|
PacketLengthEntry,
|
|
839
1331
|
PathTypeEntry,
|
|
1332
|
+
PeerEntry,
|
|
840
1333
|
PLPEntry,
|
|
841
1334
|
PreferenceEntry,
|
|
842
1335
|
PrefixListEntry,
|
|
@@ -847,6 +1340,8 @@ MatchEntry = Annotated[
|
|
|
847
1340
|
RegionListEntry,
|
|
848
1341
|
RoleEntry,
|
|
849
1342
|
RuleSetListEntry,
|
|
1343
|
+
SaaSAppListEntry,
|
|
1344
|
+
ServiceAreaEntry,
|
|
850
1345
|
SiteEntry,
|
|
851
1346
|
SiteListEntry,
|
|
852
1347
|
SiteListEntry,
|
|
@@ -860,11 +1355,16 @@ MatchEntry = Annotated[
|
|
|
860
1355
|
SourceIPv6Entry,
|
|
861
1356
|
SourcePortEntry,
|
|
862
1357
|
SourcePortListEntry,
|
|
1358
|
+
SourceScalableGroupTagListEntry,
|
|
1359
|
+
SourceSecurityGroupEntry,
|
|
1360
|
+
SourceVpnEntry,
|
|
863
1361
|
TCPEntry,
|
|
864
1362
|
TLOCEntry,
|
|
865
1363
|
TLOCListEntry,
|
|
1364
|
+
TrafficCategoryEntry,
|
|
866
1365
|
TrafficClassEntry,
|
|
867
1366
|
TrafficToEntry,
|
|
1367
|
+
VPNEntry,
|
|
868
1368
|
VPNListEntry,
|
|
869
1369
|
],
|
|
870
1370
|
Field(discriminator="field"),
|
|
@@ -888,8 +1388,8 @@ MUTUALLY_EXCLUSIVE_FIELDS = [
|
|
|
888
1388
|
def _generate_field_name_check_lookup(spec: Sequence[Set[str]]) -> Dict[str, List[str]]:
|
|
889
1389
|
lookup: Dict[str, List[str]] = {}
|
|
890
1390
|
for exclusive_set in spec:
|
|
891
|
-
for
|
|
892
|
-
lookup[
|
|
1391
|
+
for fieldname in exclusive_set:
|
|
1392
|
+
lookup[fieldname] = list(exclusive_set - {fieldname})
|
|
893
1393
|
return lookup
|
|
894
1394
|
|
|
895
1395
|
|
|
@@ -906,15 +1406,17 @@ class Action(BaseModel):
|
|
|
906
1406
|
|
|
907
1407
|
class PolicyDefinitionSequenceBase(BaseModel):
|
|
908
1408
|
sequence_id: int = Field(default=0, serialization_alias="sequenceId", validation_alias="sequenceId")
|
|
909
|
-
sequence_name: str = Field(
|
|
910
|
-
|
|
911
|
-
default="drop", serialization_alias="baseAction", validation_alias="baseAction"
|
|
1409
|
+
sequence_name: Optional[str] = Field(
|
|
1410
|
+
default=None, serialization_alias="sequenceName", validation_alias="sequenceName"
|
|
912
1411
|
)
|
|
1412
|
+
base_action: Optional[str] = Field(default=None, serialization_alias="baseAction", validation_alias="baseAction")
|
|
913
1413
|
sequence_type: SequenceType = Field(serialization_alias="sequenceType", validation_alias="sequenceType")
|
|
914
|
-
sequence_ip_type: SequenceIpType = Field(
|
|
1414
|
+
sequence_ip_type: Optional[SequenceIpType] = Field(
|
|
1415
|
+
default="ipv4", serialization_alias="sequenceIpType", validation_alias="sequenceIpType"
|
|
1416
|
+
)
|
|
915
1417
|
ruleset: Optional[bool] = None
|
|
916
1418
|
match: Match
|
|
917
|
-
actions: Sequence[ActionEntry]
|
|
1419
|
+
actions: Optional[Sequence[ActionEntry]] = None
|
|
918
1420
|
|
|
919
1421
|
@staticmethod
|
|
920
1422
|
def _check_field_collision(field: str, fields: Sequence[str]) -> None:
|
|
@@ -1006,8 +1508,16 @@ def accept_action(method):
|
|
|
1006
1508
|
return wrapper
|
|
1007
1509
|
|
|
1008
1510
|
|
|
1009
|
-
class
|
|
1010
|
-
type:
|
|
1511
|
+
class PolicyActionBase(BaseModel):
|
|
1512
|
+
type: str
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
class PolicyAcceptRejectAction(PolicyActionBase):
|
|
1516
|
+
type: AcceptRejectActionType
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
class PolicyAcceptDropAction(PolicyActionBase):
|
|
1520
|
+
type: AcceptDropActionType
|
|
1011
1521
|
|
|
1012
1522
|
|
|
1013
1523
|
class InfoTag(BaseModel):
|
|
@@ -1015,6 +1525,7 @@ class InfoTag(BaseModel):
|
|
|
1015
1525
|
|
|
1016
1526
|
|
|
1017
1527
|
class PolicyDefinitionId(BaseModel):
|
|
1528
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
1018
1529
|
definition_id: UUID = Field(serialization_alias="definitionId", validation_alias="definitionId")
|
|
1019
1530
|
|
|
1020
1531
|
|
|
@@ -1024,8 +1535,8 @@ class PolicyReference(BaseModel):
|
|
|
1024
1535
|
|
|
1025
1536
|
|
|
1026
1537
|
class DefinitionWithSequencesCommonBase(BaseModel):
|
|
1027
|
-
default_action: Optional[
|
|
1028
|
-
default=
|
|
1538
|
+
default_action: Optional[PolicyActionBase] = Field(
|
|
1539
|
+
default=None,
|
|
1029
1540
|
serialization_alias="defaultAction",
|
|
1030
1541
|
validation_alias="defaultAction",
|
|
1031
1542
|
)
|
|
@@ -1079,8 +1590,9 @@ class DefinitionWithSequencesCommonBase(BaseModel):
|
|
|
1079
1590
|
|
|
1080
1591
|
class PolicyDefinitionBase(BaseModel):
|
|
1081
1592
|
name: str = Field(
|
|
1082
|
-
pattern="^[a-zA-Z0-
|
|
1083
|
-
description="Can include only alpha-numeric characters,
|
|
1593
|
+
pattern="^[a-zA-Z0-9._-]{1,128}$",
|
|
1594
|
+
description="Can include only alpha-numeric characters, "
|
|
1595
|
+
"dot '.' or hyphen '-' or underscore '_'; maximum 128 characters",
|
|
1084
1596
|
)
|
|
1085
1597
|
description: str = "default description"
|
|
1086
1598
|
type: str
|
|
@@ -1103,21 +1615,9 @@ class PolicyDefinitionGetResponse(PolicyDefinitionInfo):
|
|
|
1103
1615
|
|
|
1104
1616
|
class PolicyDefinitionEditResponse(BaseModel):
|
|
1105
1617
|
master_templates_affected: List[str] = Field(
|
|
1106
|
-
|
|
1618
|
+
default_factory=list, serialization_alias="masterTemplatesAffected", validation_alias="masterTemplatesAffected"
|
|
1107
1619
|
)
|
|
1108
1620
|
|
|
1109
1621
|
|
|
1110
1622
|
class PolicyDefinitionPreview(BaseModel):
|
|
1111
1623
|
preview: str
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
class PolicyDefinitionEndpoints(Protocol):
|
|
1115
|
-
def create_policy_definition(self, payload: BaseModel) -> PolicyDefinitionId: ...
|
|
1116
|
-
|
|
1117
|
-
def delete_policy_definition(self, id: UUID) -> None: ...
|
|
1118
|
-
|
|
1119
|
-
def edit_policy_definition(self, id: UUID, payload: BaseModel) -> PolicyDefinitionEditResponse: ...
|
|
1120
|
-
|
|
1121
|
-
def get_definitions(self) -> DataSequence[PolicyDefinitionInfo]: ...
|
|
1122
|
-
|
|
1123
|
-
def get_policy_definition(self, id: UUID) -> PolicyDefinitionGetResponse: ...
|