Skip to content

Commit ce0758a

Browse files
authored
feat(cockpit): add product and family fields in alert listing (#995)
1 parent b7c29d2 commit ce0758a

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

scaleway-async/scaleway_async/cockpit/v1/marshalling.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,14 @@ def unmarshal_PreconfiguredAlertData(data: Any) -> PreconfiguredAlertData:
470470
if field is not None:
471471
args["display_description"] = field
472472

473+
field = data.get("product_name", None)
474+
if field is not None:
475+
args["product_name"] = field
476+
477+
field = data.get("product_family", None)
478+
if field is not None:
479+
args["product_family"] = field
480+
473481
return PreconfiguredAlertData(**args)
474482

475483

scaleway-async/scaleway_async/cockpit/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ class PreconfiguredAlertData:
148148
Human readable description of the alert.
149149
"""
150150

151+
product_name: str
152+
"""
153+
Product associated with the alert.
154+
"""
155+
156+
product_family: str
157+
"""
158+
Family of the product associated with the alert.
159+
"""
160+
151161

152162
@dataclass
153163
class ContactPointEmail:

scaleway/scaleway/cockpit/v1/marshalling.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,14 @@ def unmarshal_PreconfiguredAlertData(data: Any) -> PreconfiguredAlertData:
470470
if field is not None:
471471
args["display_description"] = field
472472

473+
field = data.get("product_name", None)
474+
if field is not None:
475+
args["product_name"] = field
476+
477+
field = data.get("product_family", None)
478+
if field is not None:
479+
args["product_family"] = field
480+
473481
return PreconfiguredAlertData(**args)
474482

475483

scaleway/scaleway/cockpit/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ class PreconfiguredAlertData:
148148
Human readable description of the alert.
149149
"""
150150

151+
product_name: str
152+
"""
153+
Product associated with the alert.
154+
"""
155+
156+
product_family: str
157+
"""
158+
Family of the product associated with the alert.
159+
"""
160+
151161

152162
@dataclass
153163
class ContactPointEmail:

0 commit comments

Comments
 (0)