Raw cpus and gpus are a property of the machines an installation has, so a node written against a cluster quietly stops meaning anything when the cluster is replaced. A node says "gpu-small" instead, and what that is stored here — editable, and read again every time the node is built, so changing the flavor changes what the next run gets. Memory joins the schema properly (`ram`, in MB, accepting "2G"), along with `duration_s` for how long a node is expected to take. That one is recorded and shown and nothing else yet: a statement for whoever is planning around the node, not a limit — the limit is still `timeout`. A flavor and a number for the same thing is refused, compared by value so an editor writing the whole object back with its defaults still round-trips. A name nothing stores is refused at the save, which covers the canvas and `fluksio sync` at once, and deleting one a node still asks for says which node. Four sizes are seeded on an installation that has none, and never re-seeded: re-adding one somebody deliberately removed is an argument nobody wins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6HeySA27EkGANZN95QySW
52 lines
1.5 KiB
Python
52 lines
1.5 KiB
Python
from fastapi import APIRouter
|
|
|
|
from fluksio.api.routes import (
|
|
alerts,
|
|
artifacts,
|
|
cloud,
|
|
dashboards,
|
|
flavors,
|
|
flows,
|
|
login,
|
|
messages,
|
|
modules,
|
|
oauth,
|
|
observability,
|
|
panels,
|
|
private,
|
|
runs,
|
|
secrets,
|
|
users,
|
|
utils,
|
|
workers,
|
|
)
|
|
|
|
api_router = APIRouter()
|
|
api_router.include_router(login.router)
|
|
api_router.include_router(users.router)
|
|
api_router.include_router(utils.router)
|
|
api_router.include_router(flavors.router)
|
|
api_router.include_router(flows.router)
|
|
api_router.include_router(flows.ws_router)
|
|
api_router.include_router(secrets.router)
|
|
api_router.include_router(alerts.router)
|
|
api_router.include_router(dashboards.router)
|
|
api_router.include_router(panels.router)
|
|
api_router.include_router(messages.router)
|
|
api_router.include_router(modules.router)
|
|
api_router.include_router(observability.router)
|
|
api_router.include_router(runs.router)
|
|
api_router.include_router(artifacts.router)
|
|
api_router.include_router(workers.router)
|
|
# Remote access through a portal. Always mounted; with no enrolment the
|
|
# endpoints only ever report that there is none.
|
|
api_router.include_router(cloud.router)
|
|
# Always mounted so the generated SDK stays the same shape; the endpoints
|
|
# themselves refuse to work unless MCP is switched on.
|
|
api_router.include_router(oauth.router)
|
|
|
|
|
|
# Always mounted like oauth, so the generated SDK keeps its shape; the
|
|
# endpoints refuse to work unless the private API is explicitly enabled.
|
|
api_router.include_router(private.router)
|