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