catalystwan 0.40.1.dev6__py3-none-any.whl → 2.0.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- catalystwan/core/__init__.py +2 -0
- catalystwan/core/abstractions.py +26 -0
- catalystwan/{apigw_auth.py → core/apigw_auth.py} +29 -14
- catalystwan/core/client.py +71 -0
- catalystwan/core/encoder.py +12 -0
- catalystwan/{exceptions.py → core/exceptions.py} +29 -9
- catalystwan/core/loader.py +37 -0
- catalystwan/{__init__.py → core/metadata.py} +9 -22
- catalystwan/core/models/deserialize.py +203 -0
- catalystwan/core/models/serialize.py +137 -0
- catalystwan/core/request_adapter.py +246 -0
- catalystwan/{request_limiter.py → core/request_limiter.py} +1 -2
- catalystwan/{response.py → core/response.py} +38 -85
- catalystwan/{session.py → core/session.py} +84 -101
- catalystwan/core/types.py +33 -0
- catalystwan/{version.py → core/version.py} +3 -5
- catalystwan/{vmanage_auth.py → core/vmanage_auth.py} +46 -21
- catalystwan-2.0.0a0.dist-info/METADATA +327 -0
- catalystwan-2.0.0a0.dist-info/RECORD +24 -0
- {catalystwan-0.40.1.dev6.dist-info → catalystwan-2.0.0a0.dist-info}/WHEEL +2 -1
- catalystwan-2.0.0a0.dist-info/top_level.txt +1 -0
- catalystwan/abstractions.py +0 -77
- catalystwan/api/admin_tech_api.py +0 -176
- catalystwan/api/administration.py +0 -434
- catalystwan/api/alarms_api.py +0 -186
- catalystwan/api/api_container.py +0 -73
- catalystwan/api/basic_api.py +0 -338
- catalystwan/api/builders/__init__.py +0 -14
- catalystwan/api/builders/feature_profiles/application_priority.py +0 -58
- catalystwan/api/builders/feature_profiles/builder_factory.py +0 -59
- catalystwan/api/builders/feature_profiles/cli.py +0 -76
- catalystwan/api/builders/feature_profiles/other.py +0 -79
- catalystwan/api/builders/feature_profiles/report.py +0 -137
- catalystwan/api/builders/feature_profiles/service.py +0 -213
- catalystwan/api/builders/feature_profiles/system.py +0 -80
- catalystwan/api/builders/feature_profiles/transport.py +0 -214
- catalystwan/api/builders/feature_profiles/uc_voice.py +0 -287
- catalystwan/api/config_device_inventory_api.py +0 -58
- catalystwan/api/config_group_api.py +0 -150
- catalystwan/api/configuration_groups/parcel.py +0 -206
- catalystwan/api/dashboard_api.py +0 -215
- catalystwan/api/device_action_api.py +0 -216
- catalystwan/api/feature_profile_api.py +0 -2401
- catalystwan/api/logs_api.py +0 -63
- catalystwan/api/monitoring_status_api.py +0 -76
- catalystwan/api/mtt_aaa_api.py +0 -197
- catalystwan/api/omp_api.py +0 -124
- catalystwan/api/packet_capture_api.py +0 -152
- catalystwan/api/parcel_api.py +0 -42
- catalystwan/api/partition_manager_api.py +0 -143
- catalystwan/api/policy_api.py +0 -1163
- catalystwan/api/resource_pool_api.py +0 -74
- catalystwan/api/software_action_api.py +0 -269
- catalystwan/api/speedtest_api.py +0 -153
- catalystwan/api/task_status_api.py +0 -171
- catalystwan/api/template_api.py +0 -761
- catalystwan/api/templates/README.md +0 -101
- catalystwan/api/templates/bool_str.py +0 -6
- catalystwan/api/templates/cli_template.py +0 -236
- catalystwan/api/templates/device_template/device_template.py +0 -181
- catalystwan/api/templates/device_variable.py +0 -7
- catalystwan/api/templates/feature_template.py +0 -133
- catalystwan/api/templates/feature_template_field.py +0 -175
- catalystwan/api/templates/feature_template_payload.py +0 -17
- catalystwan/api/templates/models/aaa_model.py +0 -387
- catalystwan/api/templates/models/cisco_aaa_model.py +0 -331
- catalystwan/api/templates/models/cisco_banner_model.py +0 -27
- catalystwan/api/templates/models/cisco_bfd_model.py +0 -61
- catalystwan/api/templates/models/cisco_bgp_model.py +0 -510
- catalystwan/api/templates/models/cisco_logging_model.py +0 -122
- catalystwan/api/templates/models/cisco_ntp_model.py +0 -60
- catalystwan/api/templates/models/cisco_omp_model.py +0 -121
- catalystwan/api/templates/models/cisco_ospf.py +0 -241
- catalystwan/api/templates/models/cisco_ospfv3.py +0 -498
- catalystwan/api/templates/models/cisco_secure_internet_gateway.py +0 -385
- catalystwan/api/templates/models/cisco_snmp_model.py +0 -102
- catalystwan/api/templates/models/cisco_system.py +0 -318
- catalystwan/api/templates/models/cisco_vpn_interface_model.py +0 -822
- catalystwan/api/templates/models/cisco_vpn_model.py +0 -603
- catalystwan/api/templates/models/cli_template.py +0 -18
- catalystwan/api/templates/models/omp_vsmart_model.py +0 -73
- catalystwan/api/templates/models/security_vsmart_model.py +0 -28
- catalystwan/api/templates/models/supported.py +0 -42
- catalystwan/api/templates/models/system_vsmart_model.py +0 -182
- catalystwan/api/templates/models/vpn_vsmart_interface_model.py +0 -198
- catalystwan/api/templates/models/vpn_vsmart_model.py +0 -124
- catalystwan/api/templates/payloads/aaa/aaa_model.py +0 -91
- catalystwan/api/templates/payloads/aaa/feature/aaa.json.j2 +0 -373
- catalystwan/api/templates/payloads/aaa/feature/accounting.json.j2 +0 -40
- catalystwan/api/templates/payloads/aaa/feature/radius.json.j2 +0 -107
- catalystwan/api/templates/payloads/aaa/feature/tacacs.json.j2 +0 -95
- catalystwan/api/templates/payloads/aaa/feature/user.json.j2 +0 -60
- catalystwan/api/templates/payloads/cisco_vpn/cisco_vpn_model.py +0 -92
- catalystwan/api/templates/payloads/cisco_vpn/feature/cisco_vpn.json.j2 +0 -224
- catalystwan/api/templates/payloads/cisco_vpn/feature/dns.json.j2 +0 -86
- catalystwan/api/templates/payloads/cisco_vpn/feature/ipv4route.json.j2 +0 -59
- catalystwan/api/templates/payloads/cisco_vpn/feature/ipv6route.json.j2 +0 -58
- catalystwan/api/templates/payloads/cisco_vpn/feature/mapping.json.j2 +0 -24
- catalystwan/api/templates/payloads/tenant/tenant.json.j2 +0 -127
- catalystwan/api/templates/payloads/tenant/tenant_model.py +0 -43
- catalystwan/api/tenant_backup_restore_api.py +0 -154
- catalystwan/api/tenant_management_api.py +0 -127
- catalystwan/api/tenant_migration_api.py +0 -121
- catalystwan/api/versions_utils.py +0 -414
- catalystwan/api/virtual_image_action_api.py +0 -200
- catalystwan/dataclasses.py +0 -493
- catalystwan/endpoints/__init__.py +0 -606
- catalystwan/endpoints/administration_user_and_group.py +0 -341
- catalystwan/endpoints/api_gateway.py +0 -24
- catalystwan/endpoints/certificate_management_device.py +0 -137
- catalystwan/endpoints/certificate_management_vmanage.py +0 -48
- catalystwan/endpoints/client.py +0 -96
- catalystwan/endpoints/cluster_management.py +0 -130
- catalystwan/endpoints/configuration/device/software_update.py +0 -31
- catalystwan/endpoints/configuration/disaster_recovery.py +0 -305
- catalystwan/endpoints/configuration/feature_profile/sdwan/application_priority.py +0 -107
- catalystwan/endpoints/configuration/feature_profile/sdwan/cli.py +0 -60
- catalystwan/endpoints/configuration/feature_profile/sdwan/dns_security.py +0 -83
- catalystwan/endpoints/configuration/feature_profile/sdwan/embedded_security.py +0 -88
- catalystwan/endpoints/configuration/feature_profile/sdwan/other.py +0 -62
- catalystwan/endpoints/configuration/feature_profile/sdwan/policy_object.py +0 -105
- catalystwan/endpoints/configuration/feature_profile/sdwan/service.py +0 -137
- catalystwan/endpoints/configuration/feature_profile/sdwan/sig_security.py +0 -88
- catalystwan/endpoints/configuration/feature_profile/sdwan/system.py +0 -205
- catalystwan/endpoints/configuration/feature_profile/sdwan/topology.py +0 -93
- catalystwan/endpoints/configuration/feature_profile/sdwan/transport.py +0 -214
- catalystwan/endpoints/configuration/feature_profile/sdwan/uc_voice.py +0 -77
- catalystwan/endpoints/configuration/network_hierarchy.py +0 -32
- catalystwan/endpoints/configuration/policy/abstractions.py +0 -49
- catalystwan/endpoints/configuration/policy/definition/access_control_list.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/access_control_list_ipv6.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/aip.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/amp.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/app_route.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/cflowd.py +0 -46
- catalystwan/endpoints/configuration/policy/definition/control.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/device_access.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/device_access_ipv6.py +0 -59
- catalystwan/endpoints/configuration/policy/definition/dial_peer.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/dns_security.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/fxo_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/fxs_did_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/fxs_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/hub_and_spoke.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/intrusion_prevention.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/mesh.py +0 -53
- catalystwan/endpoints/configuration/policy/definition/pri_isdn_port.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/qos_map.py +0 -53
- catalystwan/endpoints/configuration/policy/definition/rewrite.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/route_policy.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/rule_set.py +0 -53
- catalystwan/endpoints/configuration/policy/definition/security_group.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/srst_phone_profile.py +0 -59
- catalystwan/endpoints/configuration/policy/definition/ssl_decryption.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/ssl_decryption_utd_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/definition/traffic_data.py +0 -58
- catalystwan/endpoints/configuration/policy/definition/url_filtering.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/vpn_membership.py +0 -57
- catalystwan/endpoints/configuration/policy/definition/vpn_qos_map.py +0 -50
- catalystwan/endpoints/configuration/policy/definition/zone_based_firewall.py +0 -57
- catalystwan/endpoints/configuration/policy/list/app.py +0 -48
- catalystwan/endpoints/configuration/policy/list/app_probe.py +0 -52
- catalystwan/endpoints/configuration/policy/list/as_path.py +0 -48
- catalystwan/endpoints/configuration/policy/list/class_map.py +0 -48
- catalystwan/endpoints/configuration/policy/list/color.py +0 -48
- catalystwan/endpoints/configuration/policy/list/community.py +0 -48
- catalystwan/endpoints/configuration/policy/list/data_ipv6_prefix.py +0 -52
- catalystwan/endpoints/configuration/policy/list/data_prefix.py +0 -48
- catalystwan/endpoints/configuration/policy/list/expanded_community.py +0 -52
- catalystwan/endpoints/configuration/policy/list/extended_community.py +0 -52
- catalystwan/endpoints/configuration/policy/list/fax_protocol.py +0 -48
- catalystwan/endpoints/configuration/policy/list/fqdn.py +0 -48
- catalystwan/endpoints/configuration/policy/list/geo_location.py +0 -48
- catalystwan/endpoints/configuration/policy/list/identity.py +0 -48
- catalystwan/endpoints/configuration/policy/list/ips_signature.py +0 -52
- catalystwan/endpoints/configuration/policy/list/ipv6_prefix.py +0 -48
- catalystwan/endpoints/configuration/policy/list/local_app.py +0 -48
- catalystwan/endpoints/configuration/policy/list/local_domain.py +0 -48
- catalystwan/endpoints/configuration/policy/list/media_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/list/mirror.py +0 -48
- catalystwan/endpoints/configuration/policy/list/modem_pass_through.py +0 -52
- catalystwan/endpoints/configuration/policy/list/policer.py +0 -48
- catalystwan/endpoints/configuration/policy/list/port.py +0 -48
- catalystwan/endpoints/configuration/policy/list/preferred_color_group.py +0 -52
- catalystwan/endpoints/configuration/policy/list/prefix.py +0 -49
- catalystwan/endpoints/configuration/policy/list/protocol_name.py +0 -52
- catalystwan/endpoints/configuration/policy/list/region.py +0 -47
- catalystwan/endpoints/configuration/policy/list/scalable_group_tag.py +0 -52
- catalystwan/endpoints/configuration/policy/list/site.py +0 -52
- catalystwan/endpoints/configuration/policy/list/sla.py +0 -48
- catalystwan/endpoints/configuration/policy/list/supervisory_disconnect.py +0 -52
- catalystwan/endpoints/configuration/policy/list/threat_grid_api_key.py +0 -52
- catalystwan/endpoints/configuration/policy/list/tloc.py +0 -48
- catalystwan/endpoints/configuration/policy/list/translation_profile.py +0 -52
- catalystwan/endpoints/configuration/policy/list/translation_rules.py +0 -52
- catalystwan/endpoints/configuration/policy/list/trunkgroup.py +0 -48
- catalystwan/endpoints/configuration/policy/list/umbrella_data.py +0 -52
- catalystwan/endpoints/configuration/policy/list/url_allow_list.py +0 -48
- catalystwan/endpoints/configuration/policy/list/url_block_list.py +0 -48
- catalystwan/endpoints/configuration/policy/list/vpn.py +0 -50
- catalystwan/endpoints/configuration/policy/list/zone.py +0 -48
- catalystwan/endpoints/configuration/policy/security_template.py +0 -55
- catalystwan/endpoints/configuration/policy/vedge_template.py +0 -52
- catalystwan/endpoints/configuration/policy/voice_template.py +0 -39
- catalystwan/endpoints/configuration/policy/vsmart_template.py +0 -79
- catalystwan/endpoints/configuration/policy_group.py +0 -30
- catalystwan/endpoints/configuration/software_actions.py +0 -201
- catalystwan/endpoints/configuration/topology_group.py +0 -51
- catalystwan/endpoints/configuration_dashboard_status.py +0 -127
- catalystwan/endpoints/configuration_device_actions.py +0 -385
- catalystwan/endpoints/configuration_device_inventory.py +0 -309
- catalystwan/endpoints/configuration_device_template.py +0 -39
- catalystwan/endpoints/configuration_feature_profile.py +0 -135
- catalystwan/endpoints/configuration_general_template.py +0 -31
- catalystwan/endpoints/configuration_group.py +0 -197
- catalystwan/endpoints/configuration_settings.py +0 -749
- catalystwan/endpoints/configuration_template_master.py +0 -48
- catalystwan/endpoints/endpoints_container.py +0 -279
- catalystwan/endpoints/misc.py +0 -21
- catalystwan/endpoints/monitoring/device_details.py +0 -246
- catalystwan/endpoints/monitoring/security_policy.py +0 -12
- catalystwan/endpoints/monitoring/server_info.py +0 -12
- catalystwan/endpoints/monitoring/status.py +0 -76
- catalystwan/endpoints/real_time_monitoring/reboot_history.py +0 -35
- catalystwan/endpoints/sdavc_cloud_connector.py +0 -43
- catalystwan/endpoints/tenant_backup_restore.py +0 -40
- catalystwan/endpoints/tenant_management.py +0 -215
- catalystwan/endpoints/tenant_migration.py +0 -102
- catalystwan/endpoints/troubleshooting_tools/device_connectivity.py +0 -128
- catalystwan/endpoints/url_monitoring.py +0 -26
- catalystwan/integration_tests/__init__.py +0 -0
- catalystwan/integration_tests/base.py +0 -81
- catalystwan/integration_tests/feature_profile/sdwan/__init__.py +0 -0
- catalystwan/integration_tests/feature_profile/sdwan/policy/__init__.py +0 -0
- catalystwan/integration_tests/feature_profile/sdwan/policy/base.py +0 -33
- catalystwan/integration_tests/feature_profile/sdwan/policy/test_extended_community.py +0 -33
- catalystwan/integration_tests/feature_profile/sdwan/policy/test_security_app_list.py +0 -32
- catalystwan/integration_tests/feature_profile/sdwan/test_application_priority.py +0 -433
- catalystwan/integration_tests/feature_profile/sdwan/test_cli.py +0 -54
- catalystwan/integration_tests/feature_profile/sdwan/test_dns_security.py +0 -106
- catalystwan/integration_tests/feature_profile/sdwan/test_other.py +0 -49
- catalystwan/integration_tests/feature_profile/sdwan/test_service.py +0 -1078
- catalystwan/integration_tests/feature_profile/sdwan/test_sig_security.py +0 -322
- catalystwan/integration_tests/feature_profile/sdwan/test_ssl_decryption.py +0 -85
- catalystwan/integration_tests/feature_profile/sdwan/test_system.py +0 -368
- catalystwan/integration_tests/feature_profile/sdwan/test_transport.py +0 -1700
- catalystwan/integration_tests/feature_profile/sdwan/topology/test_topology.py +0 -93
- catalystwan/integration_tests/profile_builder/__init__.py +0 -0
- catalystwan/integration_tests/profile_builder/test_pb_service.py +0 -78
- catalystwan/integration_tests/profile_builder/test_pb_transport.py +0 -56
- catalystwan/integration_tests/profile_builder/test_pb_uc_voice.py +0 -277
- catalystwan/integration_tests/test_data/__init__.py +0 -117
- catalystwan/integration_tests/test_find_template_values.py +0 -38
- catalystwan/integration_tests/test_network_hierarchy.py +0 -82
- catalystwan/integration_tests/test_settings.py +0 -30
- catalystwan/logging.conf +0 -37
- catalystwan/models/common.py +0 -1508
- catalystwan/models/configuration/common.py +0 -11
- catalystwan/models/configuration/feature_profile/README.md +0 -344
- catalystwan/models/configuration/feature_profile/builder.py +0 -22
- catalystwan/models/configuration/feature_profile/common.py +0 -749
- catalystwan/models/configuration/feature_profile/parcel.py +0 -232
- catalystwan/models/configuration/feature_profile/sdwan/acl/__init__.py +0 -13
- catalystwan/models/configuration/feature_profile/sdwan/acl/ipv4acl.py +0 -298
- catalystwan/models/configuration/feature_profile/sdwan/acl/ipv6acl.py +0 -344
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/__init__.py +0 -215
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/policy_settings.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/qos_policy.py +0 -102
- catalystwan/models/configuration/feature_profile/sdwan/application_priority/traffic_policy.py +0 -1054
- catalystwan/models/configuration/feature_profile/sdwan/cli/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/cli/config.py +0 -18
- catalystwan/models/configuration/feature_profile/sdwan/cli/full_config.py +0 -15
- catalystwan/models/configuration/feature_profile/sdwan/dns_security/__init__.py +0 -13
- catalystwan/models/configuration/feature_profile/sdwan/dns_security/dns.py +0 -107
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/ngfirewall.py +0 -915
- catalystwan/models/configuration/feature_profile/sdwan/embedded_security/policy.py +0 -171
- catalystwan/models/configuration/feature_profile/sdwan/other/__init__.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/other/thousandeyes.py +0 -147
- catalystwan/models/configuration/feature_profile/sdwan/other/ucse.py +0 -110
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/__init__.py +0 -175
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/app_probe.py +0 -56
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/application_list.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/as_path.py +0 -22
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/color_list.py +0 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/data_prefix.py +0 -35
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/expanded_community_list.py +0 -25
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/extended_community.py +0 -34
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/fowarding_class.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv6_data_prefix.py +0 -28
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/ipv6_prefix_list.py +0 -38
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/mirror.py +0 -27
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/policer.py +0 -42
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/prefered_group_color.py +0 -83
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/prefix_list.py +0 -28
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/sla_class.py +0 -130
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/standard_community.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/policy/tloc_list.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/aip.py +0 -64
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/amp.py +0 -79
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/application_list.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/data_prefix.py +0 -22
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/fqdn.py +0 -24
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/geolocation_list.py +0 -32
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/identity.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/intrusion_prevention.py +0 -58
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ips_signature.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/local_domain.py +0 -24
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/protocol_list.py +0 -21
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/scalable_group_tag.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/security_port.py +0 -45
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ssl_decryption.py +0 -126
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/ssl_decryption_profile.py +0 -165
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/url.py +0 -32
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/url_filtering.py +0 -148
- catalystwan/models/configuration/feature_profile/sdwan/policy_object/security/zone.py +0 -44
- catalystwan/models/configuration/feature_profile/sdwan/routing/__init__.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/routing/bgp.py +0 -594
- catalystwan/models/configuration/feature_profile/sdwan/routing/ospf.py +0 -170
- catalystwan/models/configuration/feature_profile/sdwan/routing/ospfv3.py +0 -298
- catalystwan/models/configuration/feature_profile/sdwan/service/__init__.py +0 -85
- catalystwan/models/configuration/feature_profile/sdwan/service/appqoe.py +0 -270
- catalystwan/models/configuration/feature_profile/sdwan/service/dhcp_server.py +0 -127
- catalystwan/models/configuration/feature_profile/sdwan/service/eigrp.py +0 -103
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/common.py +0 -33
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/ethernet.py +0 -275
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/gre.py +0 -136
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/ipsec.py +0 -119
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/multilink.py +0 -101
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/svi.py +0 -172
- catalystwan/models/configuration/feature_profile/sdwan/service/lan/vpn.py +0 -624
- catalystwan/models/configuration/feature_profile/sdwan/service/multicast.py +0 -242
- catalystwan/models/configuration/feature_profile/sdwan/service/object_tracker.py +0 -84
- catalystwan/models/configuration/feature_profile/sdwan/service/route_policy.py +0 -419
- catalystwan/models/configuration/feature_profile/sdwan/service/service_insertion_attachment.py +0 -184
- catalystwan/models/configuration/feature_profile/sdwan/service/switchport.py +0 -112
- catalystwan/models/configuration/feature_profile/sdwan/service/tracker.py +0 -92
- catalystwan/models/configuration/feature_profile/sdwan/service/wireless_lan.py +0 -216
- catalystwan/models/configuration/feature_profile/sdwan/sig_security/__init__.py +0 -19
- catalystwan/models/configuration/feature_profile/sdwan/sig_security/sig_security.py +0 -379
- catalystwan/models/configuration/feature_profile/sdwan/system/__init__.py +0 -59
- catalystwan/models/configuration/feature_profile/sdwan/system/aaa.py +0 -406
- catalystwan/models/configuration/feature_profile/sdwan/system/banner.py +0 -30
- catalystwan/models/configuration/feature_profile/sdwan/system/basic.py +0 -290
- catalystwan/models/configuration/feature_profile/sdwan/system/bfd.py +0 -69
- catalystwan/models/configuration/feature_profile/sdwan/system/device_access.py +0 -157
- catalystwan/models/configuration/feature_profile/sdwan/system/device_access_ipv6.py +0 -157
- catalystwan/models/configuration/feature_profile/sdwan/system/global_parcel.py +0 -149
- 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 -111
- catalystwan/models/configuration/feature_profile/sdwan/system/security.py +0 -179
- catalystwan/models/configuration/feature_profile/sdwan/system/snmp.py +0 -173
- catalystwan/models/configuration/feature_profile/sdwan/topology/__init__.py +0 -29
- catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py +0 -425
- catalystwan/models/configuration/feature_profile/sdwan/topology/hubspoke.py +0 -60
- catalystwan/models/configuration/feature_profile/sdwan/topology/mesh.py +0 -23
- catalystwan/models/configuration/feature_profile/sdwan/transport/__init__.py +0 -93
- catalystwan/models/configuration/feature_profile/sdwan/transport/cellular_controller.py +0 -58
- catalystwan/models/configuration/feature_profile/sdwan/transport/cellular_profile.py +0 -71
- catalystwan/models/configuration/feature_profile/sdwan/transport/gps.py +0 -37
- catalystwan/models/configuration/feature_profile/sdwan/transport/management/ethernet.py +0 -121
- catalystwan/models/configuration/feature_profile/sdwan/transport/t1e1controller.py +0 -124
- catalystwan/models/configuration/feature_profile/sdwan/transport/vpn.py +0 -285
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/cellular.py +0 -166
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/ethernet.py +0 -281
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/gre.py +0 -46
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/ipsec.py +0 -98
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/multilink.py +0 -219
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/protocol_over.py +0 -405
- catalystwan/models/configuration/feature_profile/sdwan/transport/wan/interface/t1e1serial.py +0 -195
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/__init__.py +0 -62
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/analog_interface.py +0 -436
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/call_routing.py +0 -179
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/digital_interface.py +0 -329
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/dsp_farm.py +0 -193
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/media_profile.py +0 -25
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/server_group.py +0 -51
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/srst.py +0 -86
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/supervisory_disconnect.py +0 -68
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/translation_profile.py +0 -42
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/translation_rule.py +0 -31
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/trunk_group.py +0 -26
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/voice_global.py +0 -55
- catalystwan/models/configuration/feature_profile/sdwan/uc_voice/voice_tenant.py +0 -40
- catalystwan/models/configuration/network_hierarchy/__init__.py +0 -22
- catalystwan/models/configuration/network_hierarchy/cflowd.py +0 -120
- catalystwan/models/configuration/network_hierarchy/node.py +0 -88
- catalystwan/models/configuration/policy_group.py +0 -74
- catalystwan/models/configuration/profile_type.py +0 -5
- catalystwan/models/configuration/topology_group.py +0 -52
- catalystwan/models/device_inventory.py +0 -30
- catalystwan/models/feature_profile_parcel.py +0 -15
- catalystwan/models/misc/application_protocols.py +0 -29
- catalystwan/models/monitoring/security_policy.py +0 -16
- catalystwan/models/monitoring/server_info.py +0 -12
- catalystwan/models/policy/__init__.py +0 -392
- catalystwan/models/policy/centralized.py +0 -265
- catalystwan/models/policy/definition/access_control_list.py +0 -193
- catalystwan/models/policy/definition/access_control_list_ipv6.py +0 -187
- catalystwan/models/policy/definition/aip.py +0 -60
- catalystwan/models/policy/definition/amp.py +0 -65
- catalystwan/models/policy/definition/app_route.py +0 -246
- catalystwan/models/policy/definition/cflowd.py +0 -95
- catalystwan/models/policy/definition/control.py +0 -366
- catalystwan/models/policy/definition/device_access.py +0 -117
- catalystwan/models/policy/definition/device_access_ipv6.py +0 -115
- catalystwan/models/policy/definition/dial_peer.py +0 -60
- catalystwan/models/policy/definition/dns_security.py +0 -130
- catalystwan/models/policy/definition/fxo_port.py +0 -63
- catalystwan/models/policy/definition/fxs_did_port.py +0 -58
- catalystwan/models/policy/definition/fxs_port.py +0 -56
- catalystwan/models/policy/definition/hub_and_spoke.py +0 -87
- catalystwan/models/policy/definition/intrusion_prevention.py +0 -55
- catalystwan/models/policy/definition/mesh.py +0 -47
- catalystwan/models/policy/definition/pri_isdn_port.py +0 -48
- catalystwan/models/policy/definition/qos_map.py +0 -111
- catalystwan/models/policy/definition/rewrite.py +0 -47
- catalystwan/models/policy/definition/route_policy.py +0 -187
- catalystwan/models/policy/definition/rule_set.py +0 -270
- catalystwan/models/policy/definition/security_group.py +0 -93
- catalystwan/models/policy/definition/srst_phone_profile.py +0 -37
- catalystwan/models/policy/definition/ssl_decryption.py +0 -209
- catalystwan/models/policy/definition/ssl_decryption_utd_profile.py +0 -87
- catalystwan/models/policy/definition/traffic_data.py +0 -496
- catalystwan/models/policy/definition/url_filtering.py +0 -70
- catalystwan/models/policy/definition/vpn_membership.py +0 -42
- catalystwan/models/policy/definition/vpn_qos_map.py +0 -46
- catalystwan/models/policy/definition/zone_based_firewall.py +0 -301
- catalystwan/models/policy/list/app.py +0 -44
- catalystwan/models/policy/list/app_probe.py +0 -42
- catalystwan/models/policy/list/as_path.py +0 -30
- catalystwan/models/policy/list/class_map.py +0 -30
- catalystwan/models/policy/list/color.py +0 -28
- catalystwan/models/policy/list/communities.py +0 -83
- catalystwan/models/policy/list/data_ipv6_prefix.py +0 -30
- catalystwan/models/policy/list/data_prefix.py +0 -30
- catalystwan/models/policy/list/fax_protocol.py +0 -45
- catalystwan/models/policy/list/fqdn.py +0 -24
- catalystwan/models/policy/list/geo_location.py +0 -33
- catalystwan/models/policy/list/identity.py +0 -29
- catalystwan/models/policy/list/ips_signature.py +0 -27
- catalystwan/models/policy/list/ipv6_prefix.py +0 -33
- catalystwan/models/policy/list/local_app.py +0 -45
- catalystwan/models/policy/list/local_domain.py +0 -36
- catalystwan/models/policy/list/media_profile.py +0 -44
- catalystwan/models/policy/list/mirror.py +0 -27
- catalystwan/models/policy/list/modem_pass_through.py +0 -27
- catalystwan/models/policy/list/policer.py +0 -39
- catalystwan/models/policy/list/port.py +0 -33
- catalystwan/models/policy/list/preferred_color_group.py +0 -82
- catalystwan/models/policy/list/prefix.py +0 -33
- catalystwan/models/policy/list/protocol_name.py +0 -26
- catalystwan/models/policy/list/region.py +0 -45
- catalystwan/models/policy/list/scalable_group_tag.py +0 -30
- catalystwan/models/policy/list/site.py +0 -34
- catalystwan/models/policy/list/sla.py +0 -77
- catalystwan/models/policy/list/supervisory_disconnect.py +0 -62
- catalystwan/models/policy/list/threat_grid_api_key.py +0 -32
- catalystwan/models/policy/list/tloc.py +0 -32
- catalystwan/models/policy/list/translation_profile.py +0 -32
- catalystwan/models/policy/list/translation_rules.py +0 -29
- catalystwan/models/policy/list/trunkgroup.py +0 -56
- catalystwan/models/policy/list/umbrella_data.py +0 -30
- catalystwan/models/policy/list/url.py +0 -39
- catalystwan/models/policy/list/vpn.py +0 -40
- catalystwan/models/policy/list/zone.py +0 -45
- catalystwan/models/policy/localized.py +0 -154
- catalystwan/models/policy/policy.py +0 -100
- catalystwan/models/policy/policy_definition.py +0 -1624
- catalystwan/models/policy/policy_list.py +0 -47
- catalystwan/models/policy/security.py +0 -279
- catalystwan/models/policy/voice.py +0 -71
- catalystwan/models/settings.py +0 -41
- catalystwan/models/templates.py +0 -79
- catalystwan/models/tenant.py +0 -105
- catalystwan/models/url_monitoring.py +0 -28
- catalystwan/tests/__init__.py +0 -0
- catalystwan/tests/builders/uc_voice.py +0 -85
- catalystwan/tests/models/__init__.py +0 -0
- catalystwan/tests/templates/__init__.py +0 -0
- catalystwan/tests/templates/definitions/__init__.py +0 -0
- catalystwan/tests/templates/definitions/aaa_basic.json +0 -96
- catalystwan/tests/templates/definitions/aaa_complex.json +0 -464
- catalystwan/tests/templates/definitions/basic/__init__.py +0 -0
- catalystwan/tests/templates/definitions/basic/alias.json +0 -7
- catalystwan/tests/templates/definitions/basic/basic.json +0 -7
- catalystwan/tests/templates/definitions/basic/basic_no_value.json +0 -7
- catalystwan/tests/templates/definitions/basic/children.json +0 -39
- catalystwan/tests/templates/definitions/basic/children_nested.json +0 -72
- catalystwan/tests/templates/definitions/basic/children_nested_datapath.json +0 -72
- catalystwan/tests/templates/definitions/basic/data_path.json +0 -13
- catalystwan/tests/templates/definitions/cisco_aaa.json +0 -178
- catalystwan/tests/templates/definitions/cisco_aaa_complex.json +0 -361
- catalystwan/tests/templates/definitions/cisco_banner.json +0 -20
- catalystwan/tests/templates/definitions/cisco_bfd.json +0 -90
- catalystwan/tests/templates/definitions/cisco_logging_complex.json +0 -268
- catalystwan/tests/templates/definitions/cisco_ntp_complex.json +0 -143
- catalystwan/tests/templates/definitions/cisco_omp_complex.json +0 -175
- catalystwan/tests/templates/definitions/cisco_ospf_complex.json +0 -302
- catalystwan/tests/templates/definitions/cisco_sig.json +0 -405
- catalystwan/tests/templates/definitions/cisco_snmp_complex.json +0 -258
- catalystwan/tests/templates/definitions/cisco_system_complex.json +0 -502
- catalystwan/tests/templates/definitions/cisco_vpn_basic.json +0 -17
- catalystwan/tests/templates/definitions/cisco_vpn_complex.json +0 -1081
- catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json +0 -821
- catalystwan/tests/templates/definitions/default_cisco_system.json +0 -184
- catalystwan/tests/templates/definitions/omp_vsmart_1.json +0 -26
- catalystwan/tests/templates/definitions/omp_vsmart_2.json +0 -48
- catalystwan/tests/templates/definitions/omp_vsmart_3.json +0 -71
- catalystwan/tests/templates/definitions/omp_vsmart_complex.json +0 -73
- catalystwan/tests/templates/definitions/security_vsmart_complex.json +0 -24
- catalystwan/tests/templates/definitions/system_vsmart_complex.json +0 -193
- catalystwan/tests/templates/definitions/vpn_vsmart_basic.json +0 -17
- catalystwan/tests/templates/definitions/vpn_vsmart_complex.json +0 -179
- catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json +0 -42
- catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json +0 -208
- catalystwan/tests/templates/models/__init__.py +0 -53
- catalystwan/tests/templates/models/aaa.py +0 -106
- catalystwan/tests/templates/models/cisco_aaa.py +0 -124
- catalystwan/tests/templates/models/cisco_banner.py +0 -7
- catalystwan/tests/templates/models/cisco_bfd.py +0 -15
- catalystwan/tests/templates/models/cisco_logging.py +0 -65
- catalystwan/tests/templates/models/cisco_ntp.py +0 -17
- catalystwan/tests/templates/models/cisco_omp.py +0 -37
- catalystwan/tests/templates/models/cisco_ospf.py +0 -60
- catalystwan/tests/templates/models/cisco_secure_internet_gateway.py +0 -95
- catalystwan/tests/templates/models/cisco_snmp.py +0 -40
- catalystwan/tests/templates/models/cisco_system.py +0 -113
- catalystwan/tests/templates/models/cisco_vpn.py +0 -240
- catalystwan/tests/templates/models/cisco_vpn_interface.py +0 -200
- catalystwan/tests/templates/models/omp_vsmart.py +0 -53
- catalystwan/tests/templates/models/security_vsmart.py +0 -11
- catalystwan/tests/templates/models/system_vsmart.py +0 -37
- catalystwan/tests/templates/models/vpn_vsmart.py +0 -32
- catalystwan/tests/templates/models/vpn_vsmart_interface.py +0 -54
- catalystwan/tests/templates/schemas/aaa.json +0 -1096
- catalystwan/tests/templates/schemas/basic/alias.json +0 -24
- catalystwan/tests/templates/schemas/basic/basic.json +0 -23
- catalystwan/tests/templates/schemas/basic/children.json +0 -59
- catalystwan/tests/templates/schemas/basic/children_nested.json +0 -112
- catalystwan/tests/templates/schemas/basic/children_nested_datapath.json +0 -112
- catalystwan/tests/templates/schemas/basic/data_path.json +0 -29
- catalystwan/tests/templates/schemas/cedge_aaa.json +0 -1185
- catalystwan/tests/templates/schemas/cisco_banner.json +0 -44
- catalystwan/tests/templates/schemas/cisco_bfd.json +0 -266
- catalystwan/tests/templates/schemas/cisco_logging.json +0 -577
- catalystwan/tests/templates/schemas/cisco_ntp.json +0 -265
- catalystwan/tests/templates/schemas/cisco_omp.json +0 -479
- catalystwan/tests/templates/schemas/cisco_ospf.json +0 -908
- catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json +0 -1520
- catalystwan/tests/templates/schemas/cisco_snmp.json +0 -561
- catalystwan/tests/templates/schemas/cisco_system.json +0 -3099
- catalystwan/tests/templates/schemas/cisco_vpn.json +0 -2504
- catalystwan/tests/templates/schemas/cisco_vpn_interface.json +0 -3348
- catalystwan/tests/templates/schemas/omp-vsmart.json +0 -222
- catalystwan/tests/templates/schemas/security-vsmart.json +0 -58
- catalystwan/tests/templates/schemas/system-vsmart.json +0 -2585
- catalystwan/tests/templates/schemas/vpn-vsmart-interface.json +0 -859
- catalystwan/tests/templates/schemas/vpn-vsmart.json +0 -445
- catalystwan/tests/templates/test_chose_model.py +0 -32
- catalystwan/tests/templates/test_deserialize_model.py +0 -69
- catalystwan/tests/templates/test_find_template_values.py +0 -193
- catalystwan/tests/templates/test_find_template_values_2.py +0 -193
- catalystwan/tests/templates/test_generate_payload.py +0 -137
- catalystwan/tests/templates/test_serialize_model.py +0 -52
- catalystwan/tests/test_admin_tech_api.py +0 -198
- catalystwan/tests/test_administration.py +0 -470
- catalystwan/tests/test_alarms_api.py +0 -251
- catalystwan/tests/test_cli_template.py +0 -218
- catalystwan/tests/test_creation_tools.py +0 -155
- catalystwan/tests/test_device_action_api.py +0 -117
- catalystwan/tests/test_devices_api.py +0 -674
- catalystwan/tests/test_endpoints.py +0 -907
- catalystwan/tests/test_feature_profile_api.py +0 -282
- catalystwan/tests/test_feature_template_field.py +0 -33
- catalystwan/tests/test_logs_api.py +0 -40
- catalystwan/tests/test_models_common.py +0 -53
- catalystwan/tests/test_monitoring_security_policy.py +0 -65
- catalystwan/tests/test_monitoring_server_info.py +0 -49
- catalystwan/tests/test_monitoring_status_api.py +0 -118
- catalystwan/tests/test_mtt_aaa_api.py +0 -293
- catalystwan/tests/test_omp_api.py +0 -438
- catalystwan/tests/test_packet_capture.py +0 -125
- catalystwan/tests/test_partition_manager_api.py +0 -121
- catalystwan/tests/test_response.py +0 -183
- catalystwan/tests/test_session.py +0 -102
- catalystwan/tests/test_software_action_api.py +0 -154
- catalystwan/tests/test_speed_test_api.py +0 -143
- catalystwan/tests/test_task_status_api.py +0 -381
- catalystwan/tests/test_templates.py +0 -405
- catalystwan/tests/test_tenant_backup_restore_api.py +0 -88
- catalystwan/tests/test_tenant_management_api.py +0 -153
- catalystwan/tests/test_tenant_migration_api.py +0 -102
- catalystwan/tests/test_typed_list.py +0 -426
- catalystwan/tests/test_url_monitoring.py +0 -80
- catalystwan/tests/test_version.py +0 -99
- catalystwan/tests/test_version_utils.py +0 -240
- catalystwan/tests/test_vmanage_auth.py +0 -149
- catalystwan/typed_list.py +0 -288
- catalystwan/utils/__init__.py +0 -0
- catalystwan/utils/alarm_status.py +0 -16
- catalystwan/utils/certificate_status.py +0 -13
- catalystwan/utils/colors.py +0 -12
- catalystwan/utils/config_status.py +0 -8
- catalystwan/utils/creation_tools.py +0 -136
- catalystwan/utils/dashboard.py +0 -255
- catalystwan/utils/device_model.py +0 -322
- catalystwan/utils/dict.py +0 -61
- catalystwan/utils/feature_template/choose_model.py +0 -30
- catalystwan/utils/feature_template/find_template_values.py +0 -111
- catalystwan/utils/model.py +0 -45
- catalystwan/utils/operation_status.py +0 -22
- catalystwan/utils/persona.py +0 -5
- catalystwan/utils/personality.py +0 -10
- catalystwan/utils/pydantic_field.py +0 -12
- catalystwan/utils/reachability.py +0 -14
- catalystwan/utils/session_type.py +0 -17
- catalystwan/utils/template_type.py +0 -8
- catalystwan/utils/type_check.py +0 -22
- catalystwan/utils/upgrades_helper.py +0 -95
- catalystwan/utils/validate_status.py +0 -8
- catalystwan/workflows/backup_restore_device_templates.py +0 -467
- catalystwan/workflows/tenant_migration.py +0 -203
- catalystwan-0.40.1.dev6.dist-info/METADATA +0 -539
- catalystwan-0.40.1.dev6.dist-info/RECORD +0 -618
- /catalystwan/{api → core/models}/__init__.py +0 -0
- /catalystwan/{api/builders/feature_profiles/__init__.py → core/py.typed} +0 -0
- {catalystwan-0.40.1.dev6.dist-info → catalystwan-2.0.0a0.dist-info}/LICENSE +0 -0
|
@@ -1,1700 +0,0 @@
|
|
|
1
|
-
# Copyright 2024 Cisco Systems, Inc. and its affiliates
|
|
2
|
-
from ipaddress import IPv4Address, IPv4Interface, IPv6Address, IPv6Interface
|
|
3
|
-
from typing import List, Literal
|
|
4
|
-
from uuid import UUID
|
|
5
|
-
|
|
6
|
-
from packaging.version import Version # type: ignore
|
|
7
|
-
|
|
8
|
-
from catalystwan.api.configuration_groups.parcel import Default, Global, Variable, as_global
|
|
9
|
-
from catalystwan.api.feature_profile_api import TransportFeatureProfileAPI
|
|
10
|
-
from catalystwan.integration_tests.base import TestCaseBase, create_name_with_run_id
|
|
11
|
-
from catalystwan.integration_tests.test_data import cellular_controller_parcel, cellular_profile_parcel, gps_parcel
|
|
12
|
-
from catalystwan.models.common import (
|
|
13
|
-
CableLengthLongValue,
|
|
14
|
-
CarrierType,
|
|
15
|
-
ClockRate,
|
|
16
|
-
CoreRegion,
|
|
17
|
-
E1Framing,
|
|
18
|
-
E1Linecode,
|
|
19
|
-
EncapType,
|
|
20
|
-
EthernetDuplexMode,
|
|
21
|
-
IkeCiphersuite,
|
|
22
|
-
IkeGroup,
|
|
23
|
-
IpsecCiphersuite,
|
|
24
|
-
LineMode,
|
|
25
|
-
SecondaryRegion,
|
|
26
|
-
T1Framing,
|
|
27
|
-
T1Linecode,
|
|
28
|
-
TLOCColor,
|
|
29
|
-
)
|
|
30
|
-
from catalystwan.models.configuration.feature_profile.common import AclQos, AddressWithMask, AdvancedGre, AllowService
|
|
31
|
-
from catalystwan.models.configuration.feature_profile.common import Arp as CommonArp
|
|
32
|
-
from catalystwan.models.configuration.feature_profile.common import ChannelGroup, DNSIPv4, DNSIPv6
|
|
33
|
-
from catalystwan.models.configuration.feature_profile.common import (
|
|
34
|
-
EthernetNatAttributesIpv4 as EthernetNatAttributesIpv4,
|
|
35
|
-
)
|
|
36
|
-
from catalystwan.models.configuration.feature_profile.common import (
|
|
37
|
-
HostMapping,
|
|
38
|
-
InterfaceStaticIPv4Address,
|
|
39
|
-
MultilinkAuthenticationType,
|
|
40
|
-
MultilinkClockSource,
|
|
41
|
-
MultilinkControllerTxExList,
|
|
42
|
-
MultilinkControllerType,
|
|
43
|
-
MultilinkMethod,
|
|
44
|
-
MultilinkNimList,
|
|
45
|
-
MultilinkTxExName,
|
|
46
|
-
MultiRegionFabric,
|
|
47
|
-
ShapingRateDownstreamConfig,
|
|
48
|
-
ShapingRateUpstreamConfig,
|
|
49
|
-
SourceLoopback,
|
|
50
|
-
StaticIPv4Address,
|
|
51
|
-
StaticIPv4AddressConfig,
|
|
52
|
-
StaticNat,
|
|
53
|
-
TunnelSourceType,
|
|
54
|
-
)
|
|
55
|
-
from catalystwan.models.configuration.feature_profile.sdwan.acl.ipv4acl import Ipv4AclParcel
|
|
56
|
-
from catalystwan.models.configuration.feature_profile.sdwan.acl.ipv6acl import Ipv6AclParcel
|
|
57
|
-
from catalystwan.models.configuration.feature_profile.sdwan.routing.bgp import AddressFamily as BgpAddressFamily
|
|
58
|
-
from catalystwan.models.configuration.feature_profile.sdwan.routing.bgp import (
|
|
59
|
-
AddressFamilyItem,
|
|
60
|
-
FamilyType,
|
|
61
|
-
Ipv6AddressFamily,
|
|
62
|
-
Ipv6AggregateAddres,
|
|
63
|
-
Ipv6NeighborItem,
|
|
64
|
-
Ipv6NetworkItem,
|
|
65
|
-
Ipv6RedistributeItem,
|
|
66
|
-
MaxPrefixConfigRestart,
|
|
67
|
-
NeighborItem,
|
|
68
|
-
NetworkItem,
|
|
69
|
-
RedistributeItem,
|
|
70
|
-
RoutingBgpParcel,
|
|
71
|
-
)
|
|
72
|
-
from catalystwan.models.configuration.feature_profile.sdwan.routing.ospf import RoutingOspfParcel
|
|
73
|
-
from catalystwan.models.configuration.feature_profile.sdwan.service.route_policy import RoutePolicyParcel
|
|
74
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.cellular_controller import (
|
|
75
|
-
CellularControllerParcel,
|
|
76
|
-
)
|
|
77
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.cellular_profile import CellularProfileParcel
|
|
78
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.gps import GpsParcel
|
|
79
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.management.ethernet import (
|
|
80
|
-
Advanced as ManagementEthernetAdvanced,
|
|
81
|
-
)
|
|
82
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.management.ethernet import (
|
|
83
|
-
InterfaceEthernetParcel as ManagementEthernetParcel,
|
|
84
|
-
)
|
|
85
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.management.ethernet import (
|
|
86
|
-
InterfaceStaticIPv6Address,
|
|
87
|
-
StaticIPv6Address,
|
|
88
|
-
StaticIPv6AddressConfig,
|
|
89
|
-
)
|
|
90
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.t1e1controller import (
|
|
91
|
-
E1,
|
|
92
|
-
T1,
|
|
93
|
-
CableLengthLong,
|
|
94
|
-
ClockSource,
|
|
95
|
-
ControllerTxExList,
|
|
96
|
-
ControllerType,
|
|
97
|
-
E1Basic,
|
|
98
|
-
Long,
|
|
99
|
-
T1Basic,
|
|
100
|
-
T1E1ControllerParcel,
|
|
101
|
-
)
|
|
102
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.vpn import (
|
|
103
|
-
Address64V4PoolItem,
|
|
104
|
-
Ipv4RouteItem,
|
|
105
|
-
Ipv6RouteItem,
|
|
106
|
-
ManagementVpnParcel,
|
|
107
|
-
NextHopItem,
|
|
108
|
-
OneOfIpRouteNull0,
|
|
109
|
-
Prefix,
|
|
110
|
-
ServiceItem,
|
|
111
|
-
ServiceType,
|
|
112
|
-
SubnetMask,
|
|
113
|
-
TransportVpnParcel,
|
|
114
|
-
)
|
|
115
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.cellular import (
|
|
116
|
-
Advanced as AdvancedCellular,
|
|
117
|
-
)
|
|
118
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.cellular import (
|
|
119
|
-
InterfaceCellularParcel,
|
|
120
|
-
NatAttributesIpv4,
|
|
121
|
-
)
|
|
122
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.cellular import (
|
|
123
|
-
Tunnel as TunnelCellular,
|
|
124
|
-
)
|
|
125
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.ethernet import (
|
|
126
|
-
Advanced as EthernetAdvanced,
|
|
127
|
-
)
|
|
128
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.ethernet import (
|
|
129
|
-
InterfaceEthernetParcel,
|
|
130
|
-
NatAttributesIpv6,
|
|
131
|
-
StaticNat66,
|
|
132
|
-
)
|
|
133
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.ethernet import (
|
|
134
|
-
Tunnel as TunnelEthernet,
|
|
135
|
-
)
|
|
136
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.gre import Basic, InterfaceGreParcel
|
|
137
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.ipsec import (
|
|
138
|
-
InterfaceIpsecParcel,
|
|
139
|
-
PerfectForwardSecrecy,
|
|
140
|
-
)
|
|
141
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.multilink import (
|
|
142
|
-
InterfaceMultilinkParcel,
|
|
143
|
-
)
|
|
144
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.protocol_over import (
|
|
145
|
-
AclQos as AclQosPPPoE,
|
|
146
|
-
)
|
|
147
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.protocol_over import (
|
|
148
|
-
Advanced as AdvancedPPPoE,
|
|
149
|
-
)
|
|
150
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.protocol_over import (
|
|
151
|
-
AtmInterface,
|
|
152
|
-
Chap,
|
|
153
|
-
Dynamic,
|
|
154
|
-
DynamicIntfIpAddress,
|
|
155
|
-
Ethernet,
|
|
156
|
-
InterfaceDslIPoEParcel,
|
|
157
|
-
InterfaceDslPPPoAParcel,
|
|
158
|
-
InterfaceDslPPPoEParcel,
|
|
159
|
-
InterfaceEthPPPoEParcel,
|
|
160
|
-
IPoEEthernet,
|
|
161
|
-
NatProp,
|
|
162
|
-
Pap,
|
|
163
|
-
Ppp,
|
|
164
|
-
)
|
|
165
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.protocol_over import (
|
|
166
|
-
Tunnel as TunnelPPPoE,
|
|
167
|
-
)
|
|
168
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.protocol_over import (
|
|
169
|
-
TunnelAdvancedOption,
|
|
170
|
-
VbrNrtConfig,
|
|
171
|
-
VbrRtConfig,
|
|
172
|
-
Vdsl,
|
|
173
|
-
VdslMode,
|
|
174
|
-
)
|
|
175
|
-
from catalystwan.models.configuration.feature_profile.sdwan.transport.wan.interface.t1e1serial import (
|
|
176
|
-
Advanced,
|
|
177
|
-
Encapsulation,
|
|
178
|
-
T1E1SerialParcel,
|
|
179
|
-
Tunnel,
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
class TestTransportFeatureProfileModels(TestCaseBase):
|
|
184
|
-
api: TransportFeatureProfileAPI
|
|
185
|
-
|
|
186
|
-
@classmethod
|
|
187
|
-
def setUpClass(cls) -> None:
|
|
188
|
-
super().setUpClass()
|
|
189
|
-
cls.api = cls.session.api.sdwan_feature_profiles.transport
|
|
190
|
-
cls.profile_uuid = cls.api.create_profile(create_name_with_run_id("TestTransportModels"), "Description").id
|
|
191
|
-
|
|
192
|
-
def test_update(self):
|
|
193
|
-
# Arrange
|
|
194
|
-
parcel = RoutePolicyParcel(
|
|
195
|
-
parcel_name="TestRoutePolicyParcel_ToUpdate",
|
|
196
|
-
parcel_description="Description",
|
|
197
|
-
)
|
|
198
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, parcel).id
|
|
199
|
-
# Act
|
|
200
|
-
parcel.parcel_name = "TestRoutePolicyParcel_Updated"
|
|
201
|
-
parcel_id = self.api.update_parcel(self.profile_uuid, parcel, parcel_id).id
|
|
202
|
-
# Assert
|
|
203
|
-
updated_parcel = self.api.get_parcel(self.profile_uuid, RoutePolicyParcel, parcel_id)
|
|
204
|
-
assert isinstance(updated_parcel.payload, RoutePolicyParcel)
|
|
205
|
-
assert updated_parcel.payload == parcel
|
|
206
|
-
|
|
207
|
-
def test_when_default_values_ospf_expect_successful_post(self):
|
|
208
|
-
# Arrange
|
|
209
|
-
ospf_parcel = RoutingOspfParcel(
|
|
210
|
-
parcel_name="TestOspfParcel-Defaults",
|
|
211
|
-
parcel_description="Test Ospf Parcel",
|
|
212
|
-
)
|
|
213
|
-
# Act
|
|
214
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, ospf_parcel).id
|
|
215
|
-
# Assert
|
|
216
|
-
parcel = self.api.get_parcel(self.profile_uuid, RoutingOspfParcel, parcel_id)
|
|
217
|
-
assert isinstance(parcel.payload, RoutingOspfParcel)
|
|
218
|
-
assert parcel.payload == ospf_parcel
|
|
219
|
-
|
|
220
|
-
def test_when_fully_specified_management_vpn_parcel_expect_successful_post(self):
|
|
221
|
-
# Arrange
|
|
222
|
-
management_vpn_parcel = ManagementVpnParcel(
|
|
223
|
-
parcel_name="FullySpecifiedManagementVpnParcel",
|
|
224
|
-
description="Description",
|
|
225
|
-
dns_ipv6=DNSIPv6(
|
|
226
|
-
primary_dns_address_ipv6=as_global(IPv6Address("67ca:c2df:edfe:c8ec:b6cb:f9f4:eab0:ece6")),
|
|
227
|
-
secondary_dns_address_ipv6=as_global(IPv6Address("8989:8d33:c00a:4d13:324d:8b23:8d77:a289")),
|
|
228
|
-
),
|
|
229
|
-
dns_ipv4=DNSIPv4(
|
|
230
|
-
primary_dns_address_ipv4=as_global(IPv4Address("68.138.29.222")),
|
|
231
|
-
secondary_dns_address_ipv4=as_global(IPv4Address("122.89.114.112")),
|
|
232
|
-
),
|
|
233
|
-
new_host_mapping=[
|
|
234
|
-
HostMapping(
|
|
235
|
-
host_name=as_global("FullySpecifiedHost"),
|
|
236
|
-
list_of_ips=as_global(
|
|
237
|
-
[
|
|
238
|
-
"165.16.181.116",
|
|
239
|
-
"7a4c:1d87:8587:a6ec:21a6:48a7:00e8:1fef",
|
|
240
|
-
]
|
|
241
|
-
),
|
|
242
|
-
)
|
|
243
|
-
],
|
|
244
|
-
ipv6_route=[
|
|
245
|
-
Ipv6RouteItem(
|
|
246
|
-
prefix=as_global(IPv6Interface("0::/16")),
|
|
247
|
-
one_of_ip_route=OneOfIpRouteNull0(),
|
|
248
|
-
)
|
|
249
|
-
],
|
|
250
|
-
ipv4_route=[
|
|
251
|
-
Ipv4RouteItem(
|
|
252
|
-
prefix=Prefix(
|
|
253
|
-
ip_address=as_global(IPv4Address("202.153.165.234")),
|
|
254
|
-
subnet_mask=as_global("255.255.255.0", SubnetMask),
|
|
255
|
-
),
|
|
256
|
-
next_hop=[
|
|
257
|
-
NextHopItem(
|
|
258
|
-
address=as_global(IPv4Address("1.1.1.1")),
|
|
259
|
-
)
|
|
260
|
-
],
|
|
261
|
-
)
|
|
262
|
-
],
|
|
263
|
-
)
|
|
264
|
-
# Act
|
|
265
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, management_vpn_parcel).id
|
|
266
|
-
# Assert
|
|
267
|
-
parcel = self.api.get_parcel(self.profile_uuid, ManagementVpnParcel, parcel_id)
|
|
268
|
-
assert isinstance(parcel.payload, ManagementVpnParcel)
|
|
269
|
-
assert parcel.payload == management_vpn_parcel
|
|
270
|
-
|
|
271
|
-
def test_when_fully_specified_t1e1controller_type_e1_parcel_expect_successful_post(self):
|
|
272
|
-
# Arrange
|
|
273
|
-
t1e1controller = T1E1ControllerParcel(
|
|
274
|
-
parcel_name="FullySpecifiedT1E1ControllerParcel_type_e1",
|
|
275
|
-
description="Description",
|
|
276
|
-
type=as_global("e1", ControllerType),
|
|
277
|
-
slot=as_global("TypeEOne"),
|
|
278
|
-
controller_tx_ex_list=[
|
|
279
|
-
ControllerTxExList(
|
|
280
|
-
basic=E1Basic(
|
|
281
|
-
e1=E1(
|
|
282
|
-
framing=as_global("crc4", E1Framing),
|
|
283
|
-
linecode=as_global("ami", E1Linecode),
|
|
284
|
-
)
|
|
285
|
-
),
|
|
286
|
-
channel_group=[
|
|
287
|
-
ChannelGroup(
|
|
288
|
-
number=as_global(12),
|
|
289
|
-
timeslots=as_global("1"),
|
|
290
|
-
)
|
|
291
|
-
],
|
|
292
|
-
clock_source=as_global("internal", ClockSource),
|
|
293
|
-
description=as_global("FullySpecifiedDescription"),
|
|
294
|
-
line_mode=as_global("primary", LineMode),
|
|
295
|
-
)
|
|
296
|
-
],
|
|
297
|
-
)
|
|
298
|
-
# Act
|
|
299
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, t1e1controller).id
|
|
300
|
-
# Assert
|
|
301
|
-
parcel = self.api.get_parcel(self.profile_uuid, T1E1ControllerParcel, parcel_id)
|
|
302
|
-
assert isinstance(parcel.payload, T1E1ControllerParcel)
|
|
303
|
-
assert parcel.payload == t1e1controller
|
|
304
|
-
|
|
305
|
-
def test_when_fully_specified_t1e1controller_type_t1_parcel_expect_successful_post(self):
|
|
306
|
-
# Arrange
|
|
307
|
-
t1e1controller = T1E1ControllerParcel(
|
|
308
|
-
parcel_name="FullySpecifiedT1E1ControllerParcel_type_t1",
|
|
309
|
-
description="Description",
|
|
310
|
-
type=as_global("t1", ControllerType),
|
|
311
|
-
slot=as_global("TypeTOne"),
|
|
312
|
-
controller_tx_ex_list=[
|
|
313
|
-
ControllerTxExList(
|
|
314
|
-
basic=T1Basic(
|
|
315
|
-
t1=T1(
|
|
316
|
-
framing=as_global("esf", T1Framing),
|
|
317
|
-
linecode=as_global("b8zs", T1Linecode),
|
|
318
|
-
)
|
|
319
|
-
),
|
|
320
|
-
cable=CableLengthLong(
|
|
321
|
-
cable_length=as_global("long", Long),
|
|
322
|
-
length_long=as_global("-15db", CableLengthLongValue),
|
|
323
|
-
),
|
|
324
|
-
channel_group=[
|
|
325
|
-
ChannelGroup(
|
|
326
|
-
number=as_global(12),
|
|
327
|
-
timeslots=as_global("1"),
|
|
328
|
-
)
|
|
329
|
-
],
|
|
330
|
-
clock_source=as_global("internal", ClockSource),
|
|
331
|
-
description=as_global("FullySpecifiedDescription"),
|
|
332
|
-
line_mode=as_global("primary", LineMode),
|
|
333
|
-
)
|
|
334
|
-
],
|
|
335
|
-
)
|
|
336
|
-
# Act
|
|
337
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, t1e1controller).id
|
|
338
|
-
# Assert
|
|
339
|
-
parcel = self.api.get_parcel(self.profile_uuid, T1E1ControllerParcel, parcel_id)
|
|
340
|
-
assert isinstance(parcel.payload, T1E1ControllerParcel)
|
|
341
|
-
assert parcel.payload == t1e1controller
|
|
342
|
-
|
|
343
|
-
def test_when_fully_specifed_gps_parcel_expect_successful_post(self):
|
|
344
|
-
# Act
|
|
345
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, gps_parcel).id
|
|
346
|
-
# Assert
|
|
347
|
-
parcel = self.api.get_parcel(self.profile_uuid, GpsParcel, parcel_id)
|
|
348
|
-
assert isinstance(parcel.payload, GpsParcel)
|
|
349
|
-
assert parcel.payload == gps_parcel
|
|
350
|
-
|
|
351
|
-
def test_when_fully_specifed_cellular_controller_expect_successful_post(self):
|
|
352
|
-
# Act
|
|
353
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, cellular_controller_parcel).id
|
|
354
|
-
# Assert
|
|
355
|
-
parcel = self.api.get_parcel(self.profile_uuid, CellularControllerParcel, parcel_id)
|
|
356
|
-
assert isinstance(parcel.payload, CellularControllerParcel)
|
|
357
|
-
assert parcel.payload == cellular_controller_parcel
|
|
358
|
-
|
|
359
|
-
def test_when_fully_specifed_cellular_profile_expect_successful_post(self):
|
|
360
|
-
# Act
|
|
361
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, cellular_profile_parcel).id
|
|
362
|
-
# Assert
|
|
363
|
-
parcel = self.api.get_parcel(self.profile_uuid, CellularProfileParcel, parcel_id)
|
|
364
|
-
assert isinstance(parcel.payload, CellularProfileParcel)
|
|
365
|
-
assert parcel.payload == cellular_profile_parcel
|
|
366
|
-
|
|
367
|
-
def test_when_default_values_acl_ipv4_expect_successful_post(self):
|
|
368
|
-
# Arrange
|
|
369
|
-
acl_ipv4_parcel = Ipv4AclParcel(
|
|
370
|
-
parcel_name="TestAclIpv4Parcel-Defaults",
|
|
371
|
-
parcel_description="Test Acl Ipv4 Parcel",
|
|
372
|
-
)
|
|
373
|
-
# Act
|
|
374
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, acl_ipv4_parcel).id
|
|
375
|
-
# Assert
|
|
376
|
-
parcel = self.api.get_parcel(self.profile_uuid, Ipv4AclParcel, parcel_id)
|
|
377
|
-
assert isinstance(parcel.payload, Ipv4AclParcel)
|
|
378
|
-
assert parcel.payload == acl_ipv4_parcel
|
|
379
|
-
|
|
380
|
-
def test_when_fully_specified_acl_ipv4_expect_successful_post(self):
|
|
381
|
-
# Arrange
|
|
382
|
-
acl_ipv4_parcel = Ipv4AclParcel(
|
|
383
|
-
parcel_name="TestAclIpv4Parcel-Full",
|
|
384
|
-
parcel_description="Test Acl Ipv4 Parcel",
|
|
385
|
-
)
|
|
386
|
-
# Arrange Sequence 1
|
|
387
|
-
seq1 = acl_ipv4_parcel.add_sequence("Sequence1", 10, "accept")
|
|
388
|
-
seq1.match_destination_data_prefix(IPv4Interface("10.0.0.0/16"))
|
|
389
|
-
seq1.match_dscp([50, 55])
|
|
390
|
-
seq1.match_icmp_msg(["dod-host-prohibited", "extended-echo", "dod-net-prohibited"])
|
|
391
|
-
seq1.match_packet_length((1000, 8000))
|
|
392
|
-
seq1.match_protocol([1])
|
|
393
|
-
seq1.match_source_data_prefix(IPv4Interface("11.0.0.0/16"))
|
|
394
|
-
# Arrange Sequence 2
|
|
395
|
-
seq2 = acl_ipv4_parcel.add_sequence("Sequence2", 20, "drop")
|
|
396
|
-
seq2.match_destination_data_prefix_variable("varDestPrefix2")
|
|
397
|
-
seq2.match_source_data_prefix_variable("varSrcPrefix2")
|
|
398
|
-
seq2.match_destination_ports([233])
|
|
399
|
-
seq2.match_source_ports([1, 3, (10, 100), (50, 200), 600])
|
|
400
|
-
# Act
|
|
401
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, acl_ipv4_parcel).id
|
|
402
|
-
# Assert
|
|
403
|
-
parcel = self.api.get_parcel(self.profile_uuid, Ipv4AclParcel, parcel_id)
|
|
404
|
-
assert isinstance(parcel.payload, Ipv4AclParcel)
|
|
405
|
-
assert parcel.payload == acl_ipv4_parcel
|
|
406
|
-
|
|
407
|
-
def test_when_default_values_acl_ipv6_expect_successful_post(self):
|
|
408
|
-
# Arrange
|
|
409
|
-
acl_ipv6_parcel = Ipv6AclParcel(
|
|
410
|
-
parcel_name="TestAclIpv6Parcel-Defaults",
|
|
411
|
-
parcel_description="Test Acl Ipv6 Parcel",
|
|
412
|
-
)
|
|
413
|
-
# Act
|
|
414
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, acl_ipv6_parcel).id
|
|
415
|
-
# Assert
|
|
416
|
-
parcel = self.api.get_parcel(self.profile_uuid, Ipv6AclParcel, parcel_id)
|
|
417
|
-
assert isinstance(parcel.payload, Ipv6AclParcel)
|
|
418
|
-
assert parcel.payload == acl_ipv6_parcel
|
|
419
|
-
|
|
420
|
-
def test_when_fully_specified_acl_ipv6_expect_successful_post(self):
|
|
421
|
-
# Arrange
|
|
422
|
-
acl_ipv6_parcel = Ipv6AclParcel(
|
|
423
|
-
parcel_name="TestAclIpv6Parcel-Full",
|
|
424
|
-
parcel_description="Test Acl Ipv6 Parcel",
|
|
425
|
-
)
|
|
426
|
-
# Arrange Sequence 1
|
|
427
|
-
seq1 = acl_ipv6_parcel.add_sequence("Sequence1", 10, "accept")
|
|
428
|
-
seq1.match_destination_data_prefix(IPv6Interface("2001:db8:abcd:0012::/64"))
|
|
429
|
-
seq1.match_icmp_msg(["cp-solicitation", "ind-advertisement"])
|
|
430
|
-
seq1.match_packet_length((1000, 8000))
|
|
431
|
-
seq1.match_source_data_prefix(IPv6Interface("2001:db8:1111:0012::/64"))
|
|
432
|
-
seq1.match_traffic_class([3])
|
|
433
|
-
# Arrange Sequence 2
|
|
434
|
-
seq2 = acl_ipv6_parcel.add_sequence("Sequence2", 20, "drop")
|
|
435
|
-
seq2.match_destination_ports([233])
|
|
436
|
-
seq2.match_source_ports([1, 3, (10, 100), (50, 200), 600])
|
|
437
|
-
# Act
|
|
438
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, acl_ipv6_parcel).id
|
|
439
|
-
# Assert
|
|
440
|
-
parcel = self.api.get_parcel(self.profile_uuid, Ipv6AclParcel, parcel_id)
|
|
441
|
-
assert isinstance(parcel.payload, Ipv6AclParcel)
|
|
442
|
-
assert parcel.payload == acl_ipv6_parcel
|
|
443
|
-
|
|
444
|
-
def test_when_fully_specified_routing_bgp_expect_successful_post(self):
|
|
445
|
-
# Arrange
|
|
446
|
-
bgp_parcel = RoutingBgpParcel(
|
|
447
|
-
parcel_name="TestRoutingBgpParcel",
|
|
448
|
-
parcel_description="Description",
|
|
449
|
-
as_num=Global[int](value=50),
|
|
450
|
-
router_id=Global[IPv4Address](value=IPv4Address("192.0.0.4")),
|
|
451
|
-
propagate_aspath=Global[bool](value=True),
|
|
452
|
-
propagate_community=Global[bool](value=True),
|
|
453
|
-
external=Global[int](value=255),
|
|
454
|
-
internal=Global[int](value=255),
|
|
455
|
-
local=Global[int](value=195),
|
|
456
|
-
keepalive=Global[int](value=200),
|
|
457
|
-
holdtime=Global[int](value=246),
|
|
458
|
-
always_compare=Global[bool](value=True),
|
|
459
|
-
deterministic=Global[bool](value=True),
|
|
460
|
-
missing_as_worst=Global[bool](value=True),
|
|
461
|
-
compare_router_id=Global[bool](value=False),
|
|
462
|
-
multipath_relax=Global[bool](value=True),
|
|
463
|
-
neighbor=[
|
|
464
|
-
NeighborItem(
|
|
465
|
-
address=Global[IPv4Address](value=IPv4Address("192.175.48.31")),
|
|
466
|
-
description=Global[str](value="sJQwaemlk"),
|
|
467
|
-
shutdown=Global[bool](value=True),
|
|
468
|
-
remote_as=Global[int](value=330),
|
|
469
|
-
local_as=Global[int](value=409),
|
|
470
|
-
keepalive=Global[int](value=500),
|
|
471
|
-
holdtime=Global[int](value=204),
|
|
472
|
-
if_name=Variable(value="{{lbgp_1_ipv4_conf_1_updateSrcIntf}}"),
|
|
473
|
-
next_hop_self=Global[bool](value=True),
|
|
474
|
-
send_community=Global[bool](value=True),
|
|
475
|
-
send_ext_community=Global[bool](value=False),
|
|
476
|
-
ebgp_multihop=Global[int](value=147),
|
|
477
|
-
password=None,
|
|
478
|
-
send_label=Global[bool](value=True),
|
|
479
|
-
as_override=Global[bool](value=False),
|
|
480
|
-
as_number=Variable(value="{{lbgp_1_ipv4_conf_1_asNumber}}"),
|
|
481
|
-
address_family=[
|
|
482
|
-
AddressFamilyItem(
|
|
483
|
-
family_type=Global[FamilyType](value="ipv4-unicast"),
|
|
484
|
-
max_prefix_config=MaxPrefixConfigRestart(
|
|
485
|
-
policy_type=Global[Literal["restart"]](value="restart"),
|
|
486
|
-
prefix_num=Global[int](value=11),
|
|
487
|
-
threshold=Global[int](value=10),
|
|
488
|
-
restart_interval=Global[int](value=10),
|
|
489
|
-
),
|
|
490
|
-
),
|
|
491
|
-
],
|
|
492
|
-
),
|
|
493
|
-
],
|
|
494
|
-
ipv6_neighbor=[
|
|
495
|
-
Ipv6NeighborItem(
|
|
496
|
-
address=Global[IPv6Address](value=IPv6Address("f555:b620:61fc:798a:ece3:4364:58c3:8656")),
|
|
497
|
-
description=Global[str](value="VOBWPfHlS"),
|
|
498
|
-
shutdown=Global[bool](value=True),
|
|
499
|
-
remote_as=Global[int](value=20),
|
|
500
|
-
local_as=Global[int](value=479),
|
|
501
|
-
keepalive=Global[int](value=165),
|
|
502
|
-
holdtime=Global[int](value=147),
|
|
503
|
-
if_name=Variable(value="{{lbgp_1_ipv6_conf_1_updateSrcIntf}}"),
|
|
504
|
-
next_hop_self=Global[bool](value=True),
|
|
505
|
-
send_community=Global[bool](value=True),
|
|
506
|
-
send_ext_community=Global[bool](value=False),
|
|
507
|
-
ebgp_multihop=Global[int](value=21),
|
|
508
|
-
password=None,
|
|
509
|
-
as_override=Global[bool](value=True),
|
|
510
|
-
as_number=Global[int](value=10),
|
|
511
|
-
address_family=[
|
|
512
|
-
AddressFamilyItem(
|
|
513
|
-
family_type=Global[FamilyType](value="ipv6-unicast"),
|
|
514
|
-
max_prefix_config=MaxPrefixConfigRestart(
|
|
515
|
-
policy_type=Global[Literal["restart"]](value="restart"),
|
|
516
|
-
prefix_num=Global[int](value=11),
|
|
517
|
-
threshold=Global[int](value=10),
|
|
518
|
-
restart_interval=Global[int](value=10),
|
|
519
|
-
),
|
|
520
|
-
),
|
|
521
|
-
],
|
|
522
|
-
)
|
|
523
|
-
],
|
|
524
|
-
address_family=BgpAddressFamily(
|
|
525
|
-
name=Default[None](value=None),
|
|
526
|
-
network=[
|
|
527
|
-
NetworkItem(
|
|
528
|
-
prefix=AddressWithMask(address=Variable(value="{{cYQ4ud15}}"), mask=Variable(value="{{LdKTD}}"))
|
|
529
|
-
)
|
|
530
|
-
],
|
|
531
|
-
paths=Global[int](value=32),
|
|
532
|
-
originate=Global[bool](value=True),
|
|
533
|
-
filter=Global[bool](value=True),
|
|
534
|
-
redistribute=[
|
|
535
|
-
RedistributeItem(
|
|
536
|
-
protocol=Global[Literal["static", "connected", "ospf", "ospfv3", "nat", "omp"]](value="ospf"),
|
|
537
|
-
)
|
|
538
|
-
],
|
|
539
|
-
),
|
|
540
|
-
ipv6_address_family=Ipv6AddressFamily(
|
|
541
|
-
ipv6_aggregate_address=[
|
|
542
|
-
Ipv6AggregateAddres(
|
|
543
|
-
prefix=Global[IPv6Interface](value=IPv6Interface("0::/16")),
|
|
544
|
-
as_set=Global[bool](value=True),
|
|
545
|
-
summary_only=Global[bool](value=False),
|
|
546
|
-
)
|
|
547
|
-
],
|
|
548
|
-
ipv6_network=[
|
|
549
|
-
Ipv6NetworkItem(prefix=Global[IPv6Interface](value=IPv6Interface("2002::/16"))),
|
|
550
|
-
],
|
|
551
|
-
paths=Global[int](value=2),
|
|
552
|
-
originate=Global[bool](value=True),
|
|
553
|
-
name=Default[None](value=None),
|
|
554
|
-
filter=Global[bool](value=True),
|
|
555
|
-
redistribute=[
|
|
556
|
-
Ipv6RedistributeItem(
|
|
557
|
-
protocol=Global[Literal["static", "connected", "ospf", "omp"]](value="connected"),
|
|
558
|
-
route_policy=Default[None](value=None),
|
|
559
|
-
)
|
|
560
|
-
],
|
|
561
|
-
),
|
|
562
|
-
)
|
|
563
|
-
# Act
|
|
564
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, bgp_parcel).id
|
|
565
|
-
# Assert
|
|
566
|
-
parcel = self.api.get_parcel(self.profile_uuid, RoutingBgpParcel, parcel_id)
|
|
567
|
-
assert isinstance(parcel.payload, RoutingBgpParcel)
|
|
568
|
-
assert parcel.payload == bgp_parcel
|
|
569
|
-
|
|
570
|
-
@classmethod
|
|
571
|
-
def tearDownClass(cls) -> None:
|
|
572
|
-
cls.api.delete_profile(cls.profile_uuid)
|
|
573
|
-
super().tearDownClass()
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
class TestTransportFeatureProfileTransportVpn(TestCaseBase):
|
|
577
|
-
def setUp(self) -> None:
|
|
578
|
-
self.api = self.session.api.sdwan_feature_profiles.transport
|
|
579
|
-
self.profile_uuid = self.api.create_profile(create_name_with_run_id("TestTransportVpn"), "Description").id
|
|
580
|
-
self.config_id = self.session.api.config_group.create(
|
|
581
|
-
create_name_with_run_id("TestConfigGroupTransport"), "Descr", "sdwan", [self.profile_uuid]
|
|
582
|
-
).id
|
|
583
|
-
|
|
584
|
-
def test_when_minimal_specifed_transport_vpn_parcel_expect_successful_post(self):
|
|
585
|
-
# Arrange
|
|
586
|
-
transport_vpn_parcel = TransportVpnParcel(
|
|
587
|
-
parcel_name="MinimumSpecifiedTransportVpnParcel",
|
|
588
|
-
description="Description",
|
|
589
|
-
)
|
|
590
|
-
# Act
|
|
591
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, transport_vpn_parcel).id
|
|
592
|
-
# Assert
|
|
593
|
-
parcel = self.api.get_parcel(self.profile_uuid, TransportVpnParcel, parcel_id)
|
|
594
|
-
assert isinstance(parcel.payload, TransportVpnParcel)
|
|
595
|
-
assert parcel.payload == transport_vpn_parcel
|
|
596
|
-
|
|
597
|
-
def test_when_set_dns_address_specifed_transport_vpn_parcel_expect_successful_post(self):
|
|
598
|
-
# Arrange
|
|
599
|
-
transport_vpn_parcel = TransportVpnParcel(
|
|
600
|
-
parcel_name="MinimumSpecifiedTransportVpnParcel",
|
|
601
|
-
description="Description",
|
|
602
|
-
)
|
|
603
|
-
# Act
|
|
604
|
-
transport_vpn_parcel.set_dns_ipv4(as_global(IPv4Address("1.1.1.1")), as_global(IPv4Address("2.2.2.2")))
|
|
605
|
-
|
|
606
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, transport_vpn_parcel).id
|
|
607
|
-
# Assert
|
|
608
|
-
parcel = self.api.get_parcel(self.profile_uuid, TransportVpnParcel, parcel_id)
|
|
609
|
-
assert isinstance(parcel.payload, TransportVpnParcel)
|
|
610
|
-
assert parcel.payload == transport_vpn_parcel
|
|
611
|
-
|
|
612
|
-
def test_when_add_ipv4_route_specifed_transport_vpn_parcel_expect_successful_post(self):
|
|
613
|
-
# Arrange
|
|
614
|
-
transport_vpn_parcel = TransportVpnParcel(
|
|
615
|
-
parcel_name="MinimumSpecifiedTransportVpnParcel",
|
|
616
|
-
description="Description",
|
|
617
|
-
)
|
|
618
|
-
# Act
|
|
619
|
-
next_hops = [
|
|
620
|
-
(as_global(IPv4Address("2.2.2.2")), as_global(1)),
|
|
621
|
-
(as_global(IPv4Address("3.3.3.3")), as_global(8)),
|
|
622
|
-
(as_global(IPv4Address("4.4.4.4")), as_global(10)),
|
|
623
|
-
]
|
|
624
|
-
transport_vpn_parcel.add_ipv4_route(
|
|
625
|
-
as_global(IPv4Address("1.1.1.1")), as_global("255.255.255.255", SubnetMask), next_hops
|
|
626
|
-
)
|
|
627
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, transport_vpn_parcel).id
|
|
628
|
-
|
|
629
|
-
# Assert
|
|
630
|
-
parcel = self.api.get_parcel(self.profile_uuid, TransportVpnParcel, parcel_id)
|
|
631
|
-
assert isinstance(parcel.payload, TransportVpnParcel)
|
|
632
|
-
assert parcel.payload == transport_vpn_parcel
|
|
633
|
-
|
|
634
|
-
def test_when_fully_specifed_transport_vpn_parcel_expect_successful_post(self):
|
|
635
|
-
# Arrange
|
|
636
|
-
transport_vpn_parcel = TransportVpnParcel(
|
|
637
|
-
parcel_name="FullySpecifiedTransportVpnParcel",
|
|
638
|
-
description="Description",
|
|
639
|
-
dns_ipv6=DNSIPv6(
|
|
640
|
-
primary_dns_address_ipv6=as_global(IPv6Address("67ca:c2df:edfe:c8ec:b6cb:f9f4:eab0:ece6")),
|
|
641
|
-
secondary_dns_address_ipv6=as_global(IPv6Address("8989:8d33:c00a:4d13:324d:8b23:8d77:a289")),
|
|
642
|
-
),
|
|
643
|
-
dns_ipv4=DNSIPv4(
|
|
644
|
-
primary_dns_address_ipv4=as_global(IPv4Address("68.138.29.222")),
|
|
645
|
-
secondary_dns_address_ipv4=as_global(IPv4Address("122.89.114.112")),
|
|
646
|
-
),
|
|
647
|
-
new_host_mapping=[
|
|
648
|
-
HostMapping(
|
|
649
|
-
host_name=as_global("FullySpecifiedHost"),
|
|
650
|
-
list_of_ips=as_global(
|
|
651
|
-
[
|
|
652
|
-
"165.16.181.116",
|
|
653
|
-
"7a4c:1d87:8587:a6ec:21a6:48a7:00e8:1fef",
|
|
654
|
-
]
|
|
655
|
-
),
|
|
656
|
-
)
|
|
657
|
-
],
|
|
658
|
-
ipv6_route=[
|
|
659
|
-
Ipv6RouteItem(
|
|
660
|
-
prefix=as_global(IPv6Interface("0::/16")),
|
|
661
|
-
one_of_ip_route=OneOfIpRouteNull0(),
|
|
662
|
-
)
|
|
663
|
-
],
|
|
664
|
-
ipv4_route=[
|
|
665
|
-
Ipv4RouteItem(
|
|
666
|
-
prefix=Prefix(
|
|
667
|
-
ip_address=as_global(IPv4Address("202.153.165.234")),
|
|
668
|
-
subnet_mask=as_global("255.255.255.0", SubnetMask),
|
|
669
|
-
),
|
|
670
|
-
next_hop=[NextHopItem(address=as_global(IPv4Address("1.1.1.1")), distance=as_global(8))],
|
|
671
|
-
)
|
|
672
|
-
],
|
|
673
|
-
service=[ServiceItem(service_type=as_global("TE", ServiceType))],
|
|
674
|
-
nat64_v4_pool=[
|
|
675
|
-
Address64V4PoolItem(
|
|
676
|
-
name=as_global("FullySpecifiedNat64V4Pool"),
|
|
677
|
-
range_start=as_global(IPv4Address("3.3.3.3")),
|
|
678
|
-
range_end=as_global(IPv4Address("3.3.3.7")),
|
|
679
|
-
overload=as_global(True),
|
|
680
|
-
)
|
|
681
|
-
],
|
|
682
|
-
)
|
|
683
|
-
# Act
|
|
684
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, transport_vpn_parcel).id
|
|
685
|
-
# Assert
|
|
686
|
-
parcel = self.api.get_parcel(self.profile_uuid, TransportVpnParcel, parcel_id)
|
|
687
|
-
assert isinstance(parcel.payload, TransportVpnParcel)
|
|
688
|
-
assert parcel.payload == transport_vpn_parcel
|
|
689
|
-
|
|
690
|
-
def tearDown(self) -> None:
|
|
691
|
-
self.session.api.config_group.delete(self.config_id)
|
|
692
|
-
self.api.delete_profile(self.profile_uuid)
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
class TestTransportFeatureProfileWanInterfaceModels(TestCaseBase):
|
|
696
|
-
wan_uuid: UUID
|
|
697
|
-
api: TransportFeatureProfileAPI
|
|
698
|
-
|
|
699
|
-
@classmethod
|
|
700
|
-
def setUpClass(cls) -> None:
|
|
701
|
-
super().setUpClass()
|
|
702
|
-
cls.api = cls.session.api.sdwan_feature_profiles.transport
|
|
703
|
-
cls.profile_uuid = cls.api.create_profile(create_name_with_run_id("TestTransportInterface"), "Description").id
|
|
704
|
-
cls.wan_uuid = cls.api.create_parcel(
|
|
705
|
-
cls.profile_uuid,
|
|
706
|
-
TransportVpnParcel(
|
|
707
|
-
parcel_name="TestTransportVpnParcel",
|
|
708
|
-
parcel_description="Description",
|
|
709
|
-
),
|
|
710
|
-
).id
|
|
711
|
-
|
|
712
|
-
def test_when_fully_specified_t1e1serial_interface_parcel_expect_successfull_post(self):
|
|
713
|
-
# Arrange
|
|
714
|
-
multi_region_fabric = MultiRegionFabric(
|
|
715
|
-
core_region=Global[CoreRegion](value="core-shared"),
|
|
716
|
-
enable_core_region=Global[bool](value=False),
|
|
717
|
-
enable_secondary_region=Global[bool](value=True),
|
|
718
|
-
secondary_region=Global[SecondaryRegion](value="secondary-shared"),
|
|
719
|
-
)
|
|
720
|
-
if Version("20.12") == self.session.api_version:
|
|
721
|
-
# {"Validation Errors":{"Not Defined In Schema Attributes":["data.multiRegionFabric"]}}
|
|
722
|
-
multi_region_fabric = None
|
|
723
|
-
|
|
724
|
-
t1e1serial = T1E1SerialParcel(
|
|
725
|
-
parcel_name="T1E1FullySpecifiedParcel",
|
|
726
|
-
parcel_description="Description",
|
|
727
|
-
interface_name=Global[str](value="Serial3"),
|
|
728
|
-
address_v4=AddressWithMask(
|
|
729
|
-
address=Global[IPv4Address](value=IPv4Address("1.1.1.1")), mask=Variable(value="{{NQokHq}}")
|
|
730
|
-
),
|
|
731
|
-
address_v6=Variable(value="{{i4i}}"),
|
|
732
|
-
advanced=Advanced(
|
|
733
|
-
ip_mtu=Global[int](value=1500),
|
|
734
|
-
mtu=Global[int](value=1500),
|
|
735
|
-
tcp_mss_adjust=Variable(value="{{f}}"),
|
|
736
|
-
tloc_extension=Global[str](value="322"),
|
|
737
|
-
),
|
|
738
|
-
allow_service=AllowService(
|
|
739
|
-
bfd=Variable(value="{{GfwsBdVoSy7O8ABos}}"),
|
|
740
|
-
bgp=Global[bool](value=True),
|
|
741
|
-
dhcp=Global[bool](value=False),
|
|
742
|
-
dns=Variable(value="{{3so}}"),
|
|
743
|
-
https=Global[bool](value=True),
|
|
744
|
-
icmp=Variable(value="{{n2Qz.wW}}"),
|
|
745
|
-
netconf=Variable(value="{{0}}"),
|
|
746
|
-
ntp=Global[bool](value=True),
|
|
747
|
-
ospf=Global[bool](value=True),
|
|
748
|
-
snmp=Global[bool](value=False),
|
|
749
|
-
sshd=Variable(value="{{56lx}}"),
|
|
750
|
-
stun=Global[bool](value=True),
|
|
751
|
-
),
|
|
752
|
-
bandwidth=Variable(value="{{w}}"),
|
|
753
|
-
bandwidth_downstream=Global[int](value=34),
|
|
754
|
-
clock_rate=Variable(value="{{9_h.ePd}}"),
|
|
755
|
-
encapsulation=[
|
|
756
|
-
Encapsulation(
|
|
757
|
-
encap=Global[EncapType](value="gre"),
|
|
758
|
-
preference=Variable(value="{{I9]LwyD45eQIry]Z}}"),
|
|
759
|
-
weight=Global[int](value=32),
|
|
760
|
-
),
|
|
761
|
-
Encapsulation(
|
|
762
|
-
encap=Global[EncapType](value="ipsec"),
|
|
763
|
-
preference=Variable(value="{{I9]LwyD45eQIry]Z}}"),
|
|
764
|
-
weight=Global[int](value=2),
|
|
765
|
-
),
|
|
766
|
-
Encapsulation(
|
|
767
|
-
encap=Global[EncapType](value="gre"),
|
|
768
|
-
preference=Default[None](value=None),
|
|
769
|
-
weight=Global[int](value=112),
|
|
770
|
-
),
|
|
771
|
-
],
|
|
772
|
-
encapsulation_serial=Variable(value="{{A8/8w4Qr}}"),
|
|
773
|
-
multi_region_fabric=multi_region_fabric,
|
|
774
|
-
shutdown=Global[bool](value=True),
|
|
775
|
-
tunnel=Tunnel(
|
|
776
|
-
bind=Global[str](value="3123"),
|
|
777
|
-
border=Variable(value="{{k0Ci4g}}"),
|
|
778
|
-
carrier=Variable(value="{{SyMR13Poi}}"),
|
|
779
|
-
clear_dont_fragment=Global[bool](value=False),
|
|
780
|
-
color=Variable(value="{{ivc}}"),
|
|
781
|
-
exclude_controller_group_list=Variable(value="{{z][Ih}}"),
|
|
782
|
-
group=Variable(value="{{WlfX}}"),
|
|
783
|
-
hello_interval=Global[int](value=1000),
|
|
784
|
-
hello_tolerance=Global[int](value=123),
|
|
785
|
-
last_resort_circuit=Global[bool](value=True),
|
|
786
|
-
low_bandwidth_link=Global[bool](value=True),
|
|
787
|
-
max_control_connections=Global[int](value=0),
|
|
788
|
-
mode=Global[Literal["spoke"]](value="spoke"),
|
|
789
|
-
nat_refresh_interval=Global[int](value=3),
|
|
790
|
-
network_broadcast=Global[bool](value=True),
|
|
791
|
-
per_tunnel_qos=Global[bool](value=True),
|
|
792
|
-
per_tunnel_qos_aggregator=Global[bool](value=True),
|
|
793
|
-
port_hop=Global[bool](value=True),
|
|
794
|
-
restrict=Global[bool](value=True),
|
|
795
|
-
vbond_as_stun_server=Global[bool](value=True),
|
|
796
|
-
vmanage_connection_preference=Global[int](value=3),
|
|
797
|
-
),
|
|
798
|
-
tunnel_interface=Global[bool](value=True),
|
|
799
|
-
)
|
|
800
|
-
# Act
|
|
801
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, t1e1serial, self.wan_uuid).id
|
|
802
|
-
# Assert
|
|
803
|
-
parcel = self.api.get_parcel(self.profile_uuid, T1E1SerialParcel, parcel_id, self.wan_uuid)
|
|
804
|
-
assert isinstance(parcel.payload, T1E1SerialParcel)
|
|
805
|
-
assert parcel.payload == t1e1serial
|
|
806
|
-
|
|
807
|
-
def test_when_fully_specified_ethpppoe_interface_parcel_expect_successfull_post(self):
|
|
808
|
-
# Arrange
|
|
809
|
-
ethpppoe_parcel = InterfaceEthPPPoEParcel(
|
|
810
|
-
parcel_name="InterfaceEthPPPoEParcel",
|
|
811
|
-
parcel_description="Description",
|
|
812
|
-
acl_qos=AclQosPPPoE(
|
|
813
|
-
adapt_period=Global[int](value=436),
|
|
814
|
-
adaptive_qos=Global[bool](value=True),
|
|
815
|
-
shaping_rate=Global[int](value=295),
|
|
816
|
-
shaping_rate_downstream=Global[bool](value=False),
|
|
817
|
-
shaping_rate_downstream_config=ShapingRateDownstreamConfig(
|
|
818
|
-
default_shaping_rate_downstream=Global[int](value=500),
|
|
819
|
-
max_shaping_rate_downstream=Global[int](value=77),
|
|
820
|
-
min_shaping_rate_downstream=Global[int](value=328),
|
|
821
|
-
),
|
|
822
|
-
shaping_rate_upstream=Global[bool](value=True),
|
|
823
|
-
shaping_rate_upstream_config=ShapingRateUpstreamConfig(
|
|
824
|
-
default_shaping_rate_upstream=Global[int](value=403),
|
|
825
|
-
max_shaping_rate_upstream=Global[int](value=82),
|
|
826
|
-
min_shaping_rate_upstream=Global[int](value=101),
|
|
827
|
-
),
|
|
828
|
-
),
|
|
829
|
-
advanced=AdvancedPPPoE(
|
|
830
|
-
ip_directed_broadcast=Global[bool](value=True),
|
|
831
|
-
ip_mtu=Global[int](value=1500),
|
|
832
|
-
tcp_mss=Global[int](value=560),
|
|
833
|
-
tloc_extension=Global[str](value="FBVQf"),
|
|
834
|
-
),
|
|
835
|
-
bandwidth_downstream=Global[int](value=102),
|
|
836
|
-
bandwidth_upstream=Global[int](value=267),
|
|
837
|
-
ethernet=Ethernet(
|
|
838
|
-
if_name=Global[str](value="Ethernet1"),
|
|
839
|
-
description=Global[str](value="ABAAABB"),
|
|
840
|
-
vlan_id=Global[int](value=266),
|
|
841
|
-
),
|
|
842
|
-
multi_region_fabric=MultiRegionFabric(
|
|
843
|
-
core_region=Global[Literal["core", "core-shared"]](value="core"),
|
|
844
|
-
enable_core_region=Global[bool](value=True),
|
|
845
|
-
),
|
|
846
|
-
nat_prop=NatProp(
|
|
847
|
-
nat=Global[bool](value=True), tcp_timeout=Global[int](value=301), udp_timeout=Global[int](value=11)
|
|
848
|
-
),
|
|
849
|
-
ppp=Ppp(
|
|
850
|
-
dial_pool_number=Global[int](value=2),
|
|
851
|
-
method=Global[Literal["chap", "pap", "papandchap"]](value="chap"),
|
|
852
|
-
callin=Global[Literal["Bidirectional", "Unidirectional"]](value="Bidirectional"),
|
|
853
|
-
chap=Chap(hostname=Global[str](value="BBXwBBB"), ppp_auth_password=Global[str](value="BRyKDwlPkn")),
|
|
854
|
-
pap=Pap(ppp_auth_password=Global[str](value="sAZWrMiNhD"), username=Global[str](value="BAAAAOZNQI")),
|
|
855
|
-
ppp_max_payload=Global[int](value=276),
|
|
856
|
-
),
|
|
857
|
-
service_provider=Global[str](value="MaBNDCAFdb"),
|
|
858
|
-
shutdown=Global[bool](value=True),
|
|
859
|
-
tunnel=TunnelPPPoE(
|
|
860
|
-
bandwidth_percent=Global[int](value=43),
|
|
861
|
-
border=Global[bool](value=False),
|
|
862
|
-
clear_dont_fragment=Global[bool](value=False),
|
|
863
|
-
color=Global[TLOCColor](value="private5"),
|
|
864
|
-
low_bandwidth_link=Global[bool](value=False),
|
|
865
|
-
max_control_connections=Global[int](value=5),
|
|
866
|
-
mode=Global[Literal["hub", "spoke"]](value="hub"),
|
|
867
|
-
network_broadcast=Global[bool](value=True),
|
|
868
|
-
per_tunnel_qos=Global[bool](value=True),
|
|
869
|
-
port_hop=Global[bool](value=False),
|
|
870
|
-
restrict=Global[bool](value=True),
|
|
871
|
-
tunnel_interface=Global[bool](value=True),
|
|
872
|
-
tunnel_tcp_mss_adjust=Global[int](value=600),
|
|
873
|
-
vbond_as_stun_server=Global[bool](value=True),
|
|
874
|
-
vmanage_connection_preference=Global[int](value=2),
|
|
875
|
-
),
|
|
876
|
-
tunnel_advanced_option=TunnelAdvancedOption(
|
|
877
|
-
bind=Global[str](value="BAAREAA"),
|
|
878
|
-
carrier=Global[CarrierType](value="carrier8"),
|
|
879
|
-
gre_encap=Global[bool](value=True),
|
|
880
|
-
gre_preference=Global[int](value=266),
|
|
881
|
-
gre_weight=Global[int](value=11),
|
|
882
|
-
hello_interval=Global[int](value=329),
|
|
883
|
-
hello_tolerance=Global[int](value=373),
|
|
884
|
-
ipsec_encap=Global[bool](value=True),
|
|
885
|
-
ipsec_preference=Global[int](value=163),
|
|
886
|
-
ipsec_weight=Global[int](value=244),
|
|
887
|
-
last_resort_circuit=Global[bool](value=False),
|
|
888
|
-
nat_refresh_interval=Global[int](value=30),
|
|
889
|
-
),
|
|
890
|
-
tunnel_allow_service=AllowService(
|
|
891
|
-
all=Global[bool](value=False),
|
|
892
|
-
bgp=Global[bool](value=False),
|
|
893
|
-
dhcp=Global[bool](value=False),
|
|
894
|
-
dns=Global[bool](value=False),
|
|
895
|
-
https=Global[bool](value=True),
|
|
896
|
-
icmp=Global[bool](value=False),
|
|
897
|
-
netconf=Global[bool](value=True),
|
|
898
|
-
ntp=Global[bool](value=False),
|
|
899
|
-
ospf=Global[bool](value=False),
|
|
900
|
-
snmp=Global[bool](value=False),
|
|
901
|
-
sshd=Global[bool](value=False),
|
|
902
|
-
stun=Global[bool](value=False),
|
|
903
|
-
),
|
|
904
|
-
)
|
|
905
|
-
# Act
|
|
906
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, ethpppoe_parcel, self.wan_uuid).id
|
|
907
|
-
# Assert
|
|
908
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceEthPPPoEParcel, parcel_id, self.wan_uuid)
|
|
909
|
-
assert isinstance(parcel.payload, InterfaceEthPPPoEParcel)
|
|
910
|
-
assert parcel.payload == ethpppoe_parcel
|
|
911
|
-
|
|
912
|
-
def test_when_fully_specified_dslpppoe_interface_parcel_expect_successfull_post(self):
|
|
913
|
-
# Arrange
|
|
914
|
-
ethpppoe_parcel = InterfaceDslPPPoEParcel(
|
|
915
|
-
parcel_name="InterfaceDslPPPoEParcel",
|
|
916
|
-
parcel_description="Description",
|
|
917
|
-
acl_qos=AclQosPPPoE(
|
|
918
|
-
adapt_period=Global[int](value=436),
|
|
919
|
-
adaptive_qos=Global[bool](value=True),
|
|
920
|
-
shaping_rate=Global[int](value=295),
|
|
921
|
-
shaping_rate_downstream=Global[bool](value=False),
|
|
922
|
-
shaping_rate_downstream_config=ShapingRateDownstreamConfig(
|
|
923
|
-
default_shaping_rate_downstream=Global[int](value=500),
|
|
924
|
-
max_shaping_rate_downstream=Global[int](value=77),
|
|
925
|
-
min_shaping_rate_downstream=Global[int](value=328),
|
|
926
|
-
),
|
|
927
|
-
shaping_rate_upstream=Global[bool](value=True),
|
|
928
|
-
shaping_rate_upstream_config=ShapingRateUpstreamConfig(
|
|
929
|
-
default_shaping_rate_upstream=Global[int](value=403),
|
|
930
|
-
max_shaping_rate_upstream=Global[int](value=82),
|
|
931
|
-
min_shaping_rate_upstream=Global[int](value=101),
|
|
932
|
-
),
|
|
933
|
-
),
|
|
934
|
-
advanced=AdvancedPPPoE(
|
|
935
|
-
ip_directed_broadcast=Global[bool](value=True),
|
|
936
|
-
ip_mtu=Global[int](value=1500),
|
|
937
|
-
tcp_mss=Global[int](value=560),
|
|
938
|
-
tloc_extension=Global[str](value="FBVQf"),
|
|
939
|
-
),
|
|
940
|
-
bandwidth_downstream=Global[int](value=102),
|
|
941
|
-
bandwidth_upstream=Global[int](value=267),
|
|
942
|
-
ethernet=Ethernet(
|
|
943
|
-
if_name=Global[str](value="Ethernet1"),
|
|
944
|
-
description=Global[str](value="ABAAABB"),
|
|
945
|
-
vlan_id=Global[int](value=266),
|
|
946
|
-
),
|
|
947
|
-
multi_region_fabric=MultiRegionFabric(
|
|
948
|
-
core_region=Global[Literal["core", "core-shared"]](value="core"),
|
|
949
|
-
enable_core_region=Global[bool](value=True),
|
|
950
|
-
),
|
|
951
|
-
nat_prop=NatProp(
|
|
952
|
-
nat=Global[bool](value=True), tcp_timeout=Global[int](value=301), udp_timeout=Global[int](value=11)
|
|
953
|
-
),
|
|
954
|
-
ppp=Ppp(
|
|
955
|
-
dial_pool_number=Global[int](value=2),
|
|
956
|
-
method=Global[Literal["chap", "pap", "papandchap"]](value="chap"),
|
|
957
|
-
callin=Global[Literal["Bidirectional", "Unidirectional"]](value="Bidirectional"),
|
|
958
|
-
chap=Chap(hostname=Global[str](value="BBXwBBB"), ppp_auth_password=Global[str](value="BRyKDwlPkn")),
|
|
959
|
-
pap=Pap(ppp_auth_password=Global[str](value="sAZWrMiNhD"), username=Global[str](value="BAAAAOZNQI")),
|
|
960
|
-
ppp_max_payload=Global[int](value=276),
|
|
961
|
-
),
|
|
962
|
-
service_provider=Global[str](value="MaBNDCAFdb"),
|
|
963
|
-
shutdown=Global[bool](value=True),
|
|
964
|
-
tunnel=TunnelPPPoE(
|
|
965
|
-
bandwidth_percent=Global[int](value=43),
|
|
966
|
-
border=Global[bool](value=False),
|
|
967
|
-
clear_dont_fragment=Global[bool](value=False),
|
|
968
|
-
color=Global[TLOCColor](value="private5"),
|
|
969
|
-
low_bandwidth_link=Global[bool](value=False),
|
|
970
|
-
max_control_connections=Global[int](value=5),
|
|
971
|
-
mode=Global[Literal["hub", "spoke"]](value="hub"),
|
|
972
|
-
network_broadcast=Global[bool](value=True),
|
|
973
|
-
per_tunnel_qos=Global[bool](value=True),
|
|
974
|
-
port_hop=Global[bool](value=False),
|
|
975
|
-
restrict=Global[bool](value=True),
|
|
976
|
-
tunnel_interface=Global[bool](value=True),
|
|
977
|
-
tunnel_tcp_mss_adjust=Global[int](value=600),
|
|
978
|
-
vbond_as_stun_server=Global[bool](value=True),
|
|
979
|
-
vmanage_connection_preference=Global[int](value=2),
|
|
980
|
-
),
|
|
981
|
-
tunnel_advanced_option=TunnelAdvancedOption(
|
|
982
|
-
bind=Global[str](value="BAAREAA"),
|
|
983
|
-
carrier=Global[CarrierType](value="carrier8"),
|
|
984
|
-
gre_encap=Global[bool](value=True),
|
|
985
|
-
gre_preference=Global[int](value=266),
|
|
986
|
-
gre_weight=Global[int](value=11),
|
|
987
|
-
hello_interval=Global[int](value=329),
|
|
988
|
-
hello_tolerance=Global[int](value=373),
|
|
989
|
-
ipsec_encap=Global[bool](value=True),
|
|
990
|
-
ipsec_preference=Global[int](value=163),
|
|
991
|
-
ipsec_weight=Global[int](value=244),
|
|
992
|
-
last_resort_circuit=Global[bool](value=False),
|
|
993
|
-
nat_refresh_interval=Global[int](value=30),
|
|
994
|
-
),
|
|
995
|
-
tunnel_allow_service=AllowService(
|
|
996
|
-
all=Global[bool](value=False),
|
|
997
|
-
bgp=Global[bool](value=False),
|
|
998
|
-
dhcp=Global[bool](value=False),
|
|
999
|
-
dns=Global[bool](value=False),
|
|
1000
|
-
icmp=Global[bool](value=False),
|
|
1001
|
-
netconf=Global[bool](value=True),
|
|
1002
|
-
ntp=Global[bool](value=False),
|
|
1003
|
-
ospf=Global[bool](value=False),
|
|
1004
|
-
snmp=Global[bool](value=False),
|
|
1005
|
-
sshd=Global[bool](value=False),
|
|
1006
|
-
stun=Global[bool](value=False),
|
|
1007
|
-
),
|
|
1008
|
-
vdsl=Vdsl(
|
|
1009
|
-
slot=Variable(value="{{GfwsBdVoSy7O8ABos}}"),
|
|
1010
|
-
mode=Global[VdslMode](value="ADSL1"),
|
|
1011
|
-
sra=Global[bool](value=True),
|
|
1012
|
-
),
|
|
1013
|
-
)
|
|
1014
|
-
# Act
|
|
1015
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, ethpppoe_parcel, self.wan_uuid).id
|
|
1016
|
-
# Assert
|
|
1017
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceDslPPPoEParcel, parcel_id, self.wan_uuid)
|
|
1018
|
-
assert isinstance(parcel.payload, InterfaceDslPPPoEParcel)
|
|
1019
|
-
assert parcel.payload == ethpppoe_parcel
|
|
1020
|
-
|
|
1021
|
-
def test_when_correct_values_dlspppoa_interface_parcel_expect_successfull_post(self):
|
|
1022
|
-
"""This test case don't cover all fields because the models
|
|
1023
|
-
inherets from the same parent class as DslPPPoE and EthPPPoE"""
|
|
1024
|
-
# Arrange
|
|
1025
|
-
dslpppoa_parcel = InterfaceDslPPPoAParcel(
|
|
1026
|
-
parcel_name="InterfaceDslPPPoAParcel",
|
|
1027
|
-
parcel_description="Description",
|
|
1028
|
-
atm_interface=AtmInterface(
|
|
1029
|
-
if_name=Global[str](value="ATM123213/0/0"),
|
|
1030
|
-
local_vpi_vci=Variable(value="{{[[[[}}"),
|
|
1031
|
-
description=Global[str](value="mkMuCZMEWq"),
|
|
1032
|
-
encapsulation=Default[Literal["AAL5MUX"]](value="AAL5MUX"),
|
|
1033
|
-
vbr_nrt_config=VbrNrtConfig(
|
|
1034
|
-
burst_cell_size=Variable(value="{{GO}}"),
|
|
1035
|
-
p_c_r=Variable(value="{{JIvj5lr}}"),
|
|
1036
|
-
s_c_r=Variable(value="{{jn0LmZq8o4C}}"),
|
|
1037
|
-
),
|
|
1038
|
-
vbr_rt_config=VbrRtConfig(
|
|
1039
|
-
a_c_r=Variable(value="{{x}}"), burst_cell_size=Variable(value="{{G}}"), p_c_r=Global[int](value=481)
|
|
1040
|
-
),
|
|
1041
|
-
),
|
|
1042
|
-
)
|
|
1043
|
-
# Act
|
|
1044
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, dslpppoa_parcel, self.wan_uuid).id
|
|
1045
|
-
# Assert
|
|
1046
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceDslPPPoAParcel, parcel_id, self.wan_uuid)
|
|
1047
|
-
assert isinstance(parcel.payload, InterfaceDslPPPoAParcel)
|
|
1048
|
-
assert parcel.payload == dslpppoa_parcel
|
|
1049
|
-
|
|
1050
|
-
def test_when_correct_values_dlsipoe_interface_parcel_expect_successfull_post(self):
|
|
1051
|
-
"""This test case don't cover all fields because the models
|
|
1052
|
-
inherets from the same parent class as DslPPPoE and EthPPPoE"""
|
|
1053
|
-
# Arrange
|
|
1054
|
-
dslipoe_parcel = InterfaceDslIPoEParcel(
|
|
1055
|
-
parcel_name="InterfaceDslIPoEParcel",
|
|
1056
|
-
parcel_description="Description",
|
|
1057
|
-
ethernet=IPoEEthernet(
|
|
1058
|
-
if_name=Global[str](value="Ethernet3"),
|
|
1059
|
-
description=Global[str](value="ABAAABB"),
|
|
1060
|
-
vlan_id=Global[int](value=266),
|
|
1061
|
-
intf_ip_address=DynamicIntfIpAddress(
|
|
1062
|
-
dynamic=Dynamic(
|
|
1063
|
-
dhcp_helper=Global[str](value="1.1.1.1"),
|
|
1064
|
-
dynamic_dhcp_distance=Global[int](value=3),
|
|
1065
|
-
)
|
|
1066
|
-
),
|
|
1067
|
-
),
|
|
1068
|
-
)
|
|
1069
|
-
# Act
|
|
1070
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, dslipoe_parcel, self.wan_uuid).id
|
|
1071
|
-
# Assert
|
|
1072
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceDslIPoEParcel, parcel_id, self.wan_uuid)
|
|
1073
|
-
assert isinstance(parcel.payload, InterfaceDslIPoEParcel)
|
|
1074
|
-
assert parcel.payload == dslipoe_parcel
|
|
1075
|
-
|
|
1076
|
-
def test_when_fully_specified_gre_interface_parcel_expect_successful_post(self):
|
|
1077
|
-
# Arrange
|
|
1078
|
-
gre_parcel = InterfaceGreParcel(
|
|
1079
|
-
parcel_name="InterfaceGreParcel",
|
|
1080
|
-
parcel_description="Description",
|
|
1081
|
-
basic=Basic(
|
|
1082
|
-
address=AddressWithMask(
|
|
1083
|
-
address=Global[IPv4Address](value=IPv4Address("39.5.0.97")),
|
|
1084
|
-
mask=Variable(value="{{QPg11165441vY1}}"),
|
|
1085
|
-
),
|
|
1086
|
-
if_name=Global[str](value="gre23"),
|
|
1087
|
-
tunnel_destination=Global[IPv4Address](value=IPv4Address("3.3.3.3")),
|
|
1088
|
-
clear_dont_fragment=Global[bool](value=True),
|
|
1089
|
-
description=Global[str](value="QsLBBBBBCF"),
|
|
1090
|
-
mtu=Global[int](value=1500),
|
|
1091
|
-
shutdown=Global[bool](value=True),
|
|
1092
|
-
tcp_mss_adjust=Global[int](value=600),
|
|
1093
|
-
tunnel_source_type=TunnelSourceType(
|
|
1094
|
-
source_loopback=SourceLoopback(
|
|
1095
|
-
tunnel_route_via=Global[str](value="xSVIxuF"),
|
|
1096
|
-
tunnel_source_interface=Global[str](value="YnBabgxBUm"),
|
|
1097
|
-
)
|
|
1098
|
-
),
|
|
1099
|
-
),
|
|
1100
|
-
advanced=AdvancedGre(application=Global[Literal["none", "sig"]](value="sig")),
|
|
1101
|
-
)
|
|
1102
|
-
# Act
|
|
1103
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, gre_parcel, self.wan_uuid).id
|
|
1104
|
-
# Assert
|
|
1105
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceGreParcel, parcel_id, self.wan_uuid)
|
|
1106
|
-
assert isinstance(parcel.payload, InterfaceGreParcel)
|
|
1107
|
-
assert parcel.payload == gre_parcel
|
|
1108
|
-
|
|
1109
|
-
def test_when_fully_specified_ipsec_interface_parcel_expect_successful_post(self):
|
|
1110
|
-
ipsec_parcel = InterfaceIpsecParcel(
|
|
1111
|
-
parcel_name="InterfaceIpsecParcel",
|
|
1112
|
-
parcel_description="Description",
|
|
1113
|
-
address=AddressWithMask(
|
|
1114
|
-
address=Global[IPv4Address](value=IPv4Address("127.211.176.149")),
|
|
1115
|
-
mask=Global[SubnetMask](value="255.255.255.0"),
|
|
1116
|
-
),
|
|
1117
|
-
application=Global[Literal["none", "sig"]](value="none"),
|
|
1118
|
-
clear_dont_fragment=Global[bool](value=False),
|
|
1119
|
-
if_description=Default[None](value=None),
|
|
1120
|
-
dpd_interval=Default[int](value=10),
|
|
1121
|
-
dpd_retries=Default[int](value=3),
|
|
1122
|
-
if_name=Global[str](value="ipsec232"),
|
|
1123
|
-
ike_ciphersuite=Global[IkeCiphersuite](value="aes256-cbc-sha1"),
|
|
1124
|
-
ike_group=Global[IkeGroup](value="16"),
|
|
1125
|
-
ike_local_id=Global[str](value="TZilY"),
|
|
1126
|
-
ike_rekey_interval=Default[int](value=14400),
|
|
1127
|
-
ike_remote_id=Default[None](value=None),
|
|
1128
|
-
ike_version=Default[int](value=1),
|
|
1129
|
-
ipsec_ciphersuite=Global[IpsecCiphersuite](value="aes256-gcm"),
|
|
1130
|
-
ipsec_rekey_interval=Default[int](value=3600),
|
|
1131
|
-
ipsec_replay_window=Default[int](value=512),
|
|
1132
|
-
mtu=Default[int](value=1500),
|
|
1133
|
-
perfect_forward_secrecy=Global[PerfectForwardSecrecy](value="group-16"),
|
|
1134
|
-
pre_shared_secret=Global[str](value="iEKeBeVb"),
|
|
1135
|
-
shutdown=Default[bool](value=True),
|
|
1136
|
-
tcp_mss_adjust=Default[None](value=None),
|
|
1137
|
-
tunnel_destination=AddressWithMask(
|
|
1138
|
-
address=Global[IPv4Address](value=IPv4Address("192.0.0.171")), mask=Variable(value="{{Dr}}")
|
|
1139
|
-
),
|
|
1140
|
-
tunnel_source=AddressWithMask(
|
|
1141
|
-
address=Global[IPv4Address](value=IPv4Address("192.52.193.221")),
|
|
1142
|
-
mask=Global[SubnetMask](value="255.255.254.0"),
|
|
1143
|
-
),
|
|
1144
|
-
ike_mode=Global[Literal["main", "aggresive"]](value="main"),
|
|
1145
|
-
tracker=Global[str](value="AFrHA"),
|
|
1146
|
-
tunnel_route_via=Global[str](value="AAAfxC"),
|
|
1147
|
-
)
|
|
1148
|
-
# Act
|
|
1149
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, ipsec_parcel, self.wan_uuid).id
|
|
1150
|
-
# Assert
|
|
1151
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceIpsecParcel, parcel_id, self.wan_uuid)
|
|
1152
|
-
assert isinstance(parcel.payload, InterfaceIpsecParcel)
|
|
1153
|
-
assert parcel.payload == ipsec_parcel
|
|
1154
|
-
|
|
1155
|
-
def test_when_fully_specified_cellular_interface_parcel_expect_successful_post(self):
|
|
1156
|
-
# Arrange
|
|
1157
|
-
multi_region_fabric = MultiRegionFabric(
|
|
1158
|
-
core_region=None,
|
|
1159
|
-
enable_core_region=None,
|
|
1160
|
-
enable_secondary_region=Global[bool](value=False),
|
|
1161
|
-
secondary_region=Default[SecondaryRegion](value="secondary-shared"),
|
|
1162
|
-
)
|
|
1163
|
-
if Version("20.12") == self.session.api_version:
|
|
1164
|
-
multi_region_fabric = None
|
|
1165
|
-
|
|
1166
|
-
cellular_parcel = InterfaceCellularParcel(
|
|
1167
|
-
parcel_name="InterfaceCellularParcel",
|
|
1168
|
-
parcel_description="Description",
|
|
1169
|
-
encapsulation=[
|
|
1170
|
-
Encapsulation(
|
|
1171
|
-
encap=Global[EncapType](value="ipsec"),
|
|
1172
|
-
preference=Variable(value="{{yvJr}}"),
|
|
1173
|
-
weight=Variable(value="{{]MJ}}"),
|
|
1174
|
-
),
|
|
1175
|
-
Encapsulation(
|
|
1176
|
-
encap=Global[EncapType](value="ipsec"),
|
|
1177
|
-
preference=None,
|
|
1178
|
-
weight=Variable(value="{{_qmTNgmXr5h1vu5pMjMsTXF24}}"),
|
|
1179
|
-
),
|
|
1180
|
-
Encapsulation(
|
|
1181
|
-
encap=Global[EncapType](value="ipsec"), preference=Default[None](value=None), weight=None
|
|
1182
|
-
),
|
|
1183
|
-
],
|
|
1184
|
-
interface_description=Global[str](value="CkmMzlz"),
|
|
1185
|
-
interface_name=Global[str](value="xnaohVUa"),
|
|
1186
|
-
nat=Global[bool](value=True),
|
|
1187
|
-
shutdown=Global[bool](value=False),
|
|
1188
|
-
tunnel_interface=Global[bool](value=True),
|
|
1189
|
-
acl_qos=AclQos(
|
|
1190
|
-
adaptive_qos=Global[bool](value=True),
|
|
1191
|
-
),
|
|
1192
|
-
advanced=AdvancedCellular(
|
|
1193
|
-
intrf_mtu=Global[int](value=1500),
|
|
1194
|
-
ip_directed_broadcast=Global[bool](value=True),
|
|
1195
|
-
ip_mtu=Global[int](value=600),
|
|
1196
|
-
tcp_mss=Global[int](value=600),
|
|
1197
|
-
tloc_extension=Global[str](value="PgcsRYBJOJ"),
|
|
1198
|
-
tracker=Global[str](value="gMivIg"),
|
|
1199
|
-
),
|
|
1200
|
-
allow_service=AllowService(
|
|
1201
|
-
all=Global[bool](value=True),
|
|
1202
|
-
bfd=Global[bool](value=False),
|
|
1203
|
-
bgp=Global[bool](value=True),
|
|
1204
|
-
dhcp=Global[bool](value=True),
|
|
1205
|
-
dns=Global[bool](value=False),
|
|
1206
|
-
https=Global[bool](value=False),
|
|
1207
|
-
icmp=Global[bool](value=False),
|
|
1208
|
-
netconf=Global[bool](value=True),
|
|
1209
|
-
ntp=Global[bool](value=True),
|
|
1210
|
-
ospf=Global[bool](value=True),
|
|
1211
|
-
snmp=Global[bool](value=False),
|
|
1212
|
-
ssh=Global[bool](value=False),
|
|
1213
|
-
stun=Global[bool](value=True),
|
|
1214
|
-
),
|
|
1215
|
-
arp=[
|
|
1216
|
-
CommonArp(
|
|
1217
|
-
ip_address=Global[IPv4Address](value=IPv4Address("203.0.113.2")),
|
|
1218
|
-
mac_address=Global[str](value="DC:F1:17:22:FA:3D"),
|
|
1219
|
-
),
|
|
1220
|
-
CommonArp(
|
|
1221
|
-
ip_address=Global[IPv4Address](value=IPv4Address("3.2.1.1")),
|
|
1222
|
-
mac_address=Global[str](value="BF:DB:A1:F0:4B:C8"),
|
|
1223
|
-
),
|
|
1224
|
-
CommonArp(
|
|
1225
|
-
ip_address=Global[IPv4Address](value=IPv4Address("192.0.0.170")),
|
|
1226
|
-
mac_address=Global[str](value="1B:5A:0F:AB:9E:CE"),
|
|
1227
|
-
),
|
|
1228
|
-
],
|
|
1229
|
-
bandwidth_downstream=Global[int](value=247),
|
|
1230
|
-
bandwidth_upstream=Global[int](value=185),
|
|
1231
|
-
dhcp_helper=Global[List[str]](value=["1.1.1.1", "2.2.2.2"]),
|
|
1232
|
-
multi_region_fabric=multi_region_fabric,
|
|
1233
|
-
nat_attributes_ipv4=NatAttributesIpv4(
|
|
1234
|
-
tcp_timeout=Global[int](value=456), udp_timeout=Global[int](value=163)
|
|
1235
|
-
),
|
|
1236
|
-
service_provider=Global[str](value="XaQzKLzx"),
|
|
1237
|
-
tunnel=TunnelCellular(
|
|
1238
|
-
bind=Global[str](value="VwOXkG"),
|
|
1239
|
-
border=Global[bool](value=False),
|
|
1240
|
-
carrier=Global[CarrierType](value="carrier1"),
|
|
1241
|
-
clear_dont_fragment=Global[bool](value=True),
|
|
1242
|
-
color=Global[TLOCColor](value="silver"),
|
|
1243
|
-
hello_interval=Global[int](value=173),
|
|
1244
|
-
hello_tolerance=Global[int](value=67),
|
|
1245
|
-
last_resort_circuit=Global[bool](value=True),
|
|
1246
|
-
low_bandwidth_link=Global[bool](value=False),
|
|
1247
|
-
max_control_connections=Global[int](value=10),
|
|
1248
|
-
mode=Global[Literal["spoke"]](value="spoke"),
|
|
1249
|
-
nat_refresh_interval=Global[int](value=4),
|
|
1250
|
-
network_broadcast=Global[bool](value=False),
|
|
1251
|
-
per_tunnel_qos=Global[bool](value=True),
|
|
1252
|
-
port_hop=Global[bool](value=True),
|
|
1253
|
-
restrict=Global[bool](value=False),
|
|
1254
|
-
tunnel_tcp_mss=Global[int](value=600),
|
|
1255
|
-
vbond_as_stun_server=Global[bool](value=False),
|
|
1256
|
-
vmanage_connection_preference=Global[int](value=2),
|
|
1257
|
-
),
|
|
1258
|
-
)
|
|
1259
|
-
# Act
|
|
1260
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, cellular_parcel, self.wan_uuid).id
|
|
1261
|
-
# Assert
|
|
1262
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceCellularParcel, parcel_id, self.wan_uuid)
|
|
1263
|
-
assert isinstance(parcel.payload, InterfaceCellularParcel)
|
|
1264
|
-
assert parcel.payload == cellular_parcel
|
|
1265
|
-
|
|
1266
|
-
def test_when_fully_specified_ethernet_interface_expect_successfull_post(self):
|
|
1267
|
-
# Arrange
|
|
1268
|
-
multi_region_fabric = MultiRegionFabric(
|
|
1269
|
-
core_region=None,
|
|
1270
|
-
enable_core_region=None,
|
|
1271
|
-
enable_secondary_region=Global[bool](value=False),
|
|
1272
|
-
secondary_region=Default[SecondaryRegion](value="secondary-shared"),
|
|
1273
|
-
)
|
|
1274
|
-
if Version("20.12") == self.session.api_version:
|
|
1275
|
-
multi_region_fabric = None
|
|
1276
|
-
ethernet_parcel = InterfaceEthernetParcel(
|
|
1277
|
-
parcel_name="InterfaceEthernetParcel",
|
|
1278
|
-
parcel_description="Description",
|
|
1279
|
-
interface_description=Global[str](value="Description"),
|
|
1280
|
-
encapsulation=[
|
|
1281
|
-
Encapsulation(
|
|
1282
|
-
encap=Global[Literal["ipsec", "gre"]](value="ipsec"),
|
|
1283
|
-
preference=Default[None](value=None),
|
|
1284
|
-
weight=Variable(value="{{1fk}}"),
|
|
1285
|
-
),
|
|
1286
|
-
Encapsulation(encap=Global[EncapType](value="gre"), preference=None, weight=Global[int](value=92)),
|
|
1287
|
-
],
|
|
1288
|
-
interface_name=Global[str](value="Ethernet3"),
|
|
1289
|
-
interface_ip_address=InterfaceStaticIPv4Address(
|
|
1290
|
-
static=StaticIPv4AddressConfig(
|
|
1291
|
-
primary_ip_address=StaticIPv4Address(
|
|
1292
|
-
ip_address=Default[None](value=None), subnet_mask=Default[None](value=None)
|
|
1293
|
-
),
|
|
1294
|
-
secondary_ip_address=None,
|
|
1295
|
-
)
|
|
1296
|
-
),
|
|
1297
|
-
nat=Global[bool](value=True),
|
|
1298
|
-
shutdown=Global[bool](value=False),
|
|
1299
|
-
tunnel_interface=Global[bool](value=True),
|
|
1300
|
-
advanced=EthernetAdvanced(
|
|
1301
|
-
arp_timeout=Global[int](value=97),
|
|
1302
|
-
autonegotiate=Global[bool](value=False),
|
|
1303
|
-
duplex=Global[Literal["full", "half", "auto"]](value="auto"),
|
|
1304
|
-
icmp_redirect_disable=Global[bool](value=True),
|
|
1305
|
-
intrf_mtu=Global[int](value=1500),
|
|
1306
|
-
ip_directed_broadcast=Global[bool](value=True),
|
|
1307
|
-
ip_mtu=Global[int](value=600),
|
|
1308
|
-
load_interval=Global[int](value=189),
|
|
1309
|
-
mac_address=Global[str](value="1B:5A:0F:AB:9E:CE"),
|
|
1310
|
-
media_type=Global[Literal["auto-select", "rj45", "sfp"]](value="sfp"),
|
|
1311
|
-
speed=Global[Literal["10", "100", "1000", "10000", "2500"]](value="10000"),
|
|
1312
|
-
tracker=Global[str](value="TlQCYe"),
|
|
1313
|
-
),
|
|
1314
|
-
allow_service=AllowService(
|
|
1315
|
-
bfd=None,
|
|
1316
|
-
all=None,
|
|
1317
|
-
bgp=Default[bool](value=False),
|
|
1318
|
-
dhcp=Variable(value="{{DwA}}"),
|
|
1319
|
-
dns=Variable(value="{{ZpbcB9SD-}}"),
|
|
1320
|
-
https=None,
|
|
1321
|
-
icmp=Variable(value="{{l8}}"),
|
|
1322
|
-
netconf=Variable(value="{{dn_.}}"),
|
|
1323
|
-
ntp=None,
|
|
1324
|
-
ospf=None,
|
|
1325
|
-
snmp=None,
|
|
1326
|
-
sshd=None,
|
|
1327
|
-
stun=Variable(value="{{IOg/gP626}}"),
|
|
1328
|
-
ssh=Global[bool](value=True),
|
|
1329
|
-
),
|
|
1330
|
-
arp=[
|
|
1331
|
-
CommonArp(
|
|
1332
|
-
ip_address=Global[IPv4Address](value=IPv4Address("203.0.113.2")),
|
|
1333
|
-
mac_address=Global[str](value="DC:F1:17:22:FA:3D"),
|
|
1334
|
-
),
|
|
1335
|
-
CommonArp(
|
|
1336
|
-
ip_address=Global[IPv4Address](value=IPv4Address("3.2.1.1")),
|
|
1337
|
-
mac_address=Global[str](value="BF:DB:A1:F0:4B:C8"),
|
|
1338
|
-
),
|
|
1339
|
-
CommonArp(
|
|
1340
|
-
ip_address=Global[IPv4Address](value=IPv4Address("192.0.0.170")),
|
|
1341
|
-
mac_address=Global[str](value="1B:5A:0F:AB:9E:CE"),
|
|
1342
|
-
),
|
|
1343
|
-
],
|
|
1344
|
-
auto_detect_bandwidth=Global[bool](value=False),
|
|
1345
|
-
bandwidth_downstream=Global[int](value=168),
|
|
1346
|
-
bandwidth_upstream=Global[int](value=113),
|
|
1347
|
-
block_non_source_ip=Global[bool](value=True),
|
|
1348
|
-
dhcp_helper=Global[List[str]](value=["1.1.1.1,2.3.3.3"]),
|
|
1349
|
-
iperf_server=Global[str](value="OXYQIcr"),
|
|
1350
|
-
multi_region_fabric=multi_region_fabric,
|
|
1351
|
-
nat_attributes_ipv4=EthernetNatAttributesIpv4(
|
|
1352
|
-
nat_type=Variable(value="{{Qs6}}"),
|
|
1353
|
-
udp_timeout=Variable(value="{{2DdkYshx]a}}"),
|
|
1354
|
-
tcp_timeout=Variable(value="{{U}}"),
|
|
1355
|
-
new_static_nat=[
|
|
1356
|
-
StaticNat(
|
|
1357
|
-
source_ip=Variable(value="{{-_m}}"),
|
|
1358
|
-
translate_ip=Global[IPv4Address](value=IPv4Address("100.125.239.247")),
|
|
1359
|
-
static_nat_direction=Global[Literal["inside", "outside"]](value="outside"),
|
|
1360
|
-
source_vpn=Global[int](value=422),
|
|
1361
|
-
),
|
|
1362
|
-
StaticNat(
|
|
1363
|
-
source_ip=Global[IPv4Address](value=IPv4Address("10.0.2.1")),
|
|
1364
|
-
translate_ip=Variable(value="{{xskEgr6}}"),
|
|
1365
|
-
static_nat_direction=Default[Literal["inside", "outside"]](value="inside"),
|
|
1366
|
-
source_vpn=Default[int](value=0),
|
|
1367
|
-
),
|
|
1368
|
-
],
|
|
1369
|
-
),
|
|
1370
|
-
nat_attributes_ipv6=NatAttributesIpv6(
|
|
1371
|
-
nat64=Global[bool](value=False),
|
|
1372
|
-
nat66=Global[bool](value=True),
|
|
1373
|
-
static_nat66=[
|
|
1374
|
-
StaticNat66(
|
|
1375
|
-
source_prefix=Global[str](value="0::/16"),
|
|
1376
|
-
source_vpn_id=Global[int](value=10),
|
|
1377
|
-
# egress_interface=Global[bool](value=False), for 20.12 not definied
|
|
1378
|
-
translated_source_prefix=Global[str](value="0::/16"),
|
|
1379
|
-
),
|
|
1380
|
-
StaticNat66(
|
|
1381
|
-
source_prefix=Global[str](value="2::/16"),
|
|
1382
|
-
source_vpn_id=Global[int](value=282),
|
|
1383
|
-
# egress_interface=Global[bool](value=True), for 20.12 not definied
|
|
1384
|
-
translated_source_prefix=Global[str](value="2::/16"),
|
|
1385
|
-
),
|
|
1386
|
-
],
|
|
1387
|
-
),
|
|
1388
|
-
nat_ipv6=Global[bool](value=True),
|
|
1389
|
-
service_provider=Global[str](value="HpZoKuVPSR"),
|
|
1390
|
-
tunnel=TunnelEthernet(
|
|
1391
|
-
bandwidth_percent=Global[int](value=50),
|
|
1392
|
-
bind=Global[str](value="aDzWWarP"),
|
|
1393
|
-
border=Global[bool](value=False),
|
|
1394
|
-
carrier=Global[CarrierType](value="carrier1"),
|
|
1395
|
-
clear_dont_fragment=Global[bool](value=True),
|
|
1396
|
-
color=Global[TLOCColor](value="bronze"),
|
|
1397
|
-
cts_sgt_propagation=Global[bool](value=False),
|
|
1398
|
-
exclude_controller_group_list=Global[List[int]](value=[]),
|
|
1399
|
-
group=Global[int](value=87),
|
|
1400
|
-
hello_interval=Global[int](value=388),
|
|
1401
|
-
hello_tolerance=Global[int](value=33),
|
|
1402
|
-
last_resort_circuit=Global[bool](value=False),
|
|
1403
|
-
low_bandwidth_link=Global[bool](value=False),
|
|
1404
|
-
max_control_connections=Global[int](value=2),
|
|
1405
|
-
nat_refresh_interval=Global[int](value=5),
|
|
1406
|
-
network_broadcast=Global[bool](value=True),
|
|
1407
|
-
per_tunnel_qos=Global[bool](value=True),
|
|
1408
|
-
port_hop=Global[bool](value=False),
|
|
1409
|
-
restrict=Global[bool](value=False),
|
|
1410
|
-
tloc_extension_gre_to=None,
|
|
1411
|
-
v_bond_as_stun_server=Global[bool](value=True),
|
|
1412
|
-
v_manage_connection_preference=Global[int](value=5),
|
|
1413
|
-
),
|
|
1414
|
-
)
|
|
1415
|
-
# Act
|
|
1416
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, ethernet_parcel, self.wan_uuid).id
|
|
1417
|
-
# Assert
|
|
1418
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceEthernetParcel, parcel_id, self.wan_uuid)
|
|
1419
|
-
assert isinstance(parcel.payload, InterfaceEthernetParcel)
|
|
1420
|
-
assert parcel.payload == ethernet_parcel
|
|
1421
|
-
|
|
1422
|
-
def test_when_fully_specified_multilink_interface_parcel_expect_successful_post(self):
|
|
1423
|
-
# Arrange
|
|
1424
|
-
multi_region_fabric = MultiRegionFabric(
|
|
1425
|
-
core_region=None,
|
|
1426
|
-
enable_core_region=None,
|
|
1427
|
-
enable_secondary_region=None,
|
|
1428
|
-
secondary_region=None,
|
|
1429
|
-
)
|
|
1430
|
-
if Version("20.12") == self.session.api_version:
|
|
1431
|
-
multi_region_fabric = None
|
|
1432
|
-
nim_list = [
|
|
1433
|
-
MultilinkNimList(
|
|
1434
|
-
if_name=Global[str](value="Serial1"),
|
|
1435
|
-
bandwidth=Global[int](value=10),
|
|
1436
|
-
clock_rate=Global[ClockRate](value="1200"),
|
|
1437
|
-
description=Global[str](value="desc"),
|
|
1438
|
-
),
|
|
1439
|
-
MultilinkNimList(
|
|
1440
|
-
if_name=Global[str](value="Serial2"),
|
|
1441
|
-
bandwidth=Global[int](value=12),
|
|
1442
|
-
clock_rate=Global[ClockRate](value="115200"),
|
|
1443
|
-
description=None,
|
|
1444
|
-
),
|
|
1445
|
-
]
|
|
1446
|
-
controller_tx_ex_list = [
|
|
1447
|
-
MultilinkControllerTxExList(
|
|
1448
|
-
channel_group=[
|
|
1449
|
-
ChannelGroup(
|
|
1450
|
-
number=Global[int](value=12),
|
|
1451
|
-
timeslots=Global[str](value="12"),
|
|
1452
|
-
)
|
|
1453
|
-
],
|
|
1454
|
-
number=Global[str](value="1/1/1"),
|
|
1455
|
-
clock_source=Global[MultilinkClockSource](value="internal"),
|
|
1456
|
-
description=Global[str](value="desc"),
|
|
1457
|
-
e1_framing=Global[E1Framing](value="crc4"),
|
|
1458
|
-
e1_linecode=Global[E1Linecode](value="ami"),
|
|
1459
|
-
line_mode=Global[LineMode](value="primary"),
|
|
1460
|
-
long=None,
|
|
1461
|
-
name=Global[MultilinkTxExName](value="E1"),
|
|
1462
|
-
short=None,
|
|
1463
|
-
t1_framing=None,
|
|
1464
|
-
t1_linecode=None,
|
|
1465
|
-
),
|
|
1466
|
-
MultilinkControllerTxExList(
|
|
1467
|
-
channel_group=[
|
|
1468
|
-
ChannelGroup(
|
|
1469
|
-
number=Global[int](value=13),
|
|
1470
|
-
timeslots=Global[str](value="13"),
|
|
1471
|
-
)
|
|
1472
|
-
],
|
|
1473
|
-
number=Global[str](value="2/2/2"),
|
|
1474
|
-
clock_source=Global[MultilinkClockSource](value="loop-timed"),
|
|
1475
|
-
description=Global[str](value="desc"),
|
|
1476
|
-
e1_framing=None,
|
|
1477
|
-
e1_linecode=None,
|
|
1478
|
-
line_mode=Global[LineMode](value="secondary"),
|
|
1479
|
-
long=Global[CableLengthLongValue](value="-15db"),
|
|
1480
|
-
name=Global[MultilinkTxExName](value="T1"),
|
|
1481
|
-
short=None,
|
|
1482
|
-
t1_framing=Global[T1Framing](value="esf"),
|
|
1483
|
-
t1_linecode=Global[T1Linecode](value="ami"),
|
|
1484
|
-
),
|
|
1485
|
-
]
|
|
1486
|
-
multilink_parcel = InterfaceMultilinkParcel(
|
|
1487
|
-
parcel_name="Test",
|
|
1488
|
-
parcel_description="Description",
|
|
1489
|
-
group_number=Global[int](value=299),
|
|
1490
|
-
if_name=Global[str](value="Multilink1"),
|
|
1491
|
-
method=Global[Literal[MultilinkMethod]](value="CHAP"),
|
|
1492
|
-
address_ipv4=Global[IPv4Address](value=IPv4Address("192.175.48.4")),
|
|
1493
|
-
address_ipv6=Global[IPv6Interface](value=IPv6Interface("::3e46/100")),
|
|
1494
|
-
all=Global[bool](value=True),
|
|
1495
|
-
authentication_type=Default[Literal[MultilinkAuthenticationType]](value="unidirectional"),
|
|
1496
|
-
bandwidth_upstream=Global[int](value=21),
|
|
1497
|
-
bgp=Global[bool](value=True),
|
|
1498
|
-
bind=Global[str](value="JmwcJz"),
|
|
1499
|
-
border=Global[bool](value=True),
|
|
1500
|
-
carrier=Global[Literal[CarrierType]](value="carrier8"),
|
|
1501
|
-
clear_dont_fragment_sdwan_tunnel=Global[bool](value=True),
|
|
1502
|
-
control_connections=Global[bool](value=False),
|
|
1503
|
-
controller_tx_ex_list=controller_tx_ex_list,
|
|
1504
|
-
controller_type=Global[Literal[MultilinkControllerType]](value="T1/E1"),
|
|
1505
|
-
delay_value=Global[int](value=99),
|
|
1506
|
-
dhcp=Global[bool](value=False),
|
|
1507
|
-
disable=Global[bool](value=True),
|
|
1508
|
-
dns=Global[bool](value=False),
|
|
1509
|
-
exclude_controller_group_list=Global[str](value="12 13 14"),
|
|
1510
|
-
gre_encap=Global[bool](value=True),
|
|
1511
|
-
gre_preference=Global[int](value=91),
|
|
1512
|
-
gre_weight=Global[int](value=48),
|
|
1513
|
-
groups=Global[int](value=363),
|
|
1514
|
-
hello_interval=Global[int](value=224),
|
|
1515
|
-
hello_tolerance=Global[int](value=214),
|
|
1516
|
-
hostname=Global[str](value="oitSeZBfw"),
|
|
1517
|
-
https=Global[bool](value=False),
|
|
1518
|
-
icmp=Global[bool](value=True),
|
|
1519
|
-
interleave=Global[bool](value=False),
|
|
1520
|
-
ip_directed_broadcast=Global[bool](value=True),
|
|
1521
|
-
ipsec_encap=Global[bool](value=False),
|
|
1522
|
-
ipsec_preference=Global[int](value=498),
|
|
1523
|
-
ipsec_weight=Global[int](value=135),
|
|
1524
|
-
ipv4_acl_egress=None,
|
|
1525
|
-
ipv4_acl_ingress=None,
|
|
1526
|
-
ipv6_acl_egress=None,
|
|
1527
|
-
ipv6_acl_ingress=None,
|
|
1528
|
-
last_resort_circuit=Global[bool](value=True),
|
|
1529
|
-
low_bandwidth_link=Global[bool](value=False),
|
|
1530
|
-
mask_ipv4=Global[SubnetMask](value="255.255.255.254"),
|
|
1531
|
-
max_control_connections=Global[int](value=50),
|
|
1532
|
-
mtu=Global[int](value=5266),
|
|
1533
|
-
multi_region_fabric=multi_region_fabric,
|
|
1534
|
-
nat_refresh_interval=Global[int](value=33),
|
|
1535
|
-
netconf=Global[bool](value=False),
|
|
1536
|
-
network_broadcast=Global[bool](value=False),
|
|
1537
|
-
nim_list=nim_list,
|
|
1538
|
-
ntp=Global[bool](value=True),
|
|
1539
|
-
ospf=Global[bool](value=True),
|
|
1540
|
-
password=Global[str](value="hyBBiuDgO"),
|
|
1541
|
-
port_hop=Global[bool](value=False),
|
|
1542
|
-
ppp_auth_password=None,
|
|
1543
|
-
restrict=Global[bool](value=False),
|
|
1544
|
-
shaping_rate=Global[int](value=294),
|
|
1545
|
-
shutdown=Global[bool](value=False),
|
|
1546
|
-
snmp=Global[bool](value=False),
|
|
1547
|
-
sshd=Global[bool](value=False),
|
|
1548
|
-
stun=Global[bool](value=False),
|
|
1549
|
-
tcp_mss_adjust=Global[int](value=1267),
|
|
1550
|
-
tloc_extension=Global[str](value="ATM"),
|
|
1551
|
-
tunnel_interface=Global[bool](value=True),
|
|
1552
|
-
tunnel_tcp_mss_adjust=Global[int](value=1269),
|
|
1553
|
-
username_string=Global[str](value="ONBBAAB"),
|
|
1554
|
-
value=Global[Literal[TLOCColor]](value="silver"),
|
|
1555
|
-
vbond_as_stun_server=Global[bool](value=False),
|
|
1556
|
-
vmanage_connection_preference=Global[int](value=7),
|
|
1557
|
-
)
|
|
1558
|
-
|
|
1559
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, multilink_parcel, self.wan_uuid).id
|
|
1560
|
-
|
|
1561
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceMultilinkParcel, parcel_id, self.wan_uuid)
|
|
1562
|
-
assert isinstance(parcel.payload, InterfaceMultilinkParcel)
|
|
1563
|
-
assert parcel.payload == multilink_parcel
|
|
1564
|
-
|
|
1565
|
-
@classmethod
|
|
1566
|
-
def tearDownClass(cls) -> None:
|
|
1567
|
-
cls.api.delete_profile(cls.profile_uuid)
|
|
1568
|
-
super().tearDownClass()
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
class TestTransportFeatureProfileWanInterfaceModelsUpdate(TestCaseBase):
|
|
1572
|
-
wan_uuid: UUID
|
|
1573
|
-
api: TransportFeatureProfileAPI
|
|
1574
|
-
|
|
1575
|
-
@classmethod
|
|
1576
|
-
def setUpClass(cls) -> None:
|
|
1577
|
-
super().setUpClass()
|
|
1578
|
-
cls.api = cls.session.api.sdwan_feature_profiles.transport
|
|
1579
|
-
cls.profile_uuid = cls.api.create_profile(create_name_with_run_id("TestTransportInterface"), "Description").id
|
|
1580
|
-
cls.wan_uuid = cls.api.create_parcel(
|
|
1581
|
-
cls.profile_uuid,
|
|
1582
|
-
TransportVpnParcel(
|
|
1583
|
-
parcel_name="TestTransportVpnParcel",
|
|
1584
|
-
parcel_description="Description",
|
|
1585
|
-
),
|
|
1586
|
-
).id
|
|
1587
|
-
|
|
1588
|
-
def test_update(self):
|
|
1589
|
-
gre_parcel = InterfaceGreParcel(
|
|
1590
|
-
parcel_name="InterfaceGreParcel",
|
|
1591
|
-
parcel_description="Description",
|
|
1592
|
-
basic=Basic(
|
|
1593
|
-
if_name=Global[str](value="gre23"),
|
|
1594
|
-
tunnel_destination=Global[IPv4Address](value=IPv4Address("5.5.2.1")),
|
|
1595
|
-
address=AddressWithMask(
|
|
1596
|
-
address=Global[IPv4Address](value=IPv4Address("30.2.1.1")),
|
|
1597
|
-
mask=Variable(value="{{QPg111654}}"),
|
|
1598
|
-
),
|
|
1599
|
-
),
|
|
1600
|
-
)
|
|
1601
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, gre_parcel, self.wan_uuid).id
|
|
1602
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceGreParcel, parcel_id, self.wan_uuid)
|
|
1603
|
-
assert isinstance(parcel.payload, InterfaceGreParcel)
|
|
1604
|
-
assert parcel.payload == gre_parcel
|
|
1605
|
-
|
|
1606
|
-
gre_parcel.basic.address.address = as_global(IPv4Address("20.3.2.1"))
|
|
1607
|
-
parcel_id = self.api.update_parcel(self.profile_uuid, gre_parcel, parcel_id, self.wan_uuid).id
|
|
1608
|
-
parcel = self.api.get_parcel(self.profile_uuid, InterfaceGreParcel, parcel_id, self.wan_uuid)
|
|
1609
|
-
assert isinstance(parcel.payload, InterfaceGreParcel)
|
|
1610
|
-
assert parcel.payload == gre_parcel
|
|
1611
|
-
|
|
1612
|
-
@classmethod
|
|
1613
|
-
def tearDownClass(cls) -> None:
|
|
1614
|
-
cls.api.delete_profile(cls.profile_uuid)
|
|
1615
|
-
super().tearDownClass()
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
class TestTransportFeatureProfileWanManagementModels(TestCaseBase):
|
|
1619
|
-
wan_uuid: UUID
|
|
1620
|
-
|
|
1621
|
-
@classmethod
|
|
1622
|
-
def setUpClass(cls) -> None:
|
|
1623
|
-
super().setUpClass()
|
|
1624
|
-
cls.api = cls.session.api.sdwan_feature_profiles.transport
|
|
1625
|
-
cls.profile_uuid = cls.api.create_profile(create_name_with_run_id("TestTransportManagement"), "Description").id
|
|
1626
|
-
cls.wan_uuid = cls.api.create_parcel(
|
|
1627
|
-
cls.profile_uuid,
|
|
1628
|
-
ManagementVpnParcel(
|
|
1629
|
-
parcel_name="TestTransportVpnParcel",
|
|
1630
|
-
parcel_description="Description",
|
|
1631
|
-
),
|
|
1632
|
-
).id
|
|
1633
|
-
|
|
1634
|
-
def test_when_fully_specified_ethernet_parcel_expect_successful_post(self):
|
|
1635
|
-
v4_address = InterfaceStaticIPv4Address(
|
|
1636
|
-
static=StaticIPv4AddressConfig(
|
|
1637
|
-
primary_ip_address=StaticIPv4Address(
|
|
1638
|
-
ip_address=Default[None](value=None), subnet_mask=Default[None](value=None)
|
|
1639
|
-
),
|
|
1640
|
-
secondary_ip_address=None,
|
|
1641
|
-
)
|
|
1642
|
-
)
|
|
1643
|
-
v6_address = InterfaceStaticIPv6Address(
|
|
1644
|
-
static=StaticIPv6AddressConfig(
|
|
1645
|
-
primary_ip_v6_address=StaticIPv6Address(address=Global[IPv6Interface](value="0::/16"))
|
|
1646
|
-
)
|
|
1647
|
-
)
|
|
1648
|
-
arp = [
|
|
1649
|
-
CommonArp(
|
|
1650
|
-
ip_address=Global[IPv4Address](value=IPv4Address("203.0.113.2")),
|
|
1651
|
-
mac_address=Global[str](value="DC:F1:17:22:FA:3D"),
|
|
1652
|
-
),
|
|
1653
|
-
CommonArp(
|
|
1654
|
-
ip_address=Global[IPv4Address](value=IPv4Address("3.2.1.1")),
|
|
1655
|
-
mac_address=Global[str](value="BF:DB:A1:F0:4B:C8"),
|
|
1656
|
-
),
|
|
1657
|
-
CommonArp(
|
|
1658
|
-
ip_address=Global[IPv4Address](value=IPv4Address("192.0.0.170")),
|
|
1659
|
-
mac_address=Global[str](value="1B:5A:0F:AB:9E:CE"),
|
|
1660
|
-
),
|
|
1661
|
-
]
|
|
1662
|
-
advanced = ManagementEthernetAdvanced(
|
|
1663
|
-
arp_timeout=Global[int](value=97),
|
|
1664
|
-
ip_directed_broadcast=Global[bool](value=True),
|
|
1665
|
-
ip_mtu=Global[int](value=600),
|
|
1666
|
-
load_interval=Global[int](value=189),
|
|
1667
|
-
autonegotiate=Global[bool](value=False),
|
|
1668
|
-
duplex=Global[EthernetDuplexMode](value="auto"),
|
|
1669
|
-
icmp_redirect_disable=Global[bool](value=True),
|
|
1670
|
-
intrf_mtu=Global[int](value=1550),
|
|
1671
|
-
mac_address=Global[str](value="1B:5A:0F:AB:9E:CE"),
|
|
1672
|
-
media_type=Global[Literal["auto-select", "rj45", "sfp"]](value="sfp"),
|
|
1673
|
-
speed=Global[Literal["10", "100", "1000", "10000", "2500"]](value="10000"),
|
|
1674
|
-
tcp_mss=Global[int](value=1444),
|
|
1675
|
-
)
|
|
1676
|
-
ethernet_parcel = ManagementEthernetParcel(
|
|
1677
|
-
parcel_name="Test",
|
|
1678
|
-
parcel_description="Description",
|
|
1679
|
-
advanced=advanced,
|
|
1680
|
-
interface_name=Global[str](value="GlobalEthernet1"),
|
|
1681
|
-
interface_description=Global[str](value="Test"),
|
|
1682
|
-
intf_ip_address=v4_address,
|
|
1683
|
-
shutdown=Global[bool](value=True),
|
|
1684
|
-
arp=arp,
|
|
1685
|
-
auto_detect_bandwidth=Global[bool](value=False),
|
|
1686
|
-
dhcp_helper=Global[List[str]](value=["1.1.1.1", "2.2.2.2"]),
|
|
1687
|
-
intf_ip_v6_address=v6_address,
|
|
1688
|
-
iperf_server=Global[str](value="OXYQIcr"),
|
|
1689
|
-
)
|
|
1690
|
-
|
|
1691
|
-
parcel_id = self.api.create_parcel(self.profile_uuid, ethernet_parcel, self.wan_uuid).id
|
|
1692
|
-
|
|
1693
|
-
parcel = self.api.get_parcel(self.profile_uuid, ManagementEthernetParcel, parcel_id, self.wan_uuid)
|
|
1694
|
-
assert isinstance(parcel.payload, ManagementEthernetParcel)
|
|
1695
|
-
assert parcel.payload == ethernet_parcel
|
|
1696
|
-
|
|
1697
|
-
@classmethod
|
|
1698
|
-
def tearDownClass(cls) -> None:
|
|
1699
|
-
cls.api.delete_profile(cls.profile_uuid)
|
|
1700
|
-
super().tearDownClass()
|