Eric Callahan
affe196ff6
machine: move default allowed services to an asset file
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-03-15 15:07:29 -04:00
Eric Callahan
98bb40bd80
utils: add kernel version
...
Move the kernel version tuple calculation out of gpio.py into
the utils package so its available for any module that requires
it. In addition, report the kernel version string with the distribution
info and log the platform in the rollover header.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-03-11 06:26:18 -04:00
Eric Callahan
71517b255d
machine: dont allow usb id request to block initialization
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:28:20 -05:00
Eric Callahan
6f4a0480f3
machine: add video peripheral API request
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:22 -05:00
Eric Callahan
eb1599fa07
machine: add support for peripheral queries
...
Implement endpoints to query the following:
- Serial Devices (including Hardware UART)
- USB Devices using lsusb
- Klipper CAN Node UUIDs
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-02-01 10:27:21 -05:00
Eric Callahan
ddd735feba
refactor: convert klippy_connection into a component
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-01-13 15:15:15 -05:00
Eric Callahan
d506c9241f
refactor: convert application into a component
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-01-13 15:15:14 -05:00
Eric Callahan
f1de614027
shell_command: refactor retrires to attempts
...
This is consistent with the http_client. The argument "attempts" is more
accurate than retries, as the first attempt is not a retry.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-01-11 16:51:41 -05:00
Eric Callahan
b3b60757aa
authorization: remove "permitted_paths" attribute
...
Track authentication requirements in the API Definition. This
eliminates the need to look up the authentication component
to disable auth on an endpoint.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-12-16 16:21:22 -05:00
Eric Callahan
b18e9cc222
all: Replace strings with RequestType flags
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-12-16 16:21:20 -05:00
Eric Callahan
0e7c759bde
machine: fix linter errors
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:31:41 -04:00
Eric Callahan
f99e5b0bea
utils: add support for msgspec with stdlib json fallback
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-10-06 18:20:28 -04:00
Eric Callahan
22d1fda655
machine: use env vars for service validation
...
Use Moonraker's environment variables when generating the
env file for service validation updates.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-07-25 19:35:43 -04:00
Mikkel Schmidt
40013ec270
module: add ratos-configurator to default services
...
Adds the RatOS configurator to the default service list in machine.py so future installs of moonraker will allow the ratos configurator service to be managed from frontends.
Signed-off-by: Mikkel Schmidt <mikkel.schmidt@gmail.com>
2023-03-05 12:27:56 -05:00
Eric Callahan
4281c4d978
machine: validate web_request args
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-24 10:26:15 -05:00
Eric Callahan
6d73c60a38
moonraker: move common classes to common.py
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-24 07:08:41 -05:00
Eric Callahan
5ffd18d132
machine: update install validation to use package
...
If the "moonraker" entry point is available use it as an executable. Otherwise
launch the module through the "-m" switch.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-22 18:08:48 -05:00
Eric Callahan
79467e6484
utils: add source_info utility module
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-22 18:08:48 -05:00
Eric Callahan
0f8638fec7
components: correct imports
...
All imports must now be relative to work correctly with the
moonraker parent package.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-22 12:16:27 -05:00
Eric Callahan
5325693ed6
machine: report provider in system_info
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-08 17:44:57 -05:00
Eric Callahan
8c7b93c6dd
machine: fix supervisord active state reporting
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-08 17:00:39 -05:00
Eric Callahan
8010f1dda2
machine: add shutdown action option
...
Signed-off-by: Eric Callahan <arkisne.code@gmail.com>
2023-02-08 11:11:34 -05:00
Eric Callahan
f0b82afde4
machine: remove unnecessary supervisord handlers
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-08 06:02:25 -05:00
Eric Callahan
645f0c9acf
machine: add container detection logging
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-08 06:00:01 -05:00
Eric Callahan
b02224485e
machine: rename supervisord provider
...
This is a cli providers, so rename it to supervisord_cli.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-08 05:36:57 -05:00
Eric Callahan
c69441955a
machine: support supervisord service info extraction
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:17 -05:00
Eric Callahan
5aa645f974
machine: simplify extract_service_info() call
...
Don't require the caller to specifiy properties, use the default
property list if not specified.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:17 -05:00
Eric Callahan
2fb136449a
machine: fix supervisorctl command arguments
...
According to the supervisord documentation the `-c` option is used to
specify the configuraiton file.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:17 -05:00
Eric Callahan
8335906443
machine: automate supervisord process init
...
Don't hardcode klipper and moonraker, detect them along with all other
allowed services.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-02-07 19:10:16 -05:00
Quinn Damerell
babf97be3b
Adding OctoEverywhere to the default service list
...
module: Adding OctoEverywhere to the default service list.
Adding OctoEverywhere to the default service list in machine.py so future installs of moonraker will allow the octoeverywhere service to be managed from frontends.
Signed-off-by: Quinn Damerell <quinnd@outlook.com>
2023-02-03 19:09:34 -05:00
Eric Callahan
db81607370
machine: use direct systemctl commands for reboot/shutdown
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-01-16 12:42:21 -05:00
Eric Callahan
a154c5fa51
machine: add moonraker-obico to default services
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-01-12 18:10:30 -05:00
Eric Callahan
690f841768
machine: introduce custom allow list for service control
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-01-02 07:46:43 -05:00
Pedro Lamas
b67a08a65b
machine: use virtualization.virt_identifier property
...
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2022-11-22 05:59:18 -05:00
Eric Callahan
362bc1a3d3
machine: fix typos and clarify supervisord docs
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-11-18 10:42:44 -05:00
mirokymac
48f3bb2189
machine.py: add support for supervisord service management
...
Signed-off-by: mirokymac <toufubomb@gmail.com>
2022-11-18 10:37:33 -05:00
Eric Callahan
68f5de6d2d
machine: report canbus info
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-11-16 14:20:07 -05:00
Eric Callahan
bb7cd27be5
machine: fix typo in sudo access request
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-11-06 11:43:52 -05:00
Eric Callahan
1ef34b8b60
machine: improve default database handling
...
Don't force a symlink to the default database if
the subfolder exits.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-22 16:44:51 -04:00
Eric Callahan
4df0b4d532
machine: abort validation if the backup config is loaded
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-21 10:26:25 -04:00
Eric Callahan
1190aba4b7
machine: add logging to validation init
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-21 10:26:25 -04:00
Eric Callahan
974b37dad8
machine: improve multi-instance validation
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-20 20:27:02 -04:00
Eric Callahan
4954cc74cd
machine: change sudo folder access test
...
The previous "/lost+found" is not available on all systems. Change to
"/root", which should be available.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-19 06:21:18 -04:00
Eric Callahan
d6bdad3a9d
machine: announce required update via gcode terminal
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-18 14:07:27 -04:00
Eric Callahan
f1c4d6b143
machine: validation fix for new installs
...
Add a missing return statement to _link_data_subfolder.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-17 06:30:54 -04:00
Eric Callahan
7e35e54a71
machine: increase timeout for sudo access check
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-15 20:01:19 -04:00
Eric Callahan
05ca71f5a8
machine: relax config validation
...
Don't raise an exception if the option in a path does not exist. Remove
the option and fall back to the default path location
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-15 19:58:34 -04:00
Eric Callahan
53fcc7386f
machine: increase timeouts for sudo commands
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-15 10:52:04 -04:00
Eric Callahan
00c4846d11
machine: validation fixes
...
Protect the sudo request with a lock. Add retries to the sudo
commands.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-15 08:37:45 -04:00
th33xitus
fb327a6ca9
machine: use term "sudo" instead of "root"
...
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2022-10-15 06:11:14 -04:00