codecraftai-restclient-proxmox 1.2.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 (38) hide show
  1. codecraftai_restclient_proxmox-1.2.0/LICENSE.md +204 -0
  2. codecraftai_restclient_proxmox-1.2.0/PKG-INFO +85 -0
  3. codecraftai_restclient_proxmox-1.2.0/README.rst +65 -0
  4. codecraftai_restclient_proxmox-1.2.0/pyproject.toml +70 -0
  5. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/__init__.py +21 -0
  6. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/__init__.py +11 -0
  7. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/clustergroup.py +49 -0
  8. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/firewallgroup.py +153 -0
  9. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/groupsupport.py +196 -0
  10. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/lxcgroup.py +215 -0
  11. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/networkgroup.py +107 -0
  12. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/nodesgroup.py +92 -0
  13. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/qemugroup.py +671 -0
  14. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/storagegroup.py +136 -0
  15. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/apigroups/tasksgroup.py +67 -0
  16. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/aspectsproxmox.py +109 -0
  17. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/exceptions/__init__.py +11 -0
  18. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/exceptions/proxmoxauthenticationerror.py +20 -0
  19. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/exceptions/proxmoxtaskfailederror.py +20 -0
  20. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/__init__.py +11 -0
  21. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxclusterstatus.py +72 -0
  22. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxcontainerstatus.py +91 -0
  23. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxfirewallrule.py +95 -0
  24. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxnetworkinterface.py +72 -0
  25. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxnode.py +80 -0
  26. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxstorage.py +87 -0
  27. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxtaskhandle.py +195 -0
  28. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxtaskstatus.py +90 -0
  29. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/model/proxmoxvmstatus.py +96 -0
  30. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/proxmoxclient.py +390 -0
  31. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/py.typed +0 -0
  32. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/__init__.py +11 -0
  33. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/proxmoxcontainercreatespec.py +78 -0
  34. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/proxmoxdiskspec.py +52 -0
  35. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/proxmoxfirewallrulespec.py +91 -0
  36. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/proxmoxnicspec.py +61 -0
  37. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/proxmoxvmclonespec.py +78 -0
  38. codecraftai_restclient_proxmox-1.2.0/source/packages/ccai/restclient/proxmox/specs/proxmoxvmcreatespec.py +71 -0
@@ -0,0 +1,204 @@
1
+ # Code Craft AI - Source Available License
2
+ Version 1.0, October 2026
3
+
4
+ Copyright (C) 2026, Code Craft AI LLC
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies of *This License* document, but changing it is not allowed.
7
+
8
+ *This License* covers the Python Automation Kit, the full suite of software published by *Licensor* that consists of every `codecraftai-*` package, every `pychestrate` package, and the `pychestrate` server.
9
+
10
+ *The Software* is source available. Its source code is published so that anyone can read it, learn from it, and use it, but *This License* is not an open source license. *The Software* is free to use for *Non-Commercial Use*. *Commercial Use* is permitted in exchange for a *Usage Fee* that is based on a reasonable estimation of the income derived from *The Software*, as described in section 5. When a company migrates a product or service to *The Software* from another code base, the *Profit* from that product or service is not counted toward the *Usage Fee* for two years, as described in section 5.4. For assurance of costs, a company can disclose its usage and estimated returns to *Licensor* and negotiate a fixed license cost, as described in section 5.10.
11
+
12
+ ## 1. Definitions
13
+
14
+ ### 1.1 *This License* or *The License*
15
+ **This License** or **The License** refers to version 1.0 of the Code Craft AI - Source Available License.
16
+
17
+ ### 1.2 Licensor
18
+ **Licensor** refers to Code Craft AI LLC.
19
+
20
+ ### 1.3 The Software
21
+ **The Software** refers to the Python Automation Kit, the full suite of software that *Licensor* publishes under *This License*. The Python Automation Kit consists of the following components (each, a **Component**), together with their source code, documentation, and other materials:
22
+
23
+ 1. Every Python package published by *Licensor* whose name begins with `codecraftai-`
24
+ 2. Every Python package published by *Licensor* whose name begins with `pychestrate`
25
+ 3. The `pychestrate` server
26
+
27
+ ### 1.4 You
28
+ **You** refers to the individual or legal entity that exercises rights under *This License*. When an individual exercises rights under *This License* on behalf of a company, organization, or other legal entity, **You** refers to that entity.
29
+
30
+ ### 1.5 Use
31
+ **Use** means to install, execute, load, access, operate, display, copy, modify, configure, customize, and otherwise use.
32
+
33
+ ### 1.6 Non-Commercial Use
34
+ **Non-Commercial Use** means any *Use* of *The Software* that is not *Commercial Use*. Examples of *Non-Commercial Use* include personal use, hobby projects, study, teaching, academic research, evaluation, and use by a non-profit organization for its non-profit purposes.
35
+
36
+ ### 1.7 Commercial Use
37
+ **Commercial Use** means any *Use* of *The Software* by or on behalf of a for-profit entity, and any *Use* of *The Software* in connection with a product, service, or activity that generates revenue. *Commercial Use* includes, without limitation, *Use* of *The Software* to develop, build, test, validate, deploy, operate, or support commercial products and services, and *Use* of *The Software* to provide services to others.
38
+
39
+ ### 1.8 Commercial Activity
40
+ **Commercial Activity** means the products, services, and business operations in connection with which *You* make *Commercial Use* of *The Software*.
41
+
42
+ ### 1.9 Fiscal Year
43
+ **Fiscal Year** means the annual accounting period that *You* use for financial reporting.
44
+
45
+ ### 1.10 Profit
46
+ **Profit** means the net profit that *You* earn from the *Commercial Activity* during a *Fiscal Year*, determined under the accounting principles that *You* regularly use for financial reporting.
47
+
48
+ ### 1.11 Contribution Estimate
49
+ **Contribution Estimate** means *Your* reasonable, good faith estimate of the portion of the *Profit* that *The Software* contributed to, expressed as a number from 0 to 1.
50
+
51
+ ### 1.12 Derived Income
52
+ **Derived Income** means the portion of the *Profit* for a *Fiscal Year* that is derived from *The Software*, calculated as described in section 5.2.
53
+
54
+ ### 1.13 Usage Fee
55
+ **Usage Fee** means the yearly fee for *Commercial Use* that is set by the table in section 5.3.
56
+
57
+ ### 1.14 Migration
58
+ **Migration** means moving the work for one of *Your* products or services from a code base other than *The Software*, such as another framework, another library, or *Your* own code, to *The Software*.
59
+
60
+ ### 1.15 Migration Period
61
+ **Migration Period** means the two (2) year period, described in section 5.4, during which the *Profit* from a product or service that *You* are migrating to *The Software* is not counted.
62
+
63
+ ## 2. License Grant
64
+
65
+ Subject to the terms and conditions of *This License*, *Licensor* hereby grants to *You* a non-exclusive, worldwide, non-transferable license to *Use*, copy, modify, create derivative works of, and distribute *The Software*.
66
+
67
+ *Licensor* also grants to *You* a license under any patents that *Licensor* can license, and that are necessarily infringed by *The Software*, for the same purposes and subject to the same conditions as the license granted above.
68
+
69
+ *This License* covers the Python Automation Kit as a whole. *Use* of one, some, or all of the *Components* is *Use* of *The Software*.
70
+
71
+ The licenses granted by *This License* are free of charge for *Non-Commercial Use*. The licenses granted by *This License* for *Commercial Use* are conditioned on the payment of the *Usage Fee* described in section 5.
72
+
73
+ ## 3. Conditions
74
+
75
+ ### 3.1 License Notice
76
+ Every copy of *The Software* that *You* distribute, in original or modified form, must include a complete copy of *This License* and must keep all copyright, patent, trademark, and attribution notices that appear in *The Software*.
77
+
78
+ ### 3.2 Recipients
79
+ Anyone who receives *The Software* from *You* receives it under the terms of *This License*. *You* may not impose terms on a recipient that conflict with *This License*, and *You* may not grant a recipient rights that *This License* does not grant to *You*.
80
+
81
+ ### 3.3 Modified Versions
82
+ *You* must clearly mark any modified version of *The Software* as modified. *The Software* is published by *Licensor* under a specific identity, such as a package name. *You* may not publish a modified version of *The Software* under the identity that *Licensor* originally published it under. Every copy of *The Software* that *You* redistribute under its original identity must be an exact copy of *The Software* as *Licensor* published it.
83
+
84
+ ### 3.4 Trademarks
85
+ *This License* does not grant any rights to use the names, logos, or trademarks of *Licensor*, except as required to comply with section 3.1 and to describe the origin of *The Software*.
86
+
87
+ ## 4. Non-Commercial Use
88
+
89
+ *Non-Commercial Use* of *The Software* is free. No *Usage Fee*, registration, or report is required for *Non-Commercial Use*.
90
+
91
+ ## 5. Commercial Use
92
+
93
+ ### 5.1 Usage Fee Obligation
94
+ For each *Fiscal Year* in which *You* make *Commercial Use* of *The Software*, *You* must pay *Licensor* a *Usage Fee*. A single *Usage Fee* covers all of *Your* *Commercial Use* of the *Components*. *Usage Fees* are not owed separately for each *Component*.
95
+
96
+ ### 5.2 Derived Income
97
+ The *Derived Income* for a *Fiscal Year* is calculated as follows:
98
+
99
+ (Contribution Estimate) * (Profit) = (Derived Income)
100
+
101
+ If *You* make *Commercial Use* of *The Software* for more than one product or service, calculate the *Derived Income* for each product or service using its own *Contribution Estimate* and *Profit*, and add the results together. The *Profit* from a product or service that is in its *Migration Period* is not counted, as described in section 5.4.
102
+
103
+ If the *Profit* from a product or service for a *Fiscal Year* is zero or less, then the *Derived Income* from that product or service for that *Fiscal Year* is zero.
104
+
105
+ ### 5.3 Usage Fee
106
+ The *Usage Fee* for a *Fiscal Year* is set by the *Derived Income* for that *Fiscal Year*, as shown in the following table.
107
+
108
+ | Derived Income for the Fiscal Year | Usage Fee per Fiscal Year |
109
+ |------------------------------------|---------------------------|
110
+ | 1,000,000 or less | Free |
111
+ | More than 1,000,000, up to and including 10,000,000 | 50,000 |
112
+ | More than 10,000,000, up to and including 100,000,000 | 100,000 |
113
+ | More than 100,000,000, up to and including 1,000,000,000 | 250,000 |
114
+ | More than 1,000,000,000 | 500,000 |
115
+
116
+ All amounts in this section 5 are in United States dollars. If *You* report *Profit* in a different currency, convert the *Derived Income* to United States dollars using the average exchange rate for the *Fiscal Year*.
117
+
118
+ ### 5.4 Migration Allowance
119
+ When *You* migrate a product or service to *The Software*, the *Profit* from that product or service is not counted when calculating the *Derived Income* during its *Migration Period* (the **Migration Allowance**).
120
+
121
+ The *Migration Period* for a product or service begins on the date that *You* first make *Commercial Use* of *The Software* for that product or service as part of its *Migration*, and ends two (2) years after that date.
122
+
123
+ The *Migration Allowance* applies to each product or service separately, and *You* may use it for every product or service that *You* migrate. Each product or service has only one *Migration Period*.
124
+
125
+ If a *Fiscal Year* is only partly within the *Migration Period* of a product or service, the *Profit* from that product or service for that *Fiscal Year* is reduced in proportion to the number of days of that *Fiscal Year* that fall within its *Migration Period*.
126
+
127
+ For example, a company tests product A with *The Software* and pays a *Usage Fee* based on the *Profit* from product A. On March 1, 2027, the company begins moving the testing of product B from a different test framework to *The Software*. The company does not count the *Profit* from product B in its *Derived Income* from March 1, 2027 until March 1, 2029. Starting March 1, 2029, the *Profit* from product B is counted. If the company later migrates product C, the *Profit* from product C is not counted for two years from the start of its own *Migration*.
128
+
129
+ ### 5.5 Contribution Estimate
130
+ *You* are responsible for making the *Contribution Estimate*. A *Contribution Estimate* must be reasonable and made in good faith. The *Contribution Estimate* for a product or service covers all of the *Components* that *You* *Use* for that product or service. When making the *Contribution Estimate*, *You* should consider how important *The Software* is to the *Commercial Activity*, how much of the *Commercial Activity* depends on *The Software*, and the effort and cost that *You* would otherwise need to spend to accomplish what *The Software* accomplishes for *You*.
131
+
132
+ The following table is a guide for making the *Contribution Estimate*. When *Your* *Commercial Use* of *The Software* matches an entry in the table, the *Contribution Estimate* in that entry is a reasonable *Contribution Estimate*. When *Your* *Commercial Use* does not match an entry in the table, make the *Contribution Estimate* by comparing *Your* *Commercial Use* with the entries in the table. When more than one entry matches the same *Commercial Activity*, use the entry with the highest *Contribution Estimate*.
133
+
134
+ | Commercial Use of *The Software* | Contribution Estimate |
135
+ |----------------------------------|-----------------------|
136
+ | Quality Assurance (QA) and Continuous Integration (CI): *The Software* is used to test or validate the products or services of the *Commercial Activity*, or to run their build and test pipelines | 0.3 |
137
+ | Products Completely Based on *The Software*: the products or services of the *Commercial Activity* are built completely on *The Software* | 0.5 |
138
+
139
+ ### 5.6 Examples
140
+ A company earns 1,000,000,000 in *Profit* from a product line during a *Fiscal Year*. The company uses *The Software* for the QA and CI of that product line, so the *Contribution Estimate* is 0.3.
141
+
142
+ 0.3 * 1,000,000,000 = 300,000,000
143
+
144
+ The *Derived Income* of 300,000,000 is more than 100,000,000 and not more than 1,000,000,000, so the *Usage Fee* for that *Fiscal Year* is 250,000.
145
+
146
+ A company earns 4,000,000 in *Profit* from a product during a *Fiscal Year*. The product is built completely on *The Software*, so the *Contribution Estimate* is 0.5.
147
+
148
+ 0.5 * 4,000,000 = 2,000,000
149
+
150
+ The *Derived Income* of 2,000,000 is more than 1,000,000 and not more than 10,000,000, so the *Usage Fee* for that *Fiscal Year* is 50,000.
151
+
152
+ A company earns 3,000,000 in *Profit* from a product line during a *Fiscal Year*. The company uses *The Software* for the QA and CI of that product line, so the *Contribution Estimate* is 0.3.
153
+
154
+ 0.3 * 3,000,000 = 900,000
155
+
156
+ The *Derived Income* of 900,000 is 1,000,000 or less, so there is no *Usage Fee* for that *Fiscal Year*.
157
+
158
+ ### 5.7 Reporting and Payment
159
+ Within one hundred twenty (120) days after the end of each *Fiscal Year* for which a *Usage Fee* is owed, *You* must pay the *Usage Fee* to *Licensor* and provide *Licensor* with a written statement that shows the *Profit*, the *Contribution Estimate*, the reasoning used to make the *Contribution Estimate*, the *Derived Income*, and the *Usage Fee*. *Usage Fees* are payable in United States dollars. If any *Profit* is not counted under section 5.4, the statement must also identify each product or service that is in a *Migration Period* and show the dates of its *Migration Period*. No statement is required for a *Fiscal Year* in which no *Usage Fee* is owed.
160
+
161
+ ### 5.8 Records and Review
162
+ *You* must keep records that reasonably support each *Contribution Estimate*, each *Profit* figure, and the dates of any *Migration Period* for at least three (3) years after the end of the *Fiscal Year* that they apply to. No more than once in any twelve (12) month period, *Licensor* may ask in writing for the records that support a statement, and *You* must provide them within sixty (60) days of the request. *Licensor* will treat those records as confidential.
163
+
164
+ ### 5.9 Disputes About the Usage Fee
165
+ If *Licensor* believes that a *Contribution Estimate*, a *Profit* figure, or the dates of a *Migration Period* are not reasonable, *Licensor* will notify *You* in writing and explain why. *You* and *Licensor* will then negotiate in good faith for at least sixty (60) days to agree on a reasonable *Usage Fee*. If *You* and *Licensor* cannot agree, either party may resolve the dispute as described in section 8.
166
+
167
+ ### 5.10 Fixed License Cost
168
+ For assurance of costs, *You* may disclose to *Licensor* how *You* *Use* *The Software* and the returns that *You* estimate *You* will derive from it, and negotiate a fixed license cost with *Licensor*. A fixed license cost, and any other terms that *You* and *Licensor* agree to, must be set out in a writing signed by both *You* and *Licensor* (a **Fixed License Agreement**).
169
+
170
+ While a *Fixed License Agreement* is in effect, the fixed license cost replaces the *Usage Fee* for the *Commercial Use* that the *Fixed License Agreement* covers, and sections 5.7 through 5.9 apply to that *Commercial Use* only as the *Fixed License Agreement* provides. To the extent that a *Fixed License Agreement* conflicts with this section 5, the *Fixed License Agreement* controls.
171
+
172
+ *Licensor* will treat the information that *You* disclose under this section 5.10 as confidential.
173
+
174
+ ## 6. Termination
175
+
176
+ If *You* violate *This License*, the licenses granted to *You* by *This License* end. If *Licensor* notifies *You* in writing of the violation and *You* correct the violation within thirty (30) days of receiving the notice, including by paying any *Usage Fee* that is owed, then the licenses granted to *You* are reinstated. This reinstatement is available to *You* only once. Termination does not release *You* from any *Usage Fee* that is owed for *Commercial Use* that took place before the termination.
177
+
178
+ ## 7. No Warranty and Limitation of Liability
179
+
180
+ ### 7.1 No Warranty
181
+ *THE SOFTWARE* IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
182
+
183
+ ### 7.2 Limitation of Liability
184
+ TO THE EXTENT PERMITTED BY LAW, IN NO EVENT WILL *LICENSOR* BE LIABLE TO *YOU* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR EXEMPLARY DAMAGES OF ANY KIND ARISING OUT OF OR RELATED TO *THIS LICENSE* OR THE *USE* OF *THE SOFTWARE*, EVEN IF *LICENSOR* HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
185
+
186
+ ### 7.3 Support
187
+ *This License* does not entitle *You* to support, maintenance, or other services. Support and services are available only under a separate written agreement with *Licensor*.
188
+
189
+ ## 8. Governing Law and Jurisdiction
190
+
191
+ *This License* is governed by the laws of the State of Washington and the United States as though fully performed in Washington, without regard to provisions relating to conflicts of laws. The UN Convention for the International Sale of Goods and the Uniform Computer Information Transactions Act (UCITA) will not apply. The state and federal courts located in King County, Washington will have exclusive jurisdiction to adjudicate any disputes arising under *This License*, and *You* and *Licensor* agree to submit to the jurisdiction of those courts.
192
+
193
+ ## 9. General
194
+
195
+ ### 9.1 Severability
196
+ If any provision of *This License* is held to be unenforceable, that provision will be enforced to the maximum extent permitted, and the remaining provisions of *This License* will remain in effect.
197
+
198
+ ### 9.2 Interpretation
199
+ The section headings in *This License* are for reference purposes only and do not modify or restrict any term of *This License*. *This License* is written in the English language, and the English text prevails over any translation.
200
+
201
+ ### 9.3 Contact
202
+ Questions about *This License*, *Usage Fee* statements, payments, and requests to negotiate a *Fixed License Agreement* may be sent to *Licensor* using the contact information published at:
203
+
204
+ https://code-craft.ai
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: codecraftai-restclient-proxmox
3
+ Version: 1.2.0
4
+ Summary: Code Craft AI - Proxmox VE REST client
5
+ License-Expression: LicenseRef-CodeCraftAI-Source-Available
6
+ License-File: LICENSE.md
7
+ Keywords: python,automation,ccai,restclient,proxmox
8
+ Author: Myron Walker
9
+ Author-email: myron.walker@gmail.com
10
+ Requires-Python: >=3.10,<4.0
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: POSIX
13
+ Requires-Dist: codecraftai-foundations (<2.0.0)
14
+ Requires-Dist: codecraftai-restclient-base (<2.0.0)
15
+ Requires-Dist: requests (>=2.32.4,<3.0.0)
16
+ Project-URL: Issues, https://github.com/code-craft-ai-company/codecraftai-restclient-proxmox/issues
17
+ Project-URL: Repository, https://github.com/code-craft-ai-company/codecraftai-restclient-proxmox
18
+ Description-Content-Type: text/x-rst
19
+
20
+ =========================================
21
+ Code Craft AI Interop - Proxmox VE
22
+ =========================================
23
+
24
+ The ``codecraftai-restclient-proxmox`` package is the venue-specific REST client for Proxmox VE,
25
+ an open-source virtualization platform combining KVM virtual machines and LXC containers
26
+ under a clustered management plane. Proxmox exposes a REST API on port 8006 with a
27
+ ticket-based session scheme; the ``PVEAuthCookie`` ticket and ``CSRFPreventionToken`` are
28
+ handled inside this client via ``RestClientBase``'s authentication hook so callers see a
29
+ uniform credential-in, calls-out shape.
30
+
31
+ Highlights
32
+ ==========
33
+
34
+ - ``ProxmoxClient`` — a ``RestClientBase`` subclass handling ticket-based session auth and CSRF token management.
35
+ - Cluster and inventory enumeration — cluster and node enumeration, network (bridge/VLAN) inspection, and storage pool enumeration.
36
+ - VM and container lifecycle — create/clone/start/stop/reboot/destroy for both KVM VMs and LXC containers, plus disk and NIC management and template-based provisioning.
37
+ - Firewall and async tasks — firewall rule management and async-task tracking via the ``UPID`` returned by Proxmox for long-running operations.
38
+ - Aspects-driven transport — every behaviour-bearing call accepts ``aspects: AspectsRest = DEFAULT_PROXMOX_ASPECTS``; credentials enter as typed ``ProxmoxApiTokenCredential`` instances from ``codecraftai-credentials``.
39
+
40
+ Repository Structure
41
+ ====================
42
+
43
+ - ``development/`` - Runtime environment scripts.
44
+ - ``repository-setup/`` - Repository homing and setup scripts.
45
+ - ``source/packages/ccai/restclient/proxmox/`` - Package source code.
46
+ - ``source/testroots/testbase/ccai/tests/restclient/proxmox/`` - TestBase test roots.
47
+ - ``specs/`` - Requirements, design, and task documentation (Kiro-style).
48
+ - ``userguide/`` - Standards, conventions, and documentation.
49
+
50
+ Environment Setup
51
+ =================
52
+
53
+ When working in a Codex container:
54
+
55
+ .. code-block:: bash
56
+
57
+ ./development/setup-agent-container
58
+
59
+ For local development:
60
+
61
+ .. code-block:: bash
62
+
63
+ ./repository-setup/rehome-repository
64
+ ./development/setup-environment
65
+
66
+ Running Tests
67
+ =============
68
+
69
+ .. code-block:: bash
70
+
71
+ source .venv/bin/activate
72
+ testbase testing run --root ./source/testroots/testbase --includes=testbase.ccai.tests
73
+
74
+ Standards and Conventions
75
+ =========================
76
+
77
+ - Naming conventions: ``userguide/10-02-naming-conventions.rst``
78
+ - Code organization: ``userguide/10-01-code-organization.rst``
79
+ - Coding standards: ``userguide/10-00-coding-standards.rst``
80
+
81
+ Additional Resources
82
+ ====================
83
+
84
+ - User guide entry point: ``userguide/userguide.rst``
85
+
@@ -0,0 +1,65 @@
1
+ =========================================
2
+ Code Craft AI Interop - Proxmox VE
3
+ =========================================
4
+
5
+ The ``codecraftai-restclient-proxmox`` package is the venue-specific REST client for Proxmox VE,
6
+ an open-source virtualization platform combining KVM virtual machines and LXC containers
7
+ under a clustered management plane. Proxmox exposes a REST API on port 8006 with a
8
+ ticket-based session scheme; the ``PVEAuthCookie`` ticket and ``CSRFPreventionToken`` are
9
+ handled inside this client via ``RestClientBase``'s authentication hook so callers see a
10
+ uniform credential-in, calls-out shape.
11
+
12
+ Highlights
13
+ ==========
14
+
15
+ - ``ProxmoxClient`` — a ``RestClientBase`` subclass handling ticket-based session auth and CSRF token management.
16
+ - Cluster and inventory enumeration — cluster and node enumeration, network (bridge/VLAN) inspection, and storage pool enumeration.
17
+ - VM and container lifecycle — create/clone/start/stop/reboot/destroy for both KVM VMs and LXC containers, plus disk and NIC management and template-based provisioning.
18
+ - Firewall and async tasks — firewall rule management and async-task tracking via the ``UPID`` returned by Proxmox for long-running operations.
19
+ - Aspects-driven transport — every behaviour-bearing call accepts ``aspects: AspectsRest = DEFAULT_PROXMOX_ASPECTS``; credentials enter as typed ``ProxmoxApiTokenCredential`` instances from ``codecraftai-credentials``.
20
+
21
+ Repository Structure
22
+ ====================
23
+
24
+ - ``development/`` - Runtime environment scripts.
25
+ - ``repository-setup/`` - Repository homing and setup scripts.
26
+ - ``source/packages/ccai/restclient/proxmox/`` - Package source code.
27
+ - ``source/testroots/testbase/ccai/tests/restclient/proxmox/`` - TestBase test roots.
28
+ - ``specs/`` - Requirements, design, and task documentation (Kiro-style).
29
+ - ``userguide/`` - Standards, conventions, and documentation.
30
+
31
+ Environment Setup
32
+ =================
33
+
34
+ When working in a Codex container:
35
+
36
+ .. code-block:: bash
37
+
38
+ ./development/setup-agent-container
39
+
40
+ For local development:
41
+
42
+ .. code-block:: bash
43
+
44
+ ./repository-setup/rehome-repository
45
+ ./development/setup-environment
46
+
47
+ Running Tests
48
+ =============
49
+
50
+ .. code-block:: bash
51
+
52
+ source .venv/bin/activate
53
+ testbase testing run --root ./source/testroots/testbase --includes=testbase.ccai.tests
54
+
55
+ Standards and Conventions
56
+ =========================
57
+
58
+ - Naming conventions: ``userguide/10-02-naming-conventions.rst``
59
+ - Code organization: ``userguide/10-01-code-organization.rst``
60
+ - Coding standards: ``userguide/10-00-coding-standards.rst``
61
+
62
+ Additional Resources
63
+ ====================
64
+
65
+ - User guide entry point: ``userguide/userguide.rst``
@@ -0,0 +1,70 @@
1
+ [project]
2
+ name = "codecraftai-restclient-proxmox"
3
+ version = "1.2.0"
4
+ description = "Code Craft AI - Proxmox VE REST client"
5
+ readme = "README.rst"
6
+ license = "LicenseRef-CodeCraftAI-Source-Available"
7
+ authors = [{name = "Myron Walker", email = "myron.walker@gmail.com"}]
8
+ keywords = [
9
+ "python",
10
+ "automation",
11
+ "ccai",
12
+ "restclient",
13
+ "proxmox"
14
+ ]
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Operating System :: POSIX",
18
+ ]
19
+ requires-python = ">=3.10,<4.0"
20
+ dependencies = [
21
+ "requests>=2.32.4,<3.0.0",
22
+ "codecraftai-foundations<2.0.0",
23
+ "codecraftai-restclient-base<2.0.0",
24
+ ]
25
+
26
+ [project.urls]
27
+ Repository = "https://github.com/code-craft-ai-company/codecraftai-restclient-proxmox"
28
+ Issues = "https://github.com/code-craft-ai-company/codecraftai-restclient-proxmox/issues"
29
+
30
+ [dependency-groups]
31
+ dev = [
32
+ "codecraftai-testbase<2.0.0",
33
+ "requests-mock>=1.11.0",
34
+ ]
35
+
36
+ [tool.poetry]
37
+ packages = [{include="ccai", from="source/packages"}]
38
+
39
+ [tool.poetry.dependencies]
40
+ codecraftai-foundations = {source = "codecraftai"}
41
+ codecraftai-restclient-base = {source = "codecraftai"}
42
+
43
+ [tool.poetry.group.dev.dependencies]
44
+ codecraftai-testbase = {source = "codecraftai"}
45
+
46
+ [[tool.poetry.source]]
47
+ name = "codecraftai"
48
+ url = "https://code-craft.ai/licensed-repository/simple/"
49
+ priority = "supplemental"
50
+
51
+ [[tool.uv.index]]
52
+ # Same licensed index as [[tool.poetry.source]]. Listed before PyPI so that
53
+ # codecraftai-* packages (direct and transitive) resolve from it; everything
54
+ # else falls through to PyPI. Credentials: UV_INDEX_CODECRAFTAI_USERNAME /
55
+ # UV_INDEX_CODECRAFTAI_PASSWORD, or `uv auth login`.
56
+ name = "codecraftai"
57
+ url = "https://code-craft.ai/licensed-repository/simple/"
58
+
59
+ [tool.ruff.lint]
60
+ # Deliberately narrow. This gate exists for one reason: a bare `except:`
61
+ # swallows ConfigurationError and SemanticError, which derive from
62
+ # BaseException precisely so that they pass through ordinary handlers and end
63
+ # the run. Catching them hides the original cause behind whatever error
64
+ # happens next. See userguide/10-00-coding-standards.rst, exception-handling
65
+ # rules 5-7. Use `except Exception:` when you mean "any ordinary failure".
66
+ select = ["E722"]
67
+
68
+ [build-system]
69
+ requires = ["poetry-core"]
70
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,21 @@
1
+ """
2
+ .. module:: proxmox
3
+ :platform: Darwin, Linux, Unix, Windows
4
+ :synopsis: Package exposing the :class:`ProxmoxClient` REST client
5
+ and the typed Proxmox VE model and spec classes.
6
+
7
+ .. moduleauthor:: Myron Walker <myron.walker@gmail.com>
8
+ """
9
+
10
+ __author__ = "Myron Walker"
11
+ __copyright__ = "Copyright 2026, Code Craft AI LLC"
12
+ __credits__ = []
13
+
14
+
15
+ from ccai.restclient.proxmox.aspectsproxmox import (
16
+ AspectsProxmox, DEFAULT_PROXMOX_ASPECTS
17
+ )
18
+ from ccai.restclient.proxmox.proxmoxclient import ProxmoxClient
19
+
20
+
21
+ __all__ = ["AspectsProxmox", "DEFAULT_PROXMOX_ASPECTS", "ProxmoxClient"]
@@ -0,0 +1,11 @@
1
+ """
2
+ .. module:: apigroups
3
+ :platform: Darwin, Linux, Unix, Windows
4
+ :synopsis: Package exposing the Proxmox VE REST api-group classes.
5
+
6
+ .. moduleauthor:: Myron Walker <myron.walker@gmail.com>
7
+ """
8
+
9
+ __author__ = "Myron Walker"
10
+ __copyright__ = "Copyright 2026, Code Craft AI LLC"
11
+ __credits__ = []
@@ -0,0 +1,49 @@
1
+ """
2
+ .. module:: clustergroup
3
+ :platform: Darwin, Linux, Unix, Windows
4
+ :synopsis: Module that contains the :class:`ClusterGroup` api group
5
+ exposing the Proxmox VE cluster endpoints.
6
+
7
+ .. moduleauthor:: Myron Walker <myron.walker@gmail.com>
8
+ """
9
+
10
+ __author__ = "Myron Walker"
11
+ __copyright__ = "Copyright 2026, Code Craft AI LLC"
12
+ __credits__ = []
13
+
14
+
15
+ from ccai.restclient.base.restapigroup import RestApiGroup
16
+
17
+ from ccai.restclient.proxmox.aspectsproxmox import (
18
+ AspectsProxmox, DEFAULT_PROXMOX_ASPECTS
19
+ )
20
+ from ccai.restclient.proxmox.apigroups.groupsupport import (
21
+ compose_leaf, extract_data_list
22
+ )
23
+ from ccai.restclient.proxmox.model.proxmoxclusterstatus import (
24
+ ProxmoxClusterStatus
25
+ )
26
+
27
+
28
+ class ClusterGroup(RestApiGroup):
29
+ """
30
+ :class:`ClusterGroup` exposes the Proxmox VE cluster-level
31
+ endpoints — currently the ``/cluster/status`` query.
32
+ """
33
+
34
+ def status(self, *,
35
+ aspects: AspectsProxmox = DEFAULT_PROXMOX_ASPECTS) -> ProxmoxClusterStatus:
36
+ """
37
+ Retrieve the cluster status.
38
+
39
+ :param aspects: Behaviour control for the call.
40
+
41
+ :returns: A :class:`ProxmoxClusterStatus` record.
42
+ """
43
+ client = self.client
44
+ leaf = compose_leaf(parts=["cluster", "status"])
45
+ response = client.request(method="GET", leaf=leaf, aspects=aspects)
46
+ entries = extract_data_list(response=response, action="cluster status")
47
+
48
+ rtnval = ProxmoxClusterStatus.from_list(entries)
49
+ return rtnval
@@ -0,0 +1,153 @@
1
+ """
2
+ .. module:: firewallgroup
3
+ :platform: Darwin, Linux, Unix, Windows
4
+ :synopsis: Module that contains the :class:`FirewallGroup` api group
5
+ exposing the Proxmox VE firewall-rule endpoints.
6
+
7
+ .. moduleauthor:: Myron Walker <myron.walker@gmail.com>
8
+ """
9
+
10
+ __author__ = "Myron Walker"
11
+ __copyright__ = "Copyright 2026, Code Craft AI LLC"
12
+ __credits__ = []
13
+
14
+
15
+ from typing import List, Optional
16
+
17
+ from ccai.restclient.base.restapigroup import RestApiGroup
18
+
19
+ from ccai.restclient.proxmox.aspectsproxmox import (
20
+ AspectsProxmox, DEFAULT_PROXMOX_ASPECTS
21
+ )
22
+ from ccai.restclient.proxmox.apigroups.groupsupport import (
23
+ compose_leaf, extract_data_list, raise_for_status, require_node_name,
24
+ require_vmid
25
+ )
26
+ from ccai.restclient.proxmox.model.proxmoxfirewallrule import (
27
+ ProxmoxFirewallRule
28
+ )
29
+ from ccai.restclient.proxmox.specs.proxmoxfirewallrulespec import (
30
+ ProxmoxFirewallRuleSpec
31
+ )
32
+
33
+
34
+ class FirewallGroup(RestApiGroup):
35
+ """
36
+ :class:`FirewallGroup` exposes the Proxmox VE per-VM firewall-rule
37
+ endpoints — list, add, and delete. Add is idempotent by rule-tuple
38
+ identity; delete is idempotent on an unknown position.
39
+ """
40
+
41
+ def list_vm_firewall_rules(self, *, node_name: str, vmid: int,
42
+ aspects: AspectsProxmox = DEFAULT_PROXMOX_ASPECTS
43
+ ) -> List[ProxmoxFirewallRule]:
44
+ """
45
+ List the firewall rules attached to a VM.
46
+
47
+ :param node_name: The node hosting the VM.
48
+ :param vmid: The numeric VM identifier.
49
+ :param aspects: Behaviour control for the call.
50
+
51
+ :returns: A list of :class:`ProxmoxFirewallRule` records.
52
+
53
+ :raises: :class:`SemanticError` when arguments are invalid.
54
+ """
55
+ require_node_name(node_name=node_name)
56
+ require_vmid(vmid=vmid)
57
+
58
+ client = self.client
59
+ leaf = compose_leaf(parts=["nodes", node_name, "qemu", str(vmid),
60
+ "firewall", "rules"])
61
+ response = client.request(method="GET", leaf=leaf, aspects=aspects)
62
+ entries = extract_data_list(response=response,
63
+ action="list vm firewall rules")
64
+
65
+ rtnval: List[ProxmoxFirewallRule] = []
66
+ for entry in entries:
67
+ rtnval.append(ProxmoxFirewallRule.from_dict(entry))
68
+
69
+ return rtnval
70
+
71
+ def add_vm_firewall_rule(self, *, node_name: str, vmid: int,
72
+ spec: ProxmoxFirewallRuleSpec,
73
+ aspects: AspectsProxmox = DEFAULT_PROXMOX_ASPECTS
74
+ ) -> bool:
75
+ """
76
+ Add a firewall rule to a VM. When a rule with the same identity
77
+ tuple already exists the call is a no-op (idempotent contract).
78
+
79
+ :param node_name: The node hosting the VM.
80
+ :param vmid: The numeric VM identifier.
81
+ :param spec: The :class:`ProxmoxFirewallRuleSpec` to add.
82
+ :param aspects: Behaviour control for the call.
83
+
84
+ :returns: ``True`` when a rule was added, ``False`` when an
85
+ identical rule already existed.
86
+
87
+ :raises: :class:`SemanticError` when arguments are invalid.
88
+ """
89
+ require_node_name(node_name=node_name)
90
+ require_vmid(vmid=vmid)
91
+
92
+ existing = self.list_vm_firewall_rules(node_name=node_name,
93
+ vmid=vmid, aspects=aspects)
94
+ desired_identity = spec.identity_tuple()
95
+ for rule in existing:
96
+ if rule.identity_tuple() == desired_identity:
97
+ rtnval = False
98
+ return rtnval
99
+
100
+ client = self.client
101
+ leaf = compose_leaf(parts=["nodes", node_name, "qemu", str(vmid),
102
+ "firewall", "rules"])
103
+ response = client.request(method="POST", leaf=leaf,
104
+ form_body=spec.to_params(), aspects=aspects)
105
+ raise_for_status(response=response, action="add vm firewall rule")
106
+ rtnval = True
107
+ return rtnval
108
+
109
+ def delete_vm_firewall_rule(self, *, node_name: str, vmid: int,
110
+ position: int,
111
+ aspects: AspectsProxmox = DEFAULT_PROXMOX_ASPECTS
112
+ ) -> bool:
113
+ """
114
+ Delete a firewall rule from a VM by position. When the position
115
+ is unknown the call is a no-op (idempotent contract).
116
+
117
+ :param node_name: The node hosting the VM.
118
+ :param vmid: The numeric VM identifier.
119
+ :param position: The rule position index to delete.
120
+ :param aspects: Behaviour control for the call.
121
+
122
+ :returns: ``True`` when a rule was deleted, ``False`` when the
123
+ position was unknown.
124
+
125
+ :raises: :class:`SemanticError` when arguments are invalid.
126
+ """
127
+ require_node_name(node_name=node_name)
128
+ require_vmid(vmid=vmid)
129
+
130
+ existing = self.list_vm_firewall_rules(node_name=node_name,
131
+ vmid=vmid, aspects=aspects)
132
+ matched: Optional[ProxmoxFirewallRule] = None
133
+ for rule in existing:
134
+ if rule.pos == position:
135
+ matched = rule
136
+ break
137
+
138
+ if matched is None:
139
+ rtnval = False
140
+ return rtnval
141
+
142
+ client = self.client
143
+ leaf = compose_leaf(parts=["nodes", node_name, "qemu", str(vmid),
144
+ "firewall", "rules", str(position)])
145
+ response = client.request(method="DELETE", leaf=leaf, aspects=aspects)
146
+
147
+ if response.status_code == 404:
148
+ rtnval = False
149
+ return rtnval
150
+
151
+ raise_for_status(response=response, action="delete vm firewall rule")
152
+ rtnval = True
153
+ return rtnval