Skip to content

Commit e05df2c

Browse files
Merge pull request #133 from stefan-brus-frequenz/apiv2
Add protobuf definitions for reporting API v2
2 parents ef048fb + c3586f0 commit e05df2c

File tree

4 files changed

+570
-16
lines changed

4 files changed

+570
-16
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
## Summary
44

5-
- The frequenz-api-common dependency has been updated to v0.8.0
6-
- The reporting API now uses v1alpha8 of the common API, which comes with some breaking changes
5+
- The changes introduced in v0.9.0 have been reverted. `frequenz.api.reporting.v1` now serves the `frequenz.api.common.v1` definitions.
6+
- A new protobuf package has been introduced, `frequenz.api.reporting.v1alpha10`, in which the `frequenz.api.common.v1alpha8` adaptations can be found.
77

88
## Upgrading
99

10-
- The `MicrogridComponentIDs` message is now called `MicrogridElectricalComponentIDs`
11-
- The `ComponentData` message is now called `ElectricalComponentTelemetry`
12-
- The `SensorData` message is now called `SensorTelemetry`
10+
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
1311

1412
## New Features
1513

proto/frequenz/api/reporting/v1/reporting.proto

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ package frequenz.api.reporting.v1;
1414

1515
import "google/protobuf/timestamp.proto";
1616

17-
import "frequenz/api/common/v1alpha8/metrics/metrics.proto";
18-
import "frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto";
19-
import "frequenz/api/common/v1alpha8/microgrid/microgrid.proto";
20-
import "frequenz/api/common/v1alpha8/microgrid/sensors/sensors.proto";
17+
import "frequenz/api/common/v1/metrics/metric_sample.proto";
18+
import "frequenz/api/common/v1/microgrid/components/components.proto";
19+
import "frequenz/api/common/v1/microgrid/microgrid.proto";
20+
import "frequenz/api/common/v1/microgrid/sensors/sensors.proto";
2121

2222
// The Reporting service provides services for real-time and historical metrics monitoring
2323
// of various microgrid components like Batteries, EV Chargers, and Inverters.
@@ -132,7 +132,7 @@ message AggregationConfig {
132132
// !!! caution
133133
// Ensure the chosen metric is supported by all relevant microgrid components.
134134
// Failure to meet these conditions might results in an aggregation error.
135-
frequenz.api.common.v1alpha8.metrics.Metric metric = 2;
135+
frequenz.api.common.v1.metrics.Metric metric = 2;
136136

137137
// The formula used for aggregating the component metric for this microgrid.
138138
//
@@ -169,7 +169,7 @@ message SimpleAggregatedMetricValue {
169169

170170
// The aggregated value of the metric.
171171
// float value = 2;
172-
frequenz.api.common.v1alpha8.metrics.SimpleMetricValue sample = 2;
172+
frequenz.api.common.v1.metrics.SimpleMetricValue sample = 2;
173173
}
174174

175175
// Message defining a metric to receive data for, optionally filtering by connections.
@@ -205,7 +205,7 @@ message MetricConnections {
205205
//
206206
// If `connections` are specified, only data for this metric from those connections will be returned.
207207
// If no `connections` are specified, data from all connections for this metric will be returned.
208-
frequenz.api.common.v1alpha8.metrics.Metric metric = 1;
208+
frequenz.api.common.v1.metrics.Metric metric = 1;
209209

210210
// An optional list of connections to filter the data for the specified metric.
211211
//
@@ -279,7 +279,7 @@ message ReceiveMicrogridComponentsDataStreamRequest {
279279
// !!! note
280280
// Each entry in this repeated field associates a microgrid ID with its respective
281281
// component IDs. At least one such association must be provided for a valid request.
282-
repeated frequenz.api.common.v1alpha8.microgrid.MicrogridElectricalComponentIDs microgrid_components = 1;
282+
repeated frequenz.api.common.v1.microgrid.MicrogridComponentIDs microgrid_components = 1;
283283

284284
// List of metrics to receive data for, each possibly with connection filters.
285285
//
@@ -369,7 +369,7 @@ message ReceiveMicrogridComponentsDataStreamResponse {
369369
uint64 microgrid_id = 1;
370370

371371
// List of components within this microgrid, each with its associated data samples.
372-
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.ElectricalComponentTelemetry components = 2;
372+
repeated frequenz.api.common.v1.microgrid.components.ComponentData components = 2;
373373
}
374374

375375
// Message defining the request format for streaming aggregated historical metrics.
@@ -472,7 +472,7 @@ message ReceiveMicrogridSensorsDataStreamRequest {
472472
// !!! note
473473
// Each entry in this repeated field associates a microgrid ID with its respective
474474
// sensor IDs. At least one such association must be provided for a valid request.
475-
repeated frequenz.api.common.v1alpha8.microgrid.MicrogridSensorIDs microgrid_sensors = 1;
475+
repeated frequenz.api.common.v1.microgrid.MicrogridSensorIDs microgrid_sensors = 1;
476476

477477
// List of metrics to receive data for, each possibly with connection filters.
478478
//
@@ -504,7 +504,7 @@ message ReceiveMicrogridSensorsDataStreamResponse {
504504
uint64 microgrid_id = 1;
505505

506506
// List of sensors within this microgrid, each with its associated data samples.
507-
repeated frequenz.api.common.v1alpha8.microgrid.sensors.SensorTelemetry sensors = 2;
507+
repeated frequenz.api.common.v1.microgrid.sensors.SensorData sensors = 2;
508508
}
509509

510510
// Message defining the request format for streaming aggregated historical metrics.

0 commit comments

Comments
 (0)