model.rst 2.93 KB
Newer Older
1 2 3 4
***************
YANG Data Model
***************

5 6 7 8 9 10 11 12 13 14 15
=============
YANG Modules
=============

All Modules are located in ``yang-modules/`` project directory.

* `cznic-dns-types`_
* `cznic-resolver-common`_
* `cznic-resolver-knot`_

=============
16
Data Model
17 18 19 20 21
=============

Data Model is located in ``data-model/`` project directory.

* `Current schema tree`_
22
* `Example JSON data`_
23

mrazekales's avatar
mrazekales committed
24 25 26 27 28 29 30 31 32 33
----------------------------------------
Common Model - `cznic-resolver-common`_
----------------------------------------
Common Data model configuration options are divided into several sections.

In order to unify Knot and Unbound configuration into the `cznic-resolver-common`_,
some configurations are not generated directly from value in the common model, but before generating
must be converted to configuration value which is accepted by resolver.

Here is how some values are converted:
34 35

server:
mrazekales's avatar
mrazekales committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49
^^^^^^^

There is no ``group-name`` option for Unbound to set.

.. code-block:: python

    DataModel:     "server": {
                        "user-name": "username",
                        "group-name": "group"
                    }

    KnotResolver:  user('username','group')        # Conversion:  no conversion
    Unbound:       username: "username"            # Conversion:  no conversion

50 51

network:
mrazekales's avatar
mrazekales committed
52
^^^^^^^^
53 54

resolver:
mrazekales's avatar
mrazekales committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
^^^^^^^^^
**stub-zones**:



.. code-block:: python

    DataModel:      "stub-zones": [
                           {
                           "domain": "stub.example.com",
                           "nameserver": "192.0.2.1",
                           "port": 53                       # Default:  53
                           }
                    ]

    KnotResolver:  STUB('192.0.2.1@53')                     # Conversion:  'nameserver' + port -> nameserver@port'
    Unbound:       stub-zone:
                    name: "stub.example.com"                # Conversion:   no conversion
                    stub-addr: "192.0.2.1@53"               # Conversion:  'nameserver' + port -> nameserver@port'

logging
^^^^^^^

**verbosity**:

.. code-block:: python

    DataModel:     "verbosity": 0-5         # Default:      1

    KnotResolver:  verbosity: 0-5           # Conversion:   no conversion
    Unbound:       verbose(true/false)      # Conversion:   0 -> false    1-5 -> true
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102


dnssec:
-------------

cache:
-------------

dns64:
-------------


.. _Current schema tree: https://gitlab.labs.nic.cz/jetconf/jetconf-resolver/raw/master/data-model/model.tree
.. _Example JSON data: https://gitlab.labs.nic.cz/jetconf/jetconf-resolver/raw/master/tests/complete/example-data.json
.. _cznic-dns-types: https://gitlab.labs.nic.cz/jetconf/jetconf-resolver/raw/master/yang-modules/cznic-dns-types@2018-05-14.yang
.. _cznic-resolver-common: https://gitlab.labs.nic.cz/jetconf/jetconf-resolver/raw/master/yang-modules/cznic-resolver-knot@2018-07-27.yang
.. _cznic-resolver-knot: https://gitlab.labs.nic.cz/labs/resolvers-yang/raw/master/yang-modules/cznic-resolver-knot@2018-07-27.yang