To write NetJSON command line utility which uses SCAL APIs in its backend.
Object: scald.netjson
For example:
ubus call scald.netjson list '{ "path": [ "Device" ] }'
Will return:
{ "objects": [ "Configuration" ] , "objects": ["Monitoring"] }
As mentioned, the methods refer to an object take a string array "path", describing the path to the object.
Example: [ "Device", "Monitoring" ] or [ "Device", "Configuration" ]
list --> to 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.
get --> Reads the value of an object parameter. Parameter name can be provided or not provided to display the whole netjson schema.
ubus call scald.netsjon get '{ "path": [ "Device", "Configuration" ] }' would display the whole NetJSON DeviceConfiguration
Extra commands can be added here as necessary.
To write NetJSON command line utility which uses SCAL APIs in its backend.
Object:
scald.netjsonFor example:
Will return:
{ "objects": [ "Configuration" ] , "objects": ["Monitoring"] }As mentioned, the methods refer to an object take a string array "path", describing the path to the object.
Example:
[ "Device", "Monitoring" ]or[ "Device", "Configuration" ]list --> to 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.
get --> Reads the value of an object parameter. Parameter name can be provided or not provided to display the whole netjson schema.
ubus call scald.netsjon get '{ "path": [ "Device", "Configuration" ] }'would display the whole NetJSON DeviceConfigurationExtra commands can be added here as necessary.