|
|
# JetConf Architecture |
|
|
\ No newline at end of file |
|
|
# JetConf Architecture
|
|
|
|
|
|
JetConf is an implementation of the
|
|
|
[RESTCONF](https://tools.ietf.org/html/draft-ietf-netconf-restconf-10)
|
|
|
protocol for remote management of network devices and
|
|
|
services. [YANG 1.1](https://tools.ietf.org/html/draft-ietf-netmod-rfc6020bis-11)
|
|
|
data modelling language is also fully supported.
|
|
|
|
|
|
JetConf is written in Python 3 language and available as open source
|
|
|
software under the terms of the
|
|
|
[GNU GPLv3](https://www.gnu.org/licenses/gpl.html) license.
|
|
|
|
|
|
## Requirements and Restrictions
|
|
|
|
|
|
JetConf is a compliant RESTCONF implementation supporting all
|
|
|
mandatory features.
|
|
|
|
|
|
Although it is written in Python, it should be fast enough to support
|
|
|
large configuration databases with moderate rate of changes. A typical
|
|
|
use can may be an authoritative TLD name server in which JetConf
|
|
|
covers both server management and domain provisioning.
|
|
|
|
|
|
JetConf supports only the JSON data encoding, i.e. media types with
|
|
|
the `+json` structured syntax suffix, such as
|
|
|
`application/yang.data+json`.
|
|
|
|
|
|
JetConf supports only HTTP/2 transport. Entity tags (ETag headers) can
|
|
|
be generated for all data resources, whereas timestamps (Last-Modified
|
|
|
headers) are supported for all container-like resources, i.e. not for
|
|
|
individual leaf and leaf-list instances.
|
|
|
|
|
|
## Datastores
|
|
|
|
|
|
The initial version of JetConf will support two types of datastores:
|
|
|
|
|
|
* Plain file, in which data are stored in the JSON format. Such data
|
|
|
are completely validated by the JetConf server.
|
|
|
|
|
|
* Proxy datastore where all data management tasks (storage, validation
|
|
|
etc.) are delegated to an external software component. The role of
|
|
|
the JetConf server is just to convert requests of RESTCONF clients
|
|
|
to the API of the external software component, and, in the opposite
|
|
|
direction, translate the replies.
|
|
|
|
|
|
However, JetConf implementation must be prepared to integrate other
|
|
|
types of datastores that may be added in the future.
|
|
|
|
|
|
## Access Control
|
|
|
|
|
|
TBD
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
|
Dependencies on external Python packages, i.e. those that are not part
|
|
|
of [Python 3 standard library](https://docs.python.org/3/library)
|
|
|
should be kept to a reasonable minimum. The initial version depends on
|
|
|
two such packages:
|
|
|
|
|
|
* [Hyper-h2](http://python-hyper.org/h2/en/stable/) – HTTP/2 library,
|
|
|
|
|
|
* [Yangson](https://gitlab.labs.nic.cz/llhotka/yangson) – YANG 1.1
|
|
|
library (see below).
|
|
|
|
|
|
## Yangson Library
|
|
|
|
|
|
Yangson is a Python library that offers programmers tools for working with
|
|
|
configuration and other data modelled with YANG 1.1.
|
|
|
|
|
|
Yangson also supports only the JSON data encoding as defined in
|
|
|
[draft-ietf-netmod-yang-json](https://tools.ietf.org/html/draft-ietf-netmod-yang-json).
|
|
|
|
|
|
The Yangson package comprises the following Python modules:
|
|
|
|
|
|
* _datamodel_: This module defines the *DataModel* class that is
|
|
|
designed as the main entry point to the library. It allows for
|
|
|
composing a data model based on
|
|
|
[YANG library](https://tools.ietf.org/html/draft-ietf-netconf-yang-library).
|
|
|
|
|
|
* _schema_: This module defines a class hierarchy representing YANG
|
|
|
schema nodes and their properties.
|
|
|
|
|
|
* _datatype_: This module defines a class hierarchy representing YANG
|
|
|
built-in and derived types.
|
|
|
|
|
|
* _instance_: This module defines several classes that implement data
|
|
|
instances as
|
|
|
[persistent structures](https://en.wikipedia.org/wiki/Persistent_data_structure).
|
|
|
|
|
|
* _statement_: This module defines the *Statement* class that represents a
|
|
|
generic YANG statement.
|
|
|
|
|
|
* _modparser_: This module implements a parser for YANG modules and
|
|
|
submodules.
|
|
|
|
|
|
* _context_: This module defines the *Context* class that represents
|
|
|
the context of the current YANG data model – YANG modules and
|
|
|
submodules with their revision, namespaces of the (sub)modules, and
|
|
|
the mapping of namespace prefixes to modules and revisions. This
|
|
|
context is shared and accessed by several other Yangson
|
|
|
modules. Only one instance of the *Context* class may exist at the
|
|
|
same time.
|
|
|
|
|
|
* _typealiases_: This module defines a number of Python type aliases
|
|
|
that can be used in
|
|
|
[type hints](https://www.python.org/dev/peps/pep-0484/).
|
|
|
|
|
|
* _constants_: This module defines various constants that are used in
|
|
|
other modules – base exception class, compiled regular expressions,
|
|
|
and enumeration classes.
|
|
|
|
|
|
## JetConf Server Configuration
|
|
|
|
|
|
The JetConf server needs some start-up configuration. The following is
|
|
|
a minumum set of server configuration parameters:
|
|
|
|
|
|
* _time zone_: server's time zone (default: operating system setting)
|
|
|
* _document root_:
|
|
|
* _document default name_:
|
|
|
* _RESTCONF API root_:
|
|
|
* _server name_:
|
|
|
* _server TLS certificate location_:
|
|
|
* _server private key location_:
|
|
|
* _CA certificate location_:
|
|
|
* _admin users_: list of users that have privileged access to the
|
|
|
server and can edit the access control database.
|
|
|
|
|
|
## Server Loop
|
|
|
|
|
|
TBD
|
|
|
|
|
|
## Python Modules
|
|
|
|
|
|
TBD |