* Guard for no interfaces
* Host reload on update
* Extract payload
* Check eth and wifi interfaces with a valid ip4 config
* Add tests
* Fix tests
* Move to enum
* Split extra
* Restructure and add info
* adjust test
* Move docker version
* Add name and repository for addons
* Test supervisor version
* Use context instead of extra
* adjust test
* Add diagnostics support
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
* add aditional data
* Fix handling
* Better states
* Fix opt
* Update supervisor/bootstrap.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Only events on supported systems
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add free disk space info
* Log available space on docker image install error
* Add unit to log message
* Add 404 check and better log message
* Set default path to supervisor data path
* Clean up attribute access
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
* Move free space helper to hardware
* Add hardware test
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
* Do not use `tar_file.add` to recursively add backup folder
As the folders might contain files which are being removed temporarily (e.g. shared memory file of sqlite database), relying on `tar_file.add` becomes problematic as it crashes the whole backup process if a file does not exist anymore.
This becomes annoying, if the file which causes the error should be excluded by the filter.
To workaround this issue, we manually iterating over the files/directories and apply filters before passing the file or directory to the `tar_file.add` method. As per [documentation](https://docs.python.org/3/library/pathlib.html#pure-paths), pure path does not access the file system.
Fixes#779
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Remove unused import
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Applied code review suggestions
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Applied codestyle
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Remove `pathlib` util and move `is_excluded_by_filter` into `tar` utils
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Rename method
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Rename `origin_dir` to `origin_path` and apply `Path` typehint
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Codestyle
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Add comment why we add the directory even if we are iterating over all its items
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Use `atomic_contents_add` from tar utils to archive addon data
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Remove unused function `exclude_filter`
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Remove unsecure default list value
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Some more codestyle
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Lowercase method name `Path.joinpath`
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Fix codestyle and use proper variable
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Add test for `_is_excluded_by_filter`
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
* Update addon.py
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
* Improvements to DNS validator to include IPv6 (#1312)
* improvements to DNS validator to include IPv6
* fixed the DNS validators
* updated per suggestions
* Update const.py
* Update dns.py
* Update validate.py
* Update validate.py
* Update dns.py
* Update test_validate.py
* Update validate.py
* Cleanup
* Don't set default DNS server as default
* Remove update local resolver
* Fix lint