mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 19:16:29 +00:00
commit
7f3bc91c1d
@ -11,6 +11,7 @@ from ..exceptions import (
|
|||||||
AddonsError,
|
AddonsError,
|
||||||
AddonsNotSupportedError,
|
AddonsNotSupportedError,
|
||||||
DockerAPIError,
|
DockerAPIError,
|
||||||
|
HomeAssistantAPIError,
|
||||||
HostAppArmorError,
|
HostAppArmorError,
|
||||||
)
|
)
|
||||||
from ..store.addon import AddonStore
|
from ..store.addon import AddonStore
|
||||||
@ -155,8 +156,15 @@ class AddonManager(CoreSysAttributes):
|
|||||||
with suppress(HostAppArmorError):
|
with suppress(HostAppArmorError):
|
||||||
await addon.uninstall_apparmor()
|
await addon.uninstall_apparmor()
|
||||||
|
|
||||||
|
# Cleanup Ingress panel from sidebar
|
||||||
|
if addon.ingress_panel:
|
||||||
|
addon.ingress_panel = False
|
||||||
|
with suppress(HomeAssistantAPIError):
|
||||||
|
await self.sys_ingress.update_hass_panel(addon)
|
||||||
|
|
||||||
# Cleanup internal data
|
# Cleanup internal data
|
||||||
addon.remove_discovery()
|
addon.remove_discovery()
|
||||||
|
|
||||||
self.data.uninstall(addon)
|
self.data.uninstall(addon)
|
||||||
self.local.pop(slug)
|
self.local.pop(slug)
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ ADDONS_ROLE_ACCESS = {
|
|||||||
),
|
),
|
||||||
ROLE_MANAGER: re.compile(
|
ROLE_MANAGER: re.compile(
|
||||||
r"^(?:"
|
r"^(?:"
|
||||||
|
r"|/dns/.*"
|
||||||
r"|/homeassistant/.+"
|
r"|/homeassistant/.+"
|
||||||
r"|/host/.+"
|
r"|/host/.+"
|
||||||
r"|/hardware/.+"
|
r"|/hardware/.+"
|
||||||
|
@ -3,7 +3,7 @@ from pathlib import Path
|
|||||||
from ipaddress import ip_network
|
from ipaddress import ip_network
|
||||||
|
|
||||||
|
|
||||||
HASSIO_VERSION = "176"
|
HASSIO_VERSION = "177"
|
||||||
|
|
||||||
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
|
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
|
||||||
URL_HASSIO_VERSION = "https://version.home-assistant.io/{channel}.json"
|
URL_HASSIO_VERSION = "https://version.home-assistant.io/{channel}.json"
|
||||||
|
@ -51,7 +51,8 @@ UUID_MATCH = vol.Match(r"^[0-9a-f]{32}$")
|
|||||||
SHA256 = vol.Match(r"^[0-9a-f]{64}$")
|
SHA256 = vol.Match(r"^[0-9a-f]{64}$")
|
||||||
TOKEN = vol.Match(r"^[0-9a-f]{32,256}$")
|
TOKEN = vol.Match(r"^[0-9a-f]{32,256}$")
|
||||||
LOG_LEVEL = vol.In(["debug", "info", "warning", "error", "critical"])
|
LOG_LEVEL = vol.In(["debug", "info", "warning", "error", "critical"])
|
||||||
DNS_SERVER_LIST = vol.All([vol.Url()], vol.Length(max=8))
|
DNS_URL = vol.Match(r"^dns://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$")
|
||||||
|
DNS_SERVER_LIST = vol.All([DNS_URL], vol.Length(max=8))
|
||||||
|
|
||||||
|
|
||||||
def validate_repository(repository):
|
def validate_repository(repository):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user