Renamed folder from example -> aggregate
This commit is contained in:
24
src/aggregate/aggregate_service.py
Normal file
24
src/aggregate/aggregate_service.py
Normal 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
|
||||
Reference in New Issue
Block a user