Update
Update
This operation is used to install/change/delete a local file of the application by the third system.
The operation will specifies the steps that ODA have to do and the url where the new files can be download to change the actuals or create news.
This means that his operation can extend the actual Agent already installed into the device at runtime.
Dependencies
- Commons: Required to provide the commons utils.
- Operation API: Provides the api of the operation and the enums of the result code.
Configuration
To configure Update Operation module, a file named es.amplia.oda.operation.update.cfg must be created with the next parameters:
- rulesPath:Required parameter. Path where rules will be installed.
- rulesUtilsPath:Required parameter. Path where rules utils files will be installed.
- backupPath:Required parameter. Path where backups of files to update will be stored.
- deployPath:Required parameter. Path where bundles will be deployed.
- downloadsPath:Required parameter. Path where downloaded files will be stored.
- configurationPath:Required parameter. Path where configuration files will be installed.
Trace
The trace send by the third system (e.g. OpenGate) to the ODA to do this operation is like this:
‘{“operation”:{“request”:{“timestamp”:1557395219834,“name”:“UPDATE”,“parameters”:[{“name”:“bundleName”,“value”:{“string”:“rules-creation-test”}},{“name”:“bundleVersion”,“value”:{“string”:“2.0.0”}},{“name”:“deploymentElements”,“type”:“string”,“value”:{“array”:[{“name”:"" + this.name + “”,“version”:“2.0.0”,“type”:“SOFTWARE”,“downloadUrl”:“http://” + jschData.getSSH_SERVER_IP() + “:” + PORT_HTTP_SERVER + “/echoGet”,“path”:“rules/” + this.datastreamId + “”,“order”:1,“operation”:“INSTALL”,“validators”:[],“size”:334,“oldVersion”:“1.0.0”}]}}],“id”:“48589c6e-3d9f-4e59-a066-81f357fb6cf8”}}}’'