26 lines
804 B
Python
26 lines
804 B
Python
# 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
|