Preconfigured entities (fixtures)
Location path
Path in the assembly catalog | Description |
---|---|
|
Entities for the master domain |
|
Entities by domain type |
|
Common entities for any work domain |
Overview
Define specific entities and their parameters for automatic creation in the corresponding domain (only entities managed by the domain center - roles mdc).
Apply to the domain at the time of creation and possibly at the time the domain is reloaded by the mdc role. The fixture is loaded on the master site.
Application happens first: generic entities are created in the domain first, but then the fixtur files of a particular solutio are applied, and can overwrite at certain settings. In this case to the master domain, only the master domain’s fixtures are applied (the master domain’s solushen can also be specified, but it makes no sense). Any other domain applies the common fixtures of the worker domain and the fixtures of its solutio.
Each file can contain many objects to be created. Each directory may contain any number of fixture files, applied in the lexicographic sort order of the file names. If the fixture fails to load, a line in the log with the error information is written, all other files in the directory are skipped.
{ "objects": [ { "crud": str, "applycondition": "always" | "notexist", "data": object }, ... ] }
-
"crud"
– type of created object in a format known to the role mdc (domain, user, featurecode, sipuser, vectorrule, addressbook, …). -
"applycondition"
– conditions for creating entities when loading a domain:-
"always"
– recreate the object each time the domain is loaded; -
"notexist"
– create an object only if it does not exist in the domain.
-
-
"data"
– object to be created (fields and values)
Example
Creates a user, if there is no user, with a specific identity, role. Does not modify the user if it is manually modified, but recreates it if it is deleted.
{ "objects": [ { "crud": "user", "applycondition": "notexists", "data": { "id": "8de96fb8-afc2-67e1-057a-60115bc80006", "name": "sample_user", "pwd": "user123", "login": "sample_user" "opts": {"roles": ["sample"]} } } ] }
See also
-
Entities domain