Skip to content

Commit 0ba9ef2

Browse files
authored
IHS-176: Remove is_visible property from attribute metadata (#603)
* IHS-176: Remove `is_visible` property from attribute metadata This PR removes `is_visible` property from attribute metadata. * add news fragment
1 parent d2b5c42 commit 0ba9ef2

File tree

7 files changed

+17
-128
lines changed

7 files changed

+17
-128
lines changed

changelog/+08aa1a85.removed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove `is_visible` property from infrahub

infrahub_sdk/node/attribute.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def __init__(self, name: str, schema: AttributeSchemaAPI, data: Any | dict) -> N
5252
self.is_inherited: bool | None = data.get("is_inherited", None)
5353
self.updated_at: str | None = data.get("updated_at", None)
5454

55-
self.is_visible: bool | None = data.get("is_visible", None)
5655
self.is_protected: bool | None = data.get("is_protected", None)
5756

5857
self.source: NodeProperty | None = None

infrahub_sdk/node/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import re
33
from typing import Union
44

5-
PROPERTIES_FLAG = ["is_visible", "is_protected"]
5+
PROPERTIES_FLAG = ["is_protected"]
66
PROPERTIES_OBJECT = ["source", "owner"]
77
SAFE_VALUE = re.compile(r"(^[\. /:a-zA-Z0-9_-]+$)|(^$)")
88

infrahub_sdk/protocols_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class Attribute(Protocol):
5656
is_from_profile: bool | None
5757
is_inherited: bool | None
5858
updated_at: str | None
59-
is_visible: bool | None
6059
is_protected: bool | None
6160

6261

infrahub_sdk/schema/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ def generate_payload_create(
155155
source: str | None = None,
156156
owner: str | None = None,
157157
is_protected: bool | None = None,
158-
is_visible: bool | None = None,
159158
) -> dict[str, Any]:
160159
obj_data: dict[str, Any] = {}
161160
item_metadata: dict[str, Any] = {}
@@ -165,8 +164,6 @@ def generate_payload_create(
165164
item_metadata["owner"] = str(owner)
166165
if is_protected is not None:
167166
item_metadata["is_protected"] = is_protected
168-
if is_visible is not None:
169-
item_metadata["is_visible"] = is_visible
170167

171168
for key, value in data.items():
172169
obj_data[key] = {}

0 commit comments

Comments
 (0)