2803 Commits

Author SHA1 Message Date
Pascal Vizeli
3dd3340e35
Make host feature cheaper to call and relay on it (#2266) 2020-11-18 14:13:49 +01:00
Pascal Vizeli
2f9fc39b72
Check if connectivity check if available on host (#2265)
* Check if connectivity check if available on host

* fix get

* not needed

* Update const.py

* Use enabled
2020-11-18 12:40:55 +01:00
Pascal Vizeli
80f4309799
Enforce internet host/system (#2263) 2020-11-18 11:29:23 +01:00
Pascal Vizeli
550fca4bcd
Remove coroutine from job update (#2264) 2020-11-18 11:25:04 +01:00
Pascal Vizeli
4b500ef873
JobManager should not touch our exceptions (#2261)
* JobManager should not touch our exceptions

* Add tests

* temporary allow su update all time

* Update supervisor/jobs/decorator.py

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2020-11-17 18:46:02 +01:00
dependabot[bot]
476f021fbf
Bump debugpy from 1.1.0 to 1.2.0 (#2260)
Bumps [debugpy](https://github.com/microsoft/debugpy) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/microsoft/debugpy/releases)
- [Commits](https://github.com/microsoft/debugpy/compare/v1.1.0...v1.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-17 18:38:00 +01:00
dependabot[bot]
8393ca5b23
Bump codecov/codecov-action from v1.0.14 to v1.0.15 (#2259)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.14 to v1.0.15.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.14...239febf655bba88b16ff5dea1d3135ea8663a1f9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-17 08:56:32 +01:00
dependabot[bot]
4eb7a60b88
Bump actions/upload-artifact from v2.2.0 to v2.2.1 (#2257)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.0 to v2.2.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.0...726a6dcd0199f578459862705eed35cda05af50b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-16 12:34:50 +01:00
Pascal Vizeli
2040102e21
Handle Unhealthy like Unsupported (#2255)
* Handle Unhealthy like Unsupported

* Add tests

* Add unhealthy to sentry

* Add test
2020-11-14 16:16:00 +01:00
Joakim Sørensen
7ee5737f75
Activate new network settings after update (#2253) 2020-11-13 18:15:46 +01:00
Pascal Vizeli
8d499753a0
Fix auto interface method (#2252) 2020-11-13 16:58:28 +01:00
Pascal Vizeli
028ec277eb
Enable support for mdns & llmnr for host (#2251) 2020-11-13 16:47:56 +01:00
Pascal Vizeli
5552b1da49
Optimize flow / reduce call time (#2250)
* Optimize flow / reduce call time

* rename

* freeze too

* add connectivity task

* use newstyle timeout

* Fix tests

Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
2020-11-13 12:19:10 +01:00
Joakim Sørensen
06ab7e904f
Split check for internet connection to help troubleshooting (#2248)
* Split check for internet connection to help troubleshooting

* Siplify

* revert

* cleanup

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-11-13 08:58:07 +01:00
Pascal Vizeli
e4bf820038
Check & fix git repository integrity (#2245)
* Check & fix git repository integrity

* fix typing

* New style error handling

* Fix return

* tag more issue

* Fix black
2020-11-13 08:35:45 +01:00
dependabot[bot]
c209d2fa8d
Bump sentry-sdk from 0.19.2 to 0.19.3 (#2249)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 0.19.2 to 0.19.3.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGES.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/0.19.2...0.19.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-13 08:27:31 +01:00
Joakim Sørensen
784c5d3b7c
Use bool for host internet (#2247)
* Use bool for host internet

* Ignore host check if no network manager

* Update supervisor/host/network.py

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>

* Check dbus connection isntead of supported features

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-11-13 00:07:05 +01:00
Joakim Sørensen
a18b706f99
Add JobManager and Job decorator (#2225)
* Adds condition decorator to block execution that require internet

* Fix exsisting tests

* Add internet state to network info

* Add healthy condition

* Add tests

* It's all changed

* rename
2020-11-12 22:57:28 +01:00
Pascal Vizeli
cd34a40dd8
Send issues with sentry report (#2246) 2020-11-12 14:57:04 +01:00
Pascal Vizeli
ced72e1273
Fix show update if version is None (#2244) 2020-11-12 10:11:38 +01:00
Pascal Vizeli
5416eda1d6
Improve the error logging with new DBusProgramError (#2243) 2020-11-12 09:34:43 +01:00
Pascal Vizeli
c76a4ff422
Revert: psk is not readable and only exists on initial (#2242)
* Revert: psk is not readable and only exists on initial

* fix tests
2020-11-11 21:07:28 +01:00
Stefan Agner
d558ad2d76
Use technology neutral "auto" instead of "dhcp" for autoconfiguration (#2241)
* Use technology neutral "auto"  instead of "dhcp" for autoconfiguration

IPv6 is often run with SLAAC which does not use a DHCP server but still
does automatic address configuration. Follow wording of NetworkManager
and use "auto" instead.

* Use "auto" also in interface_update.tmpl

* Update interface_update.tmpl

* remove newline

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-11-11 18:23:04 +01:00
Pascal Vizeli
5f2d183b1d
Fix wifi conversation (#2240)
* Fix wifi conversation

* Fix naming

* simple
2020-11-11 17:09:48 +01:00
Pascal Vizeli
46e92036ec
Fix handling with open or wpa-psk (#2239) 2020-11-11 16:33:46 +01:00
Pascal Vizeli
280d423bfe
Fix error if a wlan scan is allready running (#2238)
* Fix error if a wlan scan is allready running

* fix other messages too
2020-11-11 13:48:50 +01:00
Pascal Vizeli
c4847ad10d
Handle dbus single byte (#2237) 2020-11-11 13:09:13 +01:00
dependabot[bot]
0a7c75830b
Bump pyupgrade from 2.7.3 to 2.7.4 (#2236)
Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 2.7.3 to 2.7.4.
- [Release notes](https://github.com/asottile/pyupgrade/releases)
- [Commits](https://github.com/asottile/pyupgrade/compare/v2.7.3...v2.7.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-11 08:45:07 +01:00
Pascal Vizeli
7aceb21123
Fix auth mode WEP (#2235)
* Fix auth mode WEP

* fix mapping
2020-11-10 18:07:20 +01:00
Pascal Vizeli
9264d437b1
Fix network API default value & tests (#2234) 2020-11-10 15:08:35 +01:00
Franck Nijhof
edc8d8960f
Replace stale bot with GitHub Action (#2232) 2020-11-10 09:15:34 +01:00
dependabot[bot]
0f4f196dc9
Bump colorlog from 4.5.0 to 4.6.2 (#2233)
Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 4.5.0 to 4.6.2.
- [Release notes](https://github.com/borntyping/python-colorlog/releases)
- [Commits](https://github.com/borntyping/python-colorlog/compare/v4.5.0...v4.6.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-10 09:15:01 +01:00
Pascal Vizeli
a027f4b5fc Revert info back to debug 2020-11-09 15:11:57 +00:00
Franck Nijhof
f025d1df05
Replace lock bot with GitHub Action (#2231) 2020-11-09 13:07:23 +01:00
Pascal Vizeli
4c560d7c54
Fix gateway None on API (#2230)
* Fix gateway None on API

* fix tests
2020-11-09 10:00:39 +01:00
Pascal Vizeli
a976ef6e67
Cleanup some logger (#2229) 2020-11-09 09:56:01 +01:00
Pascal Vizeli
e1b9d754af
Fix all interface are primary (#2228) 2020-11-09 09:27:16 +01:00
Pascal Vizeli
ee49935b7d
Odroid-C4 (#2226)
* Add Odroid-C4

* add machine
2020-11-09 08:57:18 +01:00
dependabot[bot]
36694c9ef0
Bump colorlog from 4.4.0 to 4.5.0 (#2227)
Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/borntyping/python-colorlog/releases)
- [Commits](https://github.com/borntyping/python-colorlog/compare/v4.4.0...v4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-09 08:57:08 +01:00
Pascal Vizeli
bd786811a3
Network: abstract dbus and supervisor - ipv6/wifi/vlan (#2217)
* Abstract code between dbus - supervisor

* cleanup v2

* fix address vs interface

* fix API calls

* Fix methodnames

* add vlan type

* add vlan support

* Fix tests

* Add wifi support

* more OOO

* fix typing import

* typing part 2

* Fix profile

* fix test payload

* ignore powersafe

* support privancy

* fix property

* Fix tests

* full support all API

* Fix all

* more robust

* Update supervisor/dbus/network/connection.py

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Fix gateway

* fix empty gateway

* Allow no ipv6 or ipv4 kernel support

* Exclude device drivers

* Add wifi

* Use loop on api

* refactory p1

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p2

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p3

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p4

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p5

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p6

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p7

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* refactory p8

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix lint

* update sup p1

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* update sup p2

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix tests

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix logging

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* improve mock handling

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* add fixtures

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix tests

* better testing

* Add more tests

* Fix API test

* Add test for vlan payload

* Support variation

* Fix doc string

* support remove & wifi scan

* make sure we ignore local-link on ipv6

* remove privancy - add vlan

* Fix tests

* fix isort

* Fixture dbus by commands

* Add dnsmanager fixture

* expose commands called by dbus

* Add wifi tests

* Update supervisor/plugins/dns.py

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Address comments & fix tests

* change url to be closer on others

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2020-11-09 08:56:42 +01:00
Paulus Schoutsen
ffaeb2b96d
Add validate session API (#2223) 2020-11-06 11:52:11 +01:00
dependabot[bot]
517e6cb437
Bump attrs from 20.2.0 to 20.3.0 (#2222)
Bumps [attrs](https://github.com/python-attrs/attrs) from 20.2.0 to 20.3.0.
- [Release notes](https://github.com/python-attrs/attrs/releases)
- [Changelog](https://github.com/python-attrs/attrs/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/python-attrs/attrs/compare/20.2.0...20.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-06 11:45:42 +01:00
Joakim Sørensen
9479672b88
Create evaluation modules (#2220)
* Create evaluation modules

* Use sys_core
2020-11-05 17:36:02 +01:00
Joakim Sørensen
934e59596a
Adds more logs to session validation (#2219)
* Adds more logs to session validation

* It's not there

* Use debug

* format

* Create new timestamp if OverflowError
2020-11-05 10:40:56 +01:00
Joakim Sørensen
8f4ac10361
Add login support for dockerhub (#2218)
* Add login support for dockerhub

* Remove registry
2020-11-05 10:39:53 +01:00
Pascal Vizeli
50e0fd159f
Add process lock for update + fix timeout (#2215) 2020.11.0 2020-11-03 18:12:57 +01:00
Pascal Vizeli
28344ff5f3
Supervisor container startup health function (#2214)
* Supervisor container startup health function

* better struct

* add test

* address comment

* rename file

* Update tests/test_main.py

Co-authored-by: Stefan Agner <stefan@agner.ch>

Co-authored-by: Stefan Agner <stefan@agner.ch>
2020-11-03 16:36:10 +01:00
dependabot[bot]
608ae14246
Bump sentry-sdk from 0.19.1 to 0.19.2 (#2211)
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 0.19.1 to 0.19.2.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGES.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/0.19.1...0.19.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-03 09:58:43 +01:00
dependabot[bot]
c0c0d44c2d
Bump home-assistant/builder from 2020.10.0 to 2020.11.0 (#2210)
Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2020.10.0 to 2020.11.0.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2020.10.0...c60c59d1300ac720519bbf35026f6b6904214d71)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-03 09:58:12 +01:00
Pascal Vizeli
5e947348ae
Fix pulse cookie error (#2212) 2020-11-03 09:54:31 +01:00