Commit graph libervia-backend/sat/plugins/plugin_misc_app_manager.py
Author SHA1 Message Date
Goffi
6a6f15707a massive refactoring to switch from camelCase to snake_case:
historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a
pre-PEP8 code, to use the same coding style as in Twisted.

However, snake_case is more readable and it's better to follow PEP8 best practices, so it
has been decided to move on full snake_case. Because Libervia has a huge codebase, this
ended with a ugly mix of camelCase and snake_case.

To fix that, this patch does a big refactoring by renaming every function and method
(including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case.

This is a massive change, and may result in some bugs.
2023-04-08 13:54:42 +02:00
Goffi
6ad9431678 plugin app manager: start doesn't wait anymore for actual app start:
Application may be long to start (e.g. a Docker app may have to download images first,
and even without the downloading, the starting could be long), which may lead to UI
blocking or bridge time out.

To prevent that, `start` is now returning immediately, and 2 new signals are used to
indicate when the application is started, of if something wrong happened.

`start` now returns initial app data, including exposed data without the computed exposed
data. The computed data must be retrieved after the app has been started.
2023-03-04 18:30:47 +01:00
Goffi
98fb1b4091 plugin app manager: add a way to create files:
a `files` field can now be used to create files on the fly. Its value must be a dict where
key are file names, and values are an other dict with file data.

For now file data can only use the `content` key. Value of content will be written to the file.
If a file already exists, it is not overwritten.
2021-06-12 15:10:49 +02:00
Goffi
35659893be plugin app manager: "public_url" must NOT have a schema 2021-06-11 17:39:59 +02:00
Goffi
dc86957043 date update 2021-03-19 15:45:14 +01:00
Goffi
190f473cab plugin app manager: fixed public_url value check 2020-11-14 21:20:48 +01:00
Goffi
e1f123f120 plugin app manager: first draft:
/!\ new optional dependency: pyyaml

this plugin manage the life cycle of external applications. Application handlers register
to it.

Data needed to launch an application as set in YAML files. Local data types are used to
get values directly from SàT:

- !sat_conf to retrieve a configuration value
- !sat_generate_pwd to generate a password
- !sat_param for parameters specified a launch

Data can be exposed when an instance is launched, this can be used to specify the port
(notably the one used for web), or a generated password.
2020-09-28 21:10:30 +02:00