c65of 1.0.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 (85) hide show
  1. c65of-1.0.0/.github/dependabot.yml +17 -0
  2. c65of-1.0.0/.github/workflows/release-python.yml +45 -0
  3. c65of-1.0.0/.github/workflows/tests-codecheck.yml +28 -0
  4. c65of-1.0.0/.github/workflows/tests-unit.yml +31 -0
  5. c65of-1.0.0/.pylintrc +24 -0
  6. c65of-1.0.0/AUTHORS +2 -0
  7. c65of-1.0.0/ChangeLog +26 -0
  8. c65of-1.0.0/Dockerfile.tests +10 -0
  9. c65of-1.0.0/LICENSE +201 -0
  10. c65of-1.0.0/PKG-INFO +30 -0
  11. c65of-1.0.0/README.rst +59 -0
  12. c65of-1.0.0/c65of/__init__.py +1 -0
  13. c65of-1.0.0/c65of/app.py +276 -0
  14. c65of-1.0.0/c65of/codec.py +391 -0
  15. c65of-1.0.0/c65of/controller.py +575 -0
  16. c65of-1.0.0/c65of/dpset.py +206 -0
  17. c65of-1.0.0/c65of/hub.py +131 -0
  18. c65of-1.0.0/c65of/lib/__init__.py +1 -0
  19. c65of-1.0.0/c65of/lib/addrconv.py +87 -0
  20. c65of-1.0.0/c65of/lib/mac.py +54 -0
  21. c65of-1.0.0/c65of/lib/type_desc.py +105 -0
  22. c65of-1.0.0/c65of/ofctl.py +188 -0
  23. c65of-1.0.0/c65of/ofp_event.py +100 -0
  24. c65of-1.0.0/c65of/ofproto/__init__.py +30 -0
  25. c65of-1.0.0/c65of/ofproto/base.py +726 -0
  26. c65of-1.0.0/c65of/ofproto/consts.py +1118 -0
  27. c65of-1.0.0/c65of/ofproto/ether.py +19 -0
  28. c65of-1.0.0/c65of/ofproto/inet.py +19 -0
  29. c65of-1.0.0/c65of/ofproto/messages.py +905 -0
  30. c65of-1.0.0/c65of/ofproto/multipart.py +1296 -0
  31. c65of-1.0.0/c65of/ofproto/nx.py +378 -0
  32. c65of-1.0.0/c65of/ofproto/oxm.py +408 -0
  33. c65of-1.0.0/c65of/ofproto/parser.py +336 -0
  34. c65of-1.0.0/c65of/packet/__init__.py +1 -0
  35. c65of-1.0.0/c65of/packet/arp.py +78 -0
  36. c65of-1.0.0/c65of/packet/bpdu.py +45 -0
  37. c65of-1.0.0/c65of/packet/ether_types.py +30 -0
  38. c65of-1.0.0/c65of/packet/ethernet.py +54 -0
  39. c65of-1.0.0/c65of/packet/icmp.py +163 -0
  40. c65of-1.0.0/c65of/packet/icmpv6.py +640 -0
  41. c65of-1.0.0/c65of/packet/in_proto.py +33 -0
  42. c65of-1.0.0/c65of/packet/ipv4.py +128 -0
  43. c65of-1.0.0/c65of/packet/ipv6.py +420 -0
  44. c65of-1.0.0/c65of/packet/lldp.py +503 -0
  45. c65of-1.0.0/c65of/packet/packet.py +130 -0
  46. c65of-1.0.0/c65of/packet/packet_base.py +83 -0
  47. c65of-1.0.0/c65of/packet/packet_utils.py +93 -0
  48. c65of-1.0.0/c65of/packet/slow.py +295 -0
  49. c65of-1.0.0/c65of/packet/stream_parser.py +44 -0
  50. c65of-1.0.0/c65of/packet/vlan.py +69 -0
  51. c65of-1.0.0/c65of.egg-info/PKG-INFO +30 -0
  52. c65of-1.0.0/c65of.egg-info/SOURCES.txt +84 -0
  53. c65of-1.0.0/c65of.egg-info/dependency_links.txt +1 -0
  54. c65of-1.0.0/c65of.egg-info/not-zip-safe +1 -0
  55. c65of-1.0.0/c65of.egg-info/pbr.json +1 -0
  56. c65of-1.0.0/c65of.egg-info/requires.txt +1 -0
  57. c65of-1.0.0/c65of.egg-info/top_level.txt +1 -0
  58. c65of-1.0.0/codecheck-requirements.txt +5 -0
  59. c65of-1.0.0/docs/design.rst +60 -0
  60. c65of-1.0.0/docs/migration.rst +110 -0
  61. c65of-1.0.0/docs/releasing.rst +51 -0
  62. c65of-1.0.0/pyproject.toml +7 -0
  63. c65of-1.0.0/pyrightconfig.json +4 -0
  64. c65of-1.0.0/requirements.txt +1 -0
  65. c65of-1.0.0/run_tests.sh +17 -0
  66. c65of-1.0.0/setup.cfg +32 -0
  67. c65of-1.0.0/setup.py +23 -0
  68. c65of-1.0.0/test-requirements.txt +5 -0
  69. c65of-1.0.0/tests/test_app.py +286 -0
  70. c65of-1.0.0/tests/test_codec.py +172 -0
  71. c65of-1.0.0/tests/test_consts.py +112 -0
  72. c65of-1.0.0/tests/test_controller.py +909 -0
  73. c65of-1.0.0/tests/test_dpset.py +316 -0
  74. c65of-1.0.0/tests/test_lib.py +205 -0
  75. c65of-1.0.0/tests/test_messages.py +534 -0
  76. c65of-1.0.0/tests/test_multipart.py +694 -0
  77. c65of-1.0.0/tests/test_no_dependencies.py +88 -0
  78. c65of-1.0.0/tests/test_nx.py +275 -0
  79. c65of-1.0.0/tests/test_ofctl.py +115 -0
  80. c65of-1.0.0/tests/test_oxm.py +168 -0
  81. c65of-1.0.0/tests/test_packet_core.py +276 -0
  82. c65of-1.0.0/tests/test_packet_ip.py +309 -0
  83. c65of-1.0.0/tests/test_packet_ipv6.py +471 -0
  84. c65of-1.0.0/tests/test_packet_lldp_slow.py +502 -0
  85. c65of-1.0.0/tests/test_parser_core.py +189 -0
