catalystwan 0.41.2.dev9__py3-none-any.whl → 0.41.3__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/ENDPOINTS.md +611 -0
- catalystwan/__init__.py +2 -3
- catalystwan/api/administration.py +2 -13
- catalystwan/api/api_container.py +1 -4
- catalystwan/api/config_group_api.py +16 -41
- catalystwan/api/configuration_groups/parcel.py +30 -100
- catalystwan/api/configuration_groups/parcels/cellular_controller.py +33 -0
- catalystwan/api/feature_profile_api.py +237 -2016
- catalystwan/api/policy_api.py +116 -470
- catalystwan/api/template_api.py +44 -113
- catalystwan/api/templates/README.md +47 -61
- catalystwan/api/templates/cli_template.py +7 -17
- catalystwan/api/templates/device_template/device_template.py +32 -127
- catalystwan/api/templates/device_template/device_template_payload.json.j2 +19 -0
- catalystwan/api/templates/feature_template.py +3 -3
- catalystwan/api/templates/models/cisco_aaa_model.py +42 -289
- catalystwan/api/templates/models/cisco_banner_model.py +2 -11
- catalystwan/api/templates/models/cisco_bfd_model.py +36 -31
- catalystwan/api/templates/models/cisco_bgp_model.py +131 -382
- catalystwan/api/templates/models/cisco_logging_model.py +43 -80
- catalystwan/api/templates/models/cisco_ntp_model.py +15 -34
- catalystwan/api/templates/models/cisco_omp_model.py +60 -70
- catalystwan/api/templates/models/cisco_ospf.py +74 -143
- catalystwan/api/templates/models/cisco_ospfv3.py +95 -217
- catalystwan/api/templates/models/cisco_secure_internet_gateway.py +142 -304
- catalystwan/api/templates/models/cisco_snmp_model.py +52 -66
- catalystwan/api/templates/models/cisco_system.py +129 -238
- catalystwan/api/templates/models/cisco_vpn_interface_model.py +275 -632
- catalystwan/api/templates/models/cisco_vpn_model.py +270 -433
- catalystwan/api/templates/models/cli_template.py +2 -3
- catalystwan/api/templates/models/omp_vsmart_model.py +10 -46
- catalystwan/api/templates/models/security_vsmart_model.py +8 -11
- catalystwan/api/templates/models/supported.py +4 -10
- catalystwan/api/templates/models/system_vsmart_model.py +27 -164
- catalystwan/apigw_auth.py +2 -6
- catalystwan/dataclasses.py +53 -2
- catalystwan/endpoints/__init__.py +41 -41
- catalystwan/endpoints/certificate_management_device.py +0 -4
- catalystwan/endpoints/cluster_management.py +9 -30
- catalystwan/endpoints/configuration/feature_profile/sdwan/policy_object.py +12 -35
- catalystwan/endpoints/configuration/feature_profile/sdwan/system.py +11 -164
- catalystwan/endpoints/configuration/feature_profile/sdwan/transport.py +26 -144
- catalystwan/endpoints/configuration/policy/definition/access_control_list.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/access_control_list_ipv6.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/control.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/device_access.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/device_access_ipv6.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/hub_and_spoke.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/mesh.py +11 -2
- catalystwan/endpoints/configuration/policy/definition/qos_map.py +11 -2
- catalystwan/endpoints/configuration/policy/definition/rewrite.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/rule_set.py +11 -2
- catalystwan/endpoints/configuration/policy/definition/security_group.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/traffic_data.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/vpn_membership.py +11 -6
- catalystwan/endpoints/configuration/policy/definition/zone_based_firewall.py +11 -6
- catalystwan/endpoints/configuration/policy/list/app.py +16 -3
- catalystwan/endpoints/configuration/policy/list/app_probe.py +15 -6
- catalystwan/endpoints/configuration/policy/list/as_path.py +16 -3
- catalystwan/endpoints/configuration/policy/list/class_map.py +16 -3
- catalystwan/endpoints/configuration/policy/list/color.py +16 -3
- catalystwan/endpoints/configuration/policy/list/community.py +16 -3
- catalystwan/endpoints/configuration/policy/list/data_ipv6_prefix.py +15 -6
- catalystwan/endpoints/configuration/policy/list/data_prefix.py +16 -3
- catalystwan/endpoints/configuration/policy/list/expanded_community.py +15 -6
- catalystwan/endpoints/configuration/policy/list/fqdn.py +16 -3
- catalystwan/endpoints/configuration/policy/list/geo_location.py +16 -3
- catalystwan/endpoints/configuration/policy/list/ips_signature.py +15 -6
- catalystwan/endpoints/configuration/policy/list/ipv6_prefix.py +16 -3
- catalystwan/endpoints/configuration/policy/list/local_app.py +16 -3
- catalystwan/endpoints/configuration/policy/list/local_domain.py +16 -3
- catalystwan/endpoints/configuration/policy/list/mirror.py +16 -3
- catalystwan/endpoints/configuration/policy/list/policer.py +16 -3
- catalystwan/endpoints/configuration/policy/list/port.py +16 -3
- catalystwan/endpoints/configuration/policy/list/preferred_color_group.py +15 -6
- catalystwan/endpoints/configuration/policy/list/prefix.py +16 -4
- catalystwan/endpoints/configuration/policy/list/protocol_name.py +15 -6
- catalystwan/endpoints/configuration/policy/list/region.py +10 -2
- catalystwan/endpoints/configuration/policy/list/site.py +16 -3
- catalystwan/endpoints/configuration/policy/list/sla.py +16 -3
- catalystwan/endpoints/configuration/policy/list/tloc.py +16 -3
- catalystwan/endpoints/configuration/policy/list/url_allow_list.py +16 -3
- catalystwan/endpoints/configuration/policy/list/url_block_list.py +16 -3
- catalystwan/endpoints/configuration/policy/list/vpn.py +16 -3
- catalystwan/endpoints/configuration/policy/list/zone.py +16 -3
- catalystwan/endpoints/configuration/policy/security_template.py +3 -2
- catalystwan/endpoints/configuration/software_actions.py +4 -2
- catalystwan/endpoints/configuration_dashboard_status.py +2 -2
- catalystwan/endpoints/configuration_device_template.py +1 -15
- catalystwan/endpoints/configuration_feature_profile.py +11 -8
- catalystwan/endpoints/configuration_group.py +5 -28
- catalystwan/endpoints/configuration_settings.py +1 -90
- catalystwan/endpoints/endpoints_container.py +18 -82
- catalystwan/endpoints/real_time_monitoring/reboot_history.py +3 -1
- catalystwan/endpoints/tenant_migration.py +0 -2
- catalystwan/exceptions.py +0 -24
- catalystwan/integration_tests/test_find_template_values.py +18 -7
- catalystwan/models/common.py +2 -1898
- catalystwan/models/configuration/common.py +0 -1
- catalystwan/models/configuration/config_migration.py +36 -0
- catalystwan/models/configuration/feature_profile/common.py +149 -634
- catalystwan/models/configuration/feature_profile/sdwan/management/vpn.py +26 -0
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/__init__.py +60 -69
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/app_probe.py +20 -34
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/application_list.py +6 -8
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/color_list.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/data_prefix.py +4 -13
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/expanded_community_list.py +7 -9
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/fowarding_class.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv6_data_prefix.py +9 -11
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv6_prefix_list.py +10 -25
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/{policer.py → policier.py} +10 -12
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/prefered_group_color.py +10 -29
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/prefix_list.py +8 -23
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/sla_class.py +31 -12
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/standard_community.py +10 -16
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/tloc_list.py +7 -8
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/application_list.py +6 -8
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/data_prefix.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/fqdn.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/geolocation_list.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ips_signature.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/local_domain.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/protocol_list.py +5 -7
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/security_port.py +11 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/url.py +15 -36
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/zone.py +18 -14
- catalystwan/models/configuration/feature_profile/sdwan/service/acl.py +409 -0
- catalystwan/models/configuration/feature_profile/sdwan/service/appqoe.py +42 -77
- catalystwan/models/configuration/feature_profile/sdwan/service/bgp.py +288 -0
- catalystwan/models/configuration/feature_profile/sdwan/service/dhcp_server.py +64 -107
- catalystwan/models/configuration/feature_profile/sdwan/service/eigrp.py +42 -39
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/common.py +88 -7
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/ethernet.py +156 -232
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/gre.py +108 -38
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/ipsec.py +84 -77
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/svi.py +56 -62
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/vpn.py +121 -112
- catalystwan/models/configuration/feature_profile/sdwan/service/multicast.py +57 -56
- catalystwan/models/configuration/feature_profile/sdwan/service/object_tracker.py +21 -15
- catalystwan/models/configuration/feature_profile/sdwan/{routing → service}/ospf.py +47 -55
- catalystwan/models/configuration/feature_profile/sdwan/{routing → service}/ospfv3.py +72 -74
- catalystwan/models/configuration/feature_profile/sdwan/service/route_policy.py +110 -358
- catalystwan/models/configuration/feature_profile/sdwan/service/service_insertion_attachment.py +25 -17
- catalystwan/models/configuration/feature_profile/sdwan/service/switchport.py +58 -50
- catalystwan/models/configuration/feature_profile/sdwan/service/tracker.py +21 -12
- catalystwan/models/configuration/feature_profile/sdwan/service/wireless_lan.py +31 -27
- catalystwan/models/configuration/feature_profile/sdwan/system/aaa.py +10 -58
- catalystwan/models/configuration/feature_profile/sdwan/transport/cellular_controller.py +23 -26
- catalystwan/models/configuration/profile_type.py +6 -1
- catalystwan/models/policy/__init__.py +69 -282
- catalystwan/models/policy/centralized.py +29 -26
- catalystwan/models/policy/{definition → definitions}/access_control_list.py +17 -47
- catalystwan/models/policy/{definition → definitions}/access_control_list_ipv6.py +18 -42
- catalystwan/models/policy/{definition → definitions}/control.py +25 -48
- catalystwan/models/policy/{definition → definitions}/device_access.py +11 -22
- catalystwan/models/policy/{definition → definitions}/device_access_ipv6.py +11 -20
- catalystwan/models/policy/{definition → definitions}/hub_and_spoke.py +4 -18
- catalystwan/models/policy/{definition → definitions}/mesh.py +1 -13
- catalystwan/models/policy/{definition → definitions}/qos_map.py +32 -39
- catalystwan/models/policy/{definition → definitions}/rewrite.py +2 -12
- catalystwan/models/policy/{definition → definitions}/rule_set.py +48 -66
- catalystwan/models/policy/{definition → definitions}/security_group.py +14 -38
- catalystwan/models/policy/{definition → definitions}/traffic_data.py +61 -184
- catalystwan/models/policy/{definition → definitions}/vpn_membership.py +1 -13
- catalystwan/models/policy/{definition → definitions}/zone_based_firewall.py +32 -93
- catalystwan/models/policy/lists.py +330 -0
- catalystwan/models/policy/lists_entries.py +444 -0
- catalystwan/models/policy/localized.py +16 -34
- catalystwan/models/policy/policy.py +10 -14
- catalystwan/models/policy/policy_definition.py +173 -673
- catalystwan/models/policy/policy_list.py +27 -38
- catalystwan/models/policy/security.py +46 -145
- catalystwan/response.py +2 -6
- catalystwan/session.py +1 -1
- catalystwan/tests/templates/definitions/{cisco_vpn_basic.json → Basic_Cisco_VPN_Model.json} +2 -2
- catalystwan/tests/templates/definitions/complex_aaa.json +277 -0
- catalystwan/tests/templates/definitions/{cisco_vpn_complex.json → complex_cisco_vpn.json} +12 -27
- catalystwan/tests/templates/definitions/{cisco_aaa.json → iuo.json} +15 -44
- catalystwan/tests/templates/definitions/omp_1.json +11 -0
- catalystwan/tests/templates/definitions/{omp_vsmart_2.json → omp_2.json} +2 -16
- catalystwan/tests/templates/definitions/{omp_vsmart_3.json → omp_3.json} +2 -16
- catalystwan/tests/templates/models/__init__.py +13 -46
- catalystwan/tests/templates/models/cisco_aaa.py +48 -81
- catalystwan/tests/templates/models/cisco_banner.py +2 -2
- catalystwan/tests/templates/models/cisco_bfd.py +6 -4
- catalystwan/tests/templates/models/cisco_system.py +3 -108
- catalystwan/tests/templates/models/cisco_vpn.py +72 -42
- catalystwan/tests/templates/models/omp_vsmart.py +8 -28
- catalystwan/tests/templates/schemas/cedge_aaa.json +1 -1
- catalystwan/tests/templates/schemas/cisco_system.json +0 -242
- catalystwan/tests/templates/schemas/cisco_vpn.json +1 -53
- catalystwan/tests/templates/schemas/omp-vsmart.json +0 -20
- catalystwan/tests/templates/test_chose_model.py +10 -6
- catalystwan/tests/templates/test_deserialize_model.py +4 -4
- catalystwan/tests/templates/test_find_template_values.py +0 -229
- catalystwan/tests/templates/test_serialize_model.py +2 -1
- catalystwan/tests/test_cli_template.py +9 -8
- catalystwan/tests/test_endpoints.py +11 -42
- catalystwan/tests/test_templates.py +19 -16
- catalystwan/utils/feature_template/find_template_values.py +9 -22
- catalystwan/utils/timezone.py +422 -0
- catalystwan/workflows/tenant_migration.py +1 -1
- {catalystwan-0.41.2.dev9.dist-info → catalystwan-0.41.3.dist-info}/METADATA +1 -20
- catalystwan-0.41.3.dist-info/RECORD +353 -0
- catalystwan/api/builders/__init__.py +0 -14
- catalystwan/api/builders/feature_profiles/__init__.py +0 -0
- catalystwan/api/builders/feature_profiles/application_priority.py +0 -58
- catalystwan/api/builders/feature_profiles/builder_factory.py +0 -59
- catalystwan/api/builders/feature_profiles/cli.py +0 -76
- catalystwan/api/builders/feature_profiles/mixins.py +0 -44
- catalystwan/api/builders/feature_profiles/other.py +0 -79
- catalystwan/api/builders/feature_profiles/report.py +0 -155
- catalystwan/api/builders/feature_profiles/service.py +0 -248
- catalystwan/api/builders/feature_profiles/system.py +0 -80
- catalystwan/api/builders/feature_profiles/transport.py +0 -256
- catalystwan/api/builders/feature_profiles/uc_voice.py +0 -287
- catalystwan/api/templates/models/aaa_model.py +0 -387
- catalystwan/api/templates/models/vpn_vsmart_interface_model.py +0 -198
- catalystwan/api/templates/models/vpn_vsmart_model.py +0 -124
- catalystwan/endpoints/configuration/feature_profile/sdwan/application_priority.py +0 -107
- catalystwan/endpoints/configuration/feature_profile/sdwan/cli.py +0 -60
- catalystwan/endpoints/configuration/feature_profile/sdwan/dns_security.py +0 -83
- catalystwan/endpoints/configuration/feature_profile/sdwan/embedded_security.py +0 -88
- catalystwan/endpoints/configuration/feature_profile/sdwan/other.py +0 -62
- catalystwan/endpoints/configuration/feature_profile/sdwan/service.py +0 -154
- catalystwan/endpoints/configuration/feature_profile/sdwan/sig_security.py +0 -88
- catalystwan/endpoints/configuration/feature_profile/sdwan/topology.py +0 -93
- catalystwan/endpoints/configuration/feature_profile/sdwan/uc_voice.py +0 -77
- catalystwan/endpoints/configuration/network_hierarchy.py +0 -47
- catalystwan/endpoints/configuration/packages.py +0 -36
- catalystwan/endpoints/configuration/policy/abstractions.py +0 -49
- catalystwan/endpoints/configuration/policy/definition/aip.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/amp.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/app_route.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/cflowd.py +0 -46
- catalystwan/endpoints/configuration/policy/definition/dial_peer.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/dns_security.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/fxo_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/fxs_did_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/fxs_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/intrusion_prevention.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/pri_isdn_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/route_policy.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/srst_phone_profile.py +0 -59
- catalystwan/endpoints/configuration/policy/definition/ssl_decryption.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/ssl_decryption_utd_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/url_filtering.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/vpn_qos_map.py +0 -50
- catalystwan/endpoints/configuration/policy/list/extended_community.py +0 -52
- catalystwan/endpoints/configuration/policy/list/fax_protocol.py +0 -48
- catalystwan/endpoints/configuration/policy/list/identity.py +0 -48
- catalystwan/endpoints/configuration/policy/list/media_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/list/modem_pass_through.py +0 -52
- catalystwan/endpoints/configuration/policy/list/scalable_group_tag.py +0 -52
- catalystwan/endpoints/configuration/policy/list/supervisory_disconnect.py +0 -52
- catalystwan/endpoints/configuration/policy/list/threat_grid_api_key.py +0 -52
- catalystwan/endpoints/configuration/policy/list/translation_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/list/translation_rules.py +0 -52
- catalystwan/endpoints/configuration/policy/list/trunkgroup.py +0 -48
- catalystwan/endpoints/configuration/policy/list/umbrella_data.py +0 -52
- catalystwan/endpoints/configuration/policy/voice_template.py +0 -39
- catalystwan/endpoints/configuration/policy_group.py +0 -30
- catalystwan/endpoints/configuration/topology_group.py +0 -51
- catalystwan/endpoints/configuration_general_template.py +0 -31
- catalystwan/endpoints/configuration_template_master.py +0 -48
- catalystwan/integration_tests/base.py +0 -81
- catalystwan/integration_tests/feature_profile/sdwan/__init__.py +0 -0
- catalystwan/integration_tests/feature_profile/sdwan/policy/__init__.py +0 -0
- catalystwan/integration_tests/feature_profile/sdwan/policy/base.py +0 -33
- catalystwan/integration_tests/feature_profile/sdwan/policy/test_extended_community.py +0 -33
- catalystwan/integration_tests/feature_profile/sdwan/policy/test_security_app_list.py +0 -32
- catalystwan/integration_tests/feature_profile/sdwan/test_application_priority.py +0 -433
- catalystwan/integration_tests/feature_profile/sdwan/test_cli.py +0 -54
- catalystwan/integration_tests/feature_profile/sdwan/test_dns_security.py +0 -106
- catalystwan/integration_tests/feature_profile/sdwan/test_other.py +0 -49
- catalystwan/integration_tests/feature_profile/sdwan/test_service.py +0 -1078
- catalystwan/integration_tests/feature_profile/sdwan/test_sig_security.py +0 -322
- catalystwan/integration_tests/feature_profile/sdwan/test_ssl_decryption.py +0 -85
- catalystwan/integration_tests/feature_profile/sdwan/test_system.py +0 -368
- catalystwan/integration_tests/feature_profile/sdwan/test_tracker.py +0 -127
- catalystwan/integration_tests/feature_profile/sdwan/test_transport.py +0 -1698
- catalystwan/integration_tests/feature_profile/sdwan/topology/test_topology.py +0 -93
- catalystwan/integration_tests/feature_profile/test_parcel.py +0 -54
- catalystwan/integration_tests/profile_builder/__init__.py +0 -0
- catalystwan/integration_tests/profile_builder/test_pb_service.py +0 -197
- catalystwan/integration_tests/profile_builder/test_pb_transport.py +0 -226
- catalystwan/integration_tests/profile_builder/test_pb_uc_voice.py +0 -277
- catalystwan/integration_tests/test_data/__init__.py +0 -117
- catalystwan/integration_tests/test_network_hierarchy.py +0 -82
- catalystwan/integration_tests/test_settings.py +0 -30
- catalystwan/models/configuration/feature_profile/parcel.py +0 -245
- catalystwan/models/configuration/feature_profile/sdwan/acl/__init__.py +0 -13
- catalystwan/models/configuration/feature_profile/sdwan/acl/ipv4acl.py +0 -298
- catalystwan/models/configuration/feature_profile/sdwan/acl/ipv6acl.py +0 -344
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/__init__.py +0 -218
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/cloud_probe.py +0 -61
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/policy_settings.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/qos_policy.py +0 -102
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/traffic_policy.py +0 -1057
- catalystwan/models/configuration/feature_profile/sdwan/cli/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/cli/config.py +0 -18
- catalystwan/models/configuration/feature_profile/sdwan/cli/full_config.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/dns_security/__init__.py +0 -13
- catalystwan/models/configuration/feature_profile/sdwan/dns_security/dns.py +0 -110
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/ngfirewall.py +0 -493
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/policy.py +0 -171
- catalystwan/models/configuration/feature_profile/sdwan/other/__init__.py +0 -25
- catalystwan/models/configuration/feature_profile/sdwan/other/cybervision.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/other/thousandeyes.py +0 -147
- catalystwan/models/configuration/feature_profile/sdwan/other/ucse.py +0 -110
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/as_path.py +0 -22
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/extended_community.py +0 -34
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv4_network_object.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv4_service_object.py +0 -254
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/mirror.py +0 -27
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/network_object_group.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/object_group.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/service_object_group.py +0 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/aip.py +0 -64
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/amp.py +0 -79
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/identity.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/intrusion_prevention.py +0 -58
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/object_group.py +0 -72
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/rule_set.py +0 -137
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/scalable_group_tag.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ssl_decryption.py +0 -126
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ssl_decryption_profile.py +0 -165
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/url_filtering.py +0 -148
- catalystwan/models/configuration/feature_profile/sdwan/routing/__init__.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/routing/bgp.py +0 -609
- catalystwan/models/configuration/feature_profile/sdwan/service/__init__.py +0 -91
- catalystwan/models/configuration/feature_profile/sdwan/service/dual_router_ha.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/multilink.py +0 -101
- catalystwan/models/configuration/feature_profile/sdwan/service/service_chain.py +0 -38
- catalystwan/models/configuration/feature_profile/sdwan/sig_security/__init__.py +0 -19
- catalystwan/models/configuration/feature_profile/sdwan/sig_security/sig_security.py +0 -379
- catalystwan/models/configuration/feature_profile/sdwan/system/__init__.py +0 -59
- catalystwan/models/configuration/feature_profile/sdwan/system/banner.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/system/basic.py +0 -290
- catalystwan/models/configuration/feature_profile/sdwan/system/bfd.py +0 -69
- catalystwan/models/configuration/feature_profile/sdwan/system/device_access.py +0 -157
- catalystwan/models/configuration/feature_profile/sdwan/system/device_access_ipv6.py +0 -157
- catalystwan/models/configuration/feature_profile/sdwan/system/global_parcel.py +0 -163
- catalystwan/models/configuration/feature_profile/sdwan/system/logging_parcel.py +0 -162
- catalystwan/models/configuration/feature_profile/sdwan/system/mrf.py +0 -75
- catalystwan/models/configuration/feature_profile/sdwan/system/ntp.py +0 -103
- catalystwan/models/configuration/feature_profile/sdwan/system/omp.py +0 -120
- catalystwan/models/configuration/feature_profile/sdwan/system/security.py +0 -179
- catalystwan/models/configuration/feature_profile/sdwan/system/snmp.py +0 -173
- catalystwan/models/configuration/feature_profile/sdwan/topology/__init__.py +0 -29
- catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py +0 -425
- catalystwan/models/configuration/feature_profile/sdwan/topology/hubspoke.py +0 -60
- catalystwan/models/configuration/feature_profile/sdwan/topology/mesh.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/trackers/__init__.py +0 -36
- catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker.py +0 -96
- catalystwan/models/configuration/feature_profile/sdwan/trackers/tracker_group.py +0 -63
- catalystwan/models/configuration/feature_profile/sdwan/transport/__init__.py +0 -93
- catalystwan/models/configuration/feature_profile/sdwan/transport/cellular_profile.py +0 -71
- catalystwan/models/configuration/feature_profile/sdwan/transport/gps.py +0 -37
- catalystwan/models/configuration/feature_profile/sdwan/transport/management/ethernet.py +0 -121
- catalystwan/models/configuration/feature_profile/sdwan/transport/t1e1controller.py +0 -124
- catalystwan/models/configuration/feature_profile/sdwan/transport/vpn.py +0 -285
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/cellular.py +0 -173
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/ethernet.py +0 -389
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/gre.py +0 -46
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/ipsec.py +0 -137
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/multilink.py +0 -219
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/protocol_over.py +0 -405
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/t1e1serial.py +0 -195
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/__init__.py +0 -62
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/analog_interface.py +0 -436
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/call_routing.py +0 -179
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/digital_interface.py +0 -380
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/dsp_farm.py +0 -193
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/media_profile.py +0 -17
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/server_group.py +0 -51
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/srst.py +0 -86
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/supervisory_disconnect.py +0 -69
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/translation_profile.py +0 -42
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/translation_rule.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/trunk_group.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/voice_global.py +0 -57
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/voice_tenant.py +0 -40
- catalystwan/models/configuration/network_hierarchy/__init__.py +0 -24
- catalystwan/models/configuration/network_hierarchy/cflowd.py +0 -128
- catalystwan/models/configuration/network_hierarchy/node.py +0 -88
- catalystwan/models/configuration/network_hierarchy/security_logging.py +0 -91
- catalystwan/models/configuration/packages.py +0 -57
- catalystwan/models/configuration/policy_group.py +0 -74
- catalystwan/models/configuration/topology_group.py +0 -52
- catalystwan/models/policy/definition/aip.py +0 -60
- catalystwan/models/policy/definition/amp.py +0 -65
- catalystwan/models/policy/definition/app_route.py +0 -246
- catalystwan/models/policy/definition/cflowd.py +0 -95
- catalystwan/models/policy/definition/dial_peer.py +0 -60
- catalystwan/models/policy/definition/dns_security.py +0 -130
- catalystwan/models/policy/definition/fxo_port.py +0 -63
- catalystwan/models/policy/definition/fxs_did_port.py +0 -58
- catalystwan/models/policy/definition/fxs_port.py +0 -56
- catalystwan/models/policy/definition/intrusion_prevention.py +0 -55
- catalystwan/models/policy/definition/pri_isdn_port.py +0 -48
- catalystwan/models/policy/definition/route_policy.py +0 -187
- catalystwan/models/policy/definition/srst_phone_profile.py +0 -37
- catalystwan/models/policy/definition/ssl_decryption.py +0 -209
- catalystwan/models/policy/definition/ssl_decryption_utd_profile.py +0 -88
- catalystwan/models/policy/definition/url_filtering.py +0 -70
- catalystwan/models/policy/definition/vpn_qos_map.py +0 -46
- catalystwan/models/policy/list/app.py +0 -44
- catalystwan/models/policy/list/app_probe.py +0 -42
- catalystwan/models/policy/list/as_path.py +0 -30
- catalystwan/models/policy/list/class_map.py +0 -30
- catalystwan/models/policy/list/color.py +0 -28
- catalystwan/models/policy/list/communities.py +0 -83
- catalystwan/models/policy/list/data_ipv6_prefix.py +0 -30
- catalystwan/models/policy/list/data_prefix.py +0 -30
- catalystwan/models/policy/list/fax_protocol.py +0 -45
- catalystwan/models/policy/list/fqdn.py +0 -24
- catalystwan/models/policy/list/geo_location.py +0 -33
- catalystwan/models/policy/list/identity.py +0 -29
- catalystwan/models/policy/list/ips_signature.py +0 -27
- catalystwan/models/policy/list/ipv6_prefix.py +0 -33
- catalystwan/models/policy/list/local_app.py +0 -45
- catalystwan/models/policy/list/local_domain.py +0 -36
- catalystwan/models/policy/list/media_profile.py +0 -44
- catalystwan/models/policy/list/mirror.py +0 -27
- catalystwan/models/policy/list/modem_pass_through.py +0 -27
- catalystwan/models/policy/list/policer.py +0 -39
- catalystwan/models/policy/list/port.py +0 -33
- catalystwan/models/policy/list/preferred_color_group.py +0 -82
- catalystwan/models/policy/list/prefix.py +0 -33
- catalystwan/models/policy/list/protocol_name.py +0 -26
- catalystwan/models/policy/list/region.py +0 -45
- catalystwan/models/policy/list/scalable_group_tag.py +0 -30
- catalystwan/models/policy/list/site.py +0 -34
- catalystwan/models/policy/list/sla.py +0 -77
- catalystwan/models/policy/list/supervisory_disconnect.py +0 -62
- catalystwan/models/policy/list/threat_grid_api_key.py +0 -32
- catalystwan/models/policy/list/tloc.py +0 -32
- catalystwan/models/policy/list/translation_profile.py +0 -32
- catalystwan/models/policy/list/translation_rules.py +0 -29
- catalystwan/models/policy/list/trunkgroup.py +0 -56
- catalystwan/models/policy/list/umbrella_data.py +0 -30
- catalystwan/models/policy/list/url.py +0 -39
- catalystwan/models/policy/list/vpn.py +0 -40
- catalystwan/models/policy/list/zone.py +0 -46
- catalystwan/models/policy/voice.py +0 -77
- catalystwan/models/settings.py +0 -41
- catalystwan/models/templates.py +0 -79
- catalystwan/tests/builders/test_report.py +0 -60
- catalystwan/tests/builders/uc_voice.py +0 -85
- catalystwan/tests/models/__init__.py +0 -0
- catalystwan/tests/models/configuration/feature_profile/sdwan/policy_object/security/test_url.py +0 -73
- catalystwan/tests/models/test_digital_interface.py +0 -56
- catalystwan/tests/templates/definitions/aaa_basic.json +0 -96
- catalystwan/tests/templates/definitions/aaa_complex.json +0 -464
- catalystwan/tests/templates/definitions/cisco_aaa_complex.json +0 -361
- catalystwan/tests/templates/definitions/cisco_logging_complex.json +0 -268
- catalystwan/tests/templates/definitions/cisco_ntp_complex.json +0 -143
- catalystwan/tests/templates/definitions/cisco_omp_complex.json +0 -175
- catalystwan/tests/templates/definitions/cisco_ospf_complex.json +0 -302
- catalystwan/tests/templates/definitions/cisco_sig.json +0 -405
- catalystwan/tests/templates/definitions/cisco_snmp_complex.json +0 -258
- catalystwan/tests/templates/definitions/cisco_system_complex.json +0 -502
- catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json +0 -821
- catalystwan/tests/templates/definitions/omp_vsmart_1.json +0 -26
- catalystwan/tests/templates/definitions/omp_vsmart_complex.json +0 -73
- catalystwan/tests/templates/definitions/security_vsmart_complex.json +0 -24
- catalystwan/tests/templates/definitions/system_vsmart_complex.json +0 -193
- catalystwan/tests/templates/definitions/vpn_vsmart_basic.json +0 -17
- catalystwan/tests/templates/definitions/vpn_vsmart_complex.json +0 -179
- catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json +0 -42
- catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json +0 -208
- catalystwan/tests/templates/models/aaa.py +0 -106
- catalystwan/tests/templates/models/cisco_logging.py +0 -65
- catalystwan/tests/templates/models/cisco_ntp.py +0 -17
- catalystwan/tests/templates/models/cisco_omp.py +0 -37
- catalystwan/tests/templates/models/cisco_ospf.py +0 -60
- catalystwan/tests/templates/models/cisco_secure_internet_gateway.py +0 -95
- catalystwan/tests/templates/models/cisco_snmp.py +0 -40
- catalystwan/tests/templates/models/cisco_vpn_interface.py +0 -200
- catalystwan/tests/templates/models/security_vsmart.py +0 -11
- catalystwan/tests/templates/models/system_vsmart.py +0 -37
- catalystwan/tests/templates/models/vpn_vsmart.py +0 -32
- catalystwan/tests/templates/models/vpn_vsmart_interface.py +0 -54
- catalystwan/tests/templates/schemas/aaa.json +0 -1096
- catalystwan/tests/templates/schemas/cisco_logging.json +0 -577
- catalystwan/tests/templates/schemas/cisco_ntp.json +0 -265
- catalystwan/tests/templates/schemas/cisco_omp.json +0 -479
- catalystwan/tests/templates/schemas/cisco_ospf.json +0 -908
- catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json +0 -1520
- catalystwan/tests/templates/schemas/cisco_snmp.json +0 -561
- catalystwan/tests/templates/schemas/cisco_vpn_interface.json +0 -3348
- catalystwan/tests/templates/schemas/security-vsmart.json +0 -58
- catalystwan/tests/templates/schemas/system-vsmart.json +0 -2585
- catalystwan/tests/templates/schemas/vpn-vsmart-interface.json +0 -859
- catalystwan/tests/templates/schemas/vpn-vsmart.json +0 -445
- catalystwan/tests/templates/test_find_template_values_2.py +0 -193
- catalystwan/tests/test_feature_profile_api.py +0 -282
- catalystwan/tests/test_models_common.py +0 -53
- catalystwan/utils/model.py +0 -48
- catalystwan/utils/persona.py +0 -5
- catalystwan/utils/type_check.py +0 -22
- catalystwan/workflows/backup_restore_device_templates.py +0 -467
- catalystwan-0.41.2.dev9.dist-info/RECORD +0 -641
- /catalystwan/tests/templates/definitions/{cisco_banner.json → banner_1.json} +0 -0
- {catalystwan-0.41.2.dev9.dist-info → catalystwan-0.41.3.dist-info}/LICENSE +0 -0
- {catalystwan-0.41.2.dev9.dist-info → catalystwan-0.41.3.dist-info}/WHEEL +0 -0
|
@@ -1,47 +1,18 @@
|
|
|
1
1
|
# Copyright 2023 Cisco Systems, Inc. and its affiliates
|
|
2
2
|
|
|
3
3
|
import datetime
|
|
4
|
-
from dataclasses import dataclass, field
|
|
5
4
|
from functools import wraps
|
|
6
|
-
from ipaddress import IPv4Address,
|
|
7
|
-
from typing import Any, Dict, List, MutableSequence, Optional, Sequence, Set, Tuple, Union
|
|
5
|
+
from ipaddress import IPv4Address, IPv4Network, IPv6Network
|
|
6
|
+
from typing import Any, Dict, List, MutableSequence, Optional, Protocol, Sequence, Set, Tuple, Union
|
|
8
7
|
from uuid import UUID
|
|
9
8
|
|
|
10
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
9
|
+
from pydantic import BaseModel, ConfigDict, Field, RootModel, model_validator
|
|
11
10
|
from typing_extensions import Annotated, Literal
|
|
12
11
|
|
|
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
|
-
)
|
|
12
|
+
from catalystwan.models.common import ServiceChainNumber, TLOCColor, check_fields_exclusive
|
|
44
13
|
from catalystwan.models.misc.application_protocols import ApplicationProtocol
|
|
14
|
+
from catalystwan.models.policy.lists_entries import EncapType
|
|
15
|
+
from catalystwan.typed_list import DataSequence
|
|
45
16
|
|
|
46
17
|
|
|
47
18
|
def port_set_and_ranges_to_str(ports: Set[int] = set(), port_ranges: List[Tuple[int, int]] = []) -> str:
|
|
@@ -61,6 +32,47 @@ PLPEntryType = Literal[
|
|
|
61
32
|
"high",
|
|
62
33
|
]
|
|
63
34
|
|
|
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
|
+
]
|
|
64
76
|
|
|
65
77
|
PathType = Literal[
|
|
66
78
|
"hierarchical-path",
|
|
@@ -68,6 +80,19 @@ PathType = Literal[
|
|
|
68
80
|
"transport-gateway-path",
|
|
69
81
|
]
|
|
70
82
|
|
|
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
|
+
]
|
|
71
96
|
|
|
72
97
|
SequenceType = Literal[
|
|
73
98
|
"applicationFirewall",
|
|
@@ -82,10 +107,6 @@ SequenceType = Literal[
|
|
|
82
107
|
"aclv6",
|
|
83
108
|
"deviceaccesspolicy",
|
|
84
109
|
"deviceaccesspolicyv6",
|
|
85
|
-
"sslDecryption",
|
|
86
|
-
"vedgeRoute",
|
|
87
|
-
"vedgeroute",
|
|
88
|
-
"appRoute",
|
|
89
110
|
]
|
|
90
111
|
|
|
91
112
|
|
|
@@ -94,141 +115,65 @@ Optimized = Literal[
|
|
|
94
115
|
"false",
|
|
95
116
|
]
|
|
96
117
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
DNSTypeEntryType = Literal[
|
|
119
|
+
"host",
|
|
120
|
+
"umbrella",
|
|
121
|
+
]
|
|
100
122
|
|
|
101
|
-
|
|
123
|
+
LossProtectionType = Literal[
|
|
124
|
+
"fecAdaptive",
|
|
125
|
+
"fecAlways",
|
|
126
|
+
"packetDuplication",
|
|
127
|
+
]
|
|
102
128
|
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"srstPhone",
|
|
107
|
-
"voicePort",
|
|
129
|
+
MultiRegionRole = Literal[
|
|
130
|
+
"border-router",
|
|
131
|
+
"edge-router",
|
|
108
132
|
]
|
|
109
133
|
|
|
134
|
+
ServiceType = Literal[
|
|
135
|
+
"FW",
|
|
136
|
+
"IDP",
|
|
137
|
+
"IDS",
|
|
138
|
+
"netsvc1",
|
|
139
|
+
"netsvc2",
|
|
140
|
+
"netsvc3",
|
|
141
|
+
"netsvc4",
|
|
142
|
+
]
|
|
110
143
|
|
|
111
|
-
|
|
112
|
-
|
|
144
|
+
TLOCActionType = Literal[
|
|
145
|
+
"strict",
|
|
146
|
+
"primary",
|
|
147
|
+
"backup",
|
|
148
|
+
"ecmp",
|
|
149
|
+
]
|
|
113
150
|
|
|
151
|
+
Carrier = Literal[
|
|
152
|
+
"default",
|
|
153
|
+
"carrier1",
|
|
154
|
+
"carrier2",
|
|
155
|
+
"carrier3",
|
|
156
|
+
"carrier4",
|
|
157
|
+
"carrier5",
|
|
158
|
+
"carrier6",
|
|
159
|
+
"carrier7",
|
|
160
|
+
"carrier8",
|
|
161
|
+
]
|
|
114
162
|
|
|
115
|
-
|
|
116
|
-
field: Literal["id"] = "id"
|
|
117
|
-
ref: UUID
|
|
163
|
+
DeviceAccessProtocol = Literal[22, 161]
|
|
118
164
|
|
|
119
165
|
|
|
120
|
-
class
|
|
121
|
-
ref:
|
|
166
|
+
class Reference(BaseModel):
|
|
167
|
+
ref: UUID
|
|
122
168
|
|
|
123
169
|
|
|
124
170
|
class VariableName(BaseModel):
|
|
125
171
|
vip_variable_name: str = Field(serialization_alias="vipVariableName", validation_alias="vipVariableName")
|
|
126
172
|
|
|
127
173
|
|
|
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
|
-
|
|
229
174
|
class LocalTLOCListEntryValue(BaseModel):
|
|
230
|
-
color:
|
|
231
|
-
encap:
|
|
175
|
+
color: TLOCColor
|
|
176
|
+
encap: EncapType
|
|
232
177
|
restrict: Optional[str] = None
|
|
233
178
|
|
|
234
179
|
|
|
@@ -281,36 +226,25 @@ class ProtocolEntry(BaseModel):
|
|
|
281
226
|
|
|
282
227
|
class DSCPEntry(BaseModel):
|
|
283
228
|
field: Literal["dscp"] = "dscp"
|
|
284
|
-
value:
|
|
229
|
+
value: str = Field(description="0-63 single numbers separate by space")
|
|
285
230
|
|
|
286
231
|
|
|
287
232
|
class SourceIPEntry(BaseModel):
|
|
288
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
289
|
-
|
|
290
233
|
field: Literal["sourceIp"] = "sourceIp"
|
|
291
|
-
value:
|
|
292
|
-
vip_variable_name: Optional[str] = Field(
|
|
293
|
-
default=None, serialization_alias="vipVariableName", validation_alias="vipVariableName"
|
|
294
|
-
)
|
|
234
|
+
value: str = Field(description="IP network specifiers separate by space")
|
|
295
235
|
|
|
296
236
|
@staticmethod
|
|
297
237
|
def from_ipv4_networks(networks: List[IPv4Network]) -> "SourceIPEntry":
|
|
298
|
-
return SourceIPEntry(value=
|
|
299
|
-
|
|
300
|
-
def as_ipv4_networks(self) -> List[IPv4Network]:
|
|
301
|
-
return [] if not self.value else [IPv4Network(val) for val in self.value]
|
|
238
|
+
return SourceIPEntry(value=networks_to_str(networks))
|
|
302
239
|
|
|
303
240
|
|
|
304
241
|
class SourceIPv6Entry(BaseModel):
|
|
305
242
|
field: Literal["sourceIpv6"] = "sourceIpv6"
|
|
306
|
-
value:
|
|
243
|
+
value: str = Field(description="IPv6 network specifiers separate by space")
|
|
307
244
|
|
|
308
245
|
@staticmethod
|
|
309
246
|
def from_ipv6_networks(networks: List[IPv6Network]) -> "SourceIPv6Entry":
|
|
310
|
-
return SourceIPv6Entry(value=
|
|
311
|
-
|
|
312
|
-
def as_ipv6_networks(self) -> List[IPv6Network]:
|
|
313
|
-
return [] if not self.value else [IPv6Network(val) for val in self.value]
|
|
247
|
+
return SourceIPv6Entry(value=networks_to_str(networks))
|
|
314
248
|
|
|
315
249
|
|
|
316
250
|
class IPAddressEntry(BaseModel):
|
|
@@ -328,32 +262,21 @@ class SourcePortEntry(BaseModel):
|
|
|
328
262
|
|
|
329
263
|
|
|
330
264
|
class DestinationIPEntry(BaseModel):
|
|
331
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
332
|
-
|
|
333
265
|
field: Literal["destinationIp"] = "destinationIp"
|
|
334
|
-
value:
|
|
335
|
-
vip_variable_name: Optional[str] = Field(
|
|
336
|
-
default=None, serialization_alias="vipVariableName", validation_alias="vipVariableName"
|
|
337
|
-
)
|
|
266
|
+
value: str
|
|
338
267
|
|
|
339
268
|
@staticmethod
|
|
340
269
|
def from_ipv4_networks(networks: List[IPv4Network]) -> "DestinationIPEntry":
|
|
341
|
-
return DestinationIPEntry(value=
|
|
342
|
-
|
|
343
|
-
def as_ipv4_networks(self) -> List[IPv4Network]:
|
|
344
|
-
return [] if not self.value else [IPv4Network(val) for val in self.value]
|
|
270
|
+
return DestinationIPEntry(value=networks_to_str(networks))
|
|
345
271
|
|
|
346
272
|
|
|
347
273
|
class DestinationIPv6Entry(BaseModel):
|
|
348
274
|
field: Literal["destinationIpv6"] = "destinationIpv6"
|
|
349
|
-
value:
|
|
275
|
+
value: str
|
|
350
276
|
|
|
351
277
|
@staticmethod
|
|
352
278
|
def from_ipv6_networks(networks: List[IPv6Network]) -> "DestinationIPv6Entry":
|
|
353
|
-
return DestinationIPv6Entry(value=
|
|
354
|
-
|
|
355
|
-
def as_ipv6_networks(self) -> List[IPv6Network]:
|
|
356
|
-
return [] if not self.value else [IPv6Network(val) for val in self.value]
|
|
279
|
+
return DestinationIPv6Entry(value=networks_to_str(networks))
|
|
357
280
|
|
|
358
281
|
|
|
359
282
|
class DestinationPortEntry(BaseModel):
|
|
@@ -395,26 +318,6 @@ class DestinationRegionEntry(BaseModel):
|
|
|
395
318
|
value: DestinationRegion
|
|
396
319
|
|
|
397
320
|
|
|
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
|
-
|
|
418
321
|
class SourceFQDNEntry(BaseModel):
|
|
419
322
|
field: Literal["sourceFqdn"] = "sourceFqdn"
|
|
420
323
|
value: str = Field(max_length=120)
|
|
@@ -461,55 +364,22 @@ class UseVPNEntry(BaseModel):
|
|
|
461
364
|
|
|
462
365
|
class FallBackEntry(BaseModel):
|
|
463
366
|
field: Literal["fallback"] = "fallback"
|
|
464
|
-
value:
|
|
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"]
|
|
367
|
+
value: str = ""
|
|
484
368
|
|
|
485
|
-
@property
|
|
486
|
-
def as_bool(self) -> bool:
|
|
487
|
-
return True if self.value == "true" else False
|
|
488
369
|
|
|
489
|
-
|
|
490
|
-
class NextHopActionEntry(BaseModel):
|
|
491
|
-
field: Literal["nextHop"] = "nextHop"
|
|
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):
|
|
370
|
+
class NextHopEntry(BaseModel):
|
|
501
371
|
field: Literal["nextHop"] = "nextHop"
|
|
502
|
-
|
|
372
|
+
value: IPv4Address
|
|
503
373
|
|
|
504
374
|
|
|
505
375
|
class NextHopLooseEntry(BaseModel):
|
|
506
376
|
field: Literal["nextHopLoose"] = "nextHopLoose"
|
|
507
|
-
value:
|
|
377
|
+
value: str
|
|
508
378
|
|
|
509
379
|
|
|
510
380
|
class OMPTagEntry(BaseModel):
|
|
511
381
|
field: Literal["ompTag"] = "ompTag"
|
|
512
|
-
value:
|
|
382
|
+
value: str = Field(description="Number in range 0-4294967295")
|
|
513
383
|
|
|
514
384
|
|
|
515
385
|
class OriginEntry(BaseModel):
|
|
@@ -529,7 +399,7 @@ class PreferenceEntry(BaseModel):
|
|
|
529
399
|
|
|
530
400
|
class PathTypeEntry(BaseModel):
|
|
531
401
|
field: Literal["pathType"] = "pathType"
|
|
532
|
-
value:
|
|
402
|
+
value: PathType
|
|
533
403
|
|
|
534
404
|
|
|
535
405
|
class RegionEntry(BaseModel):
|
|
@@ -573,17 +443,8 @@ class TLOCEntry(BaseModel):
|
|
|
573
443
|
|
|
574
444
|
|
|
575
445
|
class CommunityEntry(BaseModel):
|
|
576
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
577
446
|
field: Literal["community"] = "community"
|
|
578
|
-
value:
|
|
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
|
-
)
|
|
447
|
+
value: str = Field(description="Example: 1000:10000 or internet or local-AS or no advertise or no-export")
|
|
587
448
|
|
|
588
449
|
|
|
589
450
|
class CommunityAdditiveEntry(BaseModel):
|
|
@@ -593,7 +454,7 @@ class CommunityAdditiveEntry(BaseModel):
|
|
|
593
454
|
|
|
594
455
|
class CarrierEntry(BaseModel):
|
|
595
456
|
field: Literal["carrier"] = "carrier"
|
|
596
|
-
value:
|
|
457
|
+
value: Carrier
|
|
597
458
|
|
|
598
459
|
|
|
599
460
|
class DomainIDEntry(BaseModel):
|
|
@@ -611,175 +472,39 @@ class NextHeaderEntry(BaseModel):
|
|
|
611
472
|
value: str = Field(description="0-63 single numbers separate by space")
|
|
612
473
|
|
|
613
474
|
|
|
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
|
-
|
|
625
475
|
class TrafficClassEntry(BaseModel):
|
|
626
476
|
field: Literal["trafficClass"] = "trafficClass"
|
|
627
477
|
value: str = Field(description="Number in range 0-63")
|
|
628
478
|
|
|
629
479
|
|
|
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
|
-
|
|
727
480
|
class NATVPNEntry(RootModel):
|
|
728
|
-
root: List[
|
|
481
|
+
root: List[Union[UseVPNEntry, FallBackEntry]]
|
|
729
482
|
|
|
730
483
|
@staticmethod
|
|
731
|
-
def
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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)
|
|
484
|
+
def from_nat_vpn(fallback: bool, vpn: int = 0) -> "NATVPNEntry":
|
|
485
|
+
if fallback:
|
|
486
|
+
return NATVPNEntry(root=[UseVPNEntry(value=str(vpn)), FallBackEntry()])
|
|
487
|
+
return NATVPNEntry(root=[UseVPNEntry(value=str(vpn))])
|
|
755
488
|
|
|
756
489
|
|
|
757
490
|
class SourceDataPrefixListEntry(BaseModel):
|
|
758
491
|
field: Literal["sourceDataPrefixList"] = "sourceDataPrefixList"
|
|
759
|
-
ref:
|
|
760
|
-
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
761
|
-
)
|
|
492
|
+
ref: UUID
|
|
762
493
|
|
|
763
494
|
|
|
764
495
|
class SourceDataIPv6PrefixListEntry(BaseModel):
|
|
765
496
|
field: Literal["sourceDataIpv6PrefixList"] = "sourceDataIpv6PrefixList"
|
|
766
|
-
ref:
|
|
767
|
-
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
768
|
-
)
|
|
497
|
+
ref: UUID
|
|
769
498
|
|
|
770
499
|
|
|
771
500
|
class DestinationDataPrefixListEntry(BaseModel):
|
|
772
501
|
field: Literal["destinationDataPrefixList"] = "destinationDataPrefixList"
|
|
773
|
-
ref:
|
|
774
|
-
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
775
|
-
)
|
|
502
|
+
ref: UUID
|
|
776
503
|
|
|
777
504
|
|
|
778
505
|
class DestinationDataIPv6PrefixListEntry(BaseModel):
|
|
779
506
|
field: Literal["destinationDataIpv6PrefixList"] = "destinationDataIpv6PrefixList"
|
|
780
|
-
ref:
|
|
781
|
-
description="usually single id but zone based firewall can use multiple ids separated by space"
|
|
782
|
-
)
|
|
507
|
+
ref: UUID
|
|
783
508
|
|
|
784
509
|
|
|
785
510
|
class DNSAppListEntry(BaseModel):
|
|
@@ -789,19 +514,9 @@ class DNSAppListEntry(BaseModel):
|
|
|
789
514
|
|
|
790
515
|
class AppListEntry(BaseModel):
|
|
791
516
|
field: Literal["appList"] = "appList"
|
|
792
|
-
ref: SpaceSeparatedUUIDList
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
class SaaSAppListEntry(BaseModel):
|
|
796
|
-
field: Literal["saasAppList"] = "saasAppList"
|
|
797
517
|
ref: UUID
|
|
798
518
|
|
|
799
519
|
|
|
800
|
-
class AppListFlatEntry(BaseModel):
|
|
801
|
-
field: Literal["appListFlat"] = "appListFlat"
|
|
802
|
-
ref: SpaceSeparatedUUIDList
|
|
803
|
-
|
|
804
|
-
|
|
805
520
|
class SourceFQDNListEntry(BaseModel):
|
|
806
521
|
field: Literal["sourceFqdnList"] = "sourceFqdnList"
|
|
807
522
|
ref: UUID
|
|
@@ -809,59 +524,41 @@ class SourceFQDNListEntry(BaseModel):
|
|
|
809
524
|
|
|
810
525
|
class DestinationFQDNListEntry(BaseModel):
|
|
811
526
|
field: Literal["destinationFqdnList"] = "destinationFqdnList"
|
|
812
|
-
ref:
|
|
527
|
+
ref: UUID
|
|
813
528
|
|
|
814
529
|
|
|
815
530
|
class SourceGeoLocationListEntry(BaseModel):
|
|
816
531
|
field: Literal["sourceGeoLocationList"] = "sourceGeoLocationList"
|
|
817
|
-
ref:
|
|
532
|
+
ref: UUID
|
|
818
533
|
|
|
819
534
|
|
|
820
535
|
class DestinationGeoLocationListEntry(BaseModel):
|
|
821
536
|
field: Literal["destinationGeoLocationList"] = "destinationGeoLocationList"
|
|
822
|
-
ref:
|
|
537
|
+
ref: UUID
|
|
823
538
|
|
|
824
539
|
|
|
825
540
|
class ProtocolNameListEntry(BaseModel):
|
|
826
541
|
field: Literal["protocolNameList"] = "protocolNameList"
|
|
827
|
-
ref:
|
|
542
|
+
ref: UUID
|
|
828
543
|
|
|
829
544
|
|
|
830
545
|
class SourcePortListEntry(BaseModel):
|
|
831
546
|
field: Literal["sourcePortList"] = "sourcePortList"
|
|
832
|
-
ref:
|
|
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
|
|
547
|
+
ref: UUID
|
|
843
548
|
|
|
844
549
|
|
|
845
550
|
class DestinationPortListEntry(BaseModel):
|
|
846
551
|
field: Literal["destinationPortList"] = "destinationPortList"
|
|
847
|
-
ref:
|
|
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
|
|
552
|
+
ref: UUID
|
|
860
553
|
|
|
861
554
|
|
|
862
555
|
class RuleSetListEntry(BaseModel):
|
|
863
556
|
field: Literal["ruleSetList"] = "ruleSetList"
|
|
864
|
-
ref:
|
|
557
|
+
ref: str
|
|
558
|
+
|
|
559
|
+
@staticmethod
|
|
560
|
+
def from_rule_set_ids(rule_set_ids: Set[UUID]) -> "RuleSetListEntry":
|
|
561
|
+
return RuleSetListEntry(ref=" ".join(str(rule_set_ids)))
|
|
865
562
|
|
|
866
563
|
|
|
867
564
|
class PolicerListEntry(BaseModel):
|
|
@@ -874,16 +571,6 @@ class TLOCListEntry(BaseModel):
|
|
|
874
571
|
ref: UUID
|
|
875
572
|
|
|
876
573
|
|
|
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
|
-
|
|
887
574
|
class PrefferedColorGroupListEntry(BaseModel):
|
|
888
575
|
field: Literal["preferredColorGroup"] = "preferredColorGroup"
|
|
889
576
|
ref: UUID
|
|
@@ -921,11 +608,6 @@ class PrefixListEntry(BaseModel):
|
|
|
921
608
|
ref: UUID
|
|
922
609
|
|
|
923
610
|
|
|
924
|
-
class Ipv6PrefixListEntry(BaseModel):
|
|
925
|
-
field: Literal["ipv6prefixList"] = "ipv6prefixList"
|
|
926
|
-
ref: UUID
|
|
927
|
-
|
|
928
|
-
|
|
929
611
|
class RegionListEntry(BaseModel):
|
|
930
612
|
field: Literal["regionList"] = "regionList"
|
|
931
613
|
ref: UUID
|
|
@@ -939,17 +621,15 @@ class ClassMapListEntry(BaseModel):
|
|
|
939
621
|
class ServiceEntryValue(BaseModel):
|
|
940
622
|
model_config = ConfigDict(populate_by_name=True)
|
|
941
623
|
type: ServiceType
|
|
942
|
-
vpn:
|
|
624
|
+
vpn: str
|
|
943
625
|
tloc: Optional[TLOCEntryValue] = None
|
|
944
626
|
tloc_list: Optional[TLOCListEntry] = Field(
|
|
945
627
|
default=None, validation_alias="tlocList", serialization_alias="tlocList"
|
|
946
628
|
)
|
|
947
|
-
restrict: Optional[str] = None
|
|
948
|
-
local: Optional[str] = None
|
|
949
629
|
|
|
950
630
|
@model_validator(mode="after")
|
|
951
631
|
def tloc_xor_tloc_list(self):
|
|
952
|
-
check_fields_exclusive(self.__dict__, {"tloc", "tloc_list"},
|
|
632
|
+
check_fields_exclusive(self.__dict__, {"tloc", "tloc_list"}, True)
|
|
953
633
|
return self
|
|
954
634
|
|
|
955
635
|
|
|
@@ -971,16 +651,6 @@ class AffinityEntry(BaseModel):
|
|
|
971
651
|
RedirectDNSActionEntry = Union[IPAddressEntry, DNSTypeEntry]
|
|
972
652
|
|
|
973
653
|
|
|
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
|
-
|
|
984
654
|
class LogAction(BaseModel):
|
|
985
655
|
type: Literal["log"] = "log"
|
|
986
656
|
parameter: str = ""
|
|
@@ -1000,34 +670,8 @@ class NATAction(BaseModel):
|
|
|
1000
670
|
return NATAction(parameter=NATPoolEntry(value=str(nat_pool)))
|
|
1001
671
|
|
|
1002
672
|
@staticmethod
|
|
1003
|
-
def from_nat_vpn(
|
|
1004
|
-
|
|
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
|
|
673
|
+
def from_nat_vpn(fallback: bool, vpn: int = 0) -> "NATAction":
|
|
674
|
+
return NATAction(parameter=NATVPNEntry.from_nat_vpn(fallback=fallback, vpn=vpn))
|
|
1031
675
|
|
|
1032
676
|
|
|
1033
677
|
class CFlowDAction(BaseModel):
|
|
@@ -1046,16 +690,6 @@ class RedirectDNSAction(BaseModel):
|
|
|
1046
690
|
def from_dns_type(dns_type: DNSTypeEntryType = "host") -> "RedirectDNSAction":
|
|
1047
691
|
return RedirectDNSAction(parameter=DNSTypeEntry(value=dns_type))
|
|
1048
692
|
|
|
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
|
-
|
|
1059
693
|
|
|
1060
694
|
class TCPOptimizationAction(BaseModel):
|
|
1061
695
|
type: Literal["tcpOptimization"] = "tcpOptimization"
|
|
@@ -1118,121 +752,17 @@ class PolicerAction(BaseModel):
|
|
|
1118
752
|
parameter: Reference
|
|
1119
753
|
|
|
1120
754
|
|
|
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
|
-
|
|
1215
755
|
ActionSetEntry = Annotated[
|
|
1216
756
|
Union[
|
|
1217
757
|
AffinityEntry,
|
|
1218
|
-
AggregatorActionEntry,
|
|
1219
|
-
AsPathActionEntry,
|
|
1220
|
-
AtomicAggregateActionEntry,
|
|
1221
758
|
CommunityAdditiveEntry,
|
|
1222
759
|
CommunityEntry,
|
|
1223
760
|
DSCPEntry,
|
|
1224
761
|
ForwardingClassEntry,
|
|
1225
|
-
LocalPreferenceEntry,
|
|
1226
762
|
LocalTLOCListEntry,
|
|
1227
|
-
|
|
1228
|
-
MetricTypeEntry,
|
|
1229
|
-
NextHopActionEntry,
|
|
1230
|
-
NextHopIpv6ActionEntry,
|
|
763
|
+
NextHopEntry,
|
|
1231
764
|
NextHopLooseEntry,
|
|
1232
765
|
OMPTagEntry,
|
|
1233
|
-
OriginatorEntry,
|
|
1234
|
-
OriginEntry,
|
|
1235
|
-
OspfTagEntry,
|
|
1236
766
|
PolicerListEntry,
|
|
1237
767
|
PreferenceEntry,
|
|
1238
768
|
PrefferedColorGroupListEntry,
|
|
@@ -1243,7 +773,6 @@ ActionSetEntry = Annotated[
|
|
|
1243
773
|
TLOCListEntry,
|
|
1244
774
|
TrafficClassEntry,
|
|
1245
775
|
VPNEntry,
|
|
1246
|
-
WeightEntry,
|
|
1247
776
|
],
|
|
1248
777
|
Field(discriminator="field"),
|
|
1249
778
|
]
|
|
@@ -1251,21 +780,16 @@ ActionSetEntry = Annotated[
|
|
|
1251
780
|
|
|
1252
781
|
class ActionSet(BaseModel):
|
|
1253
782
|
type: Literal["set"] = "set"
|
|
1254
|
-
parameter: List[ActionSetEntry] =
|
|
783
|
+
parameter: List[ActionSetEntry] = []
|
|
1255
784
|
|
|
1256
785
|
|
|
1257
786
|
ActionEntry = Annotated[
|
|
1258
787
|
Union[
|
|
1259
788
|
ActionSet,
|
|
1260
|
-
AdvancedInspectionProfileAction,
|
|
1261
|
-
BackupSlaPrefferedColorAction,
|
|
1262
789
|
CFlowDAction,
|
|
1263
790
|
ClassMapAction,
|
|
1264
|
-
CloudSaaSAction,
|
|
1265
|
-
ConnectionEventsAction,
|
|
1266
791
|
CountAction,
|
|
1267
792
|
DREOptimizationAction,
|
|
1268
|
-
ExportToAction,
|
|
1269
793
|
FallBackToRoutingAction,
|
|
1270
794
|
LogAction,
|
|
1271
795
|
LossProtectionAction,
|
|
@@ -1277,19 +801,15 @@ ActionEntry = Annotated[
|
|
|
1277
801
|
RedirectDNSAction,
|
|
1278
802
|
SecureInternetGatewayAction,
|
|
1279
803
|
ServiceNodeGroupAction,
|
|
1280
|
-
SlaClassAction,
|
|
1281
804
|
TCPOptimizationAction,
|
|
805
|
+
ExportToAction,
|
|
1282
806
|
],
|
|
1283
807
|
Field(discriminator="type"),
|
|
1284
808
|
]
|
|
1285
809
|
|
|
1286
810
|
MatchEntry = Annotated[
|
|
1287
811
|
Union[
|
|
1288
|
-
AddressEntry,
|
|
1289
|
-
AdvancedCommunityEntry,
|
|
1290
812
|
AppListEntry,
|
|
1291
|
-
AppListFlatEntry,
|
|
1292
|
-
AsPathListMatchEntry,
|
|
1293
813
|
CarrierEntry,
|
|
1294
814
|
ClassMapListEntry,
|
|
1295
815
|
ColorListEntry,
|
|
@@ -1305,31 +825,18 @@ MatchEntry = Annotated[
|
|
|
1305
825
|
DestinationPortEntry,
|
|
1306
826
|
DestinationPortListEntry,
|
|
1307
827
|
DestinationRegionEntry,
|
|
1308
|
-
DestinationScalableGroupTagListEntry,
|
|
1309
|
-
DestinationSecurityGroupEntry,
|
|
1310
|
-
DestinationVpnEntry,
|
|
1311
828
|
DNSAppListEntry,
|
|
1312
829
|
DNSEntry,
|
|
1313
830
|
DomainIDEntry,
|
|
1314
831
|
DSCPEntry,
|
|
1315
|
-
ExpandedCommunityInLineEntry,
|
|
1316
|
-
ExpandedCommunityListEntry,
|
|
1317
832
|
ExpandedCommunityListEntry,
|
|
1318
|
-
ExtendedCommunityEntry,
|
|
1319
833
|
GroupIDEntry,
|
|
1320
|
-
ICMPMessageEntry,
|
|
1321
|
-
Ipv6PrefixListEntry,
|
|
1322
|
-
LocalPreferenceEntry,
|
|
1323
|
-
MetricEntry,
|
|
1324
834
|
NextHeaderEntry,
|
|
1325
|
-
NextHopMatchEntry,
|
|
1326
835
|
OMPTagEntry,
|
|
1327
836
|
OriginatorEntry,
|
|
1328
837
|
OriginEntry,
|
|
1329
|
-
OspfTagEntry,
|
|
1330
838
|
PacketLengthEntry,
|
|
1331
839
|
PathTypeEntry,
|
|
1332
|
-
PeerEntry,
|
|
1333
840
|
PLPEntry,
|
|
1334
841
|
PreferenceEntry,
|
|
1335
842
|
PrefixListEntry,
|
|
@@ -1340,8 +847,6 @@ MatchEntry = Annotated[
|
|
|
1340
847
|
RegionListEntry,
|
|
1341
848
|
RoleEntry,
|
|
1342
849
|
RuleSetListEntry,
|
|
1343
|
-
SaaSAppListEntry,
|
|
1344
|
-
ServiceAreaEntry,
|
|
1345
850
|
SiteEntry,
|
|
1346
851
|
SiteListEntry,
|
|
1347
852
|
SiteListEntry,
|
|
@@ -1355,16 +860,11 @@ MatchEntry = Annotated[
|
|
|
1355
860
|
SourceIPv6Entry,
|
|
1356
861
|
SourcePortEntry,
|
|
1357
862
|
SourcePortListEntry,
|
|
1358
|
-
SourceScalableGroupTagListEntry,
|
|
1359
|
-
SourceSecurityGroupEntry,
|
|
1360
|
-
SourceVpnEntry,
|
|
1361
863
|
TCPEntry,
|
|
1362
864
|
TLOCEntry,
|
|
1363
865
|
TLOCListEntry,
|
|
1364
|
-
TrafficCategoryEntry,
|
|
1365
866
|
TrafficClassEntry,
|
|
1366
867
|
TrafficToEntry,
|
|
1367
|
-
VPNEntry,
|
|
1368
868
|
VPNListEntry,
|
|
1369
869
|
],
|
|
1370
870
|
Field(discriminator="field"),
|
|
@@ -1388,8 +888,8 @@ MUTUALLY_EXCLUSIVE_FIELDS = [
|
|
|
1388
888
|
def _generate_field_name_check_lookup(spec: Sequence[Set[str]]) -> Dict[str, List[str]]:
|
|
1389
889
|
lookup: Dict[str, List[str]] = {}
|
|
1390
890
|
for exclusive_set in spec:
|
|
1391
|
-
for
|
|
1392
|
-
lookup[
|
|
891
|
+
for field in exclusive_set:
|
|
892
|
+
lookup[field] = list(exclusive_set - {field})
|
|
1393
893
|
return lookup
|
|
1394
894
|
|
|
1395
895
|
|
|
@@ -1406,17 +906,15 @@ class Action(BaseModel):
|
|
|
1406
906
|
|
|
1407
907
|
class PolicyDefinitionSequenceBase(BaseModel):
|
|
1408
908
|
sequence_id: int = Field(default=0, serialization_alias="sequenceId", validation_alias="sequenceId")
|
|
1409
|
-
sequence_name:
|
|
1410
|
-
|
|
909
|
+
sequence_name: str = Field(serialization_alias="sequenceName", validation_alias="sequenceName")
|
|
910
|
+
base_action: PolicyActionType = Field(
|
|
911
|
+
default="drop", serialization_alias="baseAction", validation_alias="baseAction"
|
|
1411
912
|
)
|
|
1412
|
-
base_action: Optional[str] = Field(default=None, serialization_alias="baseAction", validation_alias="baseAction")
|
|
1413
913
|
sequence_type: SequenceType = Field(serialization_alias="sequenceType", validation_alias="sequenceType")
|
|
1414
|
-
sequence_ip_type:
|
|
1415
|
-
default="ipv4", serialization_alias="sequenceIpType", validation_alias="sequenceIpType"
|
|
1416
|
-
)
|
|
914
|
+
sequence_ip_type: SequenceIpType = Field(serialization_alias="sequenceIpType", validation_alias="sequenceIpType")
|
|
1417
915
|
ruleset: Optional[bool] = None
|
|
1418
916
|
match: Match
|
|
1419
|
-
actions:
|
|
917
|
+
actions: Sequence[ActionEntry]
|
|
1420
918
|
|
|
1421
919
|
@staticmethod
|
|
1422
920
|
def _check_field_collision(field: str, fields: Sequence[str]) -> None:
|
|
@@ -1508,16 +1006,8 @@ def accept_action(method):
|
|
|
1508
1006
|
return wrapper
|
|
1509
1007
|
|
|
1510
1008
|
|
|
1511
|
-
class
|
|
1512
|
-
type:
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
class PolicyAcceptRejectAction(PolicyActionBase):
|
|
1516
|
-
type: AcceptRejectActionType
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
class PolicyAcceptDropAction(PolicyActionBase):
|
|
1520
|
-
type: AcceptDropActionType
|
|
1009
|
+
class DefaultAction(BaseModel):
|
|
1010
|
+
type: PolicyActionType
|
|
1521
1011
|
|
|
1522
1012
|
|
|
1523
1013
|
class InfoTag(BaseModel):
|
|
@@ -1525,7 +1015,6 @@ class InfoTag(BaseModel):
|
|
|
1525
1015
|
|
|
1526
1016
|
|
|
1527
1017
|
class PolicyDefinitionId(BaseModel):
|
|
1528
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
1529
1018
|
definition_id: UUID = Field(serialization_alias="definitionId", validation_alias="definitionId")
|
|
1530
1019
|
|
|
1531
1020
|
|
|
@@ -1535,8 +1024,8 @@ class PolicyReference(BaseModel):
|
|
|
1535
1024
|
|
|
1536
1025
|
|
|
1537
1026
|
class DefinitionWithSequencesCommonBase(BaseModel):
|
|
1538
|
-
default_action: Optional[
|
|
1539
|
-
default=
|
|
1027
|
+
default_action: Optional[DefaultAction] = Field(
|
|
1028
|
+
default=DefaultAction(type="drop"),
|
|
1540
1029
|
serialization_alias="defaultAction",
|
|
1541
1030
|
validation_alias="defaultAction",
|
|
1542
1031
|
)
|
|
@@ -1590,9 +1079,8 @@ class DefinitionWithSequencesCommonBase(BaseModel):
|
|
|
1590
1079
|
|
|
1591
1080
|
class PolicyDefinitionBase(BaseModel):
|
|
1592
1081
|
name: str = Field(
|
|
1593
|
-
pattern="^[a-zA-Z0-
|
|
1594
|
-
description="Can include only alpha-numeric characters, "
|
|
1595
|
-
"dot '.' or hyphen '-' or underscore '_'; maximum 128 characters",
|
|
1082
|
+
pattern="^[a-zA-Z0-9_-]{1,128}$",
|
|
1083
|
+
description="Can include only alpha-numeric characters, hyphen '-' or underscore '_'; maximum 128 characters",
|
|
1596
1084
|
)
|
|
1597
1085
|
description: str = "default description"
|
|
1598
1086
|
type: str
|
|
@@ -1615,9 +1103,21 @@ class PolicyDefinitionGetResponse(PolicyDefinitionInfo):
|
|
|
1615
1103
|
|
|
1616
1104
|
class PolicyDefinitionEditResponse(BaseModel):
|
|
1617
1105
|
master_templates_affected: List[str] = Field(
|
|
1618
|
-
|
|
1106
|
+
default=[], serialization_alias="masterTemplatesAffected", validation_alias="masterTemplatesAffected"
|
|
1619
1107
|
)
|
|
1620
1108
|
|
|
1621
1109
|
|
|
1622
1110
|
class PolicyDefinitionPreview(BaseModel):
|
|
1623
1111
|
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: ...
|