Rename S3 to AWS_S3 (#144324)

This commit is contained in:
Robert Resch 2025-05-06 13:29:37 +02:00 committed by GitHub
parent 5475d7ef58
commit ce95876d03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 48 additions and 41 deletions

4
CODEOWNERS generated
View File

@ -171,6 +171,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/avea/ @pattyland /homeassistant/components/avea/ @pattyland
/homeassistant/components/awair/ @ahayworth @danielsjf /homeassistant/components/awair/ @ahayworth @danielsjf
/tests/components/awair/ @ahayworth @danielsjf /tests/components/awair/ @ahayworth @danielsjf
/homeassistant/components/aws_s3/ @tomasbedrich
/tests/components/aws_s3/ @tomasbedrich
/homeassistant/components/axis/ @Kane610 /homeassistant/components/axis/ @Kane610
/tests/components/axis/ @Kane610 /tests/components/axis/ @Kane610
/homeassistant/components/azure_data_explorer/ @kaareseras /homeassistant/components/azure_data_explorer/ @kaareseras
@ -1318,8 +1320,6 @@ build.json @home-assistant/supervisor
/tests/components/ruuvitag_ble/ @akx /tests/components/ruuvitag_ble/ @akx
/homeassistant/components/rympro/ @OnFreund @elad-bar @maorcc /homeassistant/components/rympro/ @OnFreund @elad-bar @maorcc
/tests/components/rympro/ @OnFreund @elad-bar @maorcc /tests/components/rympro/ @OnFreund @elad-bar @maorcc
/homeassistant/components/s3/ @tomasbedrich
/tests/components/s3/ @tomasbedrich
/homeassistant/components/sabnzbd/ @shaiu @jpbede /homeassistant/components/sabnzbd/ @shaiu @jpbede
/tests/components/sabnzbd/ @shaiu @jpbede /tests/components/sabnzbd/ @shaiu @jpbede
/homeassistant/components/saj/ @fredericvl /homeassistant/components/saj/ @fredericvl

View File

@ -1,5 +1,12 @@
{ {
"domain": "amazon", "domain": "amazon",
"name": "Amazon", "name": "Amazon",
"integrations": ["alexa", "amazon_polly", "aws", "fire_tv", "route53"] "integrations": [
"alexa",
"amazon_polly",
"aws",
"aws_s3",
"fire_tv",
"route53"
]
} }

View File

@ -1,4 +1,4 @@
"""The S3 integration.""" """The AWS S3 integration."""
from __future__ import annotations from __future__ import annotations

View File

@ -1,4 +1,4 @@
"""Backup platform for the S3 integration.""" """Backup platform for the AWS S3 integration."""
from collections.abc import AsyncIterator, Callable, Coroutine from collections.abc import AsyncIterator, Callable, Coroutine
import functools import functools

View File

@ -1,4 +1,4 @@
"""Config flow for the S3 integration.""" """Config flow for the AWS S3 integration."""
from __future__ import annotations from __future__ import annotations

View File

@ -1,11 +1,11 @@
"""Constants for the S3 integration.""" """Constants for the AWS S3 integration."""
from collections.abc import Callable from collections.abc import Callable
from typing import Final from typing import Final
from homeassistant.util.hass_dict import HassKey from homeassistant.util.hass_dict import HassKey
DOMAIN: Final = "s3" DOMAIN: Final = "aws_s3"
CONF_ACCESS_KEY_ID = "access_key_id" CONF_ACCESS_KEY_ID = "access_key_id"
CONF_SECRET_ACCESS_KEY = "secret_access_key" CONF_SECRET_ACCESS_KEY = "secret_access_key"

View File

@ -1,9 +1,9 @@
{ {
"domain": "s3", "domain": "aws_s3",
"name": "S3", "name": "AWS S3",
"codeowners": ["@tomasbedrich"], "codeowners": ["@tomasbedrich"],
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/s3", "documentation": "https://www.home-assistant.io/integrations/aws_s3",
"integration_type": "service", "integration_type": "service",
"iot_class": "cloud_push", "iot_class": "cloud_push",
"loggers": ["aiobotocore"], "loggers": ["aiobotocore"],

View File

@ -9,18 +9,18 @@
"endpoint_url": "Endpoint URL" "endpoint_url": "Endpoint URL"
}, },
"data_description": { "data_description": {
"access_key_id": "Access key ID to connect to S3 API", "access_key_id": "Access key ID to connect to AWS S3 API",
"secret_access_key": "Secret access key to connect to S3 API", "secret_access_key": "Secret access key to connect to AWS S3 API",
"bucket": "Bucket must already exist and be writable by the provided credentials.", "bucket": "Bucket must already exist and be writable by the provided credentials.",
"endpoint_url": "Endpoint URL provided to [Boto3 Session]({boto3_docs_url}). Region-specific [AWS S3 endpoints]({aws_s3_docs_url}) are available in their docs." "endpoint_url": "Endpoint URL provided to [Boto3 Session]({boto3_docs_url}). Region-specific [AWS S3 endpoints]({aws_s3_docs_url}) are available in their docs."
}, },
"title": "Add S3 bucket" "title": "Add AWS S3 bucket"
} }
}, },
"error": { "error": {
"cannot_connect": "[%key:component::s3::exceptions::cannot_connect::message%]", "cannot_connect": "[%key:component::aws_s3::exceptions::cannot_connect::message%]",
"invalid_bucket_name": "[%key:component::s3::exceptions::invalid_bucket_name::message%]", "invalid_bucket_name": "[%key:component::aws_s3::exceptions::invalid_bucket_name::message%]",
"invalid_credentials": "[%key:component::s3::exceptions::invalid_credentials::message%]", "invalid_credentials": "[%key:component::aws_s3::exceptions::invalid_credentials::message%]",
"invalid_endpoint_url": "Invalid endpoint URL" "invalid_endpoint_url": "Invalid endpoint URL"
}, },
"abort": { "abort": {

View File

@ -75,6 +75,7 @@ FLOWS = {
"aussie_broadband", "aussie_broadband",
"autarco", "autarco",
"awair", "awair",
"aws_s3",
"axis", "axis",
"azure_data_explorer", "azure_data_explorer",
"azure_devops", "azure_devops",
@ -541,7 +542,6 @@ FLOWS = {
"ruuvi_gateway", "ruuvi_gateway",
"ruuvitag_ble", "ruuvitag_ble",
"rympro", "rympro",
"s3",
"sabnzbd", "sabnzbd",
"samsungtv", "samsungtv",
"sanix", "sanix",

View File

@ -219,6 +219,12 @@
"iot_class": "cloud_push", "iot_class": "cloud_push",
"name": "Amazon Web Services (AWS)" "name": "Amazon Web Services (AWS)"
}, },
"aws_s3": {
"integration_type": "service",
"config_flow": true,
"iot_class": "cloud_push",
"name": "AWS S3"
},
"fire_tv": { "fire_tv": {
"integration_type": "virtual", "integration_type": "virtual",
"config_flow": false, "config_flow": false,
@ -5622,12 +5628,6 @@
"config_flow": true, "config_flow": true,
"iot_class": "cloud_polling" "iot_class": "cloud_polling"
}, },
"s3": {
"name": "S3",
"integration_type": "service",
"config_flow": true,
"iot_class": "cloud_push"
},
"sabnzbd": { "sabnzbd": {
"name": "SABnzbd", "name": "SABnzbd",
"integration_type": "hub", "integration_type": "hub",

2
requirements_all.txt generated
View File

@ -210,7 +210,7 @@ aioazuredevops==2.2.1
aiobafi6==0.9.0 aiobafi6==0.9.0
# homeassistant.components.aws # homeassistant.components.aws
# homeassistant.components.s3 # homeassistant.components.aws_s3
aiobotocore==2.21.1 aiobotocore==2.21.1
# homeassistant.components.comelit # homeassistant.components.comelit

View File

@ -198,7 +198,7 @@ aioazuredevops==2.2.1
aiobafi6==0.9.0 aiobafi6==0.9.0
# homeassistant.components.aws # homeassistant.components.aws
# homeassistant.components.s3 # homeassistant.components.aws_s3
aiobotocore==2.21.1 aiobotocore==2.21.1
# homeassistant.components.comelit # homeassistant.components.comelit

View File

@ -1,4 +1,4 @@
"""Tests for the S3 integration.""" """Tests for the AWS S3 integration."""
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,4 +1,4 @@
"""Common fixtures for the S3 tests.""" """Common fixtures for the AWS S3 tests."""
from collections.abc import AsyncIterator, Generator from collections.abc import AsyncIterator, Generator
import json import json
@ -6,12 +6,12 @@ from unittest.mock import AsyncMock, patch
import pytest import pytest
from homeassistant.components.backup import AgentBackup from homeassistant.components.aws_s3.backup import (
from homeassistant.components.s3.backup import (
MULTIPART_MIN_PART_SIZE_BYTES, MULTIPART_MIN_PART_SIZE_BYTES,
suggested_filenames, suggested_filenames,
) )
from homeassistant.components.s3.const import DOMAIN from homeassistant.components.aws_s3.const import DOMAIN
from homeassistant.components.backup import AgentBackup
from .const import USER_INPUT from .const import USER_INPUT

View File

@ -1,6 +1,6 @@
"""Consts for S3 tests.""" """Consts for AWS S3 tests."""
from homeassistant.components.s3.const import ( from homeassistant.components.aws_s3.const import (
CONF_ACCESS_KEY_ID, CONF_ACCESS_KEY_ID,
CONF_BUCKET, CONF_BUCKET,
CONF_ENDPOINT_URL, CONF_ENDPOINT_URL,

View File

@ -1,4 +1,4 @@
"""Test the S3 backup platform.""" """Test the AWS S3 backup platform."""
from collections.abc import AsyncGenerator from collections.abc import AsyncGenerator
from io import StringIO from io import StringIO
@ -9,19 +9,19 @@ from unittest.mock import AsyncMock, Mock, patch
from botocore.exceptions import ConnectTimeoutError from botocore.exceptions import ConnectTimeoutError
import pytest import pytest
from homeassistant.components.backup import DOMAIN as BACKUP_DOMAIN, AgentBackup from homeassistant.components.aws_s3.backup import (
from homeassistant.components.s3.backup import (
MULTIPART_MIN_PART_SIZE_BYTES, MULTIPART_MIN_PART_SIZE_BYTES,
BotoCoreError, BotoCoreError,
S3BackupAgent, S3BackupAgent,
async_register_backup_agents_listener, async_register_backup_agents_listener,
suggested_filenames, suggested_filenames,
) )
from homeassistant.components.s3.const import ( from homeassistant.components.aws_s3.const import (
CONF_ENDPOINT_URL, CONF_ENDPOINT_URL,
DATA_BACKUP_AGENT_LISTENERS, DATA_BACKUP_AGENT_LISTENERS,
DOMAIN, DOMAIN,
) )
from homeassistant.components.backup import DOMAIN as BACKUP_DOMAIN, AgentBackup
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.backup import async_initialize_backup from homeassistant.helpers.backup import async_initialize_backup
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component
@ -362,7 +362,7 @@ async def test_agents_upload_network_failure(
) )
assert resp.status == 201 assert resp.status == 201
assert "Upload failed for s3" in caplog.text assert "Upload failed for aws_s3" in caplog.text
async def test_agents_download( async def test_agents_download(

View File

@ -1,4 +1,4 @@
"""Test the S3 config flow.""" """Test the AWS S3 config flow."""
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
@ -10,7 +10,7 @@ from botocore.exceptions import (
import pytest import pytest
from homeassistant import config_entries from homeassistant import config_entries
from homeassistant.components.s3.const import CONF_BUCKET, CONF_ENDPOINT_URL, DOMAIN from homeassistant.components.aws_s3.const import CONF_BUCKET, CONF_ENDPOINT_URL, DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType from homeassistant.data_entry_flow import FlowResultType

View File

@ -1,4 +1,4 @@
"""Test the s3 storage integration.""" """Test the AWS S3 storage integration."""
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch