Move Path Section of Documentation
[cps.git] / docs / modeling.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (C) 2021 Pantheon.tech
4 .. _modeling:
5
6 CPS Modeling
7 ############
8
9 .. warning:: draft
10
11 .. toctree::
12    :maxdepth: 1
13
14 Basic Concepts
15 ==============
16
17 .. image:: _static/cps-modeling-concepts.png
18    :alt: Basic entities relationship
19
20 Administrative entities
21
22 - **Dataspace** is a primary logical separation of data.
23
24   Any application can define its own dataspace to store the model(s) and data it owns.
25   Dataspace is uniquely identified by it's name.
26
27 - **Schema Set** describes a data model(s).
28
29   Schema Set holds reference(s) to single or multiple YANG modules. Schema Set belongs to dataspace
30   and uniquely identified by its name (within its own dataspace). Same YANG resources (source files) can be
31   referenced by multiple schema sets from different dataspaces.
32
33 - **Anchor** identifies the unique data set (data record) within a dataspace
34
35   Anchor always references a schema set within same dataspace which describes a data model of associated data.
36   Multiple anchors may reference same schema set. Anchor is uniquely identified by its name (within own dataspace).
37
38 Data
39
40 - **Data Node** represents a data fragment.
41
42   Each data node can have zero or more descendants and together they form a data instance tree.
43   The data node tree belongs to an anchor.
44
45   Data node is representing a data fragment described in a YANG model as a *container* and/or a *list*.
46   The data described as a *leaf* and/or a *leaf-list* are stored within a parent data node.
47
48   The data node position within a tree is uniquely identified by the node's unique **xpath** which can be used
49   for partial data query.
50
51 Querying
52
53 - **CPS Path** is used to query data nodes. The CPS Path is described in detail in the :doc:`cps-path` sub-page.
54
55 CPS Path
56 ========
57
58 .. toctree::
59    :maxdepth: 1
60
61    cps-path.rst
62