Skip to content

Commit 2328dbf

Browse files
authored
Deprecate support for api v2 (#26)
1 parent 602a036 commit 2328dbf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

glances_api/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,19 @@ def __init__(
1818
self,
1919
host: str = "localhost",
2020
port: int = 61208,
21-
version: int = 2,
21+
version: int = 3,
2222
ssl: bool = False,
2323
verify_ssl: bool = True,
2424
username: str | None = None,
2525
password: str | None = None,
2626
httpx_client: httpx.AsyncClient | None = None,
2727
):
2828
"""Initialize the connection."""
29+
if version == 2:
30+
_LOGGER.warning(
31+
"Glances api older than v3 will not be supported in the next release."
32+
)
33+
2934
schema = "https" if ssl else "http"
3035
self.url = f"{schema}://{host}:{port}/api/{version}"
3136
self.data: dict[str, Any] = {}

0 commit comments

Comments
 (0)