Renamed folder from example -> aggregate

This commit is contained in:
Pascal Scheiben
2025-09-18 10:23:40 +02:00
parent af4b60a0e3
commit 615d290773
10 changed files with 18 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
# contains the business logic for aggregates
from typing import List
from .aggregate_schema import AggregateSchema
async def get_aggregates(metric: str = "relative") -> List[AggregateSchema]:
# Dummy data for demonstration
# You can use the metric parameter to filter or modify results as needed
# For now, just return the same data and show metric usage
print(f"Metric used: {metric}")
aggregates: list = [
AggregateSchema(
aggregate="Aggregate A", node="cluster01-01", available="100.0TB"
),
AggregateSchema(
aggregate="Aggregate B", node="cluster01-01", available="200.5GB"
),
AggregateSchema(
aggregate="Aggregate C", node="cluster01-02", available="300.75MB"
),
]
return aggregates