clan/inventory: allow list usage of roles via polymorphism
This commit is contained in:
@@ -27,7 +27,9 @@ in
|
||||
default = { };
|
||||
};
|
||||
tags = lib.mkOption {
|
||||
type = types.attrsOf (types.submodule { });
|
||||
type = types.coercedTo (types.listOf types.str) (t: lib.genAttrs t (_: { })) (
|
||||
types.attrsOf (types.submodule { })
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
settings =
|
||||
|
||||
@@ -31,17 +31,10 @@ class InventoryInstanceRoleMachine(TypedDict):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class InventoryInstanceRoleTag(TypedDict):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
InventoryInstanceRoleExtramodulesType = list[dict[str, Any] | str]
|
||||
InventoryInstanceRoleMachinesType = dict[str, InventoryInstanceRoleMachine]
|
||||
InventoryInstanceRoleSettingsType = Unknown
|
||||
InventoryInstanceRoleTagsType = dict[str, InventoryInstanceRoleTag]
|
||||
InventoryInstanceRoleTagsType = dict[str, Any] | list[str]
|
||||
|
||||
class InventoryInstanceRole(TypedDict):
|
||||
extraModules: NotRequired[InventoryInstanceRoleExtramodulesType]
|
||||
|
||||
Reference in New Issue
Block a user