@@ -0,0 +1,17 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: "pip"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "daily"
8
+
9
+ - package-ecosystem: "docker"
10
+ directory: "/"
11
+ schedule:
12
+ interval: "daily"
13
+
14
+ - package-ecosystem: "github-actions"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "daily"
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: Build python packages for release
3
+
4
+ # pbr derives the version from the git tag, so a release is a tag push.
5
+ on:
6
+ push:
7
+ tags:
8
+ - "[0-9]+.[0-9]+.[0-9]+"
9
+
10
+ env:
11
+ RELEASE_PY_VER: "3.13"
12
+
13
+ jobs:
14
+ python-package:
15
+ name: "Build and publish python packages"
16
+ runs-on: ubuntu-latest
17
+ environment:
18
+ name: "release"
19
+ permissions:
20
+ contents: read
21
+ id-token: write
22
+ steps:
23
+ - name: Checkout repo
24
+ uses: actions/checkout@v7
25
+ with:
26
+ # Full history and tags: pbr reads the version from git describe.
27
+ fetch-depth: 0
28
+ - name: Set up python-${{ env.RELEASE_PY_VER }}
29
+ uses: actions/setup-python@v6
30
+ with:
31
+ python-version: ${{ env.RELEASE_PY_VER }}
32
+ - name: Build sdist and wheel
33
+ run: |
34
+ pip install -U build
35
+ python3 -m build
36
+ - name: Check the built version matches the tag
37
+ run: |
38
+ tag="${GITHUB_REF_NAME}"
39
+ if [ ! -f "dist/c65of-${tag}.tar.gz" ]; then
40
+ echo "tag ${tag} did not produce dist/c65of-${tag}.tar.gz:"
41
+ ls -1 dist
42
+ exit 1
43
+ fi
44
+ - name: Publish python package to PyPI
45
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Code checks
3
+
4
+ on: [push, pull_request]
5
+
6
+ jobs:
7
+ codecheck:
8
+ name: Code checks
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout repo
12
+ uses: actions/checkout@v7
13
+ - name: Set up python
14
+ uses: actions/setup-python@v6
15
+ with:
16
+ python-version: "3.13"
17
+ - name: Install dependencies
18
+ run: |
19
+ pip3 install -r codecheck-requirements.txt
20
+ pip3 install --no-deps -e .
21
+ - name: black
22
+ run: black --check --diff c65of tests
23
+ - name: pylint
24
+ run: pylint c65of tests
25
+ - name: flake8
26
+ run: flake8 --max-line-length=100 --extend-ignore=E203,W503 c65of tests
27
+ - name: pyright
28
+ run: pyright
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Unit tests
3
+
4
+ on: [push, pull_request]
5
+
6
+ jobs:
7
+ unit-tests:
8
+ name: Unit tests
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ python-version: ["3.12", "3.13", "3.14"]
14
+ steps:
15
+ - name: Checkout repo
16
+ uses: actions/checkout@v7
17
+ - name: Set up python-${{ matrix.python-version }}
18
+ uses: actions/setup-python@v6
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: |
23
+ pip3 install -r test-requirements.txt
24
+ pip3 install --no-deps -e .
25
+ - name: Run unit tests
26
+ run: |
27
+ pytest -n auto --cov=c65of --cov-report=xml \
28
+ --cov-fail-under=90 tests
29
+ - if: ${{ matrix.python-version == '3.13' }}
30
+ name: Upload codecov
31
+ uses: codecov/codecov-action@v7
c65of-1.0.0/.pylintrc ADDED
@@ -0,0 +1,24 @@
1
+ [MAIN]
2
+ jobs=0
3
+
4
+ [MESSAGES CONTROL]
5
+ # Protocol structs are wide by nature: field counts and constant tables are
6
+ # dictated by the wire format, not by our design.
7
+ disable=
8
+ duplicate-code,
9
+ too-few-public-methods,
10
+ too-many-arguments,
11
+ too-many-instance-attributes,
12
+ too-many-locals,
13
+ too-many-positional-arguments,
14
+ # %-formatting is the house style shared with faucet.
15
+ consider-using-f-string,
16
+ # Constructors are compiled by c65of.codec from the declared wire layout, so
17
+ # pylint cannot see where an attribute is first assigned. The declared
18
+ # attributes are published on the class with their defaults instead.
19
+ attribute-defined-outside-init,
20
+ access-member-before-definition,
21
+ no-member,
22
+
23
+ [FORMAT]
24
+ max-line-length=100
c65of-1.0.0/AUTHORS ADDED
@@ -0,0 +1,2 @@
1
+ Josh Bailey <anarkiwi@users.noreply.github.com>
2
+ Josh Bailey <josh@overlyspecific.com>
c65of-1.0.0/ChangeLog ADDED
@@ -0,0 +1,26 @@
1
+ CHANGES
2
+ =======
3
+
4
+ 1.0.0
5
+ -----
6
+
7
+ * controller: name the datapath before publishing its features reply
8
+ * multipart: say so when a single-body stats reply arrives empty
9
+ * addrconv: accept an ipaddress object, as netaddr did
10
+ * OpenFlow channel and datapath registry
11
+ * Nicira conntrack actions and the NXM match fields
12
+ * ci: publish to PyPI via Trusted Publishing on a version tag
13
+ * Guard that the runtime import graph is stdlib only
14
+ * Add hub.StreamServer; record the migration gaps
15
+ * Declare parser.\_\_all\_\_ so the re-exports are explicit
16
+ * Multipart family; make parser one module again
17
+ * OF1.3 messages; fix three bugs the coverage gate exposed
18
+ * OF event classes, generated from the message registry
19
+ * Packet layer: IPv6, ICMPv6, LLDP, LACP, BPDU constants
20
+ * Config value conversion helpers
21
+ * Land cls\_from\_jsondict\_key; test that a shared class name resolves
22
+ * Application framework and threading helpers
23
+ * Add OFPPort; resolve nested class names by enclosing module
24
+ * OF1.3 match, actions and instructions; ethernet and VLAN
25
+ * Scaffold c65of: declarative codec, address lib, OF1.3 constants, OXM
26
+ * Initial commit
@@ -0,0 +1,10 @@
1
+ # Multistage so dependency layers survive source-only changes.
2
+ FROM python:3.13-slim AS deps
3
+ WORKDIR /c65of-src
4
+ COPY requirements.txt test-requirements.txt codecheck-requirements.txt ./
5
+ RUN pip3 install --no-cache-dir -r codecheck-requirements.txt
6
+
7
+ FROM deps AS test
8
+ COPY ./ /c65of-src/
9
+ RUN pip3 install --no-cache-dir --no-deps -e .
10
+ CMD ["./run_tests.sh"]
c65of-1.0.0/LICENSE ADDED
@@ -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 [yyyy] [name of copyright owner]
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.
c65of-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: c65of
3
+ Version: 1.0.0
4
+ Summary: OpenFlow 1.3 protocol, packet and controller library with no runtime dependencies
5
+ Home-page: https://github.com/c65sdn/c65of
6
+ Author: c65sdn
7
+ License: Apache-2
8
+ Keywords: openflow,openvswitch,sdn
9
+ Platform: any
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: System Administrators
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Topic :: System :: Networking
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Operating System :: Unix
18
+ Requires-Python: >=3.12
19
+ License-File: LICENSE
20
+ Requires-Dist: pbr>=7.0.3
21
+ Dynamic: author
22
+ Dynamic: classifier
23
+ Dynamic: home-page
24
+ Dynamic: keywords
25
+ Dynamic: license
26
+ Dynamic: license-file
27
+ Dynamic: platform
28
+ Dynamic: requires-dist
29
+ Dynamic: requires-python
30
+ Dynamic: summary
c65of-1.0.0/README.rst ADDED
@@ -0,0 +1,59 @@
1
+ =====
2
+ c65of
3
+ =====
4
+
5
+ OpenFlow 1.3 protocol, packet parsing and controller library for python, with
6
+ no runtime dependencies.
7
+
8
+ c65of replaces `os-ken <https://opendev.org/openstack/os-ken>`_ for
9
+ `c65faucet <https://github.com/c65sdn/faucet>`_. It covers the OpenFlow 1.3
10
+ wire protocol, the ethernet/IP packet formats an OpenFlow controller needs to
11
+ parse, and the controller channel and application framework -- and nothing
12
+ else, so it does not shed surface underneath its consumers.
13
+
14
+ Install
15
+ =======
16
+
17
+ .. code:: bash
18
+
19
+ pip3 install c65of
20
+
21
+ Use
22
+ ===
23
+
24
+ .. code:: python
25
+
26
+ from c65of import ofproto as ofp
27
+ from c65of.ofproto import parser
28
+
29
+ match = parser.OFPMatch(eth_type=0x800, ipv4_dst="10.0.0.0/8")
30
+ mod = parser.OFPFlowMod(datapath, table_id=1, priority=100, match=match)
31
+
32
+ Design
33
+ ======
34
+
35
+ Wire formats are declared, not hand written: a class states its struct layout
36
+ and the codec compiles the constructor, the packer and the JSON dict form. See
37
+ `docs/design.rst <docs/design.rst>`_.
38
+
39
+ Encoding is verified against os-ken byte for byte by the differential test
40
+ suite; os-ken is a test dependency only.
41
+
42
+ Development
43
+ ===========
44
+
45
+ .. code:: bash
46
+
47
+ pip3 install -r codecheck-requirements.txt
48
+ ./run_tests.sh
49
+
50
+ Or in docker:
51
+
52
+ .. code:: bash
53
+
54
+ docker build -f Dockerfile.tests -t c65of-tests . && docker run c65of-tests
55
+
56
+ Licence
57
+ =======
58
+
59
+ Apache 2.0. Portions are ported from os-ken, also Apache 2.0.
@@ -0,0 +1 @@
1
+ """OpenFlow 1.3 protocol, packet and controller library."""