cribl-control-plane 0.0.46__py3-none-any.whl → 0.0.47__py3-none-any.whl
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.
Potentially problematic release.
This version of cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/errors/apierror.py +2 -0
- cribl_control_plane/errors/criblcontrolplaneerror.py +11 -7
- cribl_control_plane/errors/error.py +4 -2
- cribl_control_plane/errors/healthstatus_error.py +4 -2
- cribl_control_plane/errors/no_response_error.py +5 -1
- cribl_control_plane/errors/responsevalidationerror.py +2 -0
- {cribl_control_plane-0.0.46.dist-info → cribl_control_plane-0.0.47.dist-info}/METADATA +1 -1
- {cribl_control_plane-0.0.46.dist-info → cribl_control_plane-0.0.47.dist-info}/RECORD +10 -10
- {cribl_control_plane-0.0.46.dist-info → cribl_control_plane-0.0.47.dist-info}/WHEEL +0 -0
cribl_control_plane/_version.py
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "cribl-control-plane"
|
|
6
|
-
__version__: str = "0.0.
|
|
6
|
+
__version__: str = "0.0.47"
|
|
7
7
|
__openapi_doc_version__: str = "4.14.0-837595d5"
|
|
8
|
-
__gen_version__: str = "2.
|
|
8
|
+
__gen_version__: str = "2.707.0"
|
|
9
9
|
__user_agent__: str = (
|
|
10
|
-
"speakeasy-sdk/python 0.0.
|
|
10
|
+
"speakeasy-sdk/python 0.0.47 2.707.0 4.14.0-837595d5 cribl-control-plane"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
try:
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from typing import Optional
|
|
5
|
+
from dataclasses import dataclass
|
|
5
6
|
|
|
6
7
|
from cribl_control_plane.errors import CriblControlPlaneError
|
|
7
8
|
|
|
8
9
|
MAX_MESSAGE_LEN = 10_000
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
@dataclass(frozen=True)
|
|
11
13
|
class APIError(CriblControlPlaneError):
|
|
12
14
|
"""The fallback error class if no more specific error class is matched."""
|
|
13
15
|
|
|
@@ -2,25 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from typing import Optional
|
|
5
|
+
from dataclasses import dataclass, field
|
|
5
6
|
|
|
6
7
|
|
|
8
|
+
@dataclass(frozen=True)
|
|
7
9
|
class CriblControlPlaneError(Exception):
|
|
8
10
|
"""The base class for all HTTP error responses."""
|
|
9
11
|
|
|
10
12
|
message: str
|
|
11
13
|
status_code: int
|
|
12
14
|
body: str
|
|
13
|
-
headers: httpx.Headers
|
|
14
|
-
raw_response: httpx.Response
|
|
15
|
+
headers: httpx.Headers = field(hash=False)
|
|
16
|
+
raw_response: httpx.Response = field(hash=False)
|
|
15
17
|
|
|
16
18
|
def __init__(
|
|
17
19
|
self, message: str, raw_response: httpx.Response, body: Optional[str] = None
|
|
18
20
|
):
|
|
19
|
-
self
|
|
20
|
-
self
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
object.__setattr__(self, "message", message)
|
|
22
|
+
object.__setattr__(self, "status_code", raw_response.status_code)
|
|
23
|
+
object.__setattr__(
|
|
24
|
+
self, "body", body if body is not None else raw_response.text
|
|
25
|
+
)
|
|
26
|
+
object.__setattr__(self, "headers", raw_response.headers)
|
|
27
|
+
object.__setattr__(self, "raw_response", raw_response)
|
|
24
28
|
|
|
25
29
|
def __str__(self):
|
|
26
30
|
return self.message
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from cribl_control_plane.errors import CriblControlPlaneError
|
|
5
5
|
from cribl_control_plane.types import BaseModel
|
|
6
|
+
from dataclasses import dataclass, field
|
|
6
7
|
import httpx
|
|
7
8
|
from typing import Optional
|
|
8
9
|
|
|
@@ -12,8 +13,9 @@ class ErrorData(BaseModel):
|
|
|
12
13
|
r"""Error message"""
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
@dataclass(frozen=True)
|
|
15
17
|
class Error(CriblControlPlaneError):
|
|
16
|
-
data: ErrorData
|
|
18
|
+
data: ErrorData = field(hash=False)
|
|
17
19
|
|
|
18
20
|
def __init__(
|
|
19
21
|
self, data: ErrorData, raw_response: httpx.Response, body: Optional[str] = None
|
|
@@ -21,4 +23,4 @@ class Error(CriblControlPlaneError):
|
|
|
21
23
|
fallback = body or raw_response.text
|
|
22
24
|
message = str(data.message) or fallback
|
|
23
25
|
super().__init__(message, raw_response, body)
|
|
24
|
-
self
|
|
26
|
+
object.__setattr__(self, "data", data)
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from cribl_control_plane.errors import CriblControlPlaneError
|
|
5
5
|
from cribl_control_plane.models import healthstatus as models_healthstatus
|
|
6
6
|
from cribl_control_plane.types import BaseModel
|
|
7
|
+
from dataclasses import dataclass, field
|
|
7
8
|
import httpx
|
|
8
9
|
import pydantic
|
|
9
10
|
from typing import Optional
|
|
@@ -18,8 +19,9 @@ class HealthStatusErrorData(BaseModel):
|
|
|
18
19
|
role: Optional[models_healthstatus.Role] = None
|
|
19
20
|
|
|
20
21
|
|
|
22
|
+
@dataclass(frozen=True)
|
|
21
23
|
class HealthStatusError(CriblControlPlaneError):
|
|
22
|
-
data: HealthStatusErrorData
|
|
24
|
+
data: HealthStatusErrorData = field(hash=False)
|
|
23
25
|
|
|
24
26
|
def __init__(
|
|
25
27
|
self,
|
|
@@ -29,4 +31,4 @@ class HealthStatusError(CriblControlPlaneError):
|
|
|
29
31
|
):
|
|
30
32
|
message = body or raw_response.text
|
|
31
33
|
super().__init__(message, raw_response, body)
|
|
32
|
-
self
|
|
34
|
+
object.__setattr__(self, "data", data)
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass(frozen=True)
|
|
3
7
|
class NoResponseError(Exception):
|
|
4
8
|
"""Error raised when no HTTP response is received from the server."""
|
|
5
9
|
|
|
6
10
|
message: str
|
|
7
11
|
|
|
8
12
|
def __init__(self, message: str = "No response received"):
|
|
9
|
-
self
|
|
13
|
+
object.__setattr__(self, "message", message)
|
|
10
14
|
super().__init__(message)
|
|
11
15
|
|
|
12
16
|
def __str__(self):
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from typing import Optional
|
|
5
|
+
from dataclasses import dataclass
|
|
5
6
|
|
|
6
7
|
from cribl_control_plane.errors import CriblControlPlaneError
|
|
7
8
|
|
|
8
9
|
|
|
10
|
+
@dataclass(frozen=True)
|
|
9
11
|
class ResponseValidationError(CriblControlPlaneError):
|
|
10
12
|
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
|
11
13
|
|
|
@@ -4,7 +4,7 @@ cribl_control_plane/_hooks/clientcredentials.py,sha256=p1WN7LL3PHrAf4AxXrsOZF_NB
|
|
|
4
4
|
cribl_control_plane/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
|
5
5
|
cribl_control_plane/_hooks/sdkhooks.py,sha256=ggXjME1_Rdv8CVCg1XHqB83eYtbxzKyhXyfQ36Yc1gA,2816
|
|
6
6
|
cribl_control_plane/_hooks/types.py,sha256=Tw_C4zTZm01rW_89VDEUpvQ8KQr1WxN0Gu_-s_fYSPc,2998
|
|
7
|
-
cribl_control_plane/_version.py,sha256=
|
|
7
|
+
cribl_control_plane/_version.py,sha256=aS3OhfI6yzgZ4G0oEqMKJAgsd6Mrx9inMpj1-6unSDc,510
|
|
8
8
|
cribl_control_plane/acl.py,sha256=8lvYOKAli4PzsQhOVaCU6YCwblPMh9jQo04L0r4HJuQ,9025
|
|
9
9
|
cribl_control_plane/auth_sdk.py,sha256=3sjf1VoyWwfhSyuMDQLixgWISSf03BOZwmkiT8g5Ruw,626
|
|
10
10
|
cribl_control_plane/basesdk.py,sha256=y4yIXSNVXLMd0sLS2htBFdTCI3gkPQbIWd-C671kg1I,12249
|
|
@@ -15,12 +15,12 @@ cribl_control_plane/configs_versions.py,sha256=Ov9FqT4q9aKcCBUs1Qn65CdjnJK1pXXWP
|
|
|
15
15
|
cribl_control_plane/destinations.py,sha256=N5MApCQUc2KpTCFAQHZvXmrweuI0gSQ2mk8uTQhJjww,37519
|
|
16
16
|
cribl_control_plane/destinations_pq.py,sha256=bp25ihNaTH8Je2ifM8EgR9Cc-w4naz-snS2jJlsyq7E,14871
|
|
17
17
|
cribl_control_plane/errors/__init__.py,sha256=lzdSKjXlCz90wIT8Aylqw9-0BmLdu5P5BQFQB37rCBE,2221
|
|
18
|
-
cribl_control_plane/errors/apierror.py,sha256=
|
|
19
|
-
cribl_control_plane/errors/criblcontrolplaneerror.py,sha256=
|
|
20
|
-
cribl_control_plane/errors/error.py,sha256=
|
|
21
|
-
cribl_control_plane/errors/healthstatus_error.py,sha256=
|
|
22
|
-
cribl_control_plane/errors/no_response_error.py,sha256=
|
|
23
|
-
cribl_control_plane/errors/responsevalidationerror.py,sha256=
|
|
18
|
+
cribl_control_plane/errors/apierror.py,sha256=HhyQ52G7OtE_sGfDbaVhGGzu71F-yCFZ3tDesi3ppHg,1311
|
|
19
|
+
cribl_control_plane/errors/criblcontrolplaneerror.py,sha256=OtdGSanzRmYQaY_lZKdd21_EQmjValwW16l76cJ03LQ,961
|
|
20
|
+
cribl_control_plane/errors/error.py,sha256=omKSSWxYb9Z98Gx191qE6tWbXyfZvcTU-3P34d88xos,800
|
|
21
|
+
cribl_control_plane/errors/healthstatus_error.py,sha256=uCZRRCQB0bruVF6umBFt9ptEq9vT_hjFYEw5Jgvuxfo,1057
|
|
22
|
+
cribl_control_plane/errors/no_response_error.py,sha256=Kb7hmMtDo72KrLSjUEDNeQxvzZiVxUjOZym8TPdZp5Y,462
|
|
23
|
+
cribl_control_plane/errors/responsevalidationerror.py,sha256=7vHiNVp0rm6nrult0NCC73VDabehUhM861LrWfaObvA,778
|
|
24
24
|
cribl_control_plane/groups_configs.py,sha256=dgi-W0ElnyygaVKXqk5df2ldAAgj9YmXRPCez2hP7yc,695
|
|
25
25
|
cribl_control_plane/groups_sdk.py,sha256=EkviXQbbtP9HIv8tSkRtyOTPqxVTySgzMlgx_zhudig,61835
|
|
26
26
|
cribl_control_plane/health.py,sha256=mDYmC13IE_M9jTVKKBOr5aeZ5QArUURLT1PyPpvn5Ho,6719
|
|
@@ -320,6 +320,6 @@ cribl_control_plane/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8N
|
|
|
320
320
|
cribl_control_plane/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
321
321
|
cribl_control_plane/versions.py,sha256=4xdTYbM84Xyjr5qkixqNpgn2q6V8aXVYXkEPDU2Ele0,1156
|
|
322
322
|
cribl_control_plane/versions_configs.py,sha256=5CKcfN4SzuyFgggrx6O8H_h3GhNyKSbfdVhSkVGZKi4,7284
|
|
323
|
-
cribl_control_plane-0.0.
|
|
324
|
-
cribl_control_plane-0.0.
|
|
325
|
-
cribl_control_plane-0.0.
|
|
323
|
+
cribl_control_plane-0.0.47.dist-info/METADATA,sha256=pNCI1vg9bbCt6iqJg9wp7U4ueCG98B69mNgb_VHF1Ug,38883
|
|
324
|
+
cribl_control_plane-0.0.47.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
325
|
+
cribl_control_plane-0.0.47.dist-info/RECORD,,
|
|
File without changes
|