Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions infrahub_sdk/code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def _jinja2_filter_inheritance(value: dict[str, Any]) -> str:
def _jinja2_filter_render_attribute(value: AttributeSchema) -> str:
attribute_kind_map = {
"boolean": "Boolean",
"checkbox": "Checkbox",
"datetime": "DateTime",
"dropdown": "Dropdown",
"hashedpassword": "HashedPassword",
Expand Down
2 changes: 2 additions & 0 deletions infrahub_sdk/ctl/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
IntegerOptional,
Boolean,
BooleanOptional,
Checkbox,
CheckboxOptional,
DateTime,
DateTimeOptional,
Dropdown,
Expand Down
8 changes: 8 additions & 0 deletions infrahub_sdk/protocols_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
value: Optional[bool]


class Checkbox(Attribute):
value: bool

Check warning on line 57 in infrahub_sdk/protocols_base.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/protocols_base.py#L56-L57

Added lines #L56 - L57 were not covered by tests


class CheckboxOptional(Attribute):
value: Optional[bool]

Check warning on line 61 in infrahub_sdk/protocols_base.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/protocols_base.py#L60-L61

Added lines #L60 - L61 were not covered by tests


class DateTime(Attribute):
value: str

Expand Down