Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 changelog/+protocols-peer-types.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The protocols shipped in `infrahub_sdk.protocols` now carry the peer type of every relationship, so `node.rel.peer` and `node.many_rel.peers[0].peer` resolve to the peer's protocol instead of a bare `InfrahubNode`, and a cardinality-one relationship can be assigned an id, an HFID, a peer node or `None`. They are generated by the same renderer as `infrahubctl protocols` rather than by a separate template, which also adds the relationships the API exposes implicitly (`member_of_groups`, `subscriber_of_groups`, `profiles`) and the `ProfileBuiltinIPAddress`, `ProfileBuiltinIPPrefix`, `ProfileBuiltinTag` and `ProfileIpamNamespace` kinds. Attributes that always hold a value are no longer typed as optional, and each attribute now follows its schema kind, so `CoreGlobalPermission.decision` and `CoreObjectPermission.decision` are `Integer` rather than `Enum`. Two relationships that the API never exposed, `CoreGenericAccount.tokens` and `CoreGenericAccount.external_identities`, are gone. Protocols generated for your own schema now import the four `Profile*` kinds above instead of redefining them.
1 change: 1 addition & 0 deletions changelog/+protocols-sort-by-class-name.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Generated protocols are now ordered by the class name they render rather than by the schema name without its namespace, so `BuiltinIPPrefix` no longer sorts under `IPPrefix`. Regenerating with `infrahubctl protocols` reorders the classes in your file and changes nothing else. The ordering is also total now. Kinds that the old key compared equal, two sharing a name and differing only in namespace, or two whose names differ only in case, previously fell back to whatever order the schema was supplied in, which could make the same schema render differently from one run to the next.
Loading