testprotocols 0.1.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 (142) hide show
  1. testprotocols-0.1.0/LICENSE +201 -0
  2. testprotocols-0.1.0/NOTICE +11 -0
  3. testprotocols-0.1.0/PKG-INFO +29 -0
  4. testprotocols-0.1.0/README.md +5 -0
  5. testprotocols-0.1.0/pyproject.toml +36 -0
  6. testprotocols-0.1.0/setup.cfg +4 -0
  7. testprotocols-0.1.0/src/testprotocols/__init__.py +217 -0
  8. testprotocols-0.1.0/src/testprotocols/aftr_gateway.py +22 -0
  9. testprotocols-0.1.0/src/testprotocols/appliance_nat.py +52 -0
  10. testprotocols-0.1.0/src/testprotocols/appliance_uplinks.py +32 -0
  11. testprotocols-0.1.0/src/testprotocols/appliance_vlans.py +50 -0
  12. testprotocols-0.1.0/src/testprotocols/arp_client.py +26 -0
  13. testprotocols-0.1.0/src/testprotocols/bgp.py +55 -0
  14. testprotocols-0.1.0/src/testprotocols/conntrack.py +147 -0
  15. testprotocols-0.1.0/src/testprotocols/content_filtering.py +47 -0
  16. testprotocols-0.1.0/src/testprotocols/device_lifecycle.py +49 -0
  17. testprotocols-0.1.0/src/testprotocols/device_management.py +50 -0
  18. testprotocols-0.1.0/src/testprotocols/devices/__init__.py +46 -0
  19. testprotocols-0.1.0/src/testprotocols/devices/base.py +40 -0
  20. testprotocols-0.1.0/src/testprotocols/devices/client.py +133 -0
  21. testprotocols-0.1.0/src/testprotocols/devices/cpe.py +66 -0
  22. testprotocols-0.1.0/src/testprotocols/devices/infra.py +62 -0
  23. testprotocols-0.1.0/src/testprotocols/devices/sdwan.py +97 -0
  24. testprotocols-0.1.0/src/testprotocols/devices/switch.py +115 -0
  25. testprotocols-0.1.0/src/testprotocols/devices/traffic.py +53 -0
  26. testprotocols-0.1.0/src/testprotocols/devices/voice.py +69 -0
  27. testprotocols-0.1.0/src/testprotocols/devices/wan.py +60 -0
  28. testprotocols-0.1.0/src/testprotocols/dhcp_client.py +30 -0
  29. testprotocols-0.1.0/src/testprotocols/dhcp_server.py +23 -0
  30. testprotocols-0.1.0/src/testprotocols/discovery.py +20 -0
  31. testprotocols-0.1.0/src/testprotocols/dns_client.py +23 -0
  32. testprotocols-0.1.0/src/testprotocols/file_transfer.py +22 -0
  33. testprotocols-0.1.0/src/testprotocols/firewall.py +121 -0
  34. testprotocols-0.1.0/src/testprotocols/firewall_zones.py +133 -0
  35. testprotocols-0.1.0/src/testprotocols/first_hop_security.py +52 -0
  36. testprotocols-0.1.0/src/testprotocols/gateway_redundancy.py +29 -0
  37. testprotocols-0.1.0/src/testprotocols/http_client.py +36 -0
  38. testprotocols-0.1.0/src/testprotocols/http_server.py +22 -0
  39. testprotocols-0.1.0/src/testprotocols/hw_console.py +48 -0
  40. testprotocols-0.1.0/src/testprotocols/infra_controller.py +28 -0
  41. testprotocols-0.1.0/src/testprotocols/interface_dhcp.py +30 -0
  42. testprotocols-0.1.0/src/testprotocols/ip_interface.py +62 -0
  43. testprotocols-0.1.0/src/testprotocols/ip_routing.py +57 -0
  44. testprotocols-0.1.0/src/testprotocols/iperf_client.py +47 -0
  45. testprotocols-0.1.0/src/testprotocols/iperf_generator.py +42 -0
  46. testprotocols-0.1.0/src/testprotocols/iperf_server.py +41 -0
  47. testprotocols-0.1.0/src/testprotocols/l3_firewall.py +74 -0
  48. testprotocols-0.1.0/src/testprotocols/l7_firewall.py +32 -0
  49. testprotocols-0.1.0/src/testprotocols/link_aggregation.py +24 -0
  50. testprotocols-0.1.0/src/testprotocols/mac_table.py +20 -0
  51. testprotocols-0.1.0/src/testprotocols/models/__init__.py +304 -0
  52. testprotocols-0.1.0/src/testprotocols/models/dhcp.py +28 -0
  53. testprotocols-0.1.0/src/testprotocols/models/firewall.py +197 -0
  54. testprotocols-0.1.0/src/testprotocols/models/impairment.py +18 -0
  55. testprotocols-0.1.0/src/testprotocols/models/l2_common.py +53 -0
  56. testprotocols-0.1.0/src/testprotocols/models/multicast.py +22 -0
  57. testprotocols-0.1.0/src/testprotocols/models/networking.py +50 -0
  58. testprotocols-0.1.0/src/testprotocols/models/packets.py +21 -0
  59. testprotocols-0.1.0/src/testprotocols/models/qoe.py +31 -0
  60. testprotocols-0.1.0/src/testprotocols/models/radius.py +63 -0
  61. testprotocols-0.1.0/src/testprotocols/models/sdwan_appliance.py +637 -0
  62. testprotocols-0.1.0/src/testprotocols/models/switch.py +297 -0
  63. testprotocols-0.1.0/src/testprotocols/models/switch_routing.py +122 -0
  64. testprotocols-0.1.0/src/testprotocols/models/tr069.py +35 -0
  65. testprotocols-0.1.0/src/testprotocols/models/traffic.py +29 -0
  66. testprotocols-0.1.0/src/testprotocols/models/wan_edge.py +116 -0
  67. testprotocols-0.1.0/src/testprotocols/models/wifi.py +183 -0
  68. testprotocols-0.1.0/src/testprotocols/multicast_client.py +20 -0
  69. testprotocols-0.1.0/src/testprotocols/nat.py +87 -0
  70. testprotocols-0.1.0/src/testprotocols/netem_controller.py +42 -0
  71. testprotocols-0.1.0/src/testprotocols/network_endpoint.py +32 -0
  72. testprotocols-0.1.0/src/testprotocols/network_probe.py +27 -0
  73. testprotocols-0.1.0/src/testprotocols/nmap_scanner.py +27 -0
  74. testprotocols-0.1.0/src/testprotocols/ntp_client.py +26 -0
  75. testprotocols-0.1.0/src/testprotocols/ntp_config.py +25 -0
  76. testprotocols-0.1.0/src/testprotocols/ospf.py +24 -0
  77. testprotocols-0.1.0/src/testprotocols/packet_filter.py +144 -0
  78. testprotocols-0.1.0/src/testprotocols/pcap_capture.py +39 -0
  79. testprotocols-0.1.0/src/testprotocols/pdu_controller.py +26 -0
  80. testprotocols-0.1.0/src/testprotocols/port_poe.py +25 -0
  81. testprotocols-0.1.0/src/testprotocols/port_security.py +25 -0
  82. testprotocols-0.1.0/src/testprotocols/port_status.py +23 -0
  83. testprotocols-0.1.0/src/testprotocols/py.typed +0 -0
  84. testprotocols-0.1.0/src/testprotocols/qoe_browser.py +62 -0
  85. testprotocols-0.1.0/src/testprotocols/radius_client.py +78 -0
  86. testprotocols-0.1.0/src/testprotocols/radius_server.py +130 -0
  87. testprotocols-0.1.0/src/testprotocols/routed_interfaces.py +29 -0
  88. testprotocols-0.1.0/src/testprotocols/router.py +53 -0
  89. testprotocols-0.1.0/src/testprotocols/routing_read.py +22 -0
  90. testprotocols-0.1.0/src/testprotocols/sdwan_policy_manager.py +64 -0
  91. testprotocols-0.1.0/src/testprotocols/sip_phone.py +230 -0
  92. testprotocols-0.1.0/src/testprotocols/sip_server.py +205 -0
  93. testprotocols-0.1.0/src/testprotocols/site_to_site_vpn.py +61 -0
  94. testprotocols-0.1.0/src/testprotocols/snmp_client.py +17 -0
  95. testprotocols-0.1.0/src/testprotocols/spanning_tree.py +37 -0
  96. testprotocols-0.1.0/src/testprotocols/static_routes.py +47 -0
  97. testprotocols-0.1.0/src/testprotocols/storm_control.py +24 -0
  98. testprotocols-0.1.0/src/testprotocols/streaming_server.py +32 -0
  99. testprotocols-0.1.0/src/testprotocols/switch_acl.py +29 -0
  100. testprotocols-0.1.0/src/testprotocols/switch_ports.py +28 -0
  101. testprotocols-0.1.0/src/testprotocols/switch_qos.py +33 -0
  102. testprotocols-0.1.0/src/testprotocols/switch_vlans.py +34 -0
  103. testprotocols-0.1.0/src/testprotocols/syslog_config.py +31 -0
  104. testprotocols-0.1.0/src/testprotocols/tftp_server.py +22 -0
  105. testprotocols-0.1.0/src/testprotocols/threat_prevention.py +60 -0
  106. testprotocols-0.1.0/src/testprotocols/tr069_client.py +47 -0
  107. testprotocols-0.1.0/src/testprotocols/tr069_server.py +151 -0
  108. testprotocols-0.1.0/src/testprotocols/traffic_shaping.py +54 -0
  109. testprotocols-0.1.0/src/testprotocols/upnp_client.py +37 -0
  110. testprotocols-0.1.0/src/testprotocols/vlan_client.py +22 -0
  111. testprotocols-0.1.0/src/testprotocols/wan_link_admin.py +34 -0
  112. testprotocols-0.1.0/src/testprotocols/wifi_bss.py +197 -0
  113. testprotocols-0.1.0/src/testprotocols/wifi_client.py +72 -0
  114. testprotocols-0.1.0/src/testprotocols/wifi_mesh.py +259 -0
  115. testprotocols-0.1.0/src/testprotocols/wifi_onboarding.py +105 -0
  116. testprotocols-0.1.0/src/testprotocols/wifi_radio.py +153 -0
  117. testprotocols-0.1.0/src/testprotocols/wifi_rf.py +78 -0
  118. testprotocols-0.1.0/src/testprotocols/wifi_stations.py +59 -0
  119. testprotocols-0.1.0/src/testprotocols/wifi_transitions.py +112 -0
  120. testprotocols-0.1.0/src/testprotocols.egg-info/PKG-INFO +29 -0
  121. testprotocols-0.1.0/src/testprotocols.egg-info/SOURCES.txt +140 -0
  122. testprotocols-0.1.0/src/testprotocols.egg-info/dependency_links.txt +1 -0
  123. testprotocols-0.1.0/src/testprotocols.egg-info/top_level.txt +1 -0
  124. testprotocols-0.1.0/tests/test_cpe_templates.py +97 -0
  125. testprotocols-0.1.0/tests/test_device_types.py +586 -0
  126. testprotocols-0.1.0/tests/test_dhcp_templates.py +37 -0
  127. testprotocols-0.1.0/tests/test_firewall_templates.py +142 -0
  128. testprotocols-0.1.0/tests/test_infra_templates.py +59 -0
  129. testprotocols-0.1.0/tests/test_ip_interface.py +29 -0
  130. testprotocols-0.1.0/tests/test_ip_routing.py +24 -0
  131. testprotocols-0.1.0/tests/test_network_tool_templates.py +74 -0
  132. testprotocols-0.1.0/tests/test_package_imports.py +46 -0
  133. testprotocols-0.1.0/tests/test_radius_templates.py +63 -0
  134. testprotocols-0.1.0/tests/test_sdwan_appliance_models.py +287 -0
  135. testprotocols-0.1.0/tests/test_sdwan_appliance_templates.py +134 -0
  136. testprotocols-0.1.0/tests/test_switch_models.py +100 -0
  137. testprotocols-0.1.0/tests/test_switch_routing_models.py +55 -0
  138. testprotocols-0.1.0/tests/test_switch_templates.py +69 -0
  139. testprotocols-0.1.0/tests/test_traffic_templates.py +73 -0
  140. testprotocols-0.1.0/tests/test_voice_wifi_templates.py +134 -0
  141. testprotocols-0.1.0/tests/test_wan_edge_templates.py +106 -0
  142. testprotocols-0.1.0/tests/test_wifi_templates.py +219 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Alottabits
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,11 @@
1
+ testprotocols
2
+ Copyright 2026 Alottabits
3
+
4
+ This product includes software developed at Alottabits.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use the files in this product except in compliance with
8
+ the License. A copy of the License is distributed with this product in
9
+ the file named "LICENSE", and may also be obtained at:
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.4
2
+ Name: testprotocols
3
+ Version: 0.1.0
4
+ Summary: Common Test Resource Layer — capability and device protocols for telco testing.
5
+ Author-email: Alottabits <rjvisser@alottabits.com>
6
+ Maintainer-email: Alottabits <rjvisser@alottabits.com>
7
+ License-Expression: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/alottabits/testprotocols
9
+ Project-URL: Repository, https://github.com/alottabits/testprotocols
10
+ Project-URL: Issues, https://github.com/alottabits/testprotocols/issues
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Telecommunications Industry
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.12
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ License-File: NOTICE
23
+ Dynamic: license-file
24
+
25
+ # testprotocols
26
+
27
+ Capability and device contracts as `typing.Protocol`s, plus their dataclass models. Pure stdlib, framework-neutral.
28
+
29
+ See the [monorepo README](../../README.md) for the full architecture.
@@ -0,0 +1,5 @@
1
+ # testprotocols
2
+
3
+ Capability and device contracts as `typing.Protocol`s, plus their dataclass models. Pure stdlib, framework-neutral.
4
+
5
+ See the [monorepo README](../../README.md) for the full architecture.
@@ -0,0 +1,36 @@
1
+ [project]
2
+ name = "testprotocols"
3
+ version = "0.1.0"
4
+ description = "Common Test Resource Layer — capability and device protocols for telco testing."
5
+ requires-python = ">=3.12"
6
+ dependencies = []
7
+ readme = "README.md"
8
+ license = "Apache-2.0"
9
+ license-files = ["LICENSE", "NOTICE"]
10
+ authors = [{ name = "Alottabits", email = "rjvisser@alottabits.com" }]
11
+ maintainers = [{ name = "Alottabits", email = "rjvisser@alottabits.com" }]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Developers",
15
+ "Intended Audience :: Telecommunications Industry",
16
+ "Operating System :: OS Independent",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Topic :: Software Development :: Testing",
20
+ "Typing :: Typed",
21
+ ]
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/alottabits/testprotocols"
25
+ Repository = "https://github.com/alottabits/testprotocols"
26
+ Issues = "https://github.com/alottabits/testprotocols/issues"
27
+
28
+ [build-system]
29
+ requires = ["setuptools>=77.0"]
30
+ build-backend = "setuptools.build_meta"
31
+
32
+ [tool.setuptools.packages.find]
33
+ where = ["src"]
34
+
35
+ [tool.setuptools.package-data]
36
+ testprotocols = ["py.typed", "SPLITS.md", "LEVELS.md"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,217 @@
1
+ """testprotocols — capability and device Protocols for telco resources under test."""
2
+
3
+ __version__ = "0.1.0"
4
+
5
+ from testprotocols.aftr_gateway import AftrGateway
6
+ from testprotocols.appliance_nat import ApplianceNat
7
+ from testprotocols.appliance_uplinks import ApplianceUplinks
8
+ from testprotocols.appliance_vlans import ApplianceVlans
9
+ from testprotocols.arp_client import ArpClient
10
+ from testprotocols.bgp import Bgp
11
+ from testprotocols.conntrack import Conntrack, ConntrackWhiteBox
12
+ from testprotocols.content_filtering import ContentFiltering
13
+ from testprotocols.device_lifecycle import DeviceLifecycle
14
+ from testprotocols.device_management import DeviceManagement
15
+ from testprotocols.devices.base import BaseDeviceProtocol
16
+ from testprotocols.devices.client import (
17
+ LanClientDevice,
18
+ QoeClientDevice,
19
+ WlanClientDevice,
20
+ )
21
+ from testprotocols.devices.cpe import CpeDevice
22
+ from testprotocols.devices.infra import (
23
+ AcsDevice,
24
+ ProvisionerDevice,
25
+ TftpDevice,
26
+ )
27
+ from testprotocols.devices.sdwan import SdwanApplianceDevice, SdwanRouterDevice
28
+ from testprotocols.devices.switch import L2Switch, L3Switch, L3SwitchRouted
29
+ from testprotocols.devices.traffic import (
30
+ IperfTrafficGeneratorDevice,
31
+ TrafficControllerDevice,
32
+ )
33
+ from testprotocols.devices.voice import (
34
+ SipPhoneDevice,
35
+ SipServerDevice,
36
+ )
37
+ from testprotocols.devices.wan import WanServerDevice
38
+ from testprotocols.dhcp_client import DhcpClient
39
+ from testprotocols.dhcp_server import DhcpServer
40
+ from testprotocols.discovery import Discovery
41
+ from testprotocols.dns_client import DnsClient
42
+ from testprotocols.file_transfer import FileTransfer
43
+ from testprotocols.firewall import Firewall, FirewallWhiteBox
44
+ from testprotocols.firewall_zones import FirewallZones
45
+ from testprotocols.first_hop_security import FirstHopSecurity
46
+ from testprotocols.gateway_redundancy import GatewayRedundancy
47
+ from testprotocols.http_client import HttpClient
48
+ from testprotocols.http_server import HttpServer
49
+ from testprotocols.hw_console import HwConsole
50
+ from testprotocols.infra_controller import InfraController
51
+ from testprotocols.interface_dhcp import InterfaceDhcp
52
+ from testprotocols.ip_interface import IpInterface
53
+ from testprotocols.ip_routing import IpRouting
54
+ from testprotocols.iperf_client import IperfClient
55
+ from testprotocols.iperf_generator import IperfGenerator
56
+ from testprotocols.iperf_server import IperfServer
57
+ from testprotocols.l3_firewall import L3Firewall
58
+ from testprotocols.l7_firewall import L7Firewall
59
+ from testprotocols.link_aggregation import LinkAggregation
60
+ from testprotocols.mac_table import MacTable
61
+ from testprotocols.multicast_client import MulticastClient
62
+ from testprotocols.nat import Nat
63
+ from testprotocols.netem_controller import NetemController
64
+ from testprotocols.nmap_scanner import NmapScanner
65
+ from testprotocols.ntp_client import NtpClient
66
+ from testprotocols.ntp_config import NtpConfig
67
+ from testprotocols.ospf import Ospf
68
+ from testprotocols.packet_filter import PacketFilter, PacketFilterWhiteBox
69
+ from testprotocols.pcap_capture import PcapCapture
70
+ from testprotocols.pdu_controller import PduController
71
+ from testprotocols.port_poe import PortPoe
72
+ from testprotocols.port_security import PortSecurity
73
+ from testprotocols.port_status import PortStatus
74
+ from testprotocols.qoe_browser import QoeBrowser
75
+ from testprotocols.radius_client import RadiusClient
76
+ from testprotocols.radius_server import RadiusServer
77
+ from testprotocols.routed_interfaces import RoutedInterfaces
78
+ from testprotocols.router import Router
79
+ from testprotocols.routing_read import RoutingRead
80
+ from testprotocols.sdwan_policy_manager import SdwanPolicyManager
81
+ from testprotocols.sip_phone import SipPhone
82
+ from testprotocols.sip_server import SipServer
83
+ from testprotocols.site_to_site_vpn import SiteToSiteVpn
84
+ from testprotocols.snmp_client import SnmpClient
85
+ from testprotocols.spanning_tree import SpanningTree
86
+ from testprotocols.static_routes import StaticRoutes
87
+ from testprotocols.storm_control import StormControl
88
+ from testprotocols.streaming_server import StreamingServer
89
+ from testprotocols.switch_acl import SwitchAcl
90
+ from testprotocols.switch_ports import SwitchPorts
91
+ from testprotocols.switch_qos import SwitchQos
92
+ from testprotocols.switch_vlans import SwitchVlans
93
+ from testprotocols.syslog_config import SyslogConfig
94
+ from testprotocols.tftp_server import TftpServer
95
+ from testprotocols.threat_prevention import ThreatPrevention
96
+ from testprotocols.tr069_client import Tr069Client
97
+ from testprotocols.tr069_server import Tr069Server
98
+ from testprotocols.traffic_shaping import TrafficShaping
99
+ from testprotocols.upnp_client import UpnpClient
100
+ from testprotocols.vlan_client import VlanClient
101
+ from testprotocols.wan_link_admin import WanLinkAdmin
102
+ from testprotocols.wifi_bss import WifiBss
103
+ from testprotocols.wifi_client import WifiClient
104
+ from testprotocols.wifi_mesh import WifiMesh, WifiMeshWhiteBox
105
+ from testprotocols.wifi_onboarding import WifiOnboarding
106
+ from testprotocols.wifi_radio import WifiRadio, WifiRadioWhiteBox
107
+ from testprotocols.wifi_rf import WifiRf
108
+ from testprotocols.wifi_stations import WifiStations
109
+ from testprotocols.wifi_transitions import WifiTransitions
110
+
111
+ __all__ = [
112
+ "AcsDevice",
113
+ "AftrGateway",
114
+ "ApplianceNat",
115
+ "ApplianceUplinks",
116
+ "ApplianceVlans",
117
+ "ArpClient",
118
+ "BaseDeviceProtocol",
119
+ "Bgp",
120
+ "Conntrack",
121
+ "ConntrackWhiteBox",
122
+ "ContentFiltering",
123
+ "CpeDevice",
124
+ "DeviceLifecycle",
125
+ "DeviceManagement",
126
+ "DhcpClient",
127
+ "DhcpServer",
128
+ "Discovery",
129
+ "DnsClient",
130
+ "FileTransfer",
131
+ "Firewall",
132
+ "FirewallWhiteBox",
133
+ "FirewallZones",
134
+ "FirstHopSecurity",
135
+ "GatewayRedundancy",
136
+ "HttpClient",
137
+ "HttpServer",
138
+ "HwConsole",
139
+ "InfraController",
140
+ "InterfaceDhcp",
141
+ "IpInterface",
142
+ "IpRouting",
143
+ "IperfClient",
144
+ "IperfGenerator",
145
+ "IperfServer",
146
+ "IperfTrafficGeneratorDevice",
147
+ "L2Switch",
148
+ "L3Firewall",
149
+ "L3Switch",
150
+ "L3SwitchRouted",
151
+ "L7Firewall",
152
+ "LanClientDevice",
153
+ "LinkAggregation",
154
+ "MacTable",
155
+ "MulticastClient",
156
+ "Nat",
157
+ "NetemController",
158
+ "NmapScanner",
159
+ "NtpClient",
160
+ "NtpConfig",
161
+ "Ospf",
162
+ "PacketFilter",
163
+ "PacketFilterWhiteBox",
164
+ "PcapCapture",
165
+ "PduController",
166
+ "PortPoe",
167
+ "PortSecurity",
168
+ "PortStatus",
169
+ "ProvisionerDevice",
170
+ "QoeBrowser",
171
+ "QoeClientDevice",
172
+ "RadiusClient",
173
+ "RadiusServer",
174
+ "RoutedInterfaces",
175
+ "Router",
176
+ "RoutingRead",
177
+ "SdwanApplianceDevice",
178
+ "SdwanPolicyManager",
179
+ "SdwanRouterDevice",
180
+ "SipPhone",
181
+ "SipPhoneDevice",
182
+ "SipServer",
183
+ "SipServerDevice",
184
+ "SiteToSiteVpn",
185
+ "SnmpClient",
186
+ "SpanningTree",
187
+ "StaticRoutes",
188
+ "StormControl",
189
+ "StreamingServer",
190
+ "SwitchAcl",
191
+ "SwitchPorts",
192
+ "SwitchQos",
193
+ "SwitchVlans",
194
+ "SyslogConfig",
195
+ "TftpDevice",
196
+ "TftpServer",
197
+ "ThreatPrevention",
198
+ "Tr069Client",
199
+ "Tr069Server",
200
+ "TrafficControllerDevice",
201
+ "TrafficShaping",
202
+ "UpnpClient",
203
+ "VlanClient",
204
+ "WanLinkAdmin",
205
+ "WanServerDevice",
206
+ "WifiBss",
207
+ "WifiClient",
208
+ "WifiMesh",
209
+ "WifiMeshWhiteBox",
210
+ "WifiOnboarding",
211
+ "WifiRadio",
212
+ "WifiRadioWhiteBox",
213
+ "WifiRf",
214
+ "WifiStations",
215
+ "WifiTransitions",
216
+ "WlanClientDevice",
217
+ ]
@@ -0,0 +1,22 @@
1
+ """AFTR / Gateway template.
2
+
3
+ Defines the abstract contract for Address Family Transition Router (AFTR)
4
+ gateway operations used in DS-Lite deployments.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Protocol, runtime_checkable
10
+
11
+
12
+ @runtime_checkable
13
+ class AftrGateway(Protocol):
14
+ """Abstract contract for AFTR gateway operations."""
15
+
16
+ def configure_aftr(self) -> None:
17
+ """Apply the AFTR configuration on the gateway."""
18
+ ...
19
+
20
+ def restart_aftr_process(self) -> None:
21
+ """Restart the AFTR process on the gateway."""
22
+ ...
@@ -0,0 +1,52 @@
1
+ """NAT template — managed SD-WAN appliance edition.
2
+
3
+ Defines the abstract contract for an appliance's NAT surfaces: 1:1 NAT, 1:Many
4
+ (PAT), and port-forwarding (DNAT). Each is an ordered list read and replaced as
5
+ a whole — the appliance-native shape, distinct from the host-tier ``nat.Nat``
6
+ (iptables SNAT/DNAT primitives, add/remove by name) used by the Linux digital
7
+ twin.
8
+
9
+ In scope: read/replace the 1:1, 1:Many, and port-forwarding rule lists.
10
+
11
+ Out of scope: low-level iptables NAT primitives (see ``nat``), firewall rules
12
+ (see ``l3_firewall`` / ``l7_firewall``).
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from typing import Protocol, runtime_checkable
18
+
19
+ from testprotocols.models.sdwan_appliance import (
20
+ OneToManyNatRule,
21
+ OneToOneNatRule,
22
+ PortForwardRule,
23
+ )
24
+
25
+
26
+ @runtime_checkable
27
+ class ApplianceNat(Protocol):
28
+ """Abstract contract for an appliance's NAT rule sets."""
29
+
30
+ def set_one_to_one_rules(self, rules: list[OneToOneNatRule]) -> None:
31
+ """Replace the 1:1 NAT mapping list with *rules*."""
32
+ ...
33
+
34
+ def get_one_to_one_rules(self) -> list[OneToOneNatRule]:
35
+ """Return the 1:1 NAT mappings."""
36
+ ...
37
+
38
+ def set_one_to_many_rules(self, rules: list[OneToManyNatRule]) -> None:
39
+ """Replace the 1:Many (PAT) mapping list with *rules*."""
40
+ ...
41
+
42
+ def get_one_to_many_rules(self) -> list[OneToManyNatRule]:
43
+ """Return the 1:Many (PAT) mappings."""
44
+ ...
45
+
46
+ def set_port_forwarding_rules(self, rules: list[PortForwardRule]) -> None:
47
+ """Replace the port-forwarding rule list with *rules*."""
48
+ ...
49
+
50
+ def get_port_forwarding_rules(self) -> list[PortForwardRule]:
51
+ """Return the port-forwarding rules."""
52
+ ...
@@ -0,0 +1,32 @@
1
+ """WAN uplink template — managed SD-WAN appliance.
2
+
3
+ Defines the abstract contract for observing an appliance's WAN uplinks: their
4
+ operational state and addressing. Read-only — uplink *configuration* (static vs
5
+ DHCP, PPPoE, etc.) is a separate concern not yet modelled (add on evidence).
6
+
7
+ This replaces, for a managed appliance, the Linux-host ``ip_interface`` surface
8
+ (per-interface ``ip addr``/``link``/``mtu``/``mac``) which a cloud-managed
9
+ appliance does not expose.
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ from typing import Protocol, runtime_checkable
15
+
16
+ from testprotocols.models.sdwan_appliance import UplinkStatus
17
+
18
+
19
+ @runtime_checkable
20
+ class ApplianceUplinks(Protocol):
21
+ """Abstract contract for observing an appliance's WAN uplinks."""
22
+
23
+ def get_uplinks(self) -> list[UplinkStatus]:
24
+ """Return the status of every WAN uplink."""
25
+ ...
26
+
27
+ def get_uplink(self, name: str) -> UplinkStatus:
28
+ """Return the status of the named uplink (e.g. ``"wan1"``).
29
+
30
+ Raises KeyError if no uplink with that name exists.
31
+ """
32
+ ...
@@ -0,0 +1,50 @@
1
+ """LAN VLAN + DHCP template — managed SD-WAN appliance.
2
+
3
+ Defines the abstract contract for a managed appliance's LAN side: per-VLAN
4
+ subnet/addressing and DHCP configuration, plus observed DHCP leases. This is the
5
+ appliance counterpart to a Linux host's interface + DHCP-server surfaces — an
6
+ appliance configures DHCP per VLAN, not via a host daemon.
7
+
8
+ In scope: list/get/set VLAN configuration (incl. per-VLAN DHCP), and read DHCP
9
+ leases.
10
+
11
+ Out of scope: WAN uplink status (see ``appliance_uplinks``), L3 firewall
12
+ (see ``l3_firewall``), and host-style per-interface config (see ``ip_interface``).
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from typing import Protocol, runtime_checkable
18
+
19
+ from testprotocols.models.sdwan_appliance import DhcpLease, VlanConfig
20
+
21
+
22
+ @runtime_checkable
23
+ class ApplianceVlans(Protocol):
24
+ """Abstract contract for an appliance's LAN VLANs and DHCP."""
25
+
26
+ def list_vlans(self) -> list[VlanConfig]:
27
+ """Return every configured LAN VLAN."""
28
+ ...
29
+
30
+ def get_vlan(self, vlan_id: int) -> VlanConfig:
31
+ """Return the VLAN with *vlan_id*.
32
+
33
+ Raises KeyError if no VLAN with that id exists.
34
+ """
35
+ ...
36
+
37
+ def set_vlan(self, config: VlanConfig) -> None:
38
+ """Create or replace the VLAN identified by ``config.vlan_id``."""
39
+ ...
40
+
41
+ def get_dhcp_leases(self, vlan_id: int | None = None) -> list[DhcpLease]:
42
+ """Return current DHCP leases, optionally filtered to one *vlan_id*.
43
+
44
+ Best-effort read: several management planes publish no true lease
45
+ table, so a driver may approximate from observed-client visibility
46
+ (no expiry / binding state) or raise unsupported-capability. Tests
47
+ should treat the result as observational evidence, not an exact
48
+ lease-table assertion.
49
+ """
50
+ ...