Skip to content

Commit 689fa59

Browse files
committed
fix(sdk): rename Client._configuration; skip WS for non-PVE
1 parent d9a3991 commit 689fa59

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# clientapi_pve
22

3-
Python SDK for the Proxmox Virtual Environment (PVE) API. Generated
4-
from the upstream `apidoc.js` via [openapi-generator-cli][gen] with
3+
Python SDK for the Proxmox Virtual Environment API. Generated
4+
from the upstream `apidoc.js` from Proxmox VE via [openapi-generator-cli][gen] with
55
custom Mustache template overrides.
66

77
> **Not an official Proxmox project.** Community SDK derived from the
8-
> upstream `apidoc.js`. Always verify against
9-
> <https://pve.proxmox.com/pve-docs/api-viewer/>.
8+
> upstream `apidoc.js`. Always verify against the upstream API viewer.
9+
> <https://pve.proxmox.com/>.
1010
1111
Requires Python ≥ 3.9.
1212

@@ -51,7 +51,7 @@ print([m for m in dir(pve.qemu) if not m.startswith('_')])
5151
```
5252

5353
Generated method-level docstrings explain parameters; the upstream
54-
endpoint reference is the [PVE API viewer][pve-api].
54+
endpoint reference is the upstream API viewer.
5555

5656
The unified `Pve` class wraps each per-tag API class (`QemuApi`,
5757
`LxcApi`, `ClusterApi`, `NodesApi`, …) so consumers don't need to
@@ -92,4 +92,4 @@ req = QemuCreateVmRequest(
9292
Apache 2.0 — see [LICENSE](./LICENSE).
9393

9494
[gen]: https://openapi-generator.tech
95-
[pve-api]: https://pve.proxmox.com/pve-docs/api-viewer/
95+
[upstream-docs]: https://pve.proxmox.com/

clientapi_pve/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def headers(self, config: Configuration) -> Dict[str, str]:
325325
if slot in api_key:
326326
prefix = api_key_prefix.get(slot, "")
327327
value = api_key[slot]
328-
# PVE's `Authorization: PVEAPIToken=<id>=<secret>` has no
328+
# Proxmox VE's `Authorization: PVEAPIToken=<id>=<secret>` has no
329329
# space between the prefix and the token, so join with
330330
# `+` rather than the OpenAPI-default `prefix + " " + value`.
331331
merged = f"{prefix}{value}" if prefix else value

examples/insecure_tls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
import sys
2323
import time
2424

25-
from pve_client.configuration import Configuration
26-
from pve_client.pve import Pve
27-
from pve_client.websocket import QemuTarget
25+
from clientapi_pve.configuration import Configuration
26+
from clientapi_pve.pve import Pve
27+
from clientapi_pve.websocket import QemuTarget
2828

2929

3030
def main() -> None:

examples/list_nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
import os
1212

13-
from pve_client.configuration import Configuration
14-
from pve_client.pve import Pve
13+
from clientapi_pve.configuration import Configuration
14+
from clientapi_pve.pve import Pve
1515

1616

1717
def main() -> None:

examples/resilient_terminal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import sys
1414
import time
1515

16-
from pve_client.configuration import Configuration
17-
from pve_client.websocket import QemuTarget
18-
from pve_client.websocket_resilient import RetryOptions, connect_terminal_resilient
16+
from clientapi_pve.configuration import Configuration
17+
from clientapi_pve.websocket import QemuTarget
18+
from clientapi_pve.websocket_resilient import RetryOptions, connect_terminal_resilient
1919

2020

2121
def main() -> None:

examples/terminal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import sys
1616
import time
1717

18-
from pve_client.configuration import Configuration
19-
from pve_client.pve import Pve
20-
from pve_client.websocket import QemuTarget
18+
from clientapi_pve.configuration import Configuration
19+
from clientapi_pve.pve import Pve
20+
from clientapi_pve.websocket import QemuTarget
2121

2222

2323
def main() -> None:

test/test_websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from typing import List
1111

12-
from pve_client.websocket import BinaryFrameCodec, TextFrameCodec
12+
from clientapi_pve.websocket import BinaryFrameCodec, TextFrameCodec
1313

1414

1515
def _decode(codec: TextFrameCodec, *chunks: str) -> List[str]:

0 commit comments

Comments
 (0)