diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 02d1af0a8..ff798773c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,31 +1,24 @@ // See https://aka.ms/vscode-remote/devcontainer.json for format details. { - "name": "Hass.io dev", - "context": "..", - "dockerFile": "Dockerfile", - "appPort": "9123:8123", - "runArgs": [ - "-e", - "GIT_EDITOR=code --wait", - "--privileged" - ], - "extensions": [ - "ms-python.python", - "visualstudioexptteam.vscodeintellicode", - "esbenp.prettier-vscode" - ], - "settings": { - "python.pythonPath": "/usr/local/bin/python", - "python.linting.pylintEnabled": true, - "python.linting.enabled": true, - "python.formatting.provider": "black", - "python.formatting.blackArgs": [ - "--target-version", - "py37" - ], - "editor.formatOnPaste": false, - "editor.formatOnSave": true, - "editor.formatOnType": true, - "files.trimTrailingWhitespace": true - } -} \ No newline at end of file + "name": "Supervisor dev", + "context": "..", + "dockerFile": "Dockerfile", + "appPort": "9123:8123", + "runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"], + "extensions": [ + "ms-python.python", + "visualstudioexptteam.vscodeintellicode", + "esbenp.prettier-vscode" + ], + "settings": { + "python.pythonPath": "/usr/local/bin/python", + "python.linting.pylintEnabled": true, + "python.linting.enabled": true, + "python.formatting.provider": "black", + "python.formatting.blackArgs": ["--target-version", "py37"], + "editor.formatOnPaste": false, + "editor.formatOnSave": true, + "editor.formatOnType": true, + "files.trimTrailingWhitespace": true + } +} diff --git a/Dockerfile b/Dockerfile index 5436d632b..dbe182ec8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,4 +34,4 @@ COPY entry.sh /bin/ ENTRYPOINT ["/bin/entry.sh"] WORKDIR / -CMD [ "python3", "-m", "hassio" ] +CMD [ "python3", "-m", "supervisor" ] diff --git a/README.md b/README.md index c2428cc77..ee2afd5a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://dev.azure.com/home-assistant/Hass.io/_apis/build/status/hassio?branchName=dev)](https://dev.azure.com/home-assistant/Hass.io/_build/latest?definitionId=2&branchName=dev) -# Hass.io +# Home Assistant Supervisor ## First private cloud solution for home automation diff --git a/hassio/__init__.py b/hassio/__init__.py deleted file mode 100644 index e334e96c0..000000000 --- a/hassio/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Init file for Hass.io.""" diff --git a/hassio/misc/__init__.py b/hassio/misc/__init__.py deleted file mode 100644 index 0b6c51de2..000000000 --- a/hassio/misc/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Special object and tools for Hass.io.""" diff --git a/scripts/update-frontend.sh b/scripts/update-frontend.sh index 5610fe7b5..43fef9682 100755 --- a/scripts/update-frontend.sh +++ b/scripts/update-frontend.sh @@ -14,5 +14,5 @@ cd hassio ./script/build_hassio # Copy frontend -rm -f ../../hassio/api/panel/chunk.* -cp -rf build/* ../../hassio/api/panel/ \ No newline at end of file +rm -f ../../supervisor/hassio/api/panel/chunk.* +cp -rf build/* ../../supervisor/api/panel/ \ No newline at end of file diff --git a/setup.py b/setup.py index 0778211e1..1e8ce20b2 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,10 @@ from setuptools import setup -from hassio.const import HASSIO_VERSION +from supervisor.const import SUPERVISOR_VERSION setup( - name="HassIO", - version=HASSIO_VERSION, + name="Supervisor", + version=SUPERVISOR_VERSION, license="BSD License", author="The Home Assistant Authors", author_email="hello@home-assistant.io", @@ -24,19 +24,19 @@ setup( "Topic :: Scientific/Engineering :: Atmospheric Science", "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", ], keywords=["docker", "home-assistant", "api"], zip_safe=False, platforms="any", packages=[ - "hassio", - "hassio.docker", - "hassio.addons", - "hassio.api", - "hassio.misc", - "hassio.utils", - "hassio.snapshots", + "supervisor", + "supervisor.docker", + "supervisor.addons", + "supervisor.api", + "supervisor.misc", + "supervisor.utils", + "supervisor.snapshots", ], include_package_data=True, ) diff --git a/supervisor/__init__.py b/supervisor/__init__.py new file mode 100644 index 000000000..5b5816e1e --- /dev/null +++ b/supervisor/__init__.py @@ -0,0 +1 @@ +"""Init file for Supervisor.""" diff --git a/hassio/__main__.py b/supervisor/__main__.py similarity index 79% rename from hassio/__main__.py rename to supervisor/__main__.py index dd8a15aa0..806292940 100644 --- a/hassio/__main__.py +++ b/supervisor/__main__.py @@ -1,10 +1,10 @@ -"""Main file for Hass.io.""" +"""Main file for Supervisor.""" import asyncio from concurrent.futures import ThreadPoolExecutor import logging import sys -from hassio import bootstrap +from supervisor import bootstrap _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -29,7 +29,7 @@ if __name__ == "__main__": # Init async event loop loop = initialize_event_loop() - # Check if all information are available to setup Hass.io + # Check if all information are available to setup Supervisor if not bootstrap.check_environment(): sys.exit(1) @@ -37,27 +37,27 @@ if __name__ == "__main__": executor = ThreadPoolExecutor(thread_name_prefix="SyncWorker") loop.set_default_executor(executor) - _LOGGER.info("Initialize Hass.io setup") + _LOGGER.info("Initialize Supervisor setup") coresys = loop.run_until_complete(bootstrap.initialize_coresys()) loop.run_until_complete(coresys.core.connect()) bootstrap.supervisor_debugger(coresys) bootstrap.migrate_system_env(coresys) - _LOGGER.info("Setup HassIO") + _LOGGER.info("Setup Supervisor") loop.run_until_complete(coresys.core.setup()) loop.call_soon_threadsafe(loop.create_task, coresys.core.start()) loop.call_soon_threadsafe(bootstrap.reg_signal, loop) try: - _LOGGER.info("Run Hass.io") + _LOGGER.info("Run Supervisor") loop.run_forever() finally: - _LOGGER.info("Stopping Hass.io") + _LOGGER.info("Stopping Supervisor") loop.run_until_complete(coresys.core.stop()) executor.shutdown(wait=False) loop.close() - _LOGGER.info("Close Hass.io") + _LOGGER.info("Close Supervisor") sys.exit(0) diff --git a/hassio/addons/__init__.py b/supervisor/addons/__init__.py similarity index 98% rename from hassio/addons/__init__.py rename to supervisor/addons/__init__.py index 3e2a18eb6..46103bd4c 100644 --- a/hassio/addons/__init__.py +++ b/supervisor/addons/__init__.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-ons.""" +"""Init file for Supervisor add-ons.""" import asyncio from contextlib import suppress import logging @@ -25,7 +25,7 @@ AnyAddon = Union[Addon, AddonStore] class AddonManager(CoreSysAttributes): - """Manage add-ons inside Hass.io.""" + """Manage add-ons inside Supervisor.""" def __init__(self, coresys: CoreSys): """Initialize Docker base wrapper.""" @@ -57,7 +57,7 @@ class AddonManager(CoreSysAttributes): return self.store.get(addon_slug) def from_token(self, token: str) -> Optional[Addon]: - """Return an add-on from Hass.io token.""" + """Return an add-on from Supervisor token.""" for addon in self.installed: if token == addon.hassio_token: return addon diff --git a/hassio/addons/addon.py b/supervisor/addons/addon.py similarity index 99% rename from hassio/addons/addon.py rename to supervisor/addons/addon.py index dd27eeba0..c1d840174 100644 --- a/hassio/addons/addon.py +++ b/supervisor/addons/addon.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-ons.""" +"""Init file for Supervisor add-ons.""" from contextlib import suppress from copy import deepcopy from ipaddress import IPv4Address @@ -65,7 +65,7 @@ RE_WEBUI = re.compile( class Addon(AddonModel): - """Hold data for add-on inside Hass.io.""" + """Hold data for add-on inside Supervisor.""" def __init__(self, coresys: CoreSys, slug: str): """Initialize data holder.""" @@ -163,12 +163,12 @@ class Addon(AddonModel): @property def hassio_token(self) -> Optional[str]: - """Return access token for Hass.io API.""" + """Return access token for Supervisor API.""" return self.persist.get(ATTR_ACCESS_TOKEN) @property def ingress_token(self) -> Optional[str]: - """Return access token for Hass.io API.""" + """Return access token for Supervisor API.""" return self.persist.get(ATTR_INGRESS_TOKEN) @property diff --git a/hassio/addons/build.py b/supervisor/addons/build.py similarity index 96% rename from hassio/addons/build.py rename to supervisor/addons/build.py index 21a2e4c94..d349b60c6 100644 --- a/hassio/addons/build.py +++ b/supervisor/addons/build.py @@ -1,4 +1,4 @@ -"""Hass.io add-on build environment.""" +"""Supervisor add-on build environment.""" from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING, Dict @@ -16,7 +16,7 @@ class AddonBuild(JsonConfig, CoreSysAttributes): """Handle build options for add-ons.""" def __init__(self, coresys: CoreSys, addon: AnyAddon) -> None: - """Initialize Hass.io add-on builder.""" + """Initialize Supervisor add-on builder.""" self.coresys: CoreSys = coresys self.addon = addon diff --git a/hassio/addons/data.py b/supervisor/addons/data.py similarity index 95% rename from hassio/addons/data.py rename to supervisor/addons/data.py index f94e2af95..b8000b8e3 100644 --- a/hassio/addons/data.py +++ b/supervisor/addons/data.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-on data.""" +"""Init file for Supervisor add-on data.""" from copy import deepcopy import logging from typing import Any, Dict @@ -23,7 +23,7 @@ Config = Dict[str, Any] class AddonsData(JsonConfig, CoreSysAttributes): - """Hold data for installed Add-ons inside Hass.io.""" + """Hold data for installed Add-ons inside Supervisor.""" def __init__(self, coresys: CoreSys): """Initialize data holder.""" diff --git a/hassio/addons/model.py b/supervisor/addons/model.py similarity index 98% rename from hassio/addons/model.py rename to supervisor/addons/model.py index debc0ebe8..c4a15f805 100644 --- a/hassio/addons/model.py +++ b/supervisor/addons/model.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-ons.""" +"""Init file for Supervisor add-ons.""" from pathlib import Path from typing import Any, Awaitable, Dict, List, Optional @@ -137,12 +137,12 @@ class AddonModel(CoreSysAttributes): @property def hassio_token(self) -> Optional[str]: - """Return access token for Hass.io API.""" + """Return access token for Supervisor API.""" return None @property def ingress_token(self) -> Optional[str]: - """Return access token for Hass.io API.""" + """Return access token for Supervisor API.""" return None @property @@ -326,7 +326,7 @@ class AddonModel(CoreSysAttributes): @property def access_hassio_api(self) -> bool: - """Return True if the add-on access to Hass.io REASTful API.""" + """Return True if the add-on access to Supervisor REASTful API.""" return self.data[ATTR_HASSIO_API] @property @@ -336,7 +336,7 @@ class AddonModel(CoreSysAttributes): @property def hassio_role(self) -> str: - """Return Hass.io role for API.""" + """Return Supervisor role for API.""" return self.data[ATTR_HASSIO_ROLE] @property diff --git a/hassio/addons/utils.py b/supervisor/addons/utils.py similarity index 98% rename from hassio/addons/utils.py rename to supervisor/addons/utils.py index 4707df425..434dc7724 100644 --- a/hassio/addons/utils.py +++ b/supervisor/addons/utils.py @@ -59,7 +59,7 @@ def rating_security(addon: AddonModel) -> int: ): rating += -1 - # API Hass.io role + # API Supervisor role if addon.hassio_role == ROLE_MANAGER: rating += -1 elif addon.hassio_role == ROLE_ADMIN: diff --git a/hassio/addons/validate.py b/supervisor/addons/validate.py similarity index 100% rename from hassio/addons/validate.py rename to supervisor/addons/validate.py diff --git a/hassio/api/__init__.py b/supervisor/api/__init__.py similarity index 98% rename from hassio/api/__init__.py rename to supervisor/api/__init__.py index 456ff8e7e..88b015e24 100644 --- a/hassio/api/__init__.py +++ b/supervisor/api/__init__.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io RESTful API.""" +"""Init file for Supervisor RESTful API.""" import logging from pathlib import Path from typing import Optional @@ -29,7 +29,7 @@ MAX_CLIENT_SIZE: int = 1024 ** 2 * 16 class RestAPI(CoreSysAttributes): - """Handle RESTful API for Hass.io.""" + """Handle RESTful API for Supervisor.""" def __init__(self, coresys: CoreSys): """Initialize Docker base wrapper.""" @@ -93,7 +93,7 @@ class RestAPI(CoreSysAttributes): web.post("/os/update", api_hassos.update), web.post("/os/update/cli", api_hassos.update_cli), web.post("/os/config/sync", api_hassos.config_sync), - # Remove with old Hass.io fallback + # Remove with old Supervisor fallback web.get("/hassos/info", api_hassos.info), web.post("/hassos/update", api_hassos.update), web.post("/hassos/update/cli", api_hassos.update_cli), @@ -165,7 +165,7 @@ class RestAPI(CoreSysAttributes): web.post("/core/start", api_hass.start), web.post("/core/check", api_hass.check), web.post("/core/rebuild", api_hass.rebuild), - # Remove with old Hass.io fallback + # Remove with old Supervisor fallback web.get("/homeassistant/info", api_hass.info), web.get("/homeassistant/logs", api_hass.logs), web.get("/homeassistant/stats", api_hass.stats), @@ -192,7 +192,7 @@ class RestAPI(CoreSysAttributes): web.post("/core/api/{path:.+}", api_proxy.api), web.get("/core/api/{path:.+}", api_proxy.api), web.get("/core/api/", api_proxy.api), - # Remove with old Hass.io fallback + # Remove with old Supervisor fallback web.get("/homeassistant/api/websocket", api_proxy.websocket), web.get("/homeassistant/websocket", api_proxy.websocket), web.get("/homeassistant/api/stream", api_proxy.stream), diff --git a/hassio/api/addons.py b/supervisor/api/addons.py similarity index 99% rename from hassio/api/addons.py rename to supervisor/api/addons.py index 49cdff062..d15f04040 100644 --- a/hassio/api/addons.py +++ b/supervisor/api/addons.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io Home Assistant RESTful API.""" +"""Init file for Supervisor Home Assistant RESTful API.""" import asyncio import logging from typing import Any, Awaitable, Dict, List diff --git a/hassio/api/auth.py b/supervisor/api/auth.py similarity index 94% rename from hassio/api/auth.py rename to supervisor/api/auth.py index 5a645f129..7143fbbad 100644 --- a/hassio/api/auth.py +++ b/supervisor/api/auth.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io auth/SSO RESTful API.""" +"""Init file for Supervisor auth/SSO RESTful API.""" import asyncio import logging from typing import Dict @@ -76,7 +76,7 @@ class APIAuth(CoreSysAttributes): return await self._process_dict(request, addon, data) raise HTTPUnauthorized( - headers={WWW_AUTHENTICATE: 'Basic realm="Hass.io Authentication"'} + headers={WWW_AUTHENTICATE: 'Basic realm="Home Assistant Authentication"'} ) @api_process diff --git a/hassio/api/discovery.py b/supervisor/api/discovery.py similarity index 98% rename from hassio/api/discovery.py rename to supervisor/api/discovery.py index 560f51fa7..ddc03abc5 100644 --- a/hassio/api/discovery.py +++ b/supervisor/api/discovery.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io network RESTful API.""" +"""Init file for Supervisor network RESTful API.""" import voluptuous as vol from .utils import api_process, api_validate diff --git a/hassio/api/dns.py b/supervisor/api/dns.py similarity index 98% rename from hassio/api/dns.py rename to supervisor/api/dns.py index a56e5fca5..998f886ff 100644 --- a/hassio/api/dns.py +++ b/supervisor/api/dns.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io DNS RESTful API.""" +"""Init file for Supervisor DNS RESTful API.""" import asyncio import logging from typing import Any, Awaitable, Dict diff --git a/hassio/api/hardware.py b/supervisor/api/hardware.py similarity index 96% rename from hassio/api/hardware.py rename to supervisor/api/hardware.py index 1d71b67f7..a26608028 100644 --- a/hassio/api/hardware.py +++ b/supervisor/api/hardware.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io hardware RESTful API.""" +"""Init file for Supervisor hardware RESTful API.""" import asyncio import logging from typing import Any, Dict diff --git a/hassio/api/hassos.py b/supervisor/api/hassos.py similarity index 97% rename from hassio/api/hassos.py rename to supervisor/api/hassos.py index ef5153cb6..95128f525 100644 --- a/hassio/api/hassos.py +++ b/supervisor/api/hassos.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io HassOS RESTful API.""" +"""Init file for Supervisor HassOS RESTful API.""" import asyncio import logging from typing import Any, Awaitable, Dict diff --git a/hassio/api/homeassistant.py b/supervisor/api/homeassistant.py similarity index 98% rename from hassio/api/homeassistant.py rename to supervisor/api/homeassistant.py index 99e72fe2b..d9f691f96 100644 --- a/hassio/api/homeassistant.py +++ b/supervisor/api/homeassistant.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io Home Assistant RESTful API.""" +"""Init file for Supervisor Home Assistant RESTful API.""" import asyncio import logging from typing import Coroutine, Dict, Any diff --git a/hassio/api/host.py b/supervisor/api/host.py similarity index 98% rename from hassio/api/host.py rename to supervisor/api/host.py index 6c05ea5b0..d686863c5 100644 --- a/hassio/api/host.py +++ b/supervisor/api/host.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io host RESTful API.""" +"""Init file for Supervisor host RESTful API.""" import asyncio import logging diff --git a/hassio/api/info.py b/supervisor/api/info.py similarity index 95% rename from hassio/api/info.py rename to supervisor/api/info.py index 572552119..7c2914dc5 100644 --- a/hassio/api/info.py +++ b/supervisor/api/info.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io info RESTful API.""" +"""Init file for Supervisor info RESTful API.""" import logging from typing import Any, Dict diff --git a/hassio/api/ingress.py b/supervisor/api/ingress.py similarity index 98% rename from hassio/api/ingress.py rename to supervisor/api/ingress.py index 9d3e12304..2b29b5648 100644 --- a/hassio/api/ingress.py +++ b/supervisor/api/ingress.py @@ -1,4 +1,4 @@ -"""Hass.io Add-on ingress service.""" +"""Supervisor Add-on ingress service.""" import asyncio from ipaddress import ip_address import logging @@ -81,7 +81,7 @@ class APIIngress(CoreSysAttributes): async def handler( self, request: web.Request ) -> Union[web.Response, web.StreamResponse, web.WebSocketResponse]: - """Route data to Hass.io ingress service.""" + """Route data to Supervisor ingress service.""" self._check_ha_access(request) # Check Ingress Session diff --git a/hassio/api/panel/201359fd5a526afe13ef.worker.js b/supervisor/api/panel/201359fd5a526afe13ef.worker.js similarity index 100% rename from hassio/api/panel/201359fd5a526afe13ef.worker.js rename to supervisor/api/panel/201359fd5a526afe13ef.worker.js diff --git a/hassio/api/panel/201359fd5a526afe13ef.worker.js.gz b/supervisor/api/panel/201359fd5a526afe13ef.worker.js.gz similarity index 100% rename from hassio/api/panel/201359fd5a526afe13ef.worker.js.gz rename to supervisor/api/panel/201359fd5a526afe13ef.worker.js.gz diff --git a/hassio/api/panel/201359fd5a526afe13ef.worker.js.map b/supervisor/api/panel/201359fd5a526afe13ef.worker.js.map similarity index 100% rename from hassio/api/panel/201359fd5a526afe13ef.worker.js.map rename to supervisor/api/panel/201359fd5a526afe13ef.worker.js.map diff --git a/hassio/api/panel/chunk.0b82745c7bdffe5c1404.js b/supervisor/api/panel/chunk.0b82745c7bdffe5c1404.js similarity index 100% rename from hassio/api/panel/chunk.0b82745c7bdffe5c1404.js rename to supervisor/api/panel/chunk.0b82745c7bdffe5c1404.js diff --git a/hassio/api/panel/chunk.0b82745c7bdffe5c1404.js.gz b/supervisor/api/panel/chunk.0b82745c7bdffe5c1404.js.gz similarity index 100% rename from hassio/api/panel/chunk.0b82745c7bdffe5c1404.js.gz rename to supervisor/api/panel/chunk.0b82745c7bdffe5c1404.js.gz diff --git a/hassio/api/panel/chunk.0b82745c7bdffe5c1404.js.map b/supervisor/api/panel/chunk.0b82745c7bdffe5c1404.js.map similarity index 100% rename from hassio/api/panel/chunk.0b82745c7bdffe5c1404.js.map rename to supervisor/api/panel/chunk.0b82745c7bdffe5c1404.js.map diff --git a/hassio/api/panel/chunk.429840c83fad61bc51a8.js b/supervisor/api/panel/chunk.429840c83fad61bc51a8.js similarity index 100% rename from hassio/api/panel/chunk.429840c83fad61bc51a8.js rename to supervisor/api/panel/chunk.429840c83fad61bc51a8.js diff --git a/hassio/api/panel/chunk.429840c83fad61bc51a8.js.LICENSE b/supervisor/api/panel/chunk.429840c83fad61bc51a8.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.429840c83fad61bc51a8.js.LICENSE rename to supervisor/api/panel/chunk.429840c83fad61bc51a8.js.LICENSE diff --git a/hassio/api/panel/chunk.429840c83fad61bc51a8.js.gz b/supervisor/api/panel/chunk.429840c83fad61bc51a8.js.gz similarity index 100% rename from hassio/api/panel/chunk.429840c83fad61bc51a8.js.gz rename to supervisor/api/panel/chunk.429840c83fad61bc51a8.js.gz diff --git a/hassio/api/panel/chunk.429840c83fad61bc51a8.js.map b/supervisor/api/panel/chunk.429840c83fad61bc51a8.js.map similarity index 100% rename from hassio/api/panel/chunk.429840c83fad61bc51a8.js.map rename to supervisor/api/panel/chunk.429840c83fad61bc51a8.js.map diff --git a/hassio/api/panel/chunk.43e40fd69686ad51301d.js b/supervisor/api/panel/chunk.43e40fd69686ad51301d.js similarity index 100% rename from hassio/api/panel/chunk.43e40fd69686ad51301d.js rename to supervisor/api/panel/chunk.43e40fd69686ad51301d.js diff --git a/hassio/api/panel/chunk.43e40fd69686ad51301d.js.gz b/supervisor/api/panel/chunk.43e40fd69686ad51301d.js.gz similarity index 100% rename from hassio/api/panel/chunk.43e40fd69686ad51301d.js.gz rename to supervisor/api/panel/chunk.43e40fd69686ad51301d.js.gz diff --git a/hassio/api/panel/chunk.43e40fd69686ad51301d.js.map b/supervisor/api/panel/chunk.43e40fd69686ad51301d.js.map similarity index 100% rename from hassio/api/panel/chunk.43e40fd69686ad51301d.js.map rename to supervisor/api/panel/chunk.43e40fd69686ad51301d.js.map diff --git a/hassio/api/panel/chunk.4d45ee0a3d852768f97e.js b/supervisor/api/panel/chunk.4d45ee0a3d852768f97e.js similarity index 100% rename from hassio/api/panel/chunk.4d45ee0a3d852768f97e.js rename to supervisor/api/panel/chunk.4d45ee0a3d852768f97e.js diff --git a/hassio/api/panel/chunk.4d45ee0a3d852768f97e.js.gz b/supervisor/api/panel/chunk.4d45ee0a3d852768f97e.js.gz similarity index 100% rename from hassio/api/panel/chunk.4d45ee0a3d852768f97e.js.gz rename to supervisor/api/panel/chunk.4d45ee0a3d852768f97e.js.gz diff --git a/hassio/api/panel/chunk.4d45ee0a3d852768f97e.js.map b/supervisor/api/panel/chunk.4d45ee0a3d852768f97e.js.map similarity index 100% rename from hassio/api/panel/chunk.4d45ee0a3d852768f97e.js.map rename to supervisor/api/panel/chunk.4d45ee0a3d852768f97e.js.map diff --git a/hassio/api/panel/chunk.715824f4764bdbe425b1.js b/supervisor/api/panel/chunk.715824f4764bdbe425b1.js similarity index 100% rename from hassio/api/panel/chunk.715824f4764bdbe425b1.js rename to supervisor/api/panel/chunk.715824f4764bdbe425b1.js diff --git a/hassio/api/panel/chunk.715824f4764bdbe425b1.js.LICENSE b/supervisor/api/panel/chunk.715824f4764bdbe425b1.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.715824f4764bdbe425b1.js.LICENSE rename to supervisor/api/panel/chunk.715824f4764bdbe425b1.js.LICENSE diff --git a/hassio/api/panel/chunk.715824f4764bdbe425b1.js.gz b/supervisor/api/panel/chunk.715824f4764bdbe425b1.js.gz similarity index 100% rename from hassio/api/panel/chunk.715824f4764bdbe425b1.js.gz rename to supervisor/api/panel/chunk.715824f4764bdbe425b1.js.gz diff --git a/hassio/api/panel/chunk.715824f4764bdbe425b1.js.map b/supervisor/api/panel/chunk.715824f4764bdbe425b1.js.map similarity index 100% rename from hassio/api/panel/chunk.715824f4764bdbe425b1.js.map rename to supervisor/api/panel/chunk.715824f4764bdbe425b1.js.map diff --git a/hassio/api/panel/chunk.8527374a266cecf93aa9.js b/supervisor/api/panel/chunk.8527374a266cecf93aa9.js similarity index 100% rename from hassio/api/panel/chunk.8527374a266cecf93aa9.js rename to supervisor/api/panel/chunk.8527374a266cecf93aa9.js diff --git a/hassio/api/panel/chunk.8527374a266cecf93aa9.js.gz b/supervisor/api/panel/chunk.8527374a266cecf93aa9.js.gz similarity index 100% rename from hassio/api/panel/chunk.8527374a266cecf93aa9.js.gz rename to supervisor/api/panel/chunk.8527374a266cecf93aa9.js.gz diff --git a/hassio/api/panel/chunk.8527374a266cecf93aa9.js.map b/supervisor/api/panel/chunk.8527374a266cecf93aa9.js.map similarity index 100% rename from hassio/api/panel/chunk.8527374a266cecf93aa9.js.map rename to supervisor/api/panel/chunk.8527374a266cecf93aa9.js.map diff --git a/hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js b/supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js similarity index 100% rename from hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js rename to supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js diff --git a/hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.LICENSE b/supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.LICENSE rename to supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.LICENSE diff --git a/hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.gz b/supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.gz similarity index 100% rename from hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.gz rename to supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.gz diff --git a/hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.map b/supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.map similarity index 100% rename from hassio/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.map rename to supervisor/api/panel/chunk.87b1d37fc9b8a6f7e2a6.js.map diff --git a/hassio/api/panel/chunk.92a11ac1b80e0d7839d2.js b/supervisor/api/panel/chunk.92a11ac1b80e0d7839d2.js similarity index 100% rename from hassio/api/panel/chunk.92a11ac1b80e0d7839d2.js rename to supervisor/api/panel/chunk.92a11ac1b80e0d7839d2.js diff --git a/hassio/api/panel/chunk.92a11ac1b80e0d7839d2.js.gz b/supervisor/api/panel/chunk.92a11ac1b80e0d7839d2.js.gz similarity index 100% rename from hassio/api/panel/chunk.92a11ac1b80e0d7839d2.js.gz rename to supervisor/api/panel/chunk.92a11ac1b80e0d7839d2.js.gz diff --git a/hassio/api/panel/chunk.92a11ac1b80e0d7839d2.js.map b/supervisor/api/panel/chunk.92a11ac1b80e0d7839d2.js.map similarity index 100% rename from hassio/api/panel/chunk.92a11ac1b80e0d7839d2.js.map rename to supervisor/api/panel/chunk.92a11ac1b80e0d7839d2.js.map diff --git a/hassio/api/panel/chunk.990ee58006b248f55d23.js b/supervisor/api/panel/chunk.990ee58006b248f55d23.js similarity index 100% rename from hassio/api/panel/chunk.990ee58006b248f55d23.js rename to supervisor/api/panel/chunk.990ee58006b248f55d23.js diff --git a/hassio/api/panel/chunk.990ee58006b248f55d23.js.gz b/supervisor/api/panel/chunk.990ee58006b248f55d23.js.gz similarity index 100% rename from hassio/api/panel/chunk.990ee58006b248f55d23.js.gz rename to supervisor/api/panel/chunk.990ee58006b248f55d23.js.gz diff --git a/hassio/api/panel/chunk.990ee58006b248f55d23.js.map b/supervisor/api/panel/chunk.990ee58006b248f55d23.js.map similarity index 100% rename from hassio/api/panel/chunk.990ee58006b248f55d23.js.map rename to supervisor/api/panel/chunk.990ee58006b248f55d23.js.map diff --git a/hassio/api/panel/chunk.9d371c8143226d4eaaee.js b/supervisor/api/panel/chunk.9d371c8143226d4eaaee.js similarity index 100% rename from hassio/api/panel/chunk.9d371c8143226d4eaaee.js rename to supervisor/api/panel/chunk.9d371c8143226d4eaaee.js diff --git a/hassio/api/panel/chunk.9d371c8143226d4eaaee.js.LICENSE b/supervisor/api/panel/chunk.9d371c8143226d4eaaee.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.9d371c8143226d4eaaee.js.LICENSE rename to supervisor/api/panel/chunk.9d371c8143226d4eaaee.js.LICENSE diff --git a/hassio/api/panel/chunk.9d371c8143226d4eaaee.js.gz b/supervisor/api/panel/chunk.9d371c8143226d4eaaee.js.gz similarity index 100% rename from hassio/api/panel/chunk.9d371c8143226d4eaaee.js.gz rename to supervisor/api/panel/chunk.9d371c8143226d4eaaee.js.gz diff --git a/hassio/api/panel/chunk.9d371c8143226d4eaaee.js.map b/supervisor/api/panel/chunk.9d371c8143226d4eaaee.js.map similarity index 100% rename from hassio/api/panel/chunk.9d371c8143226d4eaaee.js.map rename to supervisor/api/panel/chunk.9d371c8143226d4eaaee.js.map diff --git a/hassio/api/panel/chunk.b2dce600432c76a53d8c.js b/supervisor/api/panel/chunk.b2dce600432c76a53d8c.js similarity index 100% rename from hassio/api/panel/chunk.b2dce600432c76a53d8c.js rename to supervisor/api/panel/chunk.b2dce600432c76a53d8c.js diff --git a/hassio/api/panel/chunk.b2dce600432c76a53d8c.js.gz b/supervisor/api/panel/chunk.b2dce600432c76a53d8c.js.gz similarity index 100% rename from hassio/api/panel/chunk.b2dce600432c76a53d8c.js.gz rename to supervisor/api/panel/chunk.b2dce600432c76a53d8c.js.gz diff --git a/hassio/api/panel/chunk.b2dce600432c76a53d8c.js.map b/supervisor/api/panel/chunk.b2dce600432c76a53d8c.js.map similarity index 100% rename from hassio/api/panel/chunk.b2dce600432c76a53d8c.js.map rename to supervisor/api/panel/chunk.b2dce600432c76a53d8c.js.map diff --git a/hassio/api/panel/chunk.b60200a57d6f63941b30.js b/supervisor/api/panel/chunk.b60200a57d6f63941b30.js similarity index 100% rename from hassio/api/panel/chunk.b60200a57d6f63941b30.js rename to supervisor/api/panel/chunk.b60200a57d6f63941b30.js diff --git a/hassio/api/panel/chunk.b60200a57d6f63941b30.js.gz b/supervisor/api/panel/chunk.b60200a57d6f63941b30.js.gz similarity index 100% rename from hassio/api/panel/chunk.b60200a57d6f63941b30.js.gz rename to supervisor/api/panel/chunk.b60200a57d6f63941b30.js.gz diff --git a/hassio/api/panel/chunk.b60200a57d6f63941b30.js.map b/supervisor/api/panel/chunk.b60200a57d6f63941b30.js.map similarity index 100% rename from hassio/api/panel/chunk.b60200a57d6f63941b30.js.map rename to supervisor/api/panel/chunk.b60200a57d6f63941b30.js.map diff --git a/hassio/api/panel/chunk.d4931d72592ad48ba2be.js b/supervisor/api/panel/chunk.d4931d72592ad48ba2be.js similarity index 100% rename from hassio/api/panel/chunk.d4931d72592ad48ba2be.js rename to supervisor/api/panel/chunk.d4931d72592ad48ba2be.js diff --git a/hassio/api/panel/chunk.d4931d72592ad48ba2be.js.LICENSE b/supervisor/api/panel/chunk.d4931d72592ad48ba2be.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.d4931d72592ad48ba2be.js.LICENSE rename to supervisor/api/panel/chunk.d4931d72592ad48ba2be.js.LICENSE diff --git a/hassio/api/panel/chunk.d4931d72592ad48ba2be.js.gz b/supervisor/api/panel/chunk.d4931d72592ad48ba2be.js.gz similarity index 100% rename from hassio/api/panel/chunk.d4931d72592ad48ba2be.js.gz rename to supervisor/api/panel/chunk.d4931d72592ad48ba2be.js.gz diff --git a/hassio/api/panel/chunk.d4931d72592ad48ba2be.js.map b/supervisor/api/panel/chunk.d4931d72592ad48ba2be.js.map similarity index 100% rename from hassio/api/panel/chunk.d4931d72592ad48ba2be.js.map rename to supervisor/api/panel/chunk.d4931d72592ad48ba2be.js.map diff --git a/hassio/api/panel/chunk.e46c606dd9100816af4e.js b/supervisor/api/panel/chunk.e46c606dd9100816af4e.js similarity index 100% rename from hassio/api/panel/chunk.e46c606dd9100816af4e.js rename to supervisor/api/panel/chunk.e46c606dd9100816af4e.js diff --git a/hassio/api/panel/chunk.e46c606dd9100816af4e.js.LICENSE b/supervisor/api/panel/chunk.e46c606dd9100816af4e.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.e46c606dd9100816af4e.js.LICENSE rename to supervisor/api/panel/chunk.e46c606dd9100816af4e.js.LICENSE diff --git a/hassio/api/panel/chunk.e46c606dd9100816af4e.js.gz b/supervisor/api/panel/chunk.e46c606dd9100816af4e.js.gz similarity index 100% rename from hassio/api/panel/chunk.e46c606dd9100816af4e.js.gz rename to supervisor/api/panel/chunk.e46c606dd9100816af4e.js.gz diff --git a/hassio/api/panel/chunk.e46c606dd9100816af4e.js.map b/supervisor/api/panel/chunk.e46c606dd9100816af4e.js.map similarity index 100% rename from hassio/api/panel/chunk.e46c606dd9100816af4e.js.map rename to supervisor/api/panel/chunk.e46c606dd9100816af4e.js.map diff --git a/hassio/api/panel/chunk.f49e500cf58ea310d452.js b/supervisor/api/panel/chunk.f49e500cf58ea310d452.js similarity index 100% rename from hassio/api/panel/chunk.f49e500cf58ea310d452.js rename to supervisor/api/panel/chunk.f49e500cf58ea310d452.js diff --git a/hassio/api/panel/chunk.f49e500cf58ea310d452.js.LICENSE b/supervisor/api/panel/chunk.f49e500cf58ea310d452.js.LICENSE similarity index 100% rename from hassio/api/panel/chunk.f49e500cf58ea310d452.js.LICENSE rename to supervisor/api/panel/chunk.f49e500cf58ea310d452.js.LICENSE diff --git a/hassio/api/panel/chunk.f49e500cf58ea310d452.js.gz b/supervisor/api/panel/chunk.f49e500cf58ea310d452.js.gz similarity index 100% rename from hassio/api/panel/chunk.f49e500cf58ea310d452.js.gz rename to supervisor/api/panel/chunk.f49e500cf58ea310d452.js.gz diff --git a/hassio/api/panel/chunk.f49e500cf58ea310d452.js.map b/supervisor/api/panel/chunk.f49e500cf58ea310d452.js.map similarity index 100% rename from hassio/api/panel/chunk.f49e500cf58ea310d452.js.map rename to supervisor/api/panel/chunk.f49e500cf58ea310d452.js.map diff --git a/hassio/api/panel/entrypoint.582baa2f.js b/supervisor/api/panel/entrypoint.582baa2f.js similarity index 100% rename from hassio/api/panel/entrypoint.582baa2f.js rename to supervisor/api/panel/entrypoint.582baa2f.js diff --git a/hassio/api/panel/entrypoint.582baa2f.js.gz b/supervisor/api/panel/entrypoint.582baa2f.js.gz similarity index 100% rename from hassio/api/panel/entrypoint.582baa2f.js.gz rename to supervisor/api/panel/entrypoint.582baa2f.js.gz diff --git a/hassio/api/panel/entrypoint.582baa2f.js.map b/supervisor/api/panel/entrypoint.582baa2f.js.map similarity index 100% rename from hassio/api/panel/entrypoint.582baa2f.js.map rename to supervisor/api/panel/entrypoint.582baa2f.js.map diff --git a/hassio/api/panel/entrypoint.js b/supervisor/api/panel/entrypoint.js similarity index 100% rename from hassio/api/panel/entrypoint.js rename to supervisor/api/panel/entrypoint.js diff --git a/hassio/api/panel/entrypoint.js.gz b/supervisor/api/panel/entrypoint.js.gz similarity index 100% rename from hassio/api/panel/entrypoint.js.gz rename to supervisor/api/panel/entrypoint.js.gz diff --git a/hassio/api/panel/entrypoint.js.map b/supervisor/api/panel/entrypoint.js.map similarity index 100% rename from hassio/api/panel/entrypoint.js.map rename to supervisor/api/panel/entrypoint.js.map diff --git a/hassio/api/panel/index.html b/supervisor/api/panel/index.html similarity index 100% rename from hassio/api/panel/index.html rename to supervisor/api/panel/index.html diff --git a/hassio/api/panel/index.html.gz b/supervisor/api/panel/index.html.gz similarity index 100% rename from hassio/api/panel/index.html.gz rename to supervisor/api/panel/index.html.gz diff --git a/hassio/api/panel/manifest.json b/supervisor/api/panel/manifest.json similarity index 100% rename from hassio/api/panel/manifest.json rename to supervisor/api/panel/manifest.json diff --git a/hassio/api/proxy.py b/supervisor/api/proxy.py similarity index 99% rename from hassio/api/proxy.py rename to supervisor/api/proxy.py index cf8a8abe3..9e8204301 100644 --- a/hassio/api/proxy.py +++ b/supervisor/api/proxy.py @@ -23,7 +23,7 @@ class APIProxy(CoreSysAttributes): """API Proxy for Home Assistant.""" def _check_access(self, request: web.Request): - """Check the Hass.io token.""" + """Check the Supervisor token.""" if AUTHORIZATION in request.headers: bearer = request.headers[AUTHORIZATION] hassio_token = bearer.split(" ")[-1] diff --git a/hassio/api/security.py b/supervisor/api/security.py similarity index 100% rename from hassio/api/security.py rename to supervisor/api/security.py diff --git a/hassio/api/services.py b/supervisor/api/services.py similarity index 97% rename from hassio/api/services.py rename to supervisor/api/services.py index 53090cb38..25e964d93 100644 --- a/hassio/api/services.py +++ b/supervisor/api/services.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io network RESTful API.""" +"""Init file for Supervisor network RESTful API.""" from .utils import api_process, api_validate from ..const import ( diff --git a/hassio/api/snapshots.py b/supervisor/api/snapshots.py similarity index 99% rename from hassio/api/snapshots.py rename to supervisor/api/snapshots.py index e2529df52..152c820aa 100644 --- a/hassio/api/snapshots.py +++ b/supervisor/api/snapshots.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io snapshot RESTful API.""" +"""Init file for Supervisor snapshot RESTful API.""" import asyncio import logging from pathlib import Path diff --git a/hassio/api/supervisor.py b/supervisor/api/supervisor.py similarity index 97% rename from hassio/api/supervisor.py rename to supervisor/api/supervisor.py index b77aebc24..d4d54cefe 100644 --- a/hassio/api/supervisor.py +++ b/supervisor/api/supervisor.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io Supervisor RESTful API.""" +"""Init file for Supervisor Supervisor RESTful API.""" import asyncio import logging from typing import Any, Awaitable, Dict @@ -36,7 +36,7 @@ from ..const import ( ATTR_VERSION, ATTR_WAIT_BOOT, CONTENT_TYPE_BINARY, - HASSIO_VERSION, + SUPERVISOR_VERSION, UpdateChannels, ) from ..coresys import CoreSysAttributes @@ -91,7 +91,7 @@ class APISupervisor(CoreSysAttributes): ) return { - ATTR_VERSION: HASSIO_VERSION, + ATTR_VERSION: SUPERVISOR_VERSION, ATTR_LAST_VERSION: self.sys_updater.version_hassio, ATTR_CHANNEL: self.sys_updater.channel, ATTR_ARCH: self.sys_supervisor.arch, diff --git a/hassio/api/utils.py b/supervisor/api/utils.py similarity index 97% rename from hassio/api/utils.py rename to supervisor/api/utils.py index 8432d47ee..f44966107 100644 --- a/hassio/api/utils.py +++ b/supervisor/api/utils.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io util for RESTful API.""" +"""Init file for Supervisor util for RESTful API.""" import json import logging from typing import Any, Dict, List, Optional @@ -29,7 +29,7 @@ def excract_supervisor_token(request: web.Request) -> Optional[str]: if supervisor_token: return supervisor_token - # Remove with old Hass.io fallback + # Remove with old Supervisor fallback supervisor_token = request.headers.get(HEADER_TOKEN_OLD) if supervisor_token: return supervisor_token diff --git a/hassio/arch.py b/supervisor/arch.py similarity index 100% rename from hassio/arch.py rename to supervisor/arch.py diff --git a/hassio/auth.py b/supervisor/auth.py similarity index 100% rename from hassio/auth.py rename to supervisor/auth.py diff --git a/hassio/bootstrap.py b/supervisor/bootstrap.py similarity index 86% rename from hassio/bootstrap.py rename to supervisor/bootstrap.py index ca9e930ca..aaabfbde3 100644 --- a/hassio/bootstrap.py +++ b/supervisor/bootstrap.py @@ -1,4 +1,4 @@ -"""Bootstrap Hass.io.""" +"""Bootstrap Supervisor.""" import logging import os from pathlib import Path @@ -12,7 +12,7 @@ from .api import RestAPI from .arch import CpuArch from .auth import Auth from .const import SOCKET_DOCKER, UpdateChannels -from .core import HassIO +from .core import Core from .coresys import CoreSys from .dbus import DBusManager from .discovery import Discovery @@ -40,11 +40,11 @@ MACHINE_ID = Path("/etc/machine-id") async def initialize_coresys(): - """Initialize HassIO coresys/objects.""" + """Initialize supervisor coresys/objects.""" coresys = CoreSys() # Initialize core objects - coresys.core = HassIO(coresys) + coresys.core = Core(coresys) coresys.dns = CoreDNS(coresys) coresys.arch = CpuArch(coresys) coresys.auth = Auth(coresys) @@ -89,51 +89,53 @@ def initialize_system_data(coresys: CoreSys): ) config.path_homeassistant.mkdir() - # hassio ssl folder + # supervisor ssl folder if not config.path_ssl.is_dir(): - _LOGGER.info("Create Hass.io SSL/TLS folder %s", config.path_ssl) + _LOGGER.info("Create Supervisor SSL/TLS folder %s", config.path_ssl) config.path_ssl.mkdir() - # hassio addon data folder + # supervisor addon data folder if not config.path_addons_data.is_dir(): - _LOGGER.info("Create Hass.io Add-on data folder %s", config.path_addons_data) + _LOGGER.info("Create Supervisor Add-on data folder %s", config.path_addons_data) config.path_addons_data.mkdir(parents=True) if not config.path_addons_local.is_dir(): _LOGGER.info( - "Create Hass.io Add-on local repository folder %s", config.path_addons_local + "Create Supervisor Add-on local repository folder %s", + config.path_addons_local, ) config.path_addons_local.mkdir(parents=True) if not config.path_addons_git.is_dir(): _LOGGER.info( - "Create Hass.io Add-on git repositories folder %s", config.path_addons_git + "Create Supervisor Add-on git repositories folder %s", + config.path_addons_git, ) config.path_addons_git.mkdir(parents=True) - # hassio tmp folder + # supervisor tmp folder if not config.path_tmp.is_dir(): - _LOGGER.info("Create Hass.io temp folder %s", config.path_tmp) + _LOGGER.info("Create Supervisor temp folder %s", config.path_tmp) config.path_tmp.mkdir(parents=True) - # hassio backup folder + # supervisor backup folder if not config.path_backup.is_dir(): - _LOGGER.info("Create Hass.io backup folder %s", config.path_backup) + _LOGGER.info("Create Supervisor backup folder %s", config.path_backup) config.path_backup.mkdir() # share folder if not config.path_share.is_dir(): - _LOGGER.info("Create Hass.io share folder %s", config.path_share) + _LOGGER.info("Create Supervisor share folder %s", config.path_share) config.path_share.mkdir() # apparmor folder if not config.path_apparmor.is_dir(): - _LOGGER.info("Create Hass.io Apparmor folder %s", config.path_apparmor) + _LOGGER.info("Create Supervisor Apparmor folder %s", config.path_apparmor) config.path_apparmor.mkdir() # dns folder if not config.path_dns.is_dir(): - _LOGGER.info("Create Hass.io DNS folder %s", config.path_dns) + _LOGGER.info("Create Supervisor DNS folder %s", config.path_dns) config.path_dns.mkdir() # Update log level @@ -239,7 +241,7 @@ def supervisor_debugger(coresys: CoreSys) -> None: # pylint: disable=import-outside-toplevel import ptvsd - _LOGGER.info("Initialize Hass.io debugger") + _LOGGER.info("Initialize Supervisor debugger") ptvsd.enable_attach(address=("0.0.0.0", 33333), redirect_output=True) if coresys.config.debug_block: diff --git a/hassio/config.py b/supervisor/config.py similarity index 95% rename from hassio/config.py rename to supervisor/config.py index 7d6161c17..c70b0ccc0 100644 --- a/hassio/config.py +++ b/supervisor/config.py @@ -1,4 +1,4 @@ -"""Bootstrap Hass.io.""" +"""Bootstrap Supervisor.""" from datetime import datetime import logging import os @@ -100,7 +100,7 @@ class CoreConfig(JsonConfig): def modify_log_level(self) -> None: """Change log level.""" lvl = getattr(logging, self.logging.upper()) - logging.getLogger("hassio").setLevel(lvl) + logging.getLogger("supervisor").setLevel(lvl) @property def last_boot(self): @@ -119,12 +119,12 @@ class CoreConfig(JsonConfig): @property def path_hassio(self): - """Return Hass.io data path.""" + """Return Supervisor data path.""" return HASSIO_DATA @property def path_extern_hassio(self): - """Return Hass.io data path external for Docker.""" + """Return Supervisor data path external for Docker.""" return PurePath(os.environ["SUPERVISOR_SHARE"]) @property @@ -179,12 +179,12 @@ class CoreConfig(JsonConfig): @property def path_tmp(self): - """Return Hass.io temp folder.""" + """Return Supervisor temp folder.""" return Path(HASSIO_DATA, TMP_DATA) @property def path_extern_tmp(self): - """Return Hass.io temp folder for Docker.""" + """Return Supervisor temp folder for Docker.""" return PurePath(self.path_extern_hassio, TMP_DATA) @property diff --git a/hassio/const.py b/supervisor/const.py similarity index 99% rename from hassio/const.py rename to supervisor/const.py index 3d6de9fb7..d6766a98c 100644 --- a/hassio/const.py +++ b/supervisor/const.py @@ -1,9 +1,9 @@ -"""Constants file for Hass.io.""" +"""Constants file for Supervisor.""" from enum import Enum from ipaddress import ip_network from pathlib import Path -HASSIO_VERSION = "202" +SUPERVISOR_VERSION = "202" URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons" diff --git a/hassio/core.py b/supervisor/core.py similarity index 93% rename from hassio/core.py rename to supervisor/core.py index 6dfb0a758..e3e0c1c77 100644 --- a/hassio/core.py +++ b/supervisor/core.py @@ -12,27 +12,27 @@ from .const import ( STARTUP_SYSTEM, CoreStates, ) -from .coresys import CoreSysAttributes +from .coresys import CoreSys, CoreSysAttributes from .exceptions import HassioError, HomeAssistantError, SupervisorUpdateError _LOGGER: logging.Logger = logging.getLogger(__name__) -class HassIO(CoreSysAttributes): +class Core(CoreSysAttributes): """Main object of Supervisor.""" - def __init__(self, coresys): + def __init__(self, coresys: CoreSys): """Initialize Supervisor object.""" - self.coresys = coresys + self.coresys: CoreSys = coresys + self.state: CoreStates = CoreStates.INITIALIZE async def connect(self): """Connect Supervisor container.""" - self.coresys.state = CoreStates.INITIALIZE await self.sys_supervisor.load() async def setup(self): - """Setup HassIO orchestration.""" - self.coresys.state = CoreStates.STARTUP + """Setup supervisor orchestration.""" + self.state = CoreStates.STARTUP # Load DBus await self.sys_dbus.load() @@ -143,7 +143,7 @@ class HassIO(CoreSysAttributes): self.sys_create_task(self.sys_homeassistant.install()) _LOGGER.info("Supervisor is up and running") - self.coresys.state = CoreStates.RUNNING + self.state = CoreStates.RUNNING async def stop(self): """Stop a running orchestration.""" @@ -151,7 +151,7 @@ class HassIO(CoreSysAttributes): self.sys_scheduler.suspend = True # store new last boot / prevent time adjustments - if self.coresys.state == CoreStates.RUNNING: + if self.state == CoreStates.RUNNING: self._update_last_boot() # process async stop tasks diff --git a/hassio/coresys.py b/supervisor/coresys.py similarity index 96% rename from hassio/coresys.py rename to supervisor/coresys.py index 169b225d5..9ab44182f 100644 --- a/hassio/coresys.py +++ b/supervisor/coresys.py @@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Optional import aiohttp from .config import CoreConfig -from .const import UpdateChannels, CoreStates +from .const import UpdateChannels from .docker import DockerAPI from .misc.hardware import Hardware from .misc.scheduler import Scheduler @@ -16,7 +16,7 @@ if TYPE_CHECKING: from .api import RestAPI from .arch import CpuArch from .auth import Auth - from .core import HassIO + from .core import Core from .dbus import DBusManager from .discovery import Discovery from .dns import CoreDNS @@ -40,7 +40,6 @@ class CoreSys: """Initialize coresys.""" # Static attributes self.machine_id: Optional[str] = None - self.state: Optional[CoreStates] = None # External objects self._loop: asyncio.BaseEventLoop = asyncio.get_running_loop() @@ -56,7 +55,7 @@ class CoreSys: self._scheduler: Scheduler = Scheduler() # Internal objects pointers - self._core: Optional[HassIO] = None + self._core: Optional[Core] = None self._arch: Optional[CpuArch] = None self._auth: Optional[Auth] = None self._dns: Optional[CoreDNS] = None @@ -78,7 +77,7 @@ class CoreSys: @property def machine(self) -> str: - """Return running machine type of the Hass.io system.""" + """Return running machine type of the Supervisor system.""" if self._homeassistant: return self._homeassistant.machine return None @@ -129,15 +128,15 @@ class CoreSys: return self._scheduler @property - def core(self) -> HassIO: - """Return HassIO object.""" + def core(self) -> Core: + """Return core object.""" return self._core @core.setter - def core(self, value: HassIO): - """Set a Hass.io object.""" + def core(self, value: Core): + """Set a Core object.""" if self._core: - raise RuntimeError("Hass.io already set!") + raise RuntimeError("Core already set!") self._core = value @property @@ -364,7 +363,7 @@ class CoreSysAttributes: @property def sys_machine(self) -> str: - """Return running machine type of the Hass.io system.""" + """Return running machine type of the Supervisor system.""" return self.coresys.machine @property @@ -418,8 +417,8 @@ class CoreSysAttributes: return self.coresys.scheduler @property - def sys_core(self) -> HassIO: - """Return HassIO object.""" + def sys_core(self) -> Core: + """Return core object.""" return self.coresys.core @property diff --git a/hassio/data/arch.json b/supervisor/data/arch.json similarity index 100% rename from hassio/data/arch.json rename to supervisor/data/arch.json diff --git a/hassio/data/asound.tmpl b/supervisor/data/asound.tmpl similarity index 100% rename from hassio/data/asound.tmpl rename to supervisor/data/asound.tmpl diff --git a/hassio/data/audiodb.json b/supervisor/data/audiodb.json similarity index 100% rename from hassio/data/audiodb.json rename to supervisor/data/audiodb.json diff --git a/hassio/data/coredns.tmpl b/supervisor/data/coredns.tmpl similarity index 100% rename from hassio/data/coredns.tmpl rename to supervisor/data/coredns.tmpl diff --git a/hassio/data/hosts.tmpl b/supervisor/data/hosts.tmpl similarity index 100% rename from hassio/data/hosts.tmpl rename to supervisor/data/hosts.tmpl diff --git a/hassio/dbus/__init__.py b/supervisor/dbus/__init__.py similarity index 100% rename from hassio/dbus/__init__.py rename to supervisor/dbus/__init__.py diff --git a/hassio/dbus/hostname.py b/supervisor/dbus/hostname.py similarity index 100% rename from hassio/dbus/hostname.py rename to supervisor/dbus/hostname.py diff --git a/hassio/dbus/interface.py b/supervisor/dbus/interface.py similarity index 100% rename from hassio/dbus/interface.py rename to supervisor/dbus/interface.py diff --git a/hassio/dbus/nmi_dns.py b/supervisor/dbus/nmi_dns.py similarity index 100% rename from hassio/dbus/nmi_dns.py rename to supervisor/dbus/nmi_dns.py diff --git a/hassio/dbus/rauc.py b/supervisor/dbus/rauc.py similarity index 100% rename from hassio/dbus/rauc.py rename to supervisor/dbus/rauc.py diff --git a/hassio/dbus/systemd.py b/supervisor/dbus/systemd.py similarity index 100% rename from hassio/dbus/systemd.py rename to supervisor/dbus/systemd.py diff --git a/hassio/dbus/utils.py b/supervisor/dbus/utils.py similarity index 100% rename from hassio/dbus/utils.py rename to supervisor/dbus/utils.py diff --git a/hassio/discovery/__init__.py b/supervisor/discovery/__init__.py similarity index 100% rename from hassio/discovery/__init__.py rename to supervisor/discovery/__init__.py diff --git a/hassio/discovery/const.py b/supervisor/discovery/const.py similarity index 100% rename from hassio/discovery/const.py rename to supervisor/discovery/const.py diff --git a/hassio/discovery/services/__init__.py b/supervisor/discovery/services/__init__.py similarity index 100% rename from hassio/discovery/services/__init__.py rename to supervisor/discovery/services/__init__.py diff --git a/hassio/discovery/services/adguard.py b/supervisor/discovery/services/adguard.py similarity index 82% rename from hassio/discovery/services/adguard.py rename to supervisor/discovery/services/adguard.py index 2b8610581..c840298c9 100644 --- a/hassio/discovery/services/adguard.py +++ b/supervisor/discovery/services/adguard.py @@ -1,7 +1,7 @@ """Discovery service for AdGuard.""" import voluptuous as vol -from hassio.validate import network_port +from supervisor.validate import network_port from ..const import ATTR_HOST, ATTR_PORT diff --git a/hassio/discovery/services/almond.py b/supervisor/discovery/services/almond.py similarity index 82% rename from hassio/discovery/services/almond.py rename to supervisor/discovery/services/almond.py index 81bcd1f0c..53b7cbd04 100644 --- a/hassio/discovery/services/almond.py +++ b/supervisor/discovery/services/almond.py @@ -1,7 +1,7 @@ """Discovery service for Almond.""" import voluptuous as vol -from hassio.validate import network_port +from supervisor.validate import network_port from ..const import ATTR_HOST, ATTR_PORT diff --git a/hassio/discovery/services/deconz.py b/supervisor/discovery/services/deconz.py similarity index 89% rename from hassio/discovery/services/deconz.py rename to supervisor/discovery/services/deconz.py index 63ac14bf9..a021a46d8 100644 --- a/hassio/discovery/services/deconz.py +++ b/supervisor/discovery/services/deconz.py @@ -1,7 +1,7 @@ """Discovery service for MQTT.""" import voluptuous as vol -from hassio.validate import network_port +from supervisor.validate import network_port from ..const import ATTR_HOST, ATTR_PORT, ATTR_API_KEY, ATTR_SERIAL diff --git a/hassio/discovery/services/home_panel.py b/supervisor/discovery/services/home_panel.py similarity index 82% rename from hassio/discovery/services/home_panel.py rename to supervisor/discovery/services/home_panel.py index 19e076167..147c2bdb4 100644 --- a/hassio/discovery/services/home_panel.py +++ b/supervisor/discovery/services/home_panel.py @@ -1,7 +1,7 @@ """Discovery service for Home Panel.""" import voluptuous as vol -from hassio.validate import network_port +from supervisor.validate import network_port from ..const import ATTR_HOST, ATTR_PORT diff --git a/hassio/discovery/services/mqtt.py b/supervisor/discovery/services/mqtt.py similarity index 93% rename from hassio/discovery/services/mqtt.py rename to supervisor/discovery/services/mqtt.py index 904d6cdab..20faf1710 100644 --- a/hassio/discovery/services/mqtt.py +++ b/supervisor/discovery/services/mqtt.py @@ -1,7 +1,7 @@ """Discovery service for MQTT.""" import voluptuous as vol -from hassio.validate import network_port +from supervisor.validate import network_port from ..const import ( ATTR_HOST, diff --git a/hassio/discovery/services/unifi.py b/supervisor/discovery/services/unifi.py similarity index 82% rename from hassio/discovery/services/unifi.py rename to supervisor/discovery/services/unifi.py index 473939a7e..072097889 100644 --- a/hassio/discovery/services/unifi.py +++ b/supervisor/discovery/services/unifi.py @@ -1,7 +1,7 @@ """Discovery service for UniFi.""" import voluptuous as vol -from hassio.validate import network_port +from supervisor.validate import network_port from ..const import ATTR_HOST, ATTR_PORT diff --git a/hassio/discovery/validate.py b/supervisor/discovery/validate.py similarity index 93% rename from hassio/discovery/validate.py rename to supervisor/discovery/validate.py index c2a1bc31d..612c85a04 100644 --- a/hassio/discovery/validate.py +++ b/supervisor/discovery/validate.py @@ -20,7 +20,7 @@ def valid_discovery_service(service): def valid_discovery_config(service, config): """Validate service name.""" try: - service_mod = import_module(f".services.{service}", "hassio.discovery") + service_mod = import_module(f".services.{service}", "supervisor.discovery") except ImportError: raise vol.Invalid(f"Service {service} not found") diff --git a/hassio/dns.py b/supervisor/dns.py similarity index 100% rename from hassio/dns.py rename to supervisor/dns.py diff --git a/hassio/docker/__init__.py b/supervisor/docker/__init__.py similarity index 98% rename from hassio/docker/__init__.py rename to supervisor/docker/__init__.py index 8274d506a..a517dd187 100644 --- a/hassio/docker/__init__.py +++ b/supervisor/docker/__init__.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io Docker object.""" +"""Init file for Supervisor Docker object.""" from contextlib import suppress from ipaddress import IPv4Address import logging @@ -23,7 +23,7 @@ class CommandReturn: class DockerAPI: - """Docker Hass.io wrapper. + """Docker Supervisor wrapper. This class is not AsyncIO safe! """ diff --git a/hassio/docker/addon.py b/supervisor/docker/addon.py similarity index 99% rename from hassio/docker/addon.py rename to supervisor/docker/addon.py index d6d8c4e69..a72a26df6 100644 --- a/hassio/docker/addon.py +++ b/supervisor/docker/addon.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-on Docker object.""" +"""Init file for Supervisor add-on Docker object.""" from __future__ import annotations from contextlib import suppress @@ -40,7 +40,7 @@ NO_ADDDRESS = ip_address("0.0.0.0") class DockerAddon(DockerInterface): - """Docker Hass.io wrapper for Home Assistant.""" + """Docker Supervisor wrapper for Home Assistant.""" def __init__(self, coresys: CoreSys, addon: Addon): """Initialize Docker Home Assistant wrapper.""" diff --git a/hassio/docker/dns.py b/supervisor/docker/dns.py similarity index 93% rename from hassio/docker/dns.py rename to supervisor/docker/dns.py index fd489c00a..de172d506 100644 --- a/hassio/docker/dns.py +++ b/supervisor/docker/dns.py @@ -13,11 +13,11 @@ DNS_DOCKER_NAME: str = "hassio_dns" class DockerDNS(DockerInterface, CoreSysAttributes): - """Docker Hass.io wrapper for Hass.io DNS.""" + """Docker Supervisor wrapper for Supervisor DNS.""" @property def image(self) -> str: - """Return name of Hass.io DNS image.""" + """Return name of Supervisor DNS image.""" return f"homeassistant/{self.sys_arch.supervisor}-hassio-dns" @property diff --git a/hassio/docker/hassos_cli.py b/supervisor/docker/hassos_cli.py similarity index 95% rename from hassio/docker/hassos_cli.py rename to supervisor/docker/hassos_cli.py index f9eaa6977..64b30c858 100644 --- a/hassio/docker/hassos_cli.py +++ b/supervisor/docker/hassos_cli.py @@ -10,7 +10,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class DockerHassOSCli(DockerInterface, CoreSysAttributes): - """Docker Hass.io wrapper for HassOS Cli.""" + """Docker Supervisor wrapper for HassOS Cli.""" @property def image(self): diff --git a/hassio/docker/homeassistant.py b/supervisor/docker/homeassistant.py similarity index 97% rename from hassio/docker/homeassistant.py rename to supervisor/docker/homeassistant.py index d011452af..7d7f5e24a 100644 --- a/hassio/docker/homeassistant.py +++ b/supervisor/docker/homeassistant.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io Docker object.""" +"""Init file for Supervisor Docker object.""" from contextlib import suppress from ipaddress import IPv4Address import logging @@ -16,7 +16,7 @@ HASS_DOCKER_NAME = "homeassistant" class DockerHomeAssistant(DockerInterface): - """Docker Hass.io wrapper for Home Assistant.""" + """Docker Supervisor wrapper for Home Assistant.""" @property def machine(self) -> Optional[str]: diff --git a/hassio/docker/interface.py b/supervisor/docker/interface.py similarity index 99% rename from hassio/docker/interface.py rename to supervisor/docker/interface.py index dddaf5524..ba0c5c54a 100644 --- a/hassio/docker/interface.py +++ b/supervisor/docker/interface.py @@ -1,4 +1,4 @@ -"""Interface class for Hass.io Docker object.""" +"""Interface class for Supervisor Docker object.""" import asyncio from contextlib import suppress import logging @@ -17,7 +17,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class DockerInterface(CoreSysAttributes): - """Docker Hass.io interface.""" + """Docker Supervisor interface.""" def __init__(self, coresys: CoreSys): """Initialize Docker base wrapper.""" diff --git a/hassio/docker/network.py b/supervisor/docker/network.py similarity index 91% rename from hassio/docker/network.py rename to supervisor/docker/network.py index 610a4db61..1ed09d440 100644 --- a/hassio/docker/network.py +++ b/supervisor/docker/network.py @@ -1,4 +1,4 @@ -"""Internal network manager for Hass.io.""" +"""Internal network manager for Supervisor.""" from contextlib import suppress from ipaddress import IPv4Address import logging @@ -13,13 +13,13 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class DockerNetwork: - """Internal Hass.io Network. + """Internal Supervisor Network. This class is not AsyncIO safe! """ def __init__(self, docker_client: docker.DockerClient): - """Initialize internal Hass.io network.""" + """Initialize internal Supervisor network.""" self.docker: docker.DockerClient = docker_client self.network: docker.models.networks.Network = self._get_network() @@ -49,11 +49,11 @@ class DockerNetwork: return DOCKER_NETWORK_MASK[3] def _get_network(self) -> docker.models.networks.Network: - """Get HassIO network.""" + """Get supervisor network.""" try: return self.docker.networks.get(DOCKER_NETWORK) except docker.errors.NotFound: - _LOGGER.info("Can't find Hass.io network, create new network") + _LOGGER.info("Can't find Supervisor network, create new network") ipam_pool = docker.types.IPAMPool( subnet=str(DOCKER_NETWORK_MASK), @@ -77,7 +77,7 @@ class DockerNetwork: alias: Optional[List[str]] = None, ipv4: Optional[IPv4Address] = None, ) -> None: - """Attach container to Hass.io network. + """Attach container to Supervisor network. Need run inside executor. """ diff --git a/hassio/docker/stats.py b/supervisor/docker/stats.py similarity index 100% rename from hassio/docker/stats.py rename to supervisor/docker/stats.py diff --git a/hassio/docker/supervisor.py b/supervisor/docker/supervisor.py similarity index 88% rename from hassio/docker/supervisor.py rename to supervisor/docker/supervisor.py index 174067b23..d7c9f5f04 100644 --- a/hassio/docker/supervisor.py +++ b/supervisor/docker/supervisor.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io Docker object.""" +"""Init file for Supervisor Docker object.""" from ipaddress import IPv4Address import logging import os @@ -14,7 +14,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class DockerSupervisor(DockerInterface, CoreSysAttributes): - """Docker Hass.io wrapper for Supervisor.""" + """Docker Supervisor wrapper for Supervisor.""" @property def name(self) -> str: @@ -53,9 +53,11 @@ class DockerSupervisor(DockerInterface, CoreSysAttributes): return # Attach to network - _LOGGER.info("Connect Supervisor to Hass.io Network") + _LOGGER.info("Connect Supervisor to hassio Network") self.sys_docker.network.attach_container( - docker_container, alias=["hassio"], ipv4=self.sys_docker.network.supervisor + docker_container, + alias=["supervisor"], + ipv4=self.sys_docker.network.supervisor, ) def retag(self) -> Awaitable[None]: diff --git a/hassio/exceptions.py b/supervisor/exceptions.py similarity index 100% rename from hassio/exceptions.py rename to supervisor/exceptions.py diff --git a/hassio/hassos.py b/supervisor/hassos.py similarity index 99% rename from hassio/hassos.py rename to supervisor/hassos.py index 1e3b110c5..fbdf754b0 100644 --- a/hassio/hassos.py +++ b/supervisor/hassos.py @@ -23,7 +23,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class HassOS(CoreSysAttributes): - """HassOS interface inside HassIO.""" + """HassOS interface inside supervisor.""" def __init__(self, coresys: CoreSys): """Initialize HassOS handler.""" diff --git a/hassio/homeassistant.py b/supervisor/homeassistant.py similarity index 99% rename from hassio/homeassistant.py rename to supervisor/homeassistant.py index 463dcc4ff..b10e3e0ea 100644 --- a/hassio/homeassistant.py +++ b/supervisor/homeassistant.py @@ -219,7 +219,7 @@ class HomeAssistant(JsonConfig, CoreSysAttributes): @property def hassio_token(self) -> str: - """Return an access token for the Hass.io API.""" + """Return an access token for the Supervisor API.""" return self._data.get(ATTR_ACCESS_TOKEN) @property diff --git a/hassio/host/__init__.py b/supervisor/host/__init__.py similarity index 100% rename from hassio/host/__init__.py rename to supervisor/host/__init__.py diff --git a/hassio/host/alsa.py b/supervisor/host/alsa.py similarity index 100% rename from hassio/host/alsa.py rename to supervisor/host/alsa.py diff --git a/hassio/host/apparmor.py b/supervisor/host/apparmor.py similarity index 100% rename from hassio/host/apparmor.py rename to supervisor/host/apparmor.py diff --git a/hassio/host/control.py b/supervisor/host/control.py similarity index 100% rename from hassio/host/control.py rename to supervisor/host/control.py diff --git a/hassio/host/info.py b/supervisor/host/info.py similarity index 100% rename from hassio/host/info.py rename to supervisor/host/info.py diff --git a/hassio/host/network.py b/supervisor/host/network.py similarity index 100% rename from hassio/host/network.py rename to supervisor/host/network.py diff --git a/hassio/host/services.py b/supervisor/host/services.py similarity index 100% rename from hassio/host/services.py rename to supervisor/host/services.py diff --git a/hassio/ingress.py b/supervisor/ingress.py similarity index 100% rename from hassio/ingress.py rename to supervisor/ingress.py diff --git a/supervisor/misc/__init__.py b/supervisor/misc/__init__.py new file mode 100644 index 000000000..0144cbd3b --- /dev/null +++ b/supervisor/misc/__init__.py @@ -0,0 +1 @@ +"""Special object and tools for Supervisor.""" diff --git a/hassio/misc/forwarder.py b/supervisor/misc/forwarder.py similarity index 100% rename from hassio/misc/forwarder.py rename to supervisor/misc/forwarder.py diff --git a/hassio/misc/hardware.py b/supervisor/misc/hardware.py similarity index 100% rename from hassio/misc/hardware.py rename to supervisor/misc/hardware.py diff --git a/hassio/misc/scheduler.py b/supervisor/misc/scheduler.py similarity index 96% rename from hassio/misc/scheduler.py rename to supervisor/misc/scheduler.py index 3e71fc040..655a8c31b 100644 --- a/hassio/misc/scheduler.py +++ b/supervisor/misc/scheduler.py @@ -1,4 +1,4 @@ -"""Schedule for Hass.io.""" +"""Schedule for Supervisor.""" import asyncio from datetime import date, datetime, time, timedelta import logging @@ -12,7 +12,7 @@ TASK = "task" class Scheduler: - """Schedule task inside Hass.io.""" + """Schedule task inside Supervisor.""" def __init__(self): """Initialize task schedule.""" diff --git a/hassio/secrets.py b/supervisor/secrets.py similarity index 100% rename from hassio/secrets.py rename to supervisor/secrets.py diff --git a/hassio/services/__init__.py b/supervisor/services/__init__.py similarity index 100% rename from hassio/services/__init__.py rename to supervisor/services/__init__.py diff --git a/hassio/services/const.py b/supervisor/services/const.py similarity index 100% rename from hassio/services/const.py rename to supervisor/services/const.py diff --git a/hassio/services/data.py b/supervisor/services/data.py similarity index 100% rename from hassio/services/data.py rename to supervisor/services/data.py diff --git a/hassio/services/interface.py b/supervisor/services/interface.py similarity index 100% rename from hassio/services/interface.py rename to supervisor/services/interface.py diff --git a/hassio/services/modules/__init__.py b/supervisor/services/modules/__init__.py similarity index 100% rename from hassio/services/modules/__init__.py rename to supervisor/services/modules/__init__.py diff --git a/hassio/services/modules/mqtt.py b/supervisor/services/modules/mqtt.py similarity index 94% rename from hassio/services/modules/mqtt.py rename to supervisor/services/modules/mqtt.py index eec10603f..29c1776fe 100644 --- a/hassio/services/modules/mqtt.py +++ b/supervisor/services/modules/mqtt.py @@ -2,9 +2,9 @@ import logging from typing import Any, Dict, List -from hassio.addons.addon import Addon -from hassio.exceptions import ServicesError -from hassio.validate import network_port +from supervisor.addons.addon import Addon +from supervisor.exceptions import ServicesError +from supervisor.validate import network_port import voluptuous as vol from ..const import ( diff --git a/hassio/services/modules/mysql.py b/supervisor/services/modules/mysql.py similarity index 94% rename from hassio/services/modules/mysql.py rename to supervisor/services/modules/mysql.py index 368646416..fb80d639d 100644 --- a/hassio/services/modules/mysql.py +++ b/supervisor/services/modules/mysql.py @@ -2,9 +2,9 @@ import logging from typing import Any, Dict, List -from hassio.addons.addon import Addon -from hassio.exceptions import ServicesError -from hassio.validate import network_port +from supervisor.addons.addon import Addon +from supervisor.exceptions import ServicesError +from supervisor.validate import network_port import voluptuous as vol from ..const import ( diff --git a/hassio/services/validate.py b/supervisor/services/validate.py similarity index 100% rename from hassio/services/validate.py rename to supervisor/services/validate.py diff --git a/hassio/snapshots/__init__.py b/supervisor/snapshots/__init__.py similarity index 100% rename from hassio/snapshots/__init__.py rename to supervisor/snapshots/__init__.py diff --git a/hassio/snapshots/snapshot.py b/supervisor/snapshots/snapshot.py similarity index 99% rename from hassio/snapshots/snapshot.py rename to supervisor/snapshots/snapshot.py index 0881485d9..8b2084707 100644 --- a/hassio/snapshots/snapshot.py +++ b/supervisor/snapshots/snapshot.py @@ -59,7 +59,7 @@ MAP_FOLDER_EXCLUDE = { class Snapshot(CoreSysAttributes): - """A single Hass.io snapshot.""" + """A single Supervisor snapshot.""" def __init__(self, coresys: CoreSys, tar_file: Path): """Initialize a snapshot.""" @@ -351,7 +351,7 @@ class Snapshot(CoreSysAttributes): await asyncio.wait(tasks) async def store_folders(self, folder_list=None): - """Backup Hass.io data into snapshot.""" + """Backup Supervisor data into snapshot.""" folder_list = set(folder_list or ALL_FOLDERS) def _folder_save(name): @@ -388,7 +388,7 @@ class Snapshot(CoreSysAttributes): await asyncio.wait(tasks) async def restore_folders(self, folder_list=None): - """Backup Hass.io data into snapshot.""" + """Backup Supervisor data into snapshot.""" folder_list = set(folder_list or self.folders) def _folder_restore(name): diff --git a/hassio/snapshots/utils.py b/supervisor/snapshots/utils.py similarity index 100% rename from hassio/snapshots/utils.py rename to supervisor/snapshots/utils.py diff --git a/hassio/snapshots/validate.py b/supervisor/snapshots/validate.py similarity index 100% rename from hassio/snapshots/validate.py rename to supervisor/snapshots/validate.py diff --git a/hassio/store/__init__.py b/supervisor/store/__init__.py similarity index 97% rename from hassio/store/__init__.py rename to supervisor/store/__init__.py index b9bf8cfb1..025edd86d 100644 --- a/hassio/store/__init__.py +++ b/supervisor/store/__init__.py @@ -15,7 +15,7 @@ BUILTIN_REPOSITORIES = set((REPOSITORY_CORE, REPOSITORY_LOCAL)) class StoreManager(CoreSysAttributes): - """Manage add-ons inside Hass.io.""" + """Manage add-ons inside Supervisor.""" def __init__(self, coresys: CoreSys): """Initialize Docker base wrapper.""" @@ -32,7 +32,7 @@ class StoreManager(CoreSysAttributes): """Start up add-on management.""" self.data.update() - # Init Hass.io built-in repositories + # Init Supervisor built-in repositories repositories = set(self.sys_config.addons_repositories) | BUILTIN_REPOSITORIES # Init custom repositories and load add-ons diff --git a/hassio/store/addon.py b/supervisor/store/addon.py similarity index 88% rename from hassio/store/addon.py rename to supervisor/store/addon.py index 3dfcf5cd2..fca2bf291 100644 --- a/hassio/store/addon.py +++ b/supervisor/store/addon.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-ons.""" +"""Init file for Supervisor add-ons.""" import logging from ..coresys import CoreSys @@ -8,7 +8,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class AddonStore(AddonModel): - """Hold data for add-on inside Hass.io.""" + """Hold data for add-on inside Supervisor.""" def __init__(self, coresys: CoreSys, slug: str): """Initialize data holder.""" diff --git a/hassio/store/built-in.json b/supervisor/store/built-in.json similarity index 100% rename from hassio/store/built-in.json rename to supervisor/store/built-in.json diff --git a/hassio/store/data.py b/supervisor/store/data.py similarity index 97% rename from hassio/store/data.py rename to supervisor/store/data.py index 8bb89f343..ef0f60aaf 100644 --- a/hassio/store/data.py +++ b/supervisor/store/data.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-on data.""" +"""Init file for Supervisor add-on data.""" import logging from pathlib import Path from typing import Any, Dict @@ -24,7 +24,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) class StoreData(CoreSysAttributes): - """Hold data for Add-ons inside Hass.io.""" + """Hold data for Add-ons inside Supervisor.""" def __init__(self, coresys: CoreSys): """Initialize data holder.""" diff --git a/hassio/store/git.py b/supervisor/store/git.py similarity index 95% rename from hassio/store/git.py rename to supervisor/store/git.py index a60799230..9a2cce642 100644 --- a/hassio/store/git.py +++ b/supervisor/store/git.py @@ -1,4 +1,4 @@ -"""Init file for Hass.io add-on Git.""" +"""Init file for Supervisor add-on Git.""" import asyncio import logging import functools as ft @@ -141,10 +141,10 @@ class GitRepo(CoreSysAttributes): class GitRepoHassIO(GitRepo): - """Hass.io add-ons repository.""" + """Supervisor add-ons repository.""" def __init__(self, coresys): - """Initialize Git Hass.io add-on repository.""" + """Initialize Git Supervisor add-on repository.""" super().__init__(coresys, coresys.config.path_addons_core, URL_HASSIO_ADDONS) @@ -152,7 +152,7 @@ class GitRepoCustom(GitRepo): """Custom add-ons repository.""" def __init__(self, coresys, url): - """Initialize custom Git Hass.io addo-n repository.""" + """Initialize custom Git Supervisor addo-n repository.""" path = Path(coresys.config.path_addons_git, get_hash_from_repository(url)) super().__init__(coresys, path, url) diff --git a/hassio/store/repository.py b/supervisor/store/repository.py similarity index 96% rename from hassio/store/repository.py rename to supervisor/store/repository.py index 690b16683..12624cf64 100644 --- a/hassio/store/repository.py +++ b/supervisor/store/repository.py @@ -1,4 +1,4 @@ -"""Represent a Hass.io repository.""" +"""Represent a Supervisor repository.""" from .git import GitRepoHassIO, GitRepoCustom from .utils import get_hash_from_repository from ..const import ( @@ -15,7 +15,7 @@ UNKNOWN = "unknown" class Repository(CoreSysAttributes): - """Repository in Hass.io.""" + """Repository in Supervisor.""" slug: str = None diff --git a/hassio/store/utils.py b/supervisor/store/utils.py similarity index 100% rename from hassio/store/utils.py rename to supervisor/store/utils.py diff --git a/hassio/store/validate.py b/supervisor/store/validate.py similarity index 100% rename from hassio/store/validate.py rename to supervisor/store/validate.py diff --git a/hassio/supervisor.py b/supervisor/supervisor.py similarity index 95% rename from hassio/supervisor.py rename to supervisor/supervisor.py index 372af6fd6..0f4666649 100644 --- a/hassio/supervisor.py +++ b/supervisor/supervisor.py @@ -9,7 +9,7 @@ from typing import Awaitable, Optional import aiohttp -from .const import URL_HASSIO_APPARMOR, HASSIO_VERSION +from .const import URL_HASSIO_APPARMOR, SUPERVISOR_VERSION from .coresys import CoreSys, CoreSysAttributes from .docker.stats import DockerStats from .docker.supervisor import DockerSupervisor @@ -60,7 +60,7 @@ class Supervisor(CoreSysAttributes): @property def version(self) -> str: """Return version of running Home Assistant.""" - return HASSIO_VERSION + return SUPERVISOR_VERSION @property def latest_version(self) -> str: @@ -74,7 +74,7 @@ class Supervisor(CoreSysAttributes): @property def arch(self) -> str: - """Return arch of the Hass.io container.""" + """Return arch of the Supervisor container.""" return self.instance.arch async def update_apparmor(self) -> None: @@ -117,7 +117,7 @@ class Supervisor(CoreSysAttributes): try: await self.instance.update(version, latest=True) except DockerAPIError: - _LOGGER.error("Update of Hass.io fails!") + _LOGGER.error("Update of Supervisor fails!") raise SupervisorUpdateError() from None with suppress(SupervisorError): diff --git a/hassio/tasks.py b/supervisor/tasks.py similarity index 96% rename from hassio/tasks.py rename to supervisor/tasks.py index 2b2bc322d..80388bacb 100644 --- a/hassio/tasks.py +++ b/supervisor/tasks.py @@ -27,7 +27,7 @@ RUN_WATCHDOG_DNS_DOCKER = 20 class Tasks(CoreSysAttributes): - """Handle Tasks inside Hass.io.""" + """Handle Tasks inside Supervisor.""" def __init__(self, coresys): """Initialize Tasks.""" @@ -119,16 +119,16 @@ class Tasks(CoreSysAttributes): await asyncio.wait(tasks) async def _update_supervisor(self): - """Check and run update of Supervisor Hass.io.""" + """Check and run update of Supervisor Supervisor.""" if not self.sys_supervisor.need_update: return # don't perform an update on dev channel if self.sys_dev: - _LOGGER.warning("Ignore Hass.io update on dev channel!") + _LOGGER.warning("Ignore Supervisor update on dev channel!") return - _LOGGER.info("Found new Hass.io version") + _LOGGER.info("Found new Supervisor version") await self.sys_supervisor.update() async def _watchdog_homeassistant_docker(self): diff --git a/hassio/updater.py b/supervisor/updater.py similarity index 95% rename from hassio/updater.py rename to supervisor/updater.py index 354d1c8c7..79ee549bc 100644 --- a/hassio/updater.py +++ b/supervisor/updater.py @@ -53,7 +53,7 @@ class Updater(JsonConfig, CoreSysAttributes): @property def version_hassio(self) -> Optional[str]: - """Return latest version of Hass.io.""" + """Return latest version of Supervisor.""" return self._data.get(ATTR_HASSIO) @property @@ -68,12 +68,12 @@ class Updater(JsonConfig, CoreSysAttributes): @property def version_dns(self) -> Optional[str]: - """Return latest version of Hass.io DNS.""" + """Return latest version of Supervisor DNS.""" return self._data.get(ATTR_DNS) @property def channel(self) -> UpdateChannels: - """Return upstream channel of Hass.io instance.""" + """Return upstream channel of Supervisor instance.""" return self._data[ATTR_CHANNEL] @channel.setter diff --git a/hassio/utils/__init__.py b/supervisor/utils/__init__.py similarity index 98% rename from hassio/utils/__init__.py rename to supervisor/utils/__init__.py index 4ff19cb18..b6b29f008 100644 --- a/hassio/utils/__init__.py +++ b/supervisor/utils/__init__.py @@ -1,4 +1,4 @@ -"""Tools file for Hass.io.""" +"""Tools file for Supervisor.""" from datetime import datetime from ipaddress import IPv4Address import logging diff --git a/hassio/utils/apparmor.py b/supervisor/utils/apparmor.py similarity index 100% rename from hassio/utils/apparmor.py rename to supervisor/utils/apparmor.py diff --git a/hassio/utils/dt.py b/supervisor/utils/dt.py similarity index 98% rename from hassio/utils/dt.py rename to supervisor/utils/dt.py index 972e77527..cfca9d760 100644 --- a/hassio/utils/dt.py +++ b/supervisor/utils/dt.py @@ -1,4 +1,4 @@ -"""Tools file for Hass.io.""" +"""Tools file for Supervisor.""" import asyncio from datetime import datetime, timedelta, timezone, tzinfo import logging diff --git a/hassio/utils/gdbus.py b/supervisor/utils/gdbus.py similarity index 100% rename from hassio/utils/gdbus.py rename to supervisor/utils/gdbus.py diff --git a/hassio/utils/json.py b/supervisor/utils/json.py similarity index 98% rename from hassio/utils/json.py rename to supervisor/utils/json.py index 044831b94..ecaa6fb7b 100644 --- a/hassio/utils/json.py +++ b/supervisor/utils/json.py @@ -1,4 +1,4 @@ -"""Tools file for Hass.io.""" +"""Tools file for Supervisor.""" import json import logging from pathlib import Path diff --git a/hassio/utils/tar.py b/supervisor/utils/tar.py similarity index 100% rename from hassio/utils/tar.py rename to supervisor/utils/tar.py diff --git a/hassio/utils/validate.py b/supervisor/utils/validate.py similarity index 100% rename from hassio/utils/validate.py rename to supervisor/utils/validate.py diff --git a/hassio/validate.py b/supervisor/validate.py similarity index 100% rename from hassio/validate.py rename to supervisor/validate.py diff --git a/tests/__init__.py b/tests/__init__.py index 4a9f81fe8..37b7f2b73 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ -"""Hass.io Testframework.""" +"""Supervisor Testframework.""" diff --git a/tests/addons/test_config.py b/tests/addons/test_config.py index f47ebc187..42c2d7d56 100644 --- a/tests/addons/test_config.py +++ b/tests/addons/test_config.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.addons import validate as vd +from supervisor.addons import validate as vd from ..common import load_json_fixture diff --git a/tests/addons/test_ui_schema.py b/tests/addons/test_ui_schema.py index bc73050d2..c61e429bc 100644 --- a/tests/addons/test_ui_schema.py +++ b/tests/addons/test_ui_schema.py @@ -1,6 +1,6 @@ """Test add-ons schema to UI schema convertion.""" -from hassio.addons.validate import schema_ui_options +from supervisor.addons.validate import schema_ui_options def test_simple_schema(): diff --git a/tests/conftest.py b/tests/conftest.py index ac105e071..72909e40e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ from unittest.mock import patch, PropertyMock, MagicMock import pytest -from hassio.bootstrap import initialize_coresys +from supervisor.bootstrap import initialize_coresys from tests.common import mock_coro @@ -13,15 +13,15 @@ from tests.common import mock_coro @pytest.fixture def docker(): """Mock Docker API.""" - with patch("hassio.coresys.DockerAPI") as mock: + with patch("supervisor.coresys.DockerAPI") as mock: yield mock @pytest.fixture async def coresys(loop, docker): """Create a CoreSys Mock.""" - with patch("hassio.bootstrap.initialize_system_data"), patch( - "hassio.bootstrap.fetch_timezone", + with patch("supervisor.bootstrap.initialize_system_data"), patch( + "supervisor.bootstrap.fetch_timezone", return_value=mock_coro(return_value="Europe/Zurich"), ): coresys_obj = await initialize_coresys() @@ -34,12 +34,14 @@ async def coresys(loop, docker): @pytest.fixture def sys_machine(): """Mock sys_machine.""" - with patch("hassio.coresys.CoreSys.machine", new_callable=PropertyMock) as mock: + with patch("supervisor.coresys.CoreSys.machine", new_callable=PropertyMock) as mock: yield mock @pytest.fixture def sys_supervisor(): - with patch("hassio.coresys.CoreSys.supervisor", new_callable=PropertyMock) as mock: + with patch( + "supervisor.coresys.CoreSys.supervisor", new_callable=PropertyMock + ) as mock: mock.return_value = MagicMock() yield MagicMock diff --git a/tests/discovery/test_adguard.py b/tests/discovery/test_adguard.py index 9f54a1961..cc2a6b05e 100644 --- a/tests/discovery/test_adguard.py +++ b/tests/discovery/test_adguard.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery.validate import valid_discovery_config +from supervisor.discovery.validate import valid_discovery_config def test_good_config(): diff --git a/tests/discovery/test_almond.py b/tests/discovery/test_almond.py index 78a8e186c..5a4548493 100644 --- a/tests/discovery/test_almond.py +++ b/tests/discovery/test_almond.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery.validate import valid_discovery_config +from supervisor.discovery.validate import valid_discovery_config def test_good_config(): diff --git a/tests/discovery/test_deconz.py b/tests/discovery/test_deconz.py index 4f76db326..6d15c7815 100644 --- a/tests/discovery/test_deconz.py +++ b/tests/discovery/test_deconz.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery.validate import valid_discovery_config +from supervisor.discovery.validate import valid_discovery_config def test_good_config(): diff --git a/tests/discovery/test_home_panel.py b/tests/discovery/test_home_panel.py index 883aeb678..cb768751c 100644 --- a/tests/discovery/test_home_panel.py +++ b/tests/discovery/test_home_panel.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery.validate import valid_discovery_config +from supervisor.discovery.validate import valid_discovery_config def test_good_config(): diff --git a/tests/discovery/test_mqtt.py b/tests/discovery/test_mqtt.py index 06fa9a39a..0ffc55424 100644 --- a/tests/discovery/test_mqtt.py +++ b/tests/discovery/test_mqtt.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery.validate import valid_discovery_config +from supervisor.discovery.validate import valid_discovery_config def test_good_config(): diff --git a/tests/discovery/test_unifi.py b/tests/discovery/test_unifi.py index 53dc9e4d4..848474641 100644 --- a/tests/discovery/test_unifi.py +++ b/tests/discovery/test_unifi.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery.validate import valid_discovery_config +from supervisor.discovery.validate import valid_discovery_config def test_good_config(): diff --git a/tests/discovery/test_validate.py b/tests/discovery/test_validate.py index 0aa6f7938..e619ecfb0 100644 --- a/tests/discovery/test_validate.py +++ b/tests/discovery/test_validate.py @@ -3,7 +3,7 @@ import voluptuous as vol import pytest -from hassio.discovery import validate +from supervisor.discovery import validate def test_valid_services(): diff --git a/tests/misc/test_hardware.py b/tests/misc/test_hardware.py index eee1c3677..edc52e855 100644 --- a/tests/misc/test_hardware.py +++ b/tests/misc/test_hardware.py @@ -2,7 +2,7 @@ from unittest.mock import patch, PropertyMock from pathlib import Path -from hassio.misc.hardware import Hardware, Device +from supervisor.misc.hardware import Hardware, Device def test_read_all_devices(): @@ -23,7 +23,7 @@ def test_video_devices(): ] with patch( - "hassio.misc.hardware.Hardware.devices", new_callable=PropertyMock + "supervisor.misc.hardware.Hardware.devices", new_callable=PropertyMock ) as mock_device: mock_device.return_value = device_list diff --git a/tests/test_ingress.py b/tests/test_ingress.py index a1aaf570e..809545f88 100644 --- a/tests/test_ingress.py +++ b/tests/test_ingress.py @@ -1,7 +1,7 @@ """Test ingress.""" from datetime import timedelta -from hassio.utils.dt import utc_from_timestamp +from supervisor.utils.dt import utc_from_timestamp def test_session_handling(coresys): diff --git a/tests/test_validate.py b/tests/test_validate.py index 2f8a5d300..53ae4ec74 100644 --- a/tests/test_validate.py +++ b/tests/test_validate.py @@ -1,6 +1,6 @@ """Test validators.""" -import hassio.validate +import supervisor.validate import voluptuous.error import pytest @@ -20,42 +20,42 @@ BAD = ["hello world", "https://foo.bar", "", "dns://example.com"] async def test_dns_url_v4_good(): """ tests the DNS validator with known-good ipv6 DNS URLs """ for url in GOOD_V4: - assert hassio.validate.dns_url(url) + assert supervisor.validate.dns_url(url) async def test_dns_url_v6_good(): """ tests the DNS validator with known-good ipv6 DNS URLs """ for url in GOOD_V6: - assert hassio.validate.dns_url(url) + assert supervisor.validate.dns_url(url) async def test_dns_server_list_v4(): """ test a list with v4 addresses """ - assert hassio.validate.dns_server_list(GOOD_V4) + assert supervisor.validate.dns_server_list(GOOD_V4) async def test_dns_server_list_v6(): """ test a list with v6 addresses """ - assert hassio.validate.dns_server_list(GOOD_V6) + assert supervisor.validate.dns_server_list(GOOD_V6) async def test_dns_server_list_combined(): """ test a list with both v4 and v6 addresses """ combined = GOOD_V4 + GOOD_V6 # test the matches - assert hassio.validate.dns_server_list(combined) + assert supervisor.validate.dns_server_list(combined) # test max_length is OK still - assert hassio.validate.dns_server_list(combined) + assert supervisor.validate.dns_server_list(combined) # test that it fails when the list is too long with pytest.raises(voluptuous.error.Invalid): - hassio.validate.dns_server_list(combined + combined + combined + combined) + supervisor.validate.dns_server_list(combined + combined + combined + combined) async def test_dns_server_list_bad(): """ test the bad list """ # test the matches with pytest.raises(voluptuous.error.Invalid): - assert hassio.validate.dns_server_list(BAD) + assert supervisor.validate.dns_server_list(BAD) async def test_dns_server_list_bad_combined(): @@ -64,4 +64,4 @@ async def test_dns_server_list_bad_combined(): with pytest.raises(voluptuous.error.Invalid): # bad list - assert hassio.validate.dns_server_list(combined) + assert supervisor.validate.dns_server_list(combined) diff --git a/tests/utils/test_check_port.py b/tests/utils/test_check_port.py index f38e9c94d..63f3ca4b1 100644 --- a/tests/utils/test_check_port.py +++ b/tests/utils/test_check_port.py @@ -1,7 +1,7 @@ """Check ports.""" from ipaddress import ip_address -from hassio.utils import check_port +from supervisor.utils import check_port def test_exists_open_port(): diff --git a/tests/utils/test_gvariant_parser.py b/tests/utils/test_gvariant_parser.py index abd79f511..50aabef7d 100644 --- a/tests/utils/test_gvariant_parser.py +++ b/tests/utils/test_gvariant_parser.py @@ -1,5 +1,5 @@ """Test gdbus gvariant parser.""" -from hassio.utils.gdbus import DBus +from supervisor.utils.gdbus import DBus def test_simple_return(): diff --git a/tests/utils/test_tarfile.py b/tests/utils/test_tarfile.py index e0a5e31e7..d0b70dfe4 100644 --- a/tests/utils/test_tarfile.py +++ b/tests/utils/test_tarfile.py @@ -3,7 +3,7 @@ import attr import pytest -from hassio.utils.tar import secure_path, exclude_filter +from supervisor.utils.tar import secure_path, exclude_filter @attr.s diff --git a/tox.ini b/tox.ini index 320d34d6c..94fa7969d 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,8 @@ deps = basepython = python3 ignore_errors = True commands = - flake8 hassio - pylint --rcfile pylintrc hassio + flake8 supervisor + pylint --rcfile pylintrc supervisor [testenv:tests] basepython = python3 @@ -21,4 +21,4 @@ commands = [testenv:black] basepython = python3 commands = - black --target-version py37 --check hassio tests setup.py + black --target-version py37 --check supervisor tests setup.py