Preconfigured entities (fixtures)
Location path
| Path in the build directory | Description |
|---|---|
|
Entities for the master domain |
|
Common entities for any working domain |
|
Entities for the product layer being installed |
Overview
Define specific entities and their parameters for automatic creation in the corresponding domain (only entities managed by the domain center - the mdc role).
Applied to a domain at creation time and possibly when the domain is reloaded by the mdc role. Fixture loading occurs on the master site.
Application order: first common entities are created in the domain, then fixture files are applied by the specific domain type, and with certain settings they can overwrite. The master domain is applied only master domain fixtures. Any other domain applies common working domain fixtures.
Each file can contain many objects to be created. Each directory can contain an arbitrary set of fixture files applied in lexicographic file name order. If a fixture fails to load, a line with error information is written to the log, and all remaining files in the directory are skipped.
{
"objects": [
{
"crud": str,
"applycondition": "always" | "notexist",
"data": object
},
...
]
}
-
"crud"– type of object to create in the format known to the mdc role (domain, user, featurecode, sipuser, vectorrule, addressbook, …). -
"applycondition"– entity creation conditions when loading the domain:-
"always"– recreate the object on every domain load; -
"notexist"– create the object only if it does not exist in the domain.
-
-
"data"– object to create (fields and values)
Example
Creates a user if absent with specific credentials and role. Does not modify the user if changed manually, but recreates it if 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 of the domain