Skip to content

Commit e3f34df

Browse files
Generate observability
1 parent 815ef3e commit e3f34df

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

services/observability/oas_commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
87a3ad63dec0a953ff5c6072ad9a15fddd8ec5f8
1+
e0004861a738bbce1cd3d921c230b0cda3d64987

services/observability/src/stackit/observability/exceptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) ->
4646
full_msg = msg
4747
if path_to_item:
4848
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
49-
super(ApiTypeError, self).__init__(full_msg)
49+
super(ApiTypeError, self).__init__(full_msg, path_to_item, valid_classes, key_type)
5050

5151

5252
class ApiValueError(OpenApiException, ValueError):
@@ -64,7 +64,7 @@ def __init__(self, msg, path_to_item=None) -> None:
6464
full_msg = msg
6565
if path_to_item:
6666
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
67-
super(ApiValueError, self).__init__(full_msg)
67+
super(ApiValueError, self).__init__(full_msg, path_to_item)
6868

6969

7070
class ApiAttributeError(OpenApiException, AttributeError):
@@ -83,7 +83,7 @@ def __init__(self, msg, path_to_item=None) -> None:
8383
full_msg = msg
8484
if path_to_item:
8585
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
86-
super(ApiAttributeError, self).__init__(full_msg)
86+
super(ApiAttributeError, self).__init__(full_msg, path_to_item)
8787

8888

8989
class ApiKeyError(OpenApiException, KeyError):
@@ -100,7 +100,7 @@ def __init__(self, msg, path_to_item=None) -> None:
100100
full_msg = msg
101101
if path_to_item:
102102
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
103-
super(ApiKeyError, self).__init__(full_msg)
103+
super(ApiKeyError, self).__init__(full_msg, path_to_item)
104104

105105

106106
class ApiException(OpenApiException):

services/observability/src/stackit/observability/models/instance_sensitive_data.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ class InstanceSensitiveData(BaseModel):
3232

3333
alerting_url: Annotated[str, Field(min_length=1, strict=True)] = Field(alias="alertingUrl")
3434
cluster: Annotated[str, Field(min_length=1, strict=True, max_length=63)]
35-
dashboard_url: Annotated[str, Field(min_length=1, strict=True)] = Field(alias="dashboardUrl")
3635
grafana_admin_enabled: StrictBool = Field(alias="grafanaAdminEnabled")
37-
grafana_admin_password: Annotated[str, Field(min_length=32, strict=True)] = Field(alias="grafanaAdminPassword")
38-
grafana_admin_user: Annotated[str, Field(min_length=1, strict=True)] = Field(alias="grafanaAdminUser")
36+
grafana_admin_password: Optional[Annotated[str, Field(min_length=32, strict=True)]] = Field(
37+
default=None, alias="grafanaAdminPassword"
38+
)
39+
grafana_admin_user: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(
40+
default=None, alias="grafanaAdminUser"
41+
)
3942
grafana_public_read_access: StrictBool = Field(alias="grafanaPublicReadAccess")
4043
grafana_url: Annotated[str, Field(min_length=1, strict=True)] = Field(alias="grafanaUrl")
4144
grafana_use_stackit_sso: StrictBool = Field(alias="grafanaUseStackitSso")
@@ -65,7 +68,6 @@ class InstanceSensitiveData(BaseModel):
6568
__properties: ClassVar[List[str]] = [
6669
"alertingUrl",
6770
"cluster",
68-
"dashboardUrl",
6971
"grafanaAdminEnabled",
7072
"grafanaAdminPassword",
7173
"grafanaAdminUser",
@@ -150,7 +152,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
150152
{
151153
"alertingUrl": obj.get("alertingUrl"),
152154
"cluster": obj.get("cluster"),
153-
"dashboardUrl": obj.get("dashboardUrl"),
154155
"grafanaAdminEnabled": (
155156
obj.get("grafanaAdminEnabled") if obj.get("grafanaAdminEnabled") is not None else True
156157
),

0 commit comments

Comments
 (0)