testprotocols 0.2.0__tar.gz → 0.3.0__tar.gz

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.
Files changed (143) hide show
  1. {testprotocols-0.2.0/src/testprotocols.egg-info → testprotocols-0.3.0}/PKG-INFO +1 -1
  2. {testprotocols-0.2.0 → testprotocols-0.3.0}/pyproject.toml +1 -1
  3. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/sdwan_policy_manager.py +25 -3
  4. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/spanning_tree.py +1 -1
  5. {testprotocols-0.2.0 → testprotocols-0.3.0/src/testprotocols.egg-info}/PKG-INFO +1 -1
  6. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_device_types.py +4 -3
  7. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_sdwan_appliance_models.py +12 -9
  8. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_switch_models.py +1 -2
  9. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_switch_routing_models.py +10 -2
  10. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_wan_edge_templates.py +2 -0
  11. {testprotocols-0.2.0 → testprotocols-0.3.0}/LICENSE +0 -0
  12. {testprotocols-0.2.0 → testprotocols-0.3.0}/NOTICE +0 -0
  13. {testprotocols-0.2.0 → testprotocols-0.3.0}/README.md +0 -0
  14. {testprotocols-0.2.0 → testprotocols-0.3.0}/setup.cfg +0 -0
  15. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/__init__.py +0 -0
  16. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/aftr_gateway.py +0 -0
  17. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/appliance_nat.py +0 -0
  18. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/appliance_uplinks.py +0 -0
  19. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/appliance_vlans.py +0 -0
  20. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/arp_client.py +0 -0
  21. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/bgp.py +0 -0
  22. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/conntrack.py +0 -0
  23. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/content_filtering.py +0 -0
  24. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/device_lifecycle.py +0 -0
  25. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/device_management.py +0 -0
  26. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/__init__.py +0 -0
  27. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/base.py +0 -0
  28. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/client.py +0 -0
  29. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/cpe.py +0 -0
  30. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/infra.py +0 -0
  31. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/sdwan.py +0 -0
  32. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/switch.py +0 -0
  33. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/traffic.py +0 -0
  34. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/voice.py +0 -0
  35. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/wan.py +0 -0
  36. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/dhcp_client.py +0 -0
  37. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/dhcp_server.py +0 -0
  38. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/discovery.py +0 -0
  39. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/dns_client.py +0 -0
  40. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/file_transfer.py +0 -0
  41. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/firewall.py +0 -0
  42. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/firewall_zones.py +0 -0
  43. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/first_hop_security.py +0 -0
  44. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/gateway_redundancy.py +0 -0
  45. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/http_client.py +0 -0
  46. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/http_server.py +0 -0
  47. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/hw_console.py +0 -0
  48. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/interface_dhcp.py +0 -0
  49. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ip_interface.py +0 -0
  50. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ip_routing.py +0 -0
  51. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/iperf_client.py +0 -0
  52. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/iperf_generator.py +0 -0
  53. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/iperf_server.py +0 -0
  54. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/l3_firewall.py +0 -0
  55. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/l7_firewall.py +0 -0
  56. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/link_aggregation.py +0 -0
  57. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/mac_table.py +0 -0
  58. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/__init__.py +92 -92
  59. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/dhcp.py +0 -0
  60. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/firewall.py +0 -0
  61. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/impairment.py +0 -0
  62. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/l2_common.py +0 -0
  63. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/multicast.py +0 -0
  64. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/networking.py +0 -0
  65. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/packets.py +0 -0
  66. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/qoe.py +0 -0
  67. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/radius.py +0 -0
  68. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/sdwan_appliance.py +0 -0
  69. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/switch.py +0 -0
  70. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/switch_routing.py +0 -0
  71. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/tr069.py +0 -0
  72. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/traffic.py +0 -0
  73. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/wan_edge.py +0 -0
  74. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/wifi.py +0 -0
  75. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/multicast_client.py +0 -0
  76. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/nat.py +0 -0
  77. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/netem_controller.py +0 -0
  78. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/network_endpoint.py +0 -0
  79. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/network_probe.py +0 -0
  80. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/nmap_scanner.py +0 -0
  81. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ntp_client.py +0 -0
  82. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ntp_config.py +0 -0
  83. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ospf.py +0 -0
  84. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/packet_filter.py +0 -0
  85. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/pcap_capture.py +0 -0
  86. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/pdu_controller.py +0 -0
  87. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/port_poe.py +0 -0
  88. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/port_security.py +0 -0
  89. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/port_status.py +0 -0
  90. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/py.typed +0 -0
  91. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/qoe_browser.py +0 -0
  92. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/radius_client.py +0 -0
  93. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/radius_server.py +0 -0
  94. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/reachability_responder.py +0 -0
  95. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/routed_interfaces.py +0 -0
  96. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/router.py +0 -0
  97. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/routing_read.py +0 -0
  98. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/sip_phone.py +0 -0
  99. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/sip_server.py +0 -0
  100. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/site_to_site_vpn.py +0 -0
  101. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/snmp_client.py +0 -0
  102. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/static_routes.py +0 -0
  103. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/storm_control.py +0 -0
  104. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/streaming_server.py +0 -0
  105. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_acl.py +0 -0
  106. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_ports.py +0 -0
  107. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_qos.py +0 -0
  108. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_vlans.py +0 -0
  109. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/syslog_config.py +0 -0
  110. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/tftp_server.py +0 -0
  111. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/threat_prevention.py +0 -0
  112. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/tr069_client.py +0 -0
  113. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/tr069_server.py +0 -0
  114. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/traffic_shaping.py +0 -0
  115. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/upnp_client.py +0 -0
  116. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/vlan_client.py +0 -0
  117. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wan_link_admin.py +0 -0
  118. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_bss.py +0 -0
  119. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_client.py +0 -0
  120. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_mesh.py +0 -0
  121. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_onboarding.py +0 -0
  122. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_radio.py +0 -0
  123. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_rf.py +0 -0
  124. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_stations.py +0 -0
  125. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_transitions.py +0 -0
  126. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols.egg-info/SOURCES.txt +0 -0
  127. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols.egg-info/dependency_links.txt +0 -0
  128. {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols.egg-info/top_level.txt +0 -0
  129. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_appliance_vlans.py +0 -0
  130. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_cpe_templates.py +0 -0
  131. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_dhcp_templates.py +0 -0
  132. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_firewall_templates.py +0 -0
  133. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_infra_templates.py +0 -0
  134. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_ip_interface.py +0 -0
  135. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_ip_routing.py +0 -0
  136. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_network_tool_templates.py +0 -0
  137. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_package_imports.py +0 -0
  138. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_radius_templates.py +0 -0
  139. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_sdwan_appliance_templates.py +0 -0
  140. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_switch_templates.py +0 -0
  141. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_traffic_templates.py +0 -0
  142. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_voice_wifi_templates.py +0 -0
  143. {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_wifi_templates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testprotocols
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Common Test Resource Layer — capability and device protocols for telco testing.
5
5
  Author-email: Alottabits <rjvisser@alottabits.com>
6
6
  Maintainer-email: Alottabits <rjvisser@alottabits.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "testprotocols"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  description = "Common Test Resource Layer — capability and device protocols for telco testing."
5
5
  requires-python = ">=3.12"
6
6
  dependencies = []
@@ -7,9 +7,12 @@ Firewall-rule administration is **not** here — it moved to the dedicated
7
7
  ``l3_firewall`` / ``l7_firewall`` capabilities (coherent-domain split; see
8
8
  SPLITS.md). Typed path steering (``set_uplink_selection`` /
9
9
  ``get_uplink_selection`` over ordered ``UplinkSelectionRule``s; performance
10
- classes reuse ``SLAPolicy`` by name) landed 2026-06-12; ``apply_policy``
11
- remains the generic escape hatch for vendor-shaped policies beyond that
12
- surface. Application-match steering grows on evidence.
10
+ classes reuse ``SLAPolicy`` by name) landed 2026-06-12; the default
11
+ (primary) uplink pair (``get_default_uplink`` / ``set_default_uplink``)
12
+ landed 2026-07-03 the network-wide "which uplink carries default-routed
13
+ traffic" knob, distinct from per-flow steering. ``apply_policy`` remains
14
+ the generic escape hatch for vendor-shaped policies beyond that surface.
15
+ Application-match steering grows on evidence.
13
16
  """
14
17
 
15
18
  from __future__ import annotations
@@ -48,6 +51,25 @@ class SdwanPolicyManager(Protocol):
48
51
  """Return application flows observed in the last *since_s* seconds."""
49
52
  ...
50
53
 
54
+ def get_default_uplink(self) -> str:
55
+ """Return the name of the network's default (primary) uplink.
56
+
57
+ The default uplink carries all default-routed traffic that no
58
+ uplink-selection rule steers elsewhere — e.g. ``"wan1"``. Vendor
59
+ drivers map this to their primary-uplink notion.
60
+ """
61
+ ...
62
+
63
+ def set_default_uplink(self, uplink: str) -> None:
64
+ """Set the network's default (primary) uplink to *uplink*.
65
+
66
+ Changes only which uplink carries default-routed traffic; the
67
+ ordered uplink-selection rules (``set_uplink_selection``) are left
68
+ untouched. Drivers reject names the product cannot express (e.g.
69
+ an uplink the appliance does not have) rather than approximating.
70
+ """
71
+ ...
72
+
51
73
  def set_uplink_selection(self, rules: list[UplinkSelectionRule]) -> None:
52
74
  """Replace the ordered uplink-selection rule list with *rules*.
53
75
 
@@ -21,7 +21,7 @@ class SpanningTree(Protocol):
21
21
  ...
22
22
 
23
23
  def set_bridge_priority(self, priority: int) -> None:
24
- """Set the bridge priority (061440, in steps of 4096 per IEEE 802.1D)."""
24
+ """Set the bridge priority (0-61440, in steps of 4096 per IEEE 802.1D)."""
25
25
  ...
26
26
 
27
27
  def set_port_config(self, config: StpPortConfig) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testprotocols
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Common Test Resource Layer — capability and device protocols for telco testing.
5
5
  Author-email: Alottabits <rjvisser@alottabits.com>
6
6
  Maintainer-email: Alottabits <rjvisser@alottabits.com>
@@ -10,7 +10,6 @@ inventory-string -> Protocol binding and the per-archetype capability set
10
10
  from __future__ import annotations
11
11
 
12
12
  import pytest
13
-
14
13
  from testprotocols.devices import DeviceTypeSpec, all_device_types, get_device_type
15
14
  from testprotocols.devices.base import BaseDeviceProtocol
16
15
  from testprotocols.devices.client import (
@@ -22,12 +21,12 @@ from testprotocols.devices.client import (
22
21
  from testprotocols.devices.cpe import CpeDevice
23
22
  from testprotocols.devices.infra import AcsDevice, ProvisionerDevice, TftpDevice
24
23
  from testprotocols.devices.sdwan import SdwanApplianceDevice, SdwanRouterDevice
24
+ from testprotocols.devices.switch import L2Switch, L3Switch, L3SwitchRouted
25
25
  from testprotocols.devices.traffic import (
26
26
  IperfTrafficGeneratorDevice,
27
27
  TrafficControllerDevice,
28
28
  )
29
29
  from testprotocols.devices.voice import SipPhoneDevice, SipServerDevice
30
- from testprotocols.devices.switch import L2Switch, L3Switch, L3SwitchRouted
31
30
  from testprotocols.devices.wan import WanServerDevice
32
31
 
33
32
  _ALL_ARCHETYPES = (
@@ -455,7 +454,9 @@ def test_cpe_full_firewall_surface() -> None:
455
454
 
456
455
  def test_devices_without_firewall() -> None:
457
456
  """These archetypes must not pull in any of the firewall capabilities."""
458
- firewall_attrs = ("packet_filter", "firewall", "nat", "port_forwarding", "conntrack", "firewall_zones")
457
+ firewall_attrs = (
458
+ "packet_filter", "firewall", "nat", "port_forwarding", "conntrack", "firewall_zones"
459
+ )
459
460
  for archetype in (
460
461
  TftpDevice,
461
462
  WlanClientDevice,
@@ -10,7 +10,6 @@ from __future__ import annotations
10
10
  from enum import StrEnum
11
11
 
12
12
  import pytest
13
-
14
13
  from testprotocols.models.sdwan_appliance import (
15
14
  ApplicationCategory,
16
15
  BgpConfig,
@@ -18,20 +17,20 @@ from testprotocols.models.sdwan_appliance import (
18
17
  BgpPeerStatus,
19
18
  BgpSessionState,
20
19
  ContentCategory,
21
- FlowMatch,
22
- L3Rule,
23
- L7MatchType,
24
- L7Rule,
25
- RuleAction,
26
- RuleProtocol,
27
20
  DhcpLease,
28
21
  DhcpMode,
29
22
  DhcpOption,
30
23
  DhcpOptionType,
24
+ FlowMatch,
31
25
  IntrusionConfig,
32
26
  IntrusionMode,
33
27
  IntrusionSensitivity,
28
+ L3Rule,
29
+ L7MatchType,
30
+ L7Rule,
34
31
  MalwareMode,
32
+ RuleAction,
33
+ RuleProtocol,
35
34
  SecurityAction,
36
35
  SecurityEvent,
37
36
  ShapingPriority,
@@ -126,7 +125,8 @@ def test_shaping_rule_uses_normalized_vocabulary() -> None:
126
125
  priority=ShapingPriority.LOW,
127
126
  )
128
127
  assert rule.priority == "low"
129
- assert ShapingRule(name="x", match_type=L7MatchType.HOST, value="1.2.3.4").priority is ShapingPriority.NORMAL
128
+ default = ShapingRule(name="x", match_type=L7MatchType.HOST, value="1.2.3.4")
129
+ assert default.priority is ShapingPriority.NORMAL
130
130
 
131
131
 
132
132
  def test_uplink_state_and_status() -> None:
@@ -144,7 +144,10 @@ def test_syslog_role_and_server() -> None:
144
144
 
145
145
 
146
146
  def test_threat_prevention_vocabularies() -> None:
147
- for enum_cls in (IntrusionMode, IntrusionSensitivity, MalwareMode, SecurityAction, ThreatCategory):
147
+ vocabularies = (
148
+ IntrusionMode, IntrusionSensitivity, MalwareMode, SecurityAction, ThreatCategory
149
+ )
150
+ for enum_cls in vocabularies:
148
151
  assert issubclass(enum_cls, StrEnum)
149
152
  assert {m.value for m in IntrusionMode} == {"disabled", "detection", "prevention"}
150
153
  assert {s.value for s in IntrusionSensitivity} == {"low", "medium", "high"}
@@ -66,6 +66,7 @@ def test_switch_records() -> None:
66
66
  AccessPolicy,
67
67
  AccessPolicyType,
68
68
  FhsBinding,
69
+ LinkAggregationGroup,
69
70
  LinkState,
70
71
  LldpNeighbor,
71
72
  NtpServer,
@@ -74,12 +75,10 @@ def test_switch_records() -> None:
74
75
  PortStatusEntry,
75
76
  QosRule,
76
77
  StormControlConfig,
77
- StormControlType,
78
78
  StpPortConfig,
79
79
  SwitchAclRule,
80
80
  SwitchPort,
81
81
  VlanDef,
82
- LinkAggregationGroup,
83
82
  )
84
83
 
85
84
  p = SwitchPort(name="1", mode="access") # type: ignore[arg-type]
@@ -43,7 +43,13 @@ def test_switch_routing_records() -> None:
43
43
  RoutedInterface,
44
44
  )
45
45
 
46
- ri = RoutedInterface(name="vlan10", mode=InterfaceMode.SVI, ip_address="10.0.10.1", subnet="10.0.10.0/24", vlan_id=10)
46
+ ri = RoutedInterface(
47
+ name="vlan10",
48
+ mode=InterfaceMode.SVI,
49
+ ip_address="10.0.10.1",
50
+ subnet="10.0.10.0/24",
51
+ vlan_id=10,
52
+ )
47
53
  assert ri.vlan_id == 10
48
54
  d = InterfaceDhcpConfig(interface="vlan10")
49
55
  assert d.mode == "disabled" and d.relay_targets == []
@@ -51,5 +57,7 @@ def test_switch_routing_records() -> None:
51
57
  assert o.version == "v2" and o.interfaces == []
52
58
  oi = OspfInterfaceSettings(interface="vlan10", area="0.0.0.0")
53
59
  assert oi.passive is False
54
- g = RedundancyGroup(group_id=1, virtual_ip="10.0.10.254", role=RedundancyRole.PRIMARY, interface="vlan10")
60
+ g = RedundancyGroup(
61
+ group_id=1, virtual_ip="10.0.10.254", role=RedundancyRole.PRIMARY, interface="vlan10"
62
+ )
55
63
  assert g.virtual_ip == "10.0.10.254"
@@ -60,6 +60,8 @@ PROTOCOLS = [
60
60
  "get_application_flows",
61
61
  "set_uplink_selection",
62
62
  "get_uplink_selection",
63
+ "get_default_uplink",
64
+ "set_default_uplink",
63
65
  },
64
66
  ),
65
67
  (
File without changes
File without changes
File without changes
File without changes
@@ -13,6 +13,12 @@ from testprotocols.models.firewall import (
13
13
  ZonePolicy,
14
14
  )
15
15
  from testprotocols.models.impairment import ImpairmentProfile
16
+ from testprotocols.models.l2_common import (
17
+ MacTableEntry,
18
+ StpGuard,
19
+ StpMode,
20
+ StpPortState,
21
+ )
16
22
  from testprotocols.models.multicast import (
17
23
  McastGroup,
18
24
  McastSource,
@@ -22,6 +28,12 @@ from testprotocols.models.multicast import (
22
28
  from testprotocols.models.networking import HTTPResult, ICMPPacketData, IPAddresses
23
29
  from testprotocols.models.packets import RIPv2PacketData
24
30
  from testprotocols.models.qoe import MeasurementSpec, QoEResult
31
+ from testprotocols.models.radius import (
32
+ RadiusAccountingRecord,
33
+ RadiusServerConfig,
34
+ RadiusSession,
35
+ RadiusUser,
36
+ )
25
37
  from testprotocols.models.sdwan_appliance import (
26
38
  ApplicationCategory,
27
39
  BgpConfig,
@@ -69,12 +81,6 @@ from testprotocols.models.sdwan_appliance import (
69
81
  VpnRole,
70
82
  VpnSubnet,
71
83
  )
72
- from testprotocols.models.l2_common import (
73
- MacTableEntry,
74
- StpGuard,
75
- StpMode,
76
- StpPortState,
77
- )
78
84
  from testprotocols.models.switch import (
79
85
  AccessPolicy,
80
86
  AccessPolicyType,
@@ -105,14 +111,6 @@ from testprotocols.models.switch import (
105
111
  SwitchPort,
106
112
  VlanDef,
107
113
  )
108
- from testprotocols.models.radius import (
109
- RadiusAccountingRecord,
110
- RadiusServerConfig,
111
- RadiusSession,
112
- RadiusUser,
113
- )
114
- from testprotocols.models.tr069 import CpeConnectionStatus
115
- from testprotocols.models.traffic import TrafficResult, TrafficSpec
116
114
  from testprotocols.models.switch_routing import (
117
115
  InterfaceDhcpConfig,
118
116
  InterfaceMode,
@@ -123,6 +121,8 @@ from testprotocols.models.switch_routing import (
123
121
  RedundancyRole,
124
122
  RoutedInterface,
125
123
  )
124
+ from testprotocols.models.tr069 import CpeConnectionStatus
125
+ from testprotocols.models.traffic import TrafficResult, TrafficSpec
126
126
  from testprotocols.models.wan_edge import (
127
127
  AppFlow,
128
128
  LinkHealthReport,
@@ -151,114 +151,65 @@ from testprotocols.models.wifi import (
151
151
  )
152
152
 
153
153
  __all__ = [
154
- # l2_common
155
- "MacTableEntry",
156
- "StpGuard",
157
- "StpMode",
158
- "StpPortState",
159
154
  # switch
160
155
  "AccessPolicy",
161
156
  "AccessPolicyType",
162
157
  "AclDirection",
163
158
  "AggregationMode",
164
- "BindingSource",
165
- "DiscoveryProtocol",
166
- "Duplex",
167
- "FhsBinding",
168
- "FhsScope",
169
- "FhsTrustState",
170
- "LinkAggregationGroup",
171
- "LinkState",
172
- "LldpNeighbor",
173
- "NtpServer",
174
- "PoePortStatus",
175
- "PoePriority",
176
- "PoeStatus",
177
- "PortAdminState",
178
- "PortMode",
179
- "PortStatusEntry",
180
- "QosRule",
181
- "QosTrustMode",
182
- "StormControlConfig",
183
- "StormControlType",
184
- "StpPortConfig",
185
- "SwitchAclRule",
186
- "SwitchPort",
187
- "VlanDef",
188
- # switch_routing
189
- "InterfaceDhcpConfig",
190
- "InterfaceMode",
191
- "OspfConfig",
192
- "OspfInterfaceSettings",
193
- "OspfVersion",
194
- "RedundancyGroup",
195
- "RedundancyRole",
196
- "RoutedInterface",
197
159
  # wan_edge
198
160
  "AppFlow",
161
+ # sdwan_appliance
162
+ "ApplicationCategory",
163
+ "BgpConfig",
164
+ "BgpNeighbor",
165
+ "BgpPeerStatus",
166
+ "BgpSessionState",
167
+ "BindingSource",
199
168
  # firewall
200
169
  "Connection",
201
170
  "ConntrackStats",
171
+ "ContentCategory",
202
172
  # tr069
203
173
  "CpeConnectionStatus",
204
174
  # dhcp
205
175
  "DHCPTraceData",
206
176
  "DHCPV6TraceData",
177
+ "DhcpLease",
178
+ "DhcpMode",
179
+ "DhcpOption",
180
+ "DhcpOptionType",
181
+ "DhcpReservation",
182
+ "DiscoveryProtocol",
183
+ "Duplex",
184
+ "FhsBinding",
185
+ "FhsScope",
186
+ "FhsTrustState",
207
187
  "FirewallRule",
188
+ "FlowMatch",
208
189
  # networking
209
190
  "HTTPResult",
210
191
  "ICMPPacketData",
211
192
  "IPAddresses",
212
193
  # impairment
213
194
  "ImpairmentProfile",
214
- # sdwan_appliance
215
- "ApplicationCategory",
216
- "BgpConfig",
217
- "BgpNeighbor",
218
- "BgpPeerStatus",
219
- "BgpSessionState",
220
- "ContentCategory",
221
- "DhcpLease",
222
- "DhcpMode",
223
- "DhcpOption",
224
- "DhcpOptionType",
225
- "DhcpReservation",
226
- "FlowMatch",
195
+ # switch_routing
196
+ "InterfaceDhcpConfig",
197
+ "InterfaceMode",
227
198
  "IntrusionConfig",
228
199
  "IntrusionMode",
229
200
  "IntrusionSensitivity",
230
201
  "L3Rule",
231
202
  "L7MatchType",
232
203
  "L7Rule",
233
- "MalwareConfig",
234
- "MalwareMode",
235
- "NatInboundAllow",
236
- "OneToManyNatRule",
237
- "OneToOneNatRule",
238
- "PortForwardRule",
239
- "RuleAction",
240
- "RuleProtocol",
241
- "SecurityAction",
242
- "SecurityEvent",
243
- "ShapingPriority",
244
- "ShapingRule",
245
- "SiteToSiteVpnConfig",
246
- "StaticRoute",
247
- "SteeringScope",
248
- "SyslogRole",
249
- "SyslogServer",
250
- "ThreatCategory",
251
- "UplinkSelectionRule",
252
- "UplinkState",
253
- "UplinkStatus",
254
- "VlanConfig",
255
- "VpnHub",
256
- "VpnPeerState",
257
- "VpnPeerStatus",
258
- "VpnRole",
259
- "VpnSubnet",
204
+ "LinkAggregationGroup",
260
205
  "LinkHealthReport",
206
+ "LinkState",
261
207
  "LinkStatus",
208
+ "LldpNeighbor",
209
+ # l2_common
210
+ "MacTableEntry",
211
+ "MalwareConfig",
212
+ "MalwareMode",
262
213
  # multicast
263
214
  "McastGroup",
264
215
  "McastSource",
@@ -266,10 +217,26 @@ __all__ = [
266
217
  "MeasurementSpec",
267
218
  "MulticastGroupRecord",
268
219
  "MulticastGroupRecordType",
220
+ "NatInboundAllow",
269
221
  "NatRule",
222
+ "NtpServer",
223
+ "OneToManyNatRule",
224
+ "OneToOneNatRule",
225
+ "OspfConfig",
226
+ "OspfInterfaceSettings",
227
+ "OspfVersion",
270
228
  "PathMetrics",
229
+ "PoePortStatus",
230
+ "PoePriority",
231
+ "PoeStatus",
232
+ "PortAdminState",
233
+ "PortForwardRule",
271
234
  "PortMapping",
235
+ "PortMode",
236
+ "PortStatusEntry",
272
237
  "QoEResult",
238
+ "QosRule",
239
+ "QosTrustMode",
273
240
  # packets
274
241
  "RIPv2PacketData",
275
242
  # radius
@@ -277,14 +244,47 @@ __all__ = [
277
244
  "RadiusServerConfig",
278
245
  "RadiusSession",
279
246
  "RadiusUser",
247
+ "RedundancyGroup",
248
+ "RedundancyRole",
280
249
  "RouteEntry",
281
250
  "RouteOrigin",
251
+ "RoutedInterface",
252
+ "RuleAction",
253
+ "RuleProtocol",
282
254
  "SLAPolicy",
255
+ "SecurityAction",
256
+ "SecurityEvent",
257
+ "ShapingPriority",
258
+ "ShapingRule",
259
+ "SiteToSiteVpnConfig",
260
+ "StaticRoute",
261
+ "SteeringScope",
262
+ "StormControlConfig",
263
+ "StormControlType",
264
+ "StpGuard",
265
+ "StpMode",
266
+ "StpPortConfig",
267
+ "StpPortState",
268
+ "SwitchAclRule",
269
+ "SwitchPort",
270
+ "SyslogRole",
271
+ "SyslogServer",
272
+ "ThreatCategory",
283
273
  # traffic
284
274
  "TrafficResult",
285
275
  "TrafficShapingRule",
286
276
  "TrafficSpec",
277
+ "UplinkSelectionRule",
278
+ "UplinkState",
279
+ "UplinkStatus",
287
280
  "VPNPeerStatus",
281
+ "VlanConfig",
282
+ "VlanDef",
283
+ "VpnHub",
284
+ "VpnPeerState",
285
+ "VpnPeerStatus",
286
+ "VpnRole",
287
+ "VpnSubnet",
288
288
  # wifi
289
289
  "WifiAcl",
290
290
  "WifiBssConfig",