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.
- {testprotocols-0.2.0/src/testprotocols.egg-info → testprotocols-0.3.0}/PKG-INFO +1 -1
- {testprotocols-0.2.0 → testprotocols-0.3.0}/pyproject.toml +1 -1
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/sdwan_policy_manager.py +25 -3
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/spanning_tree.py +1 -1
- {testprotocols-0.2.0 → testprotocols-0.3.0/src/testprotocols.egg-info}/PKG-INFO +1 -1
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_device_types.py +4 -3
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_sdwan_appliance_models.py +12 -9
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_switch_models.py +1 -2
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_switch_routing_models.py +10 -2
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_wan_edge_templates.py +2 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/LICENSE +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/NOTICE +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/README.md +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/setup.cfg +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/__init__.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/aftr_gateway.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/appliance_nat.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/appliance_uplinks.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/appliance_vlans.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/arp_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/bgp.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/conntrack.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/content_filtering.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/device_lifecycle.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/device_management.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/__init__.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/base.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/cpe.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/infra.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/sdwan.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/switch.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/traffic.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/voice.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/devices/wan.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/dhcp_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/dhcp_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/discovery.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/dns_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/file_transfer.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/firewall.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/firewall_zones.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/first_hop_security.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/gateway_redundancy.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/http_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/http_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/hw_console.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/interface_dhcp.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ip_interface.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ip_routing.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/iperf_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/iperf_generator.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/iperf_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/l3_firewall.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/l7_firewall.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/link_aggregation.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/mac_table.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/__init__.py +92 -92
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/dhcp.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/firewall.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/impairment.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/l2_common.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/multicast.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/networking.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/packets.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/qoe.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/radius.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/sdwan_appliance.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/switch.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/switch_routing.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/tr069.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/traffic.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/wan_edge.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/models/wifi.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/multicast_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/nat.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/netem_controller.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/network_endpoint.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/network_probe.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/nmap_scanner.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ntp_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ntp_config.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/ospf.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/packet_filter.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/pcap_capture.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/pdu_controller.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/port_poe.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/port_security.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/port_status.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/py.typed +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/qoe_browser.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/radius_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/radius_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/reachability_responder.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/routed_interfaces.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/router.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/routing_read.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/sip_phone.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/sip_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/site_to_site_vpn.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/snmp_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/static_routes.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/storm_control.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/streaming_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_acl.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_ports.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_qos.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/switch_vlans.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/syslog_config.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/tftp_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/threat_prevention.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/tr069_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/tr069_server.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/traffic_shaping.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/upnp_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/vlan_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wan_link_admin.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_bss.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_client.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_mesh.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_onboarding.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_radio.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_rf.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_stations.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols/wifi_transitions.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols.egg-info/SOURCES.txt +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols.egg-info/dependency_links.txt +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/src/testprotocols.egg-info/top_level.txt +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_appliance_vlans.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_cpe_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_dhcp_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_firewall_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_infra_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_ip_interface.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_ip_routing.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_network_tool_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_package_imports.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_radius_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_sdwan_appliance_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_switch_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_traffic_templates.py +0 -0
- {testprotocols-0.2.0 → testprotocols-0.3.0}/tests/test_voice_wifi_templates.py +0 -0
- {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.
|
|
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>
|
|
@@ -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;
|
|
11
|
-
|
|
12
|
-
|
|
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 (0
|
|
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.
|
|
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 = (
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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
|
-
#
|
|
215
|
-
"
|
|
216
|
-
"
|
|
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
|
-
"
|
|
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",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|