...
LISA is an alternative to the Packager Thunder Plugin used to retrieve ipkg packages, see https://github.com/rdkcentral/rdkservices/blob/master/Packager/doc/PackagerPlugin.md
Comparison of LISA with RDK Packager API
Existing Packager API (RDK services github) | Proposed Packager API (DAC RDK wiki) | LISA API |
---|
install (package, version, architecture) | install (id, type, URL, token, listener) → (id, task, success) | install (type, id, version, URL, appName, category), → (status, handle) |
| remove (id, listener) → (id, task, success) | uninstall (type, id, version, uninstallType), → (status, handle) |
|
| operationStatus→ (handle, status, details) |
| cancel (task, listener) → (success) | cancel (handle) → (status) |
| isInstalled (id) → (success) | - |
| getInstallProgress (task) → ( percent) | getProgress (handle) → (status, percent) |
| getInstalled() → (applications) | getList (filter) → (array of {type, id, version, metadata}) |
| getPackageInfo(id) → (metadata) | getMetadata(type, id, version) → (metadata) |
| - | setMetadata(type, id, version, tag, metadata) |
| getAvaialbleSpace() → (space) | getStorageDetails() → (path, quota, size, persistentStoragePath, persistentStorageQuota, persistentStorageSize) |
synchronize() |
| - |
Data Types
LISA is able to handle the following data:
...
Result payload: {"handle":"<string>"}
parameter and errors | values |
---|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "TooManyRequests" - too many requests (e.g. another installation is ongoing)
- "AlreadyInstalled" - application is already installed, uninstall first
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
handle | handle to refer with the following requests |
Uninstall the application: remove application files and - optionally - persistent storage and db entry. Non-blocking operation, handle should be used for tracking the request.
...
Result payload: {"handle":"<string>"}
parameters and errors | values |
---|
uninstallType | - "full" - full removal of all application-related data (db entry, application storage, persistent storage). If other versions are still available, the persistent storage and app record will not be removed. Only the installed_apps row will be removed. In fact, the "full" uninstallType reverts to "upgrade".
- "upgrade" - only removes given version of the application, persistent storage is not deleted, neither is the app record in apps table.
- remark: to allow cleanup of this storage dir and app record at a later point in time, you can call uninstall() without specifying a version and with installType=full.
|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "TooManyRequests" - too many requests (e.g. another installation or uninstallation is ongoing)
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
handle | handle to refer with the following requests |
Download arbitrary application's resource, e.g. icon. Resource are stored per application id/version. Asynchronous operation, handle should be used for tracking the request. If the resource of given resKey already exists it is replaced by the newly downloaded resource. If the resKey is unique, but the requested resource file already exists on the filesystem, the file should be stored under a different, unique filename, created by appending a suffix to the existing filename.
...
Result payload: {"handle":"<string>"}
parameters and errors | values |
---|
resKey | - key to access given resource file from db entry
|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "TooManyRequests" - too many requests (e.g. another installation or uninstallation is ongoing)
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
handle | handle to refer with the following requests |
Deletes the content of the database and/or persistent storage and/or all resources for the application. Synchronous operation, returns response on success or failure. Optional parameters type, id, version are used to filter the applications on which the reset will be performed. If they are not given, the reset operation affects all the data. Synchronous operation, returns a response on success or failure.
...
Response payload: {"status":"<string>"}
parameters and errors | values |
---|
version | - parameter is required only when "resetType"="resources"
|
resetType | - "full" - deletes all persistent data used by LISA: drops db tables, deletes the content of [APPS] [APPS_STORAGE]
- "storage" - deletes the content of persistent storage
- "resources" - deletes all downloaded resources for given application version
|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "FilesystemError" - file operation failed
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
Returns information on the storage usage. Depending on provided parameters: overall storage usage, application id storage or application id/version storage. Synchronous operation, returns a response on success or failure. Notes on implementation:
...
Result payload: {"storage":"<storagePayload>"}
parameters and errors | values |
---|
type | - optional parameter, if provided, then the details on a storage for applications of given type is returned. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
id | - optional parameter, if provided, then the details on a storage for applications of given id is returned. Can be only present if "type" parameter is also provided. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
version | - optional parameter, if provided, then the details on a storage for applications of given id/version is returned. Can be only present if "type" and "id" parameters are also provided. This filtering parameter is logically ANDed with the other parameters.
- if version is empty but id and type are filled in, the storageDetails result will only show the storage datapath and no actual app path.
|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "FilesystemError" - file operation failed
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
storagePayload | {"apps":{"path":"<string>", "quotaKB":"<string>", "usedKB":"<string>"}, "persistent":{"path":"<string>", "quotaKB":"<string>", "usedKB":"<string>"}} |
Returns a list of installed applications filtered using optional filtering criteria: type, id, version, appName, category. Synchronous operation, returns a response on success or failure.
...
Resultpayload: {"apps":"<appsPayload>"}
parameters and errors | values |
---|
type | - optional parameter to filter apps only of given type. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
id | - optional parameter to filter apps only of given id. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
version | - optional parameter to filter apps only of given version. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
appName | - optional parameter to filter apps only of given name. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
category | - optional parameter to filter apps only of given category. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
|
status | - "WrongParams" - request not accepted because of wrong parameters
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
appsPayload | {"apps":["app":{"type":"<string>", "id":"<string>", "installed":[{"version":"<string>", "appName":"<string>", "category":"<string>","url":"<string>"}]}]} - remark: if no actual versions of an app are installed and only the app row + data storage path remains, then the installed [] will be empty or omitted in above result. Such situation happens when uninstall the only version of an installed app with uninstallType=upgrade.
|
Set an arbitrary key: value metadata for a given application. The existing metadata object is replaced (overwritten) by the provided object. Synchronous operation, returns a response on success or failure.
Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>","auxMetadata":<auxMetadataPayload>}
Result payload: {}
parameters and errors | values |
---|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "WrongMetadata" - request not accepted because of wrong format of metadata object
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
auxMetadataPayload | [{"<string>":"<string>"}] |
Get all metadata stored for given application version. Synchronous operation, returns a response on success or failure.
...
Response payload: {"status":"<string>","metadata":}
parameters and errors | values |
---|
errors | - "WrongParams" - request not accepted because of wrong parameters
- "Initializing" - LISA is performing initialization, wait for operationStatus event
|
metadataPayload | {"appName":"<string>", "category":"<string>","url":"<string>","resources":[{"<string>":"<string>"}]},"auxMetadata":<auxMetadataPayload>} - "resources" - array referring downloaded resources; contains "resKey": "file name" mappings
|
Cancel previous asynchronous request.
...
Response payload: {"status":"<string>"}
parameters and errors | values |
---|
handle | - a handle returned earlier by install, uninstall or download request.
|
errors | - "WrongHandle" - the handle is not correct, e.g. the operation has finished
- "Error" - operation cannot be canceled
|
Get estimated progress of an asynchronous operation.
...
Response payload: {"status":"<string>", "progress":<number>}
parameters and errors | values |
---|
handle | - a handle returned earlier by install, uninstall or download request.
|
status | - "Ok" - operation successful
- "WrongHandle" - the handle is not correct, e.g. the operation has finished
|
progress | - estimated progress, an integer value 0-100
|
Events
Notification sent on the completion of asynchronous operation.
payload: {"handle":"<string>", "status":"<string>", "details":"<string>"}
parameters and errors | values |
---|
handle | - a handle returned earlier by install, uninstall or download request.
- empty string on Initialization notification
|
status | - "Success" - operation successful
- "Failed" - operation failed
|
details | - optional parameter, providing more details on the operation status.
|
Download progress tracking
...
draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | LISA sequence diagram - Initializationinitialization |
---|
simpleViewer | false |
---|
width | 200 | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 219 |
---|
revision | 1 |
---|
|
...
draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | LISA sequence diagram - cleanupmaintenance |
---|
simpleViewer | false |
---|
width | 400 | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 560 |
---|
revision | 1 |
---|
|
Install
draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | LISA sequence diagram - |
---|
|
...
install | simpleViewer | false |
---|
width |
---|
|
...
| links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 1422 |
---|
revision | 1 |
---|
|
Uninstall
draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | LISA sequence diagram - |
---|
|
...
uninstall | simpleViewer | false |
---|
width |
---|
|
...
| |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 847 |
---|
revision |
---|
|
...
Download
...
Download
...
LISA implementation
LISA should be implemented as Thunder plugin, and containarized as depicted in Thunder Integration into OneMW.
...