Replaces LICENSE (GPLv3 -> AGPLv3) and prepends `SPDX-License-Identifier: AGPL-3.0-or-later` to every source file across decnet/, decnet_web/, tests/, scripts/, and tools/. Rationale: closes the GPLv3 ASP loophole so any party operating a modified DECNET as a network service must offer their modified source. Personal copyright (Samuel Paschuan) + inbound=outbound contributions make a future unilateral relicense infeasible. - LICENSE: full AGPL-3.0 text (gnu.org/licenses/agpl-3.0.txt) - COPYRIGHT: project copyright notice - tools/add_spdx_headers.py: idempotent header injector (shebang- and PEP 263-aware) Touches 1565 source files (.py, .ts, .tsx, .js, .jsx, .css, .sh). No behavior change; comments only.
28 lines
1.2 KiB
Python
28 lines
1.2 KiB
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Swarm management endpoints for the React dashboard.
|
|
|
|
These are *not* the unauthenticated /swarm routes mounted on the separate
|
|
swarm-controller process (decnet/web/swarm_api.py on port 8770). These
|
|
live on the main web API, go through ``require_admin``, and are the
|
|
interface the dashboard uses to list hosts, decommission them, list
|
|
deckies across the fleet, and generate one-shot agent-enrollment
|
|
bundles.
|
|
|
|
Mounted under ``/api/v1/swarm`` by the main api router.
|
|
"""
|
|
from fastapi import APIRouter
|
|
|
|
from .api_list_hosts import router as list_hosts_router
|
|
from .api_decommission_host import router as decommission_host_router
|
|
from .api_list_deckies import router as list_deckies_router
|
|
from .api_enroll_bundle import router as enroll_bundle_router
|
|
from .api_teardown_host import router as teardown_host_router
|
|
|
|
swarm_mgmt_router = APIRouter(prefix="/swarm")
|
|
|
|
swarm_mgmt_router.include_router(list_hosts_router)
|
|
swarm_mgmt_router.include_router(decommission_host_router)
|
|
swarm_mgmt_router.include_router(list_deckies_router)
|
|
swarm_mgmt_router.include_router(enroll_bundle_router)
|
|
swarm_mgmt_router.include_router(teardown_host_router)
|