All Projects → prplfoundation → scal

prplfoundation / scal

Licence: ISC License
System Configuration Abstraction Layer

Programming Languages

c
50402 projects - #5 most used programming language
shell
77523 projects
CMake
9771 projects
Makefile
30231 projects

Projects that are alternatives of or similar to scal

plan44-feed
OpenWrt feed containing plan44 packages
Stars: ✭ 25 (+78.57%)
Mutual labels:  openwrt, lede
lede-dockerbuilder
A (container based) LEDE/OpenWrt image builder.
Stars: ✭ 53 (+278.57%)
Mutual labels:  openwrt, lede
openwrt-build-env
OpenWrt build environment in docker | Docker 中的 OpenWrt 编译环境
Stars: ✭ 77 (+450%)
Mutual labels:  openwrt, lede
nodewatcher-agent
A monitoring agent that runs on OpenWrt-supported devices.
Stars: ✭ 14 (+0%)
Mutual labels:  openwrt, ubus
apm82181-lede
APM82181 LEDE Repository
Stars: ✭ 18 (+28.57%)
Mutual labels:  openwrt, lede
gluon-firmware-selector
Firmware selector for gluon router images
Stars: ✭ 19 (+35.71%)
Mutual labels:  openwrt, lede
firmware-core
nodewatcher firmware.
Stars: ✭ 26 (+85.71%)
Mutual labels:  openwrt, lede
Ddns Scripts aliyun
OpenWrt/LEDE DDNS support for aliyun (阿里云)
Stars: ✭ 224 (+1500%)
Mutual labels:  openwrt, lede
luci-openwisp
OpenWISP configuration interface implemented as LuCI extensions
Stars: ✭ 21 (+50%)
Mutual labels:  openwrt, lede
openwrt-scripts
A collection of some useful scripts running on OpenWrt/LEDE routers
Stars: ✭ 43 (+207.14%)
Mutual labels:  openwrt, lede
OpenWrts
OPENWRT 固件(Raspberry Pi4B/3B+,NanoPi R4S,Orange Pi R1Plus,x86) 依源码更新自动编译
Stars: ✭ 100 (+614.29%)
Mutual labels:  openwrt, lede
OpenWrtAction
Openwrt automatic compilation project of github action
Stars: ✭ 28 (+100%)
Mutual labels:  openwrt, lede
lede-dockercompiler
Docker image to compile LEDE/OpenWrt from source
Stars: ✭ 21 (+50%)
Mutual labels:  openwrt, lede
CloudFlare-DDNS-Script
CloudFlare-DDNS-Script Support LEDE/Openwrt with IPv4/IPv6
Stars: ✭ 40 (+185.71%)
Mutual labels:  openwrt, lede
Lede
Lean's OpenWrt source
Stars: ✭ 19,062 (+136057.14%)
Mutual labels:  openwrt, lede
ansible-openwrt
Ansible collection to configure your OpenWrt devices more quickly and automatically (without Python)
Stars: ✭ 34 (+142.86%)
Mutual labels:  openwrt, lede
Opkg Upgrade
List and install OpenWRT / LEDE opkg upgradable packages
Stars: ✭ 215 (+1435.71%)
Mutual labels:  openwrt, lede
Django Netjsonconfig
Configuration manager for embedded devices, implemented as a reusable django-app
Stars: ✭ 213 (+1421.43%)
Mutual labels:  openwrt, lede
HomeLede
An Openwrt firmware for home use scenarios.
Stars: ✭ 925 (+6507.14%)
Mutual labels:  openwrt, lede
meta-openwrt
OE/Yocto metadata layer for OpenWRT
Stars: ✭ 75 (+435.71%)
Mutual labels:  openwrt, lede

System Configuration Access Layer (scal)

This is the System Configuration Access Layer (scal) for LEDE/OpenWrt.

It provides a high level abstraction API to access data models defined via plugins.

Multiple plugins are permitted to provide objects belonging to the same data model, or even extend parameters of the same objects.

This is intended to be used for implementing TR-069, NETCONF and other remote management protocols, or even provide an abstraction for a CLI running on a router itself.

Compiling/Installing SCAL

To compile SCAL, use these commands:

cmake .
make

To install:

make install

ubus API

This section explains the ubus API of scal.

Object: scald

status

Query the status of the scal daemon.

Returns a list of data models, and for each model a list of plugins that implement it.

Example:

{ "models": { "tr-181": { "plugins": [ "example" ] } } }`

The object will send out notifications for changes made to the data model. The notify type describes the change type: ("set", "add", "remove").

They contain the following fields:

  • plugin: name of the plugin providing the object/parameter being accessed
  • model: name of the affected data model
  • path: path to the object
  • param: name of the affected parameter
  • value: new value of the affected parameter

The same events can also be received on a per-datamodel basis on the data model object described below.

Object: scald.<datamodel>

All methods that refer to an object (or an object path) take a string array "path", describing the path to the object.

Example: [ "Device", "ManagementServer" ] (equal to Device.ManagementServer in TR-181)

list

List all objects on the next level below the object specified by the "path" argument. If the path is empty, the root object is listed.

Example:

ubus call scald.tr-181 list '{ "path": [ "Device" ] }'

Returns:

{ "objects": [ "ManagementServer" ] }

info

Returns information about an object, including its list of parameters

Example:

ubus call scald.tr-181 info '{ "path": [ "Device", "ManagementServer" ] }'

Returns:

{ "parameters": { "Password": { "readonly": false }, "Username": { "readonly": false } } }

get

Reads the value of an object parameter. Parameter name is provided as a string in the "name" attribute

Example:

ubus call scald.tr-181 get '{ "path": [ "Device", "ManagementServer" ], "name": "Username" }'

Returns:

{ "value": "foo" }

set

Sets an object parameter to a new value.

Parameter name is provided as a string in the "name" attribute, the value is provided as a string in the "value" attribute.

Example:

ubus call scald.tr-181 set '{"path": [ "Device", "ManagementServer" ], "name": "Username", "value": "baz" }'

add

Adds a new object instance.

Instance name is provided as a string in the "name" attribute.

Example:

ubus call scald.tr-181 add '{"path": [ "Device", "ManagementServer", "ManageableDevice" ], "name": "test" }'

remove

Remove an object instance.

Example:

ubus call scald.tr-181 remove '{"path": [ "Device", "ManagementServer", "ManageableDevice", "test" ] }'

Object: scald.acl

This object is used to allow an external daemon to perform ACL checks for incoming requests.

After subscribing to this object, the ACL daemon receives requests as notifications.

If the ACL daemon returns a non-zero status code, the incoming request will be refused.

Example message:

{"method":"list","plugin":"json","ubus":{"user":"root","group":"wheel"},"path":["DeviceInfo"]}

Plugins can add arbitrary data to this message to allow ACL filtering to be done both before and after data model translation.

method

Name of the ubus method called on scald.<datamodel>.

plugin

Name of the plugin providing the object/parameter being accessed.

ubus

ACL data from the ubus client that issued the request.

path

Path to the object.

param

Name of the requested parameter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].