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 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.
The master domain is applied only master domain fixtures. Any other domain applies common working domain fixtures. Application follows file name sort order.
When installing the product layer, product fixtures are also applied.
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.
{
"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