"""Kingsoft Cloud (金山云) driver — archival tenant, no live sync. PingCAP decommissioned 金山云 long ago; the only rows under this provider type are the 541 servers + 13 LBs migrated from the legacy CMDB (``vendor_id=1``). The driver registers the provider so the cloud tenant filter can render "金山云 (历史)" as a real tenant, but there is no test-connection, no config schema, and no capabilities — writes always fail loudly. """ from __future__ import annotations from app.domains.cmdb.providers.ksyun import KSYunProvider from app.integrations.drivers._cloud_shared import _CloudDriverBase from app.integrations.registry import register_driver from app.integrations.schemas import IntegrationTestResult @register_driver class KSYunDriver(_CloudDriverBase): provider = "ksyun" display_name = "金山云 (历史)" description = ( "金山云归档租户 — 仅保留从旧 CMDB 迁入的 541 台服务器 + 13 个负载" "均衡。不支持凭证、不支持同步,只读。" ) provider_cls = KSYunProvider capabilities: list[str] = [] archival = True account_mode = "iam" supports_test_connection = False supports_multi_instance = False config_schema = [] async def test_connection(self) -> IntegrationTestResult: return IntegrationTestResult( ok=False, message="金山云为只读历史归档,不支持连接测试。", detail={"reason": "read_only_archive"}, ) async def list_servers(self): # type: ignore[override] return []