clicon / clixon-controller

Clixon network controller
Apache License 2.0
12 stars 4 forks source link

Separate isolated yang modules for device profile #88

Open olofhagsand opened 6 months ago

olofhagsand commented 6 months ago

Some devices share same YANG file + revisions with others but with different content. Proposal is that a device profile can be configured to use a separate YANG domain (mounts).

olofhagsand commented 6 months ago

Several parts: 1) A new config-option on device-common that says to use isolated yangs (ie yang-isolated type boolean) 2) When fetching YANGs from devices with schema-get, (or manually copy) the mount-dir is now CONTROLLER_YANG_SCHEMA_MOUNT_DIR. Instead, if yang-isolated is true, they need to be put in another dir, maybe by adding a new option and appending the device(profile) name. 3) When loading the YANGS, this new place should be checked first. This is in the core part of the clixon yang module yang_file_find_match() which needs some new logic